Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental PR - MOBA Agents #2669

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions ModularTegustation/agent_skills/defensive/hunker_down.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/datum/action/cooldown/hunkerdown_agent
name = "Hunker Down"
desc = "Decrease movespeed and increase defenses for 10 seconds. Costs 10 SP"
icon_icon = 'icons/hud/screen_skills.dmi'
button_icon_state = "hunkerdown"
cooldown_time = 30 SECONDS


/datum/action/cooldown/hunkerdown_agent/Trigger()
. = ..()
if(!.)
return FALSE
if (ishuman(owner))
var/mob/living/carbon/human/human = owner
human.adjustSanityLoss(10)
human.add_movespeed_modifier(/datum/movespeed_modifier/hunkerdown)
addtimer(CALLBACK(human, TYPE_PROC_REF(/mob, remove_movespeed_modifier), /datum/movespeed_modifier/hunkerdown), 10 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
human.physiology.red_mod *= 0.6
human.physiology.white_mod *= 0.6
human.physiology.black_mod *= 0.6
human.physiology.pale_mod *= 0.6
addtimer(CALLBACK(src, PROC_REF(Recall),), 10 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
StartCooldown()

/datum/action/cooldown/hunkerdown_agent/proc/Recall()
var/mob/living/carbon/human/human = owner
human.physiology.red_mod /= 0.6
human.physiology.white_mod /= 0.6
human.physiology.black_mod /= 0.6
human.physiology.pale_mod /= 0.6

31 changes: 31 additions & 0 deletions ModularTegustation/agent_skills/defensive/parry.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/datum/action/cooldown/parry
name = "Parry"
desc = "Parry 90% of damage for 1 second. Immobilize for 3 seconds. Costs 10 SP"
icon_icon = 'icons/hud/screen_skills.dmi'
button_icon_state = "parry"
cooldown_time = 30 SECONDS


/datum/action/cooldown/parry/Trigger()
. = ..()
if(!.)
return FALSE
if (ishuman(owner))
var/mob/living/carbon/human/human = owner
human.adjustSanityLoss(10)
human.physiology.red_mod *= 0.1
human.physiology.white_mod *= 0.1
human.physiology.black_mod *= 0.1
human.physiology.pale_mod *= 0.1
addtimer(CALLBACK(src, PROC_REF(Recall),), 1 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)

human.Immobilize(3 SECONDS)
new /obj/effect/temp_visual/weapon_stun(get_turf(owner))
StartCooldown()

/datum/action/cooldown/parry/proc/Recall()
var/mob/living/carbon/human/human = owner
human.physiology.red_mod /= 0.1
human.physiology.white_mod /= 0.1
human.physiology.black_mod /= 0.1
human.physiology.pale_mod /= 0.1
27 changes: 27 additions & 0 deletions ModularTegustation/agent_skills/healing/healing.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//Curing
/datum/action/cooldown/agent_healing
name = "Healing"
desc = "Heal all humans in a 5 tile radius (except the user) by 15 HP. Costs 10SP"
icon_icon = 'icons/hud/screen_skills.dmi'
button_icon_state = "healing"
cooldown_time = 30 SECONDS
var/healamount = 15

/datum/action/cooldown/agent_healing/Trigger()
. = ..()
if(!.)
return FALSE

if(owner.stat == DEAD)
return FALSE

for(var/mob/living/carbon/human/H in view(5, get_turf(src)))
if(H.stat >= HARD_CRIT)
continue
if(H == owner)
H.adjustSanityLoss(10)
continue
H.adjustBruteLoss(-healamount)
new /obj/effect/temp_visual/heal(get_turf(H), "#FF4444")
StartCooldown()

27 changes: 27 additions & 0 deletions ModularTegustation/agent_skills/healing/soothing.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//Curing
/datum/action/cooldown/agent_soothing
name = "Soothing"
desc = "Heal all humans in a 5 tile radius (except the user) by 15 HP. Costs 10SP"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
desc = "Heal all humans in a 5 tile radius (except the user) by 15 HP. Costs 10SP"
desc = "Heal all humans in a 5 tile radius (except the user) by 15 SP. Costs 10SP"

icon_icon = 'icons/hud/screen_skills.dmi'
button_icon_state = "soothing"
cooldown_time = 30 SECONDS
var/healamount = 15

/datum/action/cooldown/agent_soothing/Trigger()
. = ..()
if(!.)
return FALSE

if(owner.stat == DEAD)
return FALSE

for(var/mob/living/carbon/human/H in view(5, get_turf(src)))
if(H.stat >= HARD_CRIT)
continue
if(H == owner)
H.adjustSanityLoss(10)
continue
H.adjustSanityLoss(-healamount) //Healing for those around.
new /obj/effect/temp_visual/heal(get_turf(H), "#6E6EFF")
StartCooldown()

20 changes: 20 additions & 0 deletions ModularTegustation/agent_skills/ranged/autoloader.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/datum/action/cooldown/autoloader
name = "Autoloader"
desc = "Reload all guns on the user. Costs 10 SP"
icon_icon = 'icons/hud/screen_skills.dmi'
button_icon_state = "autoload"
cooldown_time = 30 SECONDS


/datum/action/cooldown/autoloader/Trigger()
. = ..()
if (owner.stat == DEAD)
return FALSE

if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.adjustSanityLoss(10)
playsound(H, 'sound/weapons/gun/general/bolt_rack.ogg', 50, TRUE)
for(var/obj/item/ego_weapon/ranged/Gun in H.contents)
Gun.shotsleft = initial(Gun.shotsleft)
StartCooldown()
32 changes: 32 additions & 0 deletions ModularTegustation/agent_skills/ranged/grenade.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

/datum/action/cooldown/grenade
name = "Grenade Spawn"
desc = "Create a grenade that blows up after 15 seconds. Costs 10SP"
icon_icon = 'icons/hud/screen_skills.dmi'
button_icon_state = "smokedash"
cooldown_time = 20 SECONDS

/datum/action/cooldown/grenade/Trigger()
. = ..()
if(!.)
return FALSE

if (owner.stat == DEAD)
return FALSE

if(!ishuman(owner))
return FALSE

var/mob/living/carbon/human/user = owner
user.adjustSanityLoss(10)

var/obj/item/grenade/r_corp/F = new /obj/item/grenade/r_corp/lcorp(get_turf(user))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var/obj/item/grenade/r_corp/F = new /obj/item/grenade/r_corp/lcorp(get_turf(user))
var/obj/item/grenade/r_corp/lcorp/F = new(get_turf(user))

F.explosion_damage_type = pick(RED_DAMAGE, BLACK_DAMAGE, WHITE_DAMAGE)
F.explosion_damage = get_attribute_level(user, JUSTICE_ATTRIBUTE)*2
user.equip_in_one_of_slots(F, ITEM_SLOT_HANDS , qdel_on_fail = TRUE)
StartCooldown()

//This is only used by the grenade launcher ability
/obj/item/grenade/r_corp/lcorp
name = "l-corp grenade"
desc = "An anti-abnormality grenade. It deals 90% less damage to humans."
31 changes: 31 additions & 0 deletions ModularTegustation/agent_skills/ranged/grenade_launcher.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/obj/effect/proc_holder/ability/aimed/grenade_launcher
name = "Grenade Launcher"
desc = "Use a gun in hand to fire a grenade. Damage type and amount is based off the gun's damage and type. Costs 10 SP"
action_icon_state = "cross_spawn0"
base_icon_state = "cross_spawn"
cooldown_time = 20 SECONDS

/obj/effect/proc_holder/ability/aimed/grenade_launcher/Perform(target, mob/user)
if(ishuman(user))
var/mob/living/carbon/human/shooter = user
H.adjustSanityLoss(10)

var/list/gunsinhand = list()
for(var/obj/item/ego_weapon/ranged/Gun in shooter.held_items)
gunsinhand+=Gun
if(!LAZYLEN(gunsinhand))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use length() instead of LAZYLEN when not working with lazy lists for clarity please

Suggested change
if(!LAZYLEN(gunsinhand))
if(!LAZYLEN(gunsinhand))

return ..()

var/obj/item/ego_weapon/ranged/chosengun = pick(gunsinhand)
var/grenadedamage = chosengun.last_projectile_type

var/obj/item/grenade/r_corp/F = new /obj/item/grenade/r_corp/lcorp
F.explosion_damage_type = grenadedamage
F.explosion_damage = chosengun.last_projectile_damage*3
F.forceMove(user.loc)
F.throw_at(target, 30, 2, user)

//This is only used by the grenade launcher ability
/obj/item/grenade/r_corp/lcorp
name = "l-corp grenade"
desc = "An anti-abnormality grenade. It deals 90% less damage to humans."
28 changes: 28 additions & 0 deletions ModularTegustation/agent_skills/ranged/smokedash.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//Smokedash
/datum/action/cooldown/agent_smokedash
name = "Smoke bomb"
desc = "Drop a smoke bomb at your feet, and increase speed for 2 seconds. Costs 10SP"
icon_icon = 'icons/hud/screen_skills.dmi'
button_icon_state = "smokedash"
cooldown_time = 30 SECONDS

/datum/action/cooldown/agent_smokedash/Trigger()
. = ..()
if(!.)
return FALSE

if (owner.stat == DEAD)
return FALSE

//increase speed
var/mob/living/carbon/human/human = owner
human.adjustSanityLoss(10)
human.add_movespeed_modifier(/datum/movespeed_modifier/assault)
addtimer(CALLBACK(human, TYPE_PROC_REF(/mob, remove_movespeed_modifier), /datum/movespeed_modifier/assault), 2 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)

//drop a bit of smoke
var/datum/effect_system/smoke_spread/S = new
S.set_up(4, get_turf(human)) //Make the smoke bigger
S.start()
qdel(S)
StartCooldown()
81 changes: 81 additions & 0 deletions ModularTegustation/agent_skills/skill_chooser.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/obj/item/class_chooser
name = "L-Corp agent class chooser accelerator"
desc = "A device used to choose your agent class."
icon = 'icons/obj/device.dmi'
icon_state = "nanite_comm_remote"

/obj/item/class_chooser/Initialize()
. = ..()
QDEL_IN(src, 60 SECONDS) //You MUST pick within 60 seconds

/obj/item/class_chooser/attack_self(mob/living/carbon/human/user)
//Let you pick your agent class
var/list/can_class = list(
//Only Agents specifically and Dept Captains get this.
//Might be good for Interns to not have this option
//Captains belong to the "Command" Class
"Agent",
"Department Captain",
)

if(!(user?.mind?.assigned_role in can_class))
return ..()


var/list/classes = list( //Classes that aren't standard or Random
"Defensive",
"Healing",
"Ranged",
)

var/list/available_classes = list(
"Standard",
//"Random", Currently bugged
)

for(var/i in 1 to 3) //You should only get to pick 1-3 of these.
var/random_add = pick(classes)
available_classes += random_add
classes -= random_add

qdel(src)//Delete it here so you can't re-roll your class.

var/choice = input(user, "Which Agent class will you choose?", "Select a class") as null|anything in available_classes
if(!choice || !user.canUseTopic(get_turf(user), BE_CLOSE, FALSE, NO_TK))
to_chat(user, span_notice("You decide to choose the 'Standard' class."))
return

classes-= "Random"
if(choice == "Random")
choice = pick(classes)

switch(choice)
if("Defensive")
to_chat(user, span_greenannounce("You have chosen the Defensive Agent class. In exchange for -10 Work rate and speed, you get 2 Defensive skills."))
user.adjust_attribute_bonus(TEMPERANCE_ATTRIBUTE, -10)

var/datum/action/G = new /datum/action/cooldown/hunkerdown_agent
G.Grant(user)
G = new /datum/action/cooldown/parry
G.Grant(user)

if("Healing")
to_chat(user, span_greenannounce("You have chosen the Healing Agent class. In exchange for -10 melee damage and movement speed, you get 2 Healing skills."))
user.adjust_attribute_bonus(JUSTICE_ATTRIBUTE, -10)

var/datum/action/G = new /datum/action/cooldown/agent_healing
G.Grant(user)
G = new /datum/action/cooldown/agent_soothing
G.Grant(user)

if("Ranged")
to_chat(user, span_greenannounce("You have chosen the Ranged Agent class. In exchange for 20% slower melee, you get a movement skill, a gun skill, and all guns scale justice 50%."))
ADD_TRAIT(user, TRAIT_WEAK_MELEE, JOB_TRAIT)
ADD_TRAIT(user, TRAIT_BETTER_GUNS, JOB_TRAIT)

var/datum/action/G = new /datum/action/cooldown/agent_smokedash
G.Grant(user)
G = new /datum/action/cooldown/autoloader
G.Grant(user)

return ..()
7 changes: 7 additions & 0 deletions ModularTegustation/ego_weapons/_ego_weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@
if(!CanUseEgo(user))
return FALSE
. = ..()
if(HAS_TRAIT(user, TRAIT_WEAK_MELEE))
if(!attack_speed)
user.changeNext_move(CLICK_CD_MELEE * 1.2)
else
user.changeNext_move(CLICK_CD_MELEE * attack_speed*1.2)
return TRUE

if(attack_speed)
user.changeNext_move(CLICK_CD_MELEE * attack_speed)
return TRUE
Expand Down
4 changes: 4 additions & 0 deletions ModularTegustation/ego_weapons/ranged/_ranged_projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
projectile.suppressed = quiet

projectile.damage *= projectile_damage_multiplier

if(HAS_TRAIT(user, TRAIT_BETTER_GUNS))
projectile.damage += projectile.damage*get_attribute_level(user, JUSTICE_ATTRIBUTE)/130*0.50

if(temporary_damage_multiplier)
projectile.damage *= temporary_damage_multiplier

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_WORK_KNOWLEDGE "work_knowledge"
#define TRAIT_WORK_FORBIDDEN "work_forbidden"
#define TRAIT_ATTRIBUTES_VISION "attributes_vision"
#define TRAIT_WEAK_MELEE "weak_melee"
#define TRAIT_BETTER_GUNS "better_guns"
/// reduces the use time of syringes, pills, patches and medigels but only when using on someone
#define TRAIT_FASTMED "fast_med_use"
#define TRAIT_NOBREATH "no_breath"
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_WORK_KNOWLEDGE" = TRAIT_WORK_KNOWLEDGE,
"TRAIT_WORK_FORBIDDEN" = TRAIT_WORK_FORBIDDEN,
"TRAIT_ATTRIBUTES_VISION" = TRAIT_ATTRIBUTES_VISION,
"TRAIT_WEAK_MELEE" = TRAIT_WEAK_MELEE,
"TRAIT_BETTER_GUNS" = TRAIT_BETTER_GUNS,
"TRAIT_NOBREATH" = TRAIT_NOBREATH,
"TRAIT_ANTIMAGIC" = TRAIT_ANTIMAGIC,
"TRAIT_HOLY" = TRAIT_HOLY,
Expand Down
4 changes: 2 additions & 2 deletions code/modules/jobs/job_types/agent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@
if(istype(processing, /datum/job/suppression/captain))
processing.total_positions = 1

return ..()


/datum/outfit/job/agent
name = "Agent"
Expand All @@ -134,6 +132,7 @@
shoes = /obj/item/clothing/shoes/laceup
gloves = /obj/item/clothing/gloves/color/black
implants = list(/obj/item/organ/cyberimp/eyes/hud/security)
l_hand = /obj/item/class_chooser

backpack_contents = list(
/obj/item/melee/classic_baton,
Expand Down Expand Up @@ -164,6 +163,7 @@
name = "Agent Intern"
jobtype = /datum/job/agent/intern
head = null
l_hand = null

backpack_contents = list(
/obj/item/melee/classic_baton,
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/captain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
head = /obj/item/clothing/head/hos/beret
ears = /obj/item/radio/headset/heads/agent_captain/alt
l_pocket = /obj/item/commandprojector
l_hand = null

backpack_contents = list(
/obj/item/melee/classic_baton,
Expand Down
Binary file modified icons/hud/screen_skills.dmi
Binary file not shown.
Loading
Loading