From 56e40a520c8bb5dee92e64171ff7615a2c91bdfc Mon Sep 17 00:00:00 2001 From: Kirie Saito <77302679+Kitsunemitsu@users.noreply.github.com> Date: Mon, 6 Jan 2025 01:02:22 -0500 Subject: [PATCH] update --- .../agent_skills/healing/healing.dm | 2 +- .../agent_skills/healing/soothing.dm | 2 +- .../agent_skills/ranged/autoloader.dm | 6 +++- .../agent_skills/ranged/grenade.dm | 32 +++++++++++++++++++ code/modules/jobs/job_types/agent.dm | 8 +++-- 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 ModularTegustation/agent_skills/ranged/grenade.dm diff --git a/ModularTegustation/agent_skills/healing/healing.dm b/ModularTegustation/agent_skills/healing/healing.dm index e4cfc0d7bf91..a0131c8514c8 100644 --- a/ModularTegustation/agent_skills/healing/healing.dm +++ b/ModularTegustation/agent_skills/healing/healing.dm @@ -22,6 +22,6 @@ H.adjustSanityLoss(10) continue H.adjustBruteLoss(-healamount) - new /obj/effect/temp_visual/heal(get_turf(H), "#E2ED4A") + new /obj/effect/temp_visual/heal(get_turf(H), "#FF4444") StartCooldown() diff --git a/ModularTegustation/agent_skills/healing/soothing.dm b/ModularTegustation/agent_skills/healing/soothing.dm index 2b87fbb35ce6..35266fd953e7 100644 --- a/ModularTegustation/agent_skills/healing/soothing.dm +++ b/ModularTegustation/agent_skills/healing/soothing.dm @@ -22,6 +22,6 @@ H.adjustSanityLoss(10) continue H.adjustSanityLoss(-healamount) //Healing for those around. - new /obj/effect/temp_visual/heal(get_turf(H), "#E2ED4A") + new /obj/effect/temp_visual/heal(get_turf(H), "#6E6EFF") StartCooldown() diff --git a/ModularTegustation/agent_skills/ranged/autoloader.dm b/ModularTegustation/agent_skills/ranged/autoloader.dm index d0717464d622..eebc8730f038 100644 --- a/ModularTegustation/agent_skills/ranged/autoloader.dm +++ b/ModularTegustation/agent_skills/ranged/autoloader.dm @@ -7,10 +7,14 @@ /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() diff --git a/ModularTegustation/agent_skills/ranged/grenade.dm b/ModularTegustation/agent_skills/ranged/grenade.dm new file mode 100644 index 000000000000..a419a9c24933 --- /dev/null +++ b/ModularTegustation/agent_skills/ranged/grenade.dm @@ -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)) + 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." diff --git a/code/modules/jobs/job_types/agent.dm b/code/modules/jobs/job_types/agent.dm index 695596922bda..074540a6b1eb 100644 --- a/code/modules/jobs/job_types/agent.dm +++ b/code/modules/jobs/job_types/agent.dm @@ -141,10 +141,12 @@ "Random", ) - for(var/i in 1 to 3) - available_classes += pick(classes) + 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 - var/choice = input(M, "Which Agent class will you choose?", "Select a class") as null|anything in classes + var/choice = input(M, "Which Agent class will you choose?", "Select a class") as null|anything in available_classes if(!choice || !M.canUseTopic(get_turf(M), BE_CLOSE, FALSE, NO_TK)) to_chat(M, span_notice("You decide to choose the 'Standard' class.")) return