Nerfs and buffs The Traps
This commit is contained in:
@@ -253,7 +253,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
|
||||
|
||||
|
||||
|
||||
@@ -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, "<span class='notice'>You reveal [src]!</span>")
|
||||
flare()
|
||||
@@ -41,10 +45,15 @@
|
||||
// Makes the trap visible, and starts the cooldown until it's
|
||||
// able to be triggered again.
|
||||
visible_message("<span class='warning'>[src] flares brightly!</span>")
|
||||
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)
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user