From df91d2dcb0c09b2072e1084c24b0297acb7ec8a3 Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Tue, 25 Apr 2017 00:44:25 +0100 Subject: [PATCH] Nerfs and buffs The Traps :cl: coiax balance: Wizard traps automatically disappear five minutes after being summoned. balance: Wizard traps disappear after firing, whether triggered via person or something being thrown across it. balance: Wizards are immune to their own traps. tweak: The Traps are now marked as a Defensive spell, rather than an Offensive spell. /:cl: So a permament structure that has to be beaten down in order to remove isn't really fun in the long term. So instead, they fire once, and then disappear. They also disappear after a bit, so they're not long term hazards, but they do stick around long enough so the wizard can feel comfortable running back into an area they've already trapped, for that AREA CONTROL. --- code/game/gamemodes/wizard/spellbook.dm | 2 +- code/game/objects/structures/traps.dm | 23 ++++++++++++++++---- code/modules/spells/spell_types/conjure.dm | 5 +++++ code/modules/spells/spell_types/the_traps.dm | 11 ++++++---- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index fbd9130594c..02b8d8d01e9 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -252,7 +252,7 @@ /datum/spellbook_entry/the_traps name = "The Traps!" spell_type = /obj/effect/proc_holder/spell/aoe_turf/conjure/the_traps - category = "Offensive" + category = "Defensive" cost = 1 diff --git a/code/game/objects/structures/traps.dm b/code/game/objects/structures/traps.dm index 90500f14db7..dad4e9b53e1 100644 --- a/code/game/objects/structures/traps.dm +++ b/code/game/objects/structures/traps.dm @@ -8,8 +8,10 @@ alpha = 30 //initially quite hidden when not "recharging" var/last_trigger = 0 var/time_between_triggers = 600 //takes a minute to recharge + var/charges = INFINITY var/list/static/ignore_typecache + var/list/mob/immune_minds = list() var/datum/effect_system/spark_spread/spark_system @@ -30,9 +32,11 @@ . = ..() /obj/structure/trap/examine(mob/user) - ..() + . = ..() if(!isliving(user)) return + if(user.mind && user.mind in immune_minds) + return if(get_dist(user, src) <= 1) to_chat(user, "You reveal [src]!") flare() @@ -41,10 +45,15 @@ // Makes the trap visible, and starts the cooldown until it's // able to be triggered again. visible_message("[src] flares brightly!") - alpha = 200 - animate(src, alpha = initial(alpha), time = time_between_triggers) - last_trigger = world.time spark_system.start() + alpha = 200 + last_trigger = world.time + charges-- + if(charges <= 0) + animate(src, alpha = 0, time = 10) + QDEL_IN(src, 10) + else + animate(src, alpha = initial(alpha), time = time_between_triggers) /obj/structure/trap/Crossed(atom/movable/AM) if(last_trigger + time_between_triggers > world.time) @@ -52,6 +61,12 @@ // Don't want the traps triggered by sparks, ghosts or projectiles. if(is_type_in_typecache(AM, ignore_typecache)) return + if(ismob(AM)) + var/mob/M = AM + if(M.mind in immune_minds) + return + if(charges <= 0) + return flare() if(isliving(AM)) trap_effect(AM) diff --git a/code/modules/spells/spell_types/conjure.dm b/code/modules/spells/spell_types/conjure.dm index 4a28a220762..dfde331207a 100644 --- a/code/modules/spells/spell_types/conjure.dm +++ b/code/modules/spells/spell_types/conjure.dm @@ -42,6 +42,11 @@ if(summon_lifespan) QDEL_IN(summoned_object, summon_lifespan) + post_summon(summoned_object, user) + +/obj/effect/proc_holder/spell/aoe_turf/conjure/proc/post_summon(atom/summoned_object, mob/user) + return + /obj/effect/proc_holder/spell/aoe_turf/conjure/summonEdSwarm //test purposes - Also a lot of fun name = "Dispense Wizard Justice" desc = "This spell dispenses wizard justice." diff --git a/code/modules/spells/spell_types/the_traps.dm b/code/modules/spells/spell_types/the_traps.dm index ca3da766172..169a38bb957 100644 --- a/code/modules/spells/spell_types/the_traps.dm +++ b/code/modules/spells/spell_types/the_traps.dm @@ -3,7 +3,7 @@ desc = "Summon a number of traps to confuse and weaken your enemies, and possibly you." charge_max = 250 - cooldown_min = 100 + cooldown_min = 50 clothes_req = 1 invocation = "CAVERE INSIDIAS" @@ -14,10 +14,13 @@ /obj/structure/trap/stun, /obj/structure/trap/fire, /obj/structure/trap/chill, - /obj/structure/trap/damage, - /obj/structure/swarmer/trap + /obj/structure/trap/damage ) - summon_lifespan = 0 + summon_lifespan = 3000 summon_amt = 5 action_icon_state = "the_traps" + +/obj/effect/proc_holder/spell/aoe_turf/conjure/the_traps/post_summon(obj/structure/trap/T, mob/user) + T.immune_minds += user.mind + T.charges = 1