diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index 8596b5267fe..29fe4dfd7ed 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -41,6 +41,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/spell_level = 0 //if a spell can be taken multiple times, this raises
var/level_max = 4 //The max possible level_max is 4
var/cooldown_min = 0 //This defines what spell quickened four times has as a cooldown. Make sure to set this for every spell
+ var/player_lock = 1 //If it can be used by simple mobs
var/overlay = 0
var/overlay_icon = 'icons/obj/wizard.dmi'
@@ -62,9 +63,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
- if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list))
- user << "You shouldn't have this spell! Something's wrong."
- return 0
+ if(player_lock)
+ if(!user.mind || !(src in user.mind.spell_list) && !(src in user.mob_spell_list))
+ user << "You shouldn't have this spell! Something's wrong."
+ return 0
+ else
+ if(!(src in user.mob_spell_list))
+ return 0
if(user.z == ZLEVEL_CENTCOM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
return 0
@@ -170,8 +175,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1, mob/user = usr) //if recharge is started is important for the trigger spells
before_cast(targets)
- invocation()
- user.attack_log += text("\[[time_stamp()]\] [user.real_name] ([user.ckey]) cast the spell [name].")
+ invocation(user)
+ if(user.ckey)
+ user.attack_log += text("\[[time_stamp()]\] [user.real_name] ([user.ckey]) cast the spell [name].")
spawn(0)
if(charge_type == "recharge" && recharge)
start_recharge()
@@ -180,7 +186,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(prob(critfailchance))
critfail(targets)
else
- cast(targets)
+ cast(targets,user=user)
after_cast(targets)
/obj/effect/proc_holder/spell/proc/before_cast(list/targets)
@@ -227,7 +233,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
smoke.start()
-/obj/effect/proc_holder/spell/proc/cast(list/targets)
+/obj/effect/proc_holder/spell/proc/cast(list/targets,mob/user = usr)
return
/obj/effect/proc_holder/spell/proc/critfail(list/targets)
@@ -334,7 +340,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
revert_cast(user)
return
- perform(targets)
+ perform(targets,user=user)
return
@@ -349,7 +355,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
revert_cast()
return
- perform(targets)
+ perform(targets,user=user)
return
@@ -418,7 +424,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(!user)
revert_cast()
return
- perform(user)
+ perform(null,user=user)
/obj/effect/proc_holder/spell/self/basic_heal //This spell exists mainly for debugging purposes, and also to show how casting works
name = "Lesser Heal"
diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm
index 49f19c3a23f..8497a05007a 100644
--- a/code/datums/spells/area_teleport.dm
+++ b/code/datums/spells/area_teleport.dm
@@ -32,8 +32,8 @@
return thearea
-/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea)
- playsound(get_turf(usr), sound1, 50,1)
+/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea,mob/user = usr)
+ playsound(get_turf(user), sound1, 50,1)
for(var/mob/living/target in targets)
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
@@ -67,22 +67,22 @@
if(!success)
target.loc = pick(L)
- playsound(get_turf(usr), sound2, 50,1)
+ playsound(get_turf(user), sound2, 50,1)
return
-/obj/effect/proc_holder/spell/targeted/area_teleport/invocation(area/chosenarea = null)
+/obj/effect/proc_holder/spell/targeted/area_teleport/invocation(area/chosenarea = null,mob/user = usr)
if(!invocation_area || !chosenarea)
..()
else
switch(invocation_type)
if("shout")
- usr.say("[invocation] [uppertext(chosenarea.name)]")
- if(usr.gender==MALE)
- playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
+ user.say("[invocation] [uppertext(chosenarea.name)]")
+ if(user.gender==MALE)
+ playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
else
- playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
+ playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
if("whisper")
- usr.whisper("[invocation] [uppertext(chosenarea.name)]")
+ user.whisper("[invocation] [uppertext(chosenarea.name)]")
return
diff --git a/code/datums/spells/charge.dm b/code/datums/spells/charge.dm
index 0c7c2800b2b..0b7ba942075 100644
--- a/code/datums/spells/charge.dm
+++ b/code/datums/spells/charge.dm
@@ -12,9 +12,9 @@
include_user = 1
-/obj/effect/proc_holder/spell/targeted/charge/cast(list/targets)
- for(var/mob/living/user in targets)
- var/list/hand_items = list(user.get_active_hand(),user.get_inactive_hand())
+/obj/effect/proc_holder/spell/targeted/charge/cast(list/targets,mob/user = usr)
+ for(var/mob/living/L in targets)
+ var/list/hand_items = list(L.get_active_hand(),L.get_inactive_hand())
var/charged_item = null
var/burnt_out = 0
for(var/obj/item in hand_items)
@@ -38,15 +38,15 @@
if(istype(item, /obj/item/weapon/spellbook/oneuse))
var/obj/item/weapon/spellbook/oneuse/I = item
if(prob(80))
- user.visible_message("[I] catches fire!")
+ L.visible_message("[I] catches fire!")
qdel(I)
else
I.used = 0
charged_item = I
break
else
- user << "Glowing red letters appear on the front cover..."
- user << "[pick("NICE TRY BUT NO!","CLEVER BUT NOT CLEVER ENOUGH!", "SUCH FLAGRANT CHEESING IS WHY WE ACCEPTED YOUR APPLICATION!", "CUTE!", "YOU DIDN'T THINK IT'D BE THAT EASY, DID YOU?")]"
+ L << "Glowing red letters appear on the front cover..."
+ L << "[pick("NICE TRY BUT NO!","CLEVER BUT NOT CLEVER ENOUGH!", "SUCH FLAGRANT CHEESING IS WHY WE ACCEPTED YOUR APPLICATION!", "CUTE!", "YOU DIDN'T THINK IT'D BE THAT EASY, DID YOU?")]"
burnt_out = 1
else if(istype(item, /obj/item/weapon/gun/magic))
var/obj/item/weapon/gun/magic/I = item
@@ -86,9 +86,9 @@
charged_item = item
break
if(!charged_item)
- user << "you feel magical power surging to your hands, but the feeling rapidly fades..."
+ L << "you feel magical power surging to your hands, but the feeling rapidly fades..."
else if(burnt_out)
- user << "[charged_item] doesn't seem to be reacting to the spell..."
+ L << "[charged_item] doesn't seem to be reacting to the spell..."
else
- playsound(get_turf(usr), "sound/magic/Charge.ogg", 50, 1)
- user << "[charged_item] suddenly feels very warm!"
+ playsound(get_turf(L), "sound/magic/Charge.ogg", 50, 1)
+ L << "[charged_item] suddenly feels very warm!"
diff --git a/code/datums/spells/conjure.dm b/code/datums/spells/conjure.dm
index 82320dbc4ca..c6d5f24bf8f 100644
--- a/code/datums/spells/conjure.dm
+++ b/code/datums/spells/conjure.dm
@@ -15,8 +15,8 @@
var/cast_sound = 'sound/items/welder.ogg'
-/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets)
- playsound(get_turf(usr), cast_sound, 50,1)
+/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets,mob/user = usr)
+ playsound(get_turf(user), cast_sound, 50,1)
for(var/turf/T in targets)
if(T.density && !summon_ignore_density)
targets -= T
diff --git a/code/datums/spells/dumbfire.dm b/code/datums/spells/dumbfire.dm
index 66b0dfbe183..38a42ccb037 100644
--- a/code/datums/spells/dumbfire.dm
+++ b/code/datums/spells/dumbfire.dm
@@ -22,13 +22,13 @@
/obj/effect/proc_holder/spell/dumbfire/choose_targets(mob/user = usr)
- var/turf/T = get_turf(usr)
+ var/turf/T = get_turf(user)
for(var/i = 1; i < range; i++)
- var/turf/new_turf = get_step(T, usr.dir)
+ var/turf/new_turf = get_step(T, user.dir)
if(new_turf.density)
break
T = new_turf
- perform(list(T))
+ perform(list(T),user = user)
/obj/effect/proc_holder/spell/dumbfire/cast(list/targets, mob/user = usr)
playMagSound()
@@ -46,7 +46,7 @@
projectile.dir = get_dir(projectile, target)
projectile.name = proj_name
- var/current_loc = usr.loc
+ var/current_loc = user.loc
projectile.loc = current_loc
@@ -60,12 +60,12 @@
step(projectile, projectile.dir)
if(projectile.loc == current_loc || i == proj_lifespan)
- projectile.cast(current_loc)
+ projectile.cast(current_loc,user=user)
break
- var/mob/living/L = locate(/mob/living) in range(projectile, proj_trigger_range) - usr
+ var/mob/living/L = locate(/mob/living) in range(projectile, proj_trigger_range) - user
if(L && L.stat != DEAD)
- projectile.cast(L.loc)
+ projectile.cast(L.loc,user=user)
break
if(proj_trail && projectile)
diff --git a/code/datums/spells/emplosion.dm b/code/datums/spells/emplosion.dm
index ce92204f70b..4004237e7fd 100644
--- a/code/datums/spells/emplosion.dm
+++ b/code/datums/spells/emplosion.dm
@@ -8,8 +8,8 @@
action_icon_state = "emp"
sound = "sound/weapons/ZapBang.ogg"
-/obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets)
- playsound(get_turf(usr), sound, 50,1)
+/obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets,mob/user = usr)
+ playsound(get_turf(user), sound, 50,1)
for(var/mob/living/target in targets)
empulse(target.loc, emp_heavy, emp_light)
diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm
index 3fd6266d19c..bb0a0d7b8c6 100644
--- a/code/datums/spells/ethereal_jaunt.dm
+++ b/code/datums/spells/ethereal_jaunt.dm
@@ -15,8 +15,8 @@
var/jaunt_duration = 50 //in deciseconds
action_icon_state = "jaunt"
-/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded
- playsound(get_turf(usr), 'sound/magic/Ethereal_Enter.ogg', 50, 1, -1)
+/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets,mob/user = usr) //magnets, so mostly hardcoded
+ playsound(get_turf(user), 'sound/magic/Ethereal_Enter.ogg', 50, 1, -1)
for(var/mob/living/target in targets)
target.notransform = 1 //protects the mob from being transformed (replaced) midjaunt and getting stuck in bluespace
spawn(0)
@@ -50,7 +50,7 @@
jaunt_steam(mobloc)
target.canmove = 0
holder.reappearing = 1
- playsound(get_turf(usr), 'sound/magic/Ethereal_Exit.ogg', 50, 1, -1)
+ playsound(get_turf(user), 'sound/magic/Ethereal_Exit.ogg', 50, 1, -1)
sleep(20)
jaunt_reappear(animation, target)
sleep(5)
diff --git a/code/datums/spells/explosion.dm b/code/datums/spells/explosion.dm
index 7bb7195c2dd..def7db816f2 100644
--- a/code/datums/spells/explosion.dm
+++ b/code/datums/spells/explosion.dm
@@ -7,7 +7,7 @@
var/ex_light = 3
var/ex_flash = 4
-/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets,mob/user = usr)
for(var/mob/living/target in targets)
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
diff --git a/code/datums/spells/genetic.dm b/code/datums/spells/genetic.dm
index 969372b1203..575ab6767ae 100644
--- a/code/datums/spells/genetic.dm
+++ b/code/datums/spells/genetic.dm
@@ -15,7 +15,7 @@
6th bit - ?
*/
-/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets,mob/user = usr)
playMagSound()
for(var/mob/living/carbon/target in targets)
if(!target.dna)
diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm
index e82d3ce2003..fe91ace65a7 100644
--- a/code/datums/spells/inflict_handler.dm
+++ b/code/datums/spells/inflict_handler.dm
@@ -19,7 +19,7 @@
var/summon_type = null //this will put an obj at the target's location
-/obj/effect/proc_holder/spell/targeted/inflict_handler/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/inflict_handler/cast(list/targets,mob/user = usr)
for(var/mob/living/target in targets)
playsound(target,sound, 50,1)
diff --git a/code/datums/spells/knock.dm b/code/datums/spells/knock.dm
index 6b772162c7b..647c6a5d7f7 100644
--- a/code/datums/spells/knock.dm
+++ b/code/datums/spells/knock.dm
@@ -12,8 +12,8 @@
action_icon_state = "knock"
-/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets)
- usr << sound("sound/magic/Knock.ogg")
+/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets,mob/user = usr)
+ user << sound("sound/magic/Knock.ogg")
for(var/turf/T in targets)
for(var/obj/machinery/door/door in T.contents)
spawn(1)
diff --git a/code/datums/spells/lichdom.dm b/code/datums/spells/lichdom.dm
index ca80db2b644..0e1042a8d1e 100644
--- a/code/datums/spells/lichdom.dm
+++ b/code/datums/spells/lichdom.dm
@@ -34,35 +34,35 @@
ticker.mode.round_ends_with_antag_death = 1
..()
-/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets)
- for(var/mob/user in targets)
+/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets,mob/user = usr)
+ for(var/mob/M in targets)
var/list/hand_items = list()
- if(iscarbon(user))
- hand_items = list(user.get_active_hand(),user.get_inactive_hand())
+ if(iscarbon(M))
+ hand_items = list(M.get_active_hand(),M.get_inactive_hand())
if(marked_item && !stat_allowed) //sanity, shouldn't happen without badminry
marked_item = null
return
if(stat_allowed) //Death is not my end!
- if(user.stat == CONSCIOUS && iscarbon(user))
- user << "You aren't dead enough to revive!" //Usually a good problem to have
+ if(M.stat == CONSCIOUS && iscarbon(M))
+ M << "You aren't dead enough to revive!" //Usually a good problem to have
charge_counter = charge_max
return
if(!marked_item || qdeleted(marked_item)) //Wait nevermind
- user << "Your phylactery is gone!"
+ M << "Your phylactery is gone!"
return
- var/turf/user_turf = get_turf(user)
+ var/turf/user_turf = get_turf(M)
var/turf/item_turf = get_turf(marked_item)
if(user_turf.z != item_turf.z)
- user << "Your phylactery is out of range!"
+ M << "Your phylactery is out of range!"
return
- if(isobserver(user))
- var/mob/dead/observer/O = user
+ if(isobserver(M))
+ var/mob/dead/observer/O = M
O.reenter_corpse()
var/mob/living/carbon/human/lich = new /mob/living/carbon/human(item_turf)
@@ -72,8 +72,8 @@
lich.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(lich), slot_wear_suit)
lich.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(lich), slot_head)
- lich.real_name = user.mind.name
- user.mind.transfer_to(lich)
+ lich.real_name = M.mind.name
+ M.mind.transfer_to(lich)
lich.hardset_dna(null,null,lich.real_name,null,/datum/species/skeleton)
lich << "Your bones clatter and shutter as they're pulled back into this world!"
charge_max += 600
@@ -99,15 +99,15 @@
if(ABSTRACT in item.flags || NODROP in item.flags)
continue
marked_item = item
- user << "You begin to focus your very being into the [item.name]..."
+ M << "You begin to focus your very being into the [item.name]..."
break
if(!marked_item)
- user << "You must hold an item you wish to make your phylactery..."
+ M << "You must hold an item you wish to make your phylactery..."
spawn(50)
- if(marked_item.loc != user) //I changed my mind I don't want to put my soul in a cheeseburger!
- user << "Your soul snaps back to your body as you drop the [marked_item.name]!"
+ if(marked_item.loc != M) //I changed my mind I don't want to put my soul in a cheeseburger!
+ M << "Your soul snaps back to your body as you drop the [marked_item.name]!"
marked_item = null
return
name = "RISE!"
@@ -118,11 +118,11 @@
marked_item.name = "Ensouled [marked_item.name]"
marked_item.desc = "A terrible aura surrounds this item, its very existence is offensive to life itself..."
marked_item.color = "#003300"
- user << "With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!"
- user.set_species(/datum/species/skeleton)
- current_body = user.mind.current
- if(ishuman(user))
- var/mob/living/carbon/human/H = user
+ M << "With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!"
+ M.set_species(/datum/species/skeleton)
+ current_body = M.mind.current
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
H.unEquip(H.wear_suit)
H.unEquip(H.head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit)
diff --git a/code/datums/spells/lightning.dm b/code/datums/spells/lightning.dm
index da2e4fe3466..ea21b2c8fe5 100644
--- a/code/datums/spells/lightning.dm
+++ b/code/datums/spells/lightning.dm
@@ -18,7 +18,7 @@
/obj/effect/proc_holder/spell/targeted/lightning/Click()
if(!ready && cast_check())
- StartChargeup()
+ StartChargeup()
return 1
/obj/effect/proc_holder/spell/targeted/lightning/proc/StartChargeup(mob/user = usr)
@@ -27,7 +27,7 @@
Snd = new/sound('sound/magic/lightning_chargeup.ogg',channel = 7)
halo = image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = EFFECTS_LAYER)
user.overlays.Add(halo)
- playsound(get_turf(usr), Snd, 50, 0)
+ playsound(get_turf(user), Snd, 50, 0)
if(do_mob(user,user,100,uninterruptible=1))
if(ready && cast_check(skipcharge=1))
choose_targets()
@@ -48,13 +48,13 @@
ready = 0
var/mob/living/carbon/target = targets[1]
Snd=sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
- playsound(get_turf(usr),Snd,50,0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
+ playsound(get_turf(user),Snd,50,0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
if(get_dist(user,target)>range)
user << "They are too far away!"
Reset(user)
return
- playsound(get_turf(usr), 'sound/magic/lightningbolt.ogg', 50, 1)
+ playsound(get_turf(user), 'sound/magic/lightningbolt.ogg', 50, 1)
user.Beam(target,icon_state="lightning",icon='icons/effects/effects.dmi',time=5)
Bolt(user,target,30,5,user)
diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm
index 6ad4f4243a3..cae1181058e 100644
--- a/code/datums/spells/mime.dm
+++ b/code/datums/spells/mime.dm
@@ -53,7 +53,7 @@
still_recharging_msg = "You'll have to wait before you can give your vow of silence again!"
..()
-/obj/effect/proc_holder/spell/targeted/mime/speak/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/mime/speak/cast(list/targets,mob/user = usr)
for(var/mob/living/carbon/human/H in targets)
H.mind.miming=!H.mind.miming
if(H.mind.miming)
diff --git a/code/datums/spells/projectile.dm b/code/datums/spells/projectile.dm
index 5439486b935..e12ccde655e 100644
--- a/code/datums/spells/projectile.dm
+++ b/code/datums/spells/projectile.dm
@@ -38,7 +38,7 @@
projectile.dir = get_dir(target,projectile)
projectile.name = proj_name
- var/current_loc = usr.loc
+ var/current_loc = user.loc
projectile.loc = current_loc
@@ -76,7 +76,7 @@
qdel(trail)
if(projectile.loc in range(target.loc,proj_trigger_range))
- projectile.perform(list(target))
+ projectile.perform(list(target),user=user)
break
current_loc = projectile.loc
diff --git a/code/datums/spells/shapeshift.dm b/code/datums/spells/shapeshift.dm
index 52a6c24785f..1a11d0476a5 100644
--- a/code/datums/spells/shapeshift.dm
+++ b/code/datums/spells/shapeshift.dm
@@ -15,7 +15,7 @@
var/list/current_shapes = list()
var/list/current_casters = list()
-/obj/effect/proc_holder/spell/targeted/shapeshift/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/shapeshift/cast(list/targets,mob/user = usr)
for(var/mob/living/M in targets)
if(M in current_shapes)
Restore(M)
diff --git a/code/datums/spells/summonitem.dm b/code/datums/spells/summonitem.dm
index 2f8116ffe6b..9de9508525a 100644
--- a/code/datums/spells/summonitem.dm
+++ b/code/datums/spells/summonitem.dm
@@ -15,9 +15,9 @@
action_icon_state = "summons"
-/obj/effect/proc_holder/spell/targeted/summonitem/cast(list/targets)
- for(var/mob/living/user in targets)
- var/list/hand_items = list(user.get_active_hand(),user.get_inactive_hand())
+/obj/effect/proc_holder/spell/targeted/summonitem/cast(list/targets,mob/user = usr)
+ for(var/mob/living/L in targets)
+ var/list/hand_items = list(L.get_active_hand(),L.get_inactive_hand())
var/butterfingers = 0
var/message
@@ -58,7 +58,7 @@
var/obj/item/organ/internal/organ = item_to_retrive
if(organ.owner)
// If this code ever runs I will be happy
- add_logs(user, organ.owner, "magically removed [organ.name] from", addition="INTENT: [uppertext(user.a_intent)]")
+ add_logs(L, organ.owner, "magically removed [organ.name] from", addition="INTENT: [uppertext(L.a_intent)]")
organ.Remove(organ.owner)
else
while(!isturf(item_to_retrive.loc) && infinite_recursion < 10) //if it's in something you get the whole thing.
@@ -67,7 +67,7 @@
if(issilicon(M)) //Items in silicons warp the whole silicon
M.loc.visible_message("[M] suddenly disappears!")
- M.loc = user.loc
+ M.loc = L.loc
M.loc.visible_message("[M] suddenly appears!")
item_to_retrive = null
break
@@ -95,22 +95,22 @@
item_to_retrive.loc.visible_message("The [item_to_retrive.name] suddenly disappears!")
- if(user.hand) //left active hand
- if(!user.equip_to_slot_if_possible(item_to_retrive, slot_l_hand, 0, 1, 1))
- if(!user.equip_to_slot_if_possible(item_to_retrive, slot_r_hand, 0, 1, 1))
+ if(L.hand) //left active hand
+ if(!L.equip_to_slot_if_possible(item_to_retrive, slot_l_hand, 0, 1, 1))
+ if(!L.equip_to_slot_if_possible(item_to_retrive, slot_r_hand, 0, 1, 1))
butterfingers = 1
else //right active hand
- if(!user.equip_to_slot_if_possible(item_to_retrive, slot_r_hand, 0, 1, 1))
- if(!user.equip_to_slot_if_possible(item_to_retrive, slot_l_hand, 0, 1, 1))
+ if(!L.equip_to_slot_if_possible(item_to_retrive, slot_r_hand, 0, 1, 1))
+ if(!L.equip_to_slot_if_possible(item_to_retrive, slot_l_hand, 0, 1, 1))
butterfingers = 1
if(butterfingers)
- item_to_retrive.loc = user.loc
+ item_to_retrive.loc = L.loc
item_to_retrive.loc.visible_message("The [item_to_retrive.name] suddenly appears!")
- playsound(get_turf(user),"sound/magic/SummonItems_generic.ogg",50,1)
+ playsound(get_turf(L),"sound/magic/SummonItems_generic.ogg",50,1)
else
- item_to_retrive.loc.visible_message("The [item_to_retrive.name] suddenly appears in [user]'s hand!")
- playsound(get_turf(user),"sound/magic/SummonItems_generic.ogg",50,1)
+ item_to_retrive.loc.visible_message("The [item_to_retrive.name] suddenly appears in [L]'s hand!")
+ playsound(get_turf(L),"sound/magic/SummonItems_generic.ogg",50,1)
if(message)
- user << message
+ L << message
diff --git a/code/datums/spells/touch_attacks.dm b/code/datums/spells/touch_attacks.dm
index cd83738c1f7..51fa79bccc7 100644
--- a/code/datums/spells/touch_attacks.dm
+++ b/code/datums/spells/touch_attacks.dm
@@ -14,10 +14,10 @@
return 0
..()
-/obj/effect/proc_holder/spell/targeted/touch/cast(list/targets)
- for(var/mob/living/carbon/user in targets)
+/obj/effect/proc_holder/spell/targeted/touch/cast(list/targets,mob/user = usr)
+ for(var/mob/living/carbon/C in targets)
if(!attached_hand)
- if(!ChargeHand(user))
+ if(!ChargeHand(C))
return 0
while(attached_hand) //hibernate untill the spell is actually used
charge_counter = 0
diff --git a/code/datums/spells/trigger.dm b/code/datums/spells/trigger.dm
index 3988f3bae16..9c6dc7490f3 100644
--- a/code/datums/spells/trigger.dm
+++ b/code/datums/spells/trigger.dm
@@ -19,7 +19,7 @@
starting_spells = null
return ..()
-/obj/effect/proc_holder/spell/targeted/trigger/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/trigger/cast(list/targets,mob/user = usr)
playMagSound()
for(var/mob/living/target in targets)
for(var/obj/effect/proc_holder/spell/spell in contents)
diff --git a/code/datums/spells/turf_teleport.dm b/code/datums/spells/turf_teleport.dm
index 1d2b47f11c0..7010b9bf705 100644
--- a/code/datums/spells/turf_teleport.dm
+++ b/code/datums/spells/turf_teleport.dm
@@ -11,8 +11,8 @@
var/sound1 = "sound/weapons/ZapBang.ogg"
var/sound2 = "sound/weapons/ZapBang.ogg"
-/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets)
- playsound(get_turf(usr), sound1, 50,1)
+/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets,mob/user = usr)
+ playsound(get_turf(user), sound1, 50,1)
for(var/mob/living/target in targets)
var/list/turfs = new/list()
for(var/turf/T in range(target,outer_tele_radius))
@@ -41,4 +41,4 @@
if(target.buckled_mob)
target.unbuckle_mob(force=1)
target.loc = picked
- playsound(get_turf(usr), sound2, 50,1)
+ playsound(get_turf(user), sound2, 50,1)
diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm
index 028d23d4291..87f896b3f55 100644
--- a/code/datums/spells/wizard.dm
+++ b/code/datums/spells/wizard.dm
@@ -273,7 +273,7 @@
action_icon_state = "fireball"
sound = "sound/magic/Fireball.ogg"
-/obj/effect/proc_holder/spell/turf/fireball/cast(turf/T)
+/obj/effect/proc_holder/spell/turf/fireball/cast(turf/T,mob/user = usr)
explosion(T, -1, 0, 2, 3, 0, flame_range = 2)
@@ -303,8 +303,7 @@
action_icon_state = "repulse"
-/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets)
- var/mob/user = usr
+/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets,mob/user = usr)
var/list/thrownatoms = list()
var/atom/throwtarget
var/distfromcaster
@@ -351,9 +350,9 @@
action_icon_state = "tailsweep"
action_background_icon_state = "bg_alien"
-/obj/effect/proc_holder/spell/aoe_turf/repulse/xeno/cast(list/targets)
- if(istype(usr, /mob/living/carbon))
- var/mob/living/carbon/C = usr
+/obj/effect/proc_holder/spell/aoe_turf/repulse/xeno/cast(list/targets,mob/user = usr)
+ if(istype(user, /mob/living/carbon))
+ var/mob/living/carbon/C = user
playsound(C.loc, 'sound/voice/hiss5.ogg', 80, 1, 1)
C.spin(6,1)
..()
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 18c97414a8c..9d9457f7d7b 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -19,28 +19,28 @@
clothes_req = 0
action_icon_state = "glare"
-/obj/effect/proc_holder/spell/targeted/glare/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/glare/cast(list/targets,mob/user = usr)
for(var/mob/living/target in targets)
if(!ishuman(target))
- usr << "You may only glare at humans!"
+ user << "You may only glare at humans!"
revert_cast()
return
- if(!shadowling_check(usr))
+ if(!shadowling_check(user))
revert_cast()
return
if(target.stat)
- usr << "[target] must be conscious!"
+ user << "[target] must be conscious!"
revert_cast()
return
if(is_shadow_or_thrall(target))
- usr << "You cannot glare at allies!"
+ user << "You cannot glare at allies!"
revert_cast()
return
var/mob/living/carbon/human/M = target
- usr.visible_message("[usr]'s eyes flash a blinding red!")
+ user.visible_message("[user]'s eyes flash a blinding red!")
target.visible_message("[target] freezes in place, their eyes glazing over...")
- if(in_range(target, usr))
- target << "Your gaze is forcibly drawn into [usr]'s eyes, and you are mesmerized by the heavenly lights..."
+ if(in_range(target, user))
+ target << "Your gaze is forcibly drawn into [user]'s eyes, and you are mesmerized by the heavenly lights..."
else //Only alludes to the shadowling if the target is close by
target << "Red lights suddenly dance in your vision, and you are mesmerized by their heavenly beauty..."
target.Stun(10)
@@ -80,11 +80,11 @@
blacklistLuminosity += extinguishItem(F)
H.SetLuminosity(blacklistLuminosity) //I hate lightcode for making me do it this way
-/obj/effect/proc_holder/spell/aoe_turf/veil/cast(list/targets)
- if(!shadowling_check(usr) && !admin_override)
+/obj/effect/proc_holder/spell/aoe_turf/veil/cast(list/targets,mob/user = usr)
+ if(!shadowling_check(user) && !admin_override)
revert_cast()
return
- usr << "You silently disable all nearby lights."
+ user << "You silently disable all nearby lights."
for(var/turf/T in targets)
for(var/obj/item/F in T.contents)
extinguishItem(F)
@@ -95,7 +95,7 @@
for(var/obj/machinery/computer/C in T.contents)
C.SetLuminosity(0)
C.visible_message("[C] grows dim, its screen barely readable.")
- for(var/obj/effect/glowshroom/G in orange(7, usr)) //High radius because glowshroom spam wrecks shadowlings
+ for(var/obj/effect/glowshroom/G in orange(7, user)) //High radius because glowshroom spam wrecks shadowlings
G.visible_message("[G] withers away!")
qdel(G)
for(var/mob/living/H in T.contents)
@@ -142,15 +142,15 @@
action_icon_state = "icy_veins"
sound = 'sound/effects/ghost2.ogg'
-/obj/effect/proc_holder/spell/aoe_turf/flashfreeze/cast(list/targets)
- if(!shadowling_check(usr))
+/obj/effect/proc_holder/spell/aoe_turf/flashfreeze/cast(list/targets,mob/user = usr)
+ if(!shadowling_check(user))
revert_cast()
return
- usr << "You freeze the nearby air."
+ user << "You freeze the nearby air."
for(var/turf/T in targets)
for(var/mob/living/carbon/M in T.contents)
if(is_shadow_or_thrall(M))
- if(M == usr) //No message for the user, of course
+ if(M == user) //No message for the user, of course
continue
else
M << "You feel a blast of paralyzingly cold air wrap around you and flow past, but you are unaffected!"
@@ -175,79 +175,78 @@
action_icon_state = "enthrall"
var/enthralling = 0
-/obj/effect/proc_holder/spell/targeted/enthrall/cast(list/targets)
- var/mob/living/carbon/human/user = usr
+/obj/effect/proc_holder/spell/targeted/enthrall/cast(list/targets,mob/living/carbon/human/user = usr)
listclearnulls(ticker.mode.thralls)
- if(!(usr.mind in ticker.mode.shadows)) return
+ if(!(user.mind in ticker.mode.shadows)) return
if(user.dna.species.id != "shadowling")
if(ticker.mode.thralls.len >= 5)
revert_cast()
return
for(var/mob/living/carbon/human/target in targets)
- if(!in_range(usr, target))
- usr << "You need to be closer to enthrall [target]!"
+ if(!in_range(user, target))
+ user << "You need to be closer to enthrall [target]!"
revert_cast()
return
if(!target.key || !target.mind)
- usr << "The target has no mind!"
+ user << "The target has no mind!"
revert_cast()
return
if(target.stat)
- usr << "The target must be conscious!"
+ user << "The target must be conscious!"
revert_cast()
return
if(is_shadow_or_thrall(target))
- usr << "You can not enthrall allies!"
+ user << "You can not enthrall allies!"
revert_cast()
return
if(!ishuman(target))
- usr << "You can only enthrall humans!"
+ user << "You can only enthrall humans!"
revert_cast()
return
if(enthralling)
- usr << "You are already enthralling!"
+ user << "You are already enthralling!"
revert_cast()
return
if(!target.client)
- usr << "[target]'s mind is vacant of activity."
+ user << "[target]'s mind is vacant of activity."
enthralling = 1
- usr << "This target is valid. You begin the enthralling..."
- target << "[usr] stares at you. You feel your head begin to pulse."
+ user << "This target is valid. You begin the enthralling..."
+ target << "[user] stares at you. You feel your head begin to pulse."
for(var/progress = 0, progress <= 3, progress++)
switch(progress)
if(1)
- usr << "You place your hands to [target]'s head..."
- usr.visible_message("[usr] places their hands onto the sides of [target]'s head!")
+ user << "You place your hands to [target]'s head..."
+ user.visible_message("[user] places their hands onto the sides of [target]'s head!")
if(2)
- usr << "You begin preparing [target]'s mind as a blank slate..."
- usr.visible_message("[usr]'s palms flare a bright red against [target]'s temples!")
+ user << "You begin preparing [target]'s mind as a blank slate..."
+ user.visible_message("[user]'s palms flare a bright red against [target]'s temples!")
target << "A terrible red light floods your mind. You collapse as conscious thought is wiped away."
target.Weaken(12)
sleep(20)
if(isloyal(target))
- usr << "They are enslaved by Nanotrasen. You begin to shut down the nanobot implant - this will take some time."
- usr.visible_message("[usr] pauses, then dips their head in concentration!")
+ user << "They are enslaved by Nanotrasen. You begin to shut down the nanobot implant - this will take some time."
+ user.visible_message("[user] pauses, then dips their head in concentration!")
target << "You feel your loyalties begin to weaken!"
sleep(100) //10 seconds - not spawn() so the enthralling takes longer
- usr << "The nanobots composing the loyalty implant have been rendered inert. Now to continue."
- usr.visible_message("[user] relaxes again.")
+ user << "The nanobots composing the loyalty implant have been rendered inert. Now to continue."
+ user.visible_message("[user] relaxes again.")
for(var/obj/item/weapon/implant/loyalty/L in target)
if(L && L.implanted)
qdel(L)
target << "Your unwavering loyalty to Nanotrasen unexpectedly falters, dims, dies."
if(3)
- usr << "You begin planting the tumor that will control the new thrall..."
- usr.visible_message("A strange energy passes from [usr]'s hands into [target]'s head!")
+ user << "You begin planting the tumor that will control the new thrall..."
+ user.visible_message("A strange energy passes from [user]'s hands into [target]'s head!")
target << "You feel your memories twisting, morphing. A sense of horror dominates your mind."
- if(!do_mob(usr, target, 70)) //around 21 seconds total for enthralling, 31 for someone with a loyalty implant
- usr << "The enthralling has been interrupted - your target's mind returns to its previous state."
- target << "You wrest yourself away from [usr]'s hands and compose yourself"
+ if(!do_mob(user, target, 70)) //around 21 seconds total for enthralling, 31 for someone with a loyalty implant
+ user << "The enthralling has been interrupted - your target's mind returns to its previous state."
+ target << "You wrest yourself away from [user]'s hands and compose yourself"
enthralling = 0
return
enthralling = 0
- usr << "You have enthralled [target.real_name]!"
+ user << "You have enthralled [target.real_name]!"
target.visible_message("[target] looks to have experienced a revelation!", \
"False faces all dark not real not real not--")
target.setOxyLoss(0) //In case the shadowling was choking them out
@@ -264,7 +263,7 @@
clothes_req = 0
action_icon_state = "commune"
-/obj/effect/proc_holder/spell/self/shadowling_hivemind/cast(mob/living/user)
+/obj/effect/proc_holder/spell/self/shadowling_hivemind/cast(mob/living/user,mob/user = usr)
if(!is_shadow(user))
user << "You must be a shadowling to do that!"
return
@@ -273,7 +272,7 @@
return
for(var/mob/M in mob_list)
if(is_shadow_or_thrall(M) || (M in dead_mob_list))
- M << "\[Shadowling\] [usr.real_name]: [text]"
+ M << "\[Shadowling\] [user.real_name]: [text]"
/obj/effect/proc_holder/spell/self/shadowling_regenarmor //Resets a shadowling's species to normal, removes genetic defects, and re-equips their armor
@@ -293,13 +292,13 @@
user.visible_message("[user]'s skin suddenly bubbles and shifts around their body!", \
"You regenerate your protective armor and cleanse your form of defects.")
user.adjustCloneLoss(user.getCloneLoss())
- user.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(usr), slot_w_uniform)
- user.equip_to_slot_or_del(new /obj/item/clothing/shoes/shadowling(usr), slot_shoes)
- user.equip_to_slot_or_del(new /obj/item/clothing/suit/space/shadowling(usr), slot_wear_suit)
- user.equip_to_slot_or_del(new /obj/item/clothing/head/shadowling(usr), slot_head)
- user.equip_to_slot_or_del(new /obj/item/clothing/gloves/shadowling(usr), slot_gloves)
- user.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/shadowling(usr), slot_wear_mask)
- user.equip_to_slot_or_del(new /obj/item/clothing/glasses/night/shadowling(usr), slot_glasses)
+ user.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(user), slot_w_uniform)
+ user.equip_to_slot_or_del(new /obj/item/clothing/shoes/shadowling(user), slot_shoes)
+ user.equip_to_slot_or_del(new /obj/item/clothing/suit/space/shadowling(user), slot_wear_suit)
+ user.equip_to_slot_or_del(new /obj/item/clothing/head/shadowling(user), slot_head)
+ user.equip_to_slot_or_del(new /obj/item/clothing/gloves/shadowling(user), slot_gloves)
+ user.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/shadowling(user), slot_wear_mask)
+ user.equip_to_slot_or_del(new /obj/item/clothing/glasses/night/shadowling(user), slot_glasses)
user.set_species(/datum/species/shadow/ling)
@@ -362,8 +361,8 @@
user << "You do not have the power to ascend. You require [victory_threshold] thralls, but only [thralls] living thralls are present."
else if(thralls >= victory_threshold)
- usr << "You are now powerful enough to ascend. Use the Ascendance ability when you are ready. This will kill all of your thralls."
- usr << "You may find Ascendance in the Shadowling Evolution tab."
+ user << "You are now powerful enough to ascend. Use the Ascendance ability when you are ready. This will kill all of your thralls."
+ user << "You may find Ascendance in the Shadowling Evolution tab."
for(M in living_mob_list)
if(is_shadow(M))
var/obj/effect/proc_holder/spell/self/collective_mind/CM
@@ -372,7 +371,7 @@
qdel(CM)
M.mind.remove_spell(/obj/effect/proc_holder/spell/self/shadowling_hatch)
M.mind.AddSpell(new /obj/effect/proc_holder/spell/self/shadowling_ascend(null))
- if(M == usr)
+ if(M == user)
M << "You project this power to the rest of the shadowlings."
else
M << "[user.real_name] has coalesced the strength of the thralls. You can draw upon it at any time to ascend. (Shadowling Evolution Tab)" //Tells all the other shadowlings
@@ -440,15 +439,15 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
action_icon_state = "screech"
sound = 'sound/effects/screech.ogg'
-/obj/effect/proc_holder/spell/aoe_turf/unearthly_screech/cast(list/targets)
- if(!shadowling_check(usr))
+/obj/effect/proc_holder/spell/aoe_turf/unearthly_screech/cast(list/targets,mob/user = usr)
+ if(!shadowling_check(user))
revert_cast()
return
- usr.audible_message("[usr] lets out a horrible scream!")
+ user.audible_message("[user] lets out a horrible scream!")
for(var/turf/T in targets)
for(var/mob/target in T.contents)
if(is_shadow_or_thrall(target))
- if(target == usr) //No message for the user, of course
+ if(target == user) //No message for the user, of course
continue
else
continue
@@ -482,32 +481,32 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
var/targetsDrained
var/list/nearbyTargets
-/obj/effect/proc_holder/spell/aoe_turf/drain_life/cast(list/targets, mob/living/carbon/human/U = usr)
- if(!shadowling_check(U))
+/obj/effect/proc_holder/spell/aoe_turf/drain_life/cast(list/targets, mob/living/carbon/human/user = usr)
+ if(!shadowling_check(user))
revert_cast()
return
targetsDrained = 0
nearbyTargets = list()
for(var/turf/T in targets)
for(var/mob/living/carbon/M in T.contents)
- if(M == usr) continue
+ if(M == user) continue
targetsDrained++
nearbyTargets.Add(M)
if(!targetsDrained)
revert_cast()
- usr << "There were no nearby humans for you to drain."
+ user << "There were no nearby humans for you to drain."
return
for(var/mob/living/carbon/M in nearbyTargets)
- U.heal_organ_damage(10, 10)
- U.adjustToxLoss(-10)
- U.adjustOxyLoss(-10)
- U.adjustStaminaLoss(-20)
- U.AdjustWeakened(-1)
- U.AdjustStunned(-1)
+ user.heal_organ_damage(10, 10)
+ user.adjustToxLoss(-10)
+ user.adjustOxyLoss(-10)
+ user.adjustStaminaLoss(-20)
+ user.AdjustWeakened(-1)
+ user.AdjustStunned(-1)
M.adjustOxyLoss(20)
M.adjustStaminaLoss(20)
M << "You feel a wave of exhaustion and a curious draining sensation directed towards [usr]!"
- usr << "You draw life from those around you to heal your wounds."
+ user << "You draw life from those around you to heal your wounds."
/obj/effect/proc_holder/spell/targeted/revive_thrall //Completely revives a dead thrall
@@ -521,20 +520,20 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
include_user = 0
action_icon_state = "revive_thrall"
-/obj/effect/proc_holder/spell/targeted/revive_thrall/cast(list/targets)
- if(!shadowling_check(usr))
+/obj/effect/proc_holder/spell/targeted/revive_thrall/cast(list/targets,mob/user = usr)
+ if(!shadowling_check(user))
revert_cast()
return
for(var/mob/living/carbon/human/thrallToRevive in targets)
- var/choice = alert(usr,"Empower a living thrall or revive a dead one?",,"Empower","Revive","Cancel")
+ var/choice = alert(user,"Empower a living thrall or revive a dead one?",,"Empower","Revive","Cancel")
switch(choice)
if("Empower")
if(!is_thrall(thrallToRevive))
- usr << "[thrallToRevive] is not a thrall."
+ user << "[thrallToRevive] is not a thrall."
revert_cast()
return
if(thrallToRevive.stat != CONSCIOUS)
- usr << "[thrallToRevive] must be conscious to become empowered."
+ user << "[thrallToRevive] must be conscious to become empowered."
revert_cast()
return
var/empowered_thralls = 0
@@ -545,21 +544,21 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
if(H.dna.species.id == "l_shadowling")
empowered_thralls++
if(empowered_thralls >= EMPOWERED_THRALL_LIMIT)
- usr << "You cannot spare this much energy. There are too many empowered thralls."
+ user << "You cannot spare this much energy. There are too many empowered thralls."
revert_cast()
return
- usr.visible_message("[usr] places their hands over [thrallToRevive]'s face, red light shining from beneath.", \
+ user.visible_message("[user] places their hands over [thrallToRevive]'s face, red light shining from beneath.", \
"You place your hands on [thrallToRevive]'s face and begin gathering energy...")
- thrallToRevive << "[usr] places their hands over your face. You feel energy gathering. Stand still..."
- if(!do_mob(usr, thrallToRevive, 80))
- usr << "Your concentration snaps. The flow of energy ebbs."
+ thrallToRevive << "[user] places their hands over your face. You feel energy gathering. Stand still..."
+ if(!do_mob(user, thrallToRevive, 80))
+ user << "Your concentration snaps. The flow of energy ebbs."
revert_cast()
return
- usr << "You release a massive surge of power into [thrallToRevive]!"
- usr.visible_message("Red lightning surges into [thrallToRevive]'s face!")
+ user << "You release a massive surge of power into [thrallToRevive]!"
+ user.visible_message("Red lightning surges into [thrallToRevive]'s face!")
playsound(thrallToRevive, 'sound/weapons/Egloves.ogg', 50, 1)
playsound(thrallToRevive, 'sound/machines/defib_zap.ogg', 50, 1)
- usr.Beam(thrallToRevive,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1)
+ user.Beam(thrallToRevive,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1)
thrallToRevive.Weaken(5)
thrallToRevive.visible_message("[thrallToRevive] collapses, their skin and face distorting!", \
"AAAAAAAAAAAAAAAAAAAGH-")
@@ -574,25 +573,25 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/self/shadow_walk(null))
if("Revive")
if(!is_thrall(thrallToRevive))
- usr << "[thrallToRevive] is not a thrall."
+ user << "[thrallToRevive] is not a thrall."
revert_cast()
return
if(thrallToRevive.stat != DEAD)
- usr << "[thrallToRevive] is not dead."
+ user << "[thrallToRevive] is not dead."
revert_cast()
return
- usr.visible_message("[usr] kneels over [thrallToRevive], placing their hands on \his chest.", \
+ user.visible_message("[user] kneels over [thrallToRevive], placing their hands on \his chest.", \
"You crouch over the body of your thrall and begin gathering energy...")
thrallToRevive.notify_ghost_cloning("Your masters are resuscitating you! Re-enter your corpse if you wish to be brought to life.", source = thrallToRevive)
- if(!do_mob(usr, thrallToRevive, 30))
- usr << "Your concentration snaps. The flow of energy ebbs."
+ if(!do_mob(user, thrallToRevive, 30))
+ user << "Your concentration snaps. The flow of energy ebbs."
revert_cast()
return
- usr << "You release a massive surge of power into [thrallToRevive]!"
- usr.visible_message("Red lightning surges from [usr]'s hands into [thrallToRevive]'s chest!")
+ user << "You release a massive surge of power into [thrallToRevive]!"
+ user.visible_message("Red lightning surges from [user]'s hands into [thrallToRevive]'s chest!")
playsound(thrallToRevive, 'sound/weapons/Egloves.ogg', 50, 1)
playsound(thrallToRevive, 'sound/machines/defib_zap.ogg', 50, 1)
- usr.Beam(thrallToRevive,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1)
+ user.Beam(thrallToRevive,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1)
sleep(10)
thrallToRevive.revive()
thrallToRevive.visible_message("[thrallToRevive] heaves in breath, dim red light shining in their eyes.", \
@@ -615,8 +614,8 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
charge_max = 600
action_icon_state = "extend_shuttle"
-/obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle/cast(list/targets, mob/living/carbon/human/U = usr)
- if(!shadowling_check(U))
+/obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle/cast(list/targets, mob/living/carbon/human/user = usr)
+ if(!shadowling_check(user))
revert_cast()
return
for(var/mob/living/carbon/human/target in targets)
@@ -624,23 +623,23 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
revert_cast()
return
if(!is_thrall(target))
- usr << "[target] must be a thrall."
+ user << "[target] must be a thrall."
revert_cast()
return
if(SSshuttle.emergency.mode != SHUTTLE_CALL)
- usr << "The shuttle must be inbound only to the station."
+ user << "The shuttle must be inbound only to the station."
revert_cast()
return
var/mob/living/carbon/human/M = target
- U.visible_message("[U]'s eyes flash a bright red!", \
+ user.visible_message("[user]'s eyes flash a bright red!", \
"You begin to draw [M]'s life force.")
M.visible_message("[M]'s face falls slack, their jaw slightly distending.", \
"You are suddenly transported... far, far away...")
- if(!do_after(U, 50, target = M))
+ if(!do_after(user, 50, target = M))
M << "You are snapped back to reality, your haze dissipating!"
- U << "You have been interrupted. The draw has failed."
+ user << "You have been interrupted. The draw has failed."
return
- U << "You project [M]'s life force toward the approaching shuttle, extending its arrival duration!"
+ user << "You project [M]'s life force toward the approaching shuttle, extending its arrival duration!"
M.visible_message("[M]'s eyes suddenly flare red. They proceed to collapse on the floor, not breathing.", \
"...speeding by... ...pretty blue glow... ...touch it... ...no glow now... ...no light... ...nothing at all...")
M.death()
@@ -650,7 +649,7 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
timer += more_minutes
priority_announce("Major system failure aboard the emergency shuttle. This will extend its arrival time by approximately 15 minutes..", "System Failure", 'sound/misc/notice1.ogg')
SSshuttle.emergency.setTimer(timer)
- U.mind.spell_list.Remove(src) //Can only be used once!
+ user.mind.spell_list.Remove(src) //Can only be used once!
qdel(src)
@@ -666,25 +665,25 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
clothes_req = 0
action_icon_state = "glare"
-/obj/effect/proc_holder/spell/targeted/lesser_glare/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/lesser_glare/cast(list/targets,mob/user = usr)
for(var/mob/living/target in targets)
if(!ishuman(target) || !target)
- usr << "You nay only glare at humans!"
+ user << "You nay only glare at humans!"
revert_cast()
return
if(target.stat)
- usr << "[target] must be conscious!"
+ user << "[target] must be conscious!"
revert_cast()
return
if(is_shadow_or_thrall(target))
- usr << "You cannot glare at allies!"
+ user << "You cannot glare at allies!"
revert_cast()
return
var/mob/living/carbon/human/M = target
- usr.visible_message("[usr]'s eyes flash a bright red!")
+ user.visible_message("[user]'s eyes flash a bright red!")
target.visible_message("[target] freezes in place, their eyes clouding...")
- if(in_range(target, usr))
- target << "Your gaze is forcibly drawn into [usr]'s eyes, and you are starstruck by the heavenly lights..."
+ if(in_range(target, user))
+ target << "Your gaze is forcibly drawn into [user]'s eyes, and you are starstruck by the heavenly lights..."
else //Only alludes to the shadowling if the target is close by
target << "Red lights suddenly dance in your vision, and you are starstruck by their heavenly beauty..."
target.Stun(5) //Roughly 50% as long as the normal one
@@ -749,7 +748,7 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
return
for(var/mob/M in mob_list)
if(is_shadow_or_thrall(M) || (M in dead_mob_list))
- M << "\[Thrall\] [usr.real_name]: [text]"
+ M << "\[Thrall\] [user.real_name]: [text]"
log_say("[user.real_name]/[user.key] : [text]")
@@ -766,19 +765,17 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
action_icon_state = "annihilate"
sound = 'sound/magic/Staff_Chaos.ogg'
-/obj/effect/proc_holder/spell/targeted/annihilate/cast(list/targets)
- var/mob/living/simple_animal/ascendant_shadowling/SHA = usr
- if(SHA.phasing)
- usr << "You are not in the same plane of existence. Unphase first."
+/obj/effect/proc_holder/spell/targeted/annihilate/cast(list/targets,mob/living/simple_animal/ascendant_shadowling/user = usr)
+ if(user.phasing)
+ user << "You are not in the same plane of existence. Unphase first."
revert_cast()
return
-
for(var/mob/living/boom in targets)
if(is_shadow(boom)) //Used to not work on thralls. Now it does so you can PUNISH THEM LIKE THE WRATHFUL GOD YOU ARE.
- usr << "Making an ally explode seems unwise."
+ user << "Making an ally explode seems unwise."
revert_cast()
return
- usr.visible_message("[usr]'s markings flare as they gesture at [boom]!", \
+ user.visible_message("[user]'s markings flare as they gesture at [boom]!", \
"You direct a lance of telekinetic energy into [boom].")
sleep(4)
if(iscarbon(boom))
@@ -796,32 +793,31 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
clothes_req = 0
action_icon_state = "enthrall"
-/obj/effect/proc_holder/spell/targeted/hypnosis/cast(list/targets)
- var/mob/living/simple_animal/ascendant_shadowling/SHA = usr
- if(SHA.phasing)
+/obj/effect/proc_holder/spell/targeted/hypnosis/cast(list/targets,mob/living/simple_animal/ascendant_shadowling/user = usr)
+ if(user.phasing)
revert_cast()
- usr << "You are not in the same plane of existence. Unphase first."
+ user << "You are not in the same plane of existence. Unphase first."
return
for(var/mob/living/carbon/human/target in targets)
if(is_shadow_or_thrall(target))
- usr << "You cannot enthrall an ally."
+ user << "You cannot enthrall an ally."
revert_cast()
return
if(!target.ckey || !target.mind)
- usr << "The target has no mind."
+ user << "The target has no mind."
revert_cast()
return
if(target.stat)
- usr << "The target must be conscious."
+ user << "The target must be conscious."
revert_cast()
return
if(!ishuman(target))
- usr << "You can only enthrall humans."
+ user << "You can only enthrall humans."
revert_cast()
return
- usr << "You instantly rearrange [target]'s memories, hyptonitizing them into a thrall."
+ user << "You instantly rearrange [target]'s memories, hyptonitizing them into a thrall."
target << "An agonizing spike of pain drives into your mind, and--"
target.mind.special_role = "thrall"
ticker.mode.add_thrall(target.mind)
@@ -835,20 +831,19 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
clothes_req = 0
action_icon_state = "shadow_walk"
-/obj/effect/proc_holder/spell/self/shadowling_phase_shift/cast(list/targets)
- var/mob/living/simple_animal/ascendant_shadowling/SHA = usr
- for(SHA in targets)
- SHA.phasing = !SHA.phasing
- if(SHA.phasing)
- SHA.visible_message("[SHA] suddenly vanishes!", \
+/obj/effect/proc_holder/spell/self/shadowling_phase_shift/cast(list/targets,mob/living/simple_animal/ascendant_shadowling/user = usr)
+ for(user in targets)
+ user.phasing = !user.phasing
+ if(user.phasing)
+ user.visible_message("[user] suddenly vanishes!", \
"You begin phasing through planes of existence. Use the ability again to return.")
- SHA.incorporeal_move = 1
- SHA.alpha = 0
+ user.incorporeal_move = 1
+ user.alpha = 0
else
- SHA.visible_message("[SHA] suddenly appears from nowhere!", \
+ user.visible_message("[user] suddenly appears from nowhere!", \
"You return from the space between worlds.")
- SHA.incorporeal_move = 0
- SHA.alpha = 255
+ user.incorporeal_move = 0
+ user.alpha = 255
/obj/effect/proc_holder/spell/aoe_turf/ascendant_storm //Releases bolts of lightning to everyone nearby
@@ -861,13 +856,12 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
action_icon_state = "lightning_storm"
sound = 'sound/magic/lightningbolt.ogg'
-/obj/effect/proc_holder/spell/aoe_turf/ascendant_storm/cast(list/targets)
- var/mob/living/simple_animal/ascendant_shadowling/SHA = usr
- if(SHA.phasing)
- usr << "You are not in the same plane of existence. Unphase first."
+/obj/effect/proc_holder/spell/aoe_turf/ascendant_storm/cast(list/targets,mob/living/simple_animal/ascendant_shadowling/user = usr)
+ if(user.phasing)
+ user << "You are not in the same plane of existence. Unphase first."
revert_cast()
return
- usr.visible_message("A massive ball of lightning appears in [usr]'s hands and flares out!", \
+ user.visible_message("A massive ball of lightning appears in [user]'s hands and flares out!", \
"You conjure a ball of lightning and release it.")
for(var/turf/T in targets)
@@ -878,7 +872,7 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
playsound(target, 'sound/magic/LightningShock.ogg', 50, 1)
target.Weaken(8)
target.take_organ_damage(0,50)
- usr.Beam(target,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1)
+ user.Beam(target,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1)
/obj/effect/proc_holder/spell/self/shadowling_hivemind_ascendant //Large, all-caps text in shadowling chat
@@ -896,5 +890,5 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
text = "[text]"
for(var/mob/M in mob_list)
if(is_shadow_or_thrall(M) || (M in dead_mob_list))
- M << "\[Ascendant\] [usr.real_name]: [text]" //Bigger text for ascendants.
+ M << "\[Ascendant\] [user.real_name]: [text]" //Bigger text for ascendants.
log_say("[user.real_name]/[user.key] : [text]")
diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
index 9b1c0835efc..b696426ba03 100644
--- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
@@ -9,8 +9,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
clothes_req = 0
action_icon_state = "hatch"
-/obj/effect/proc_holder/spell/self/shadowling_hatch/cast(mob/living/carbon/human/H)
- if(usr.stat || !ishuman(usr) || !usr || !is_shadow(usr)) return
+/obj/effect/proc_holder/spell/self/shadowling_hatch/cast(mob/living/carbon/human/H,mob/user = usr)
+ if(user.stat || !ishuman(user) || !user || !is_shadow(user)) return
var/hatch_or_no = alert(H,"Are you sure you want to hatch? You cannot undo this!",,"Yes","No")
switch(hatch_or_no)
if("No")
@@ -27,8 +27,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
sleep(50)
var/turf/simulated/floor/F
- var/turf/shadowturf = get_turf(usr)
- for(F in orange(1, usr))
+ var/turf/shadowturf = get_turf(user)
+ for(F in orange(1, user))
new /obj/structure/alien/resin/wall/shadowling(F)
for(var/obj/structure/alien/resin/wall/shadowling/R in shadowturf) //extremely hacky
qdel(R)
@@ -60,7 +60,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
var/newNameId = pick(possibleShadowlingNames)
possibleShadowlingNames.Remove(newNameId)
H.real_name = newNameId
- H.name = usr.real_name
+ H.name = user.real_name
H.SetStunned(0)
H << "YOU LIVE!!!"
@@ -107,7 +107,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
clothes_req = 0
action_icon_state = "ascend"
-/obj/effect/proc_holder/spell/self/shadowling_ascend/cast(mob/living/carbon/human/H)
+/obj/effect/proc_holder/spell/self/shadowling_ascend/cast(mob/living/carbon/human/H,mob/user = usr)
if(!shadowling_check(H))
return
var/hatch_or_no = alert(H,"It is time to ascend. Are you sure about this?",,"Yes","No")
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index d5b8135442b..b16d811e5ac 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -163,7 +163,7 @@
clothes_req = 0
range = 14
-/obj/effect/proc_holder/spell/aoe_turf/flicker_lights/cast(list/targets)
+/obj/effect/proc_holder/spell/aoe_turf/flicker_lights/cast(list/targets,mob/user = usr)
for(var/turf/T in targets)
for(var/obj/machinery/light/L in T)
L.flicker()
@@ -179,7 +179,7 @@
clothes_req = 0
range = 10
-/obj/effect/proc_holder/spell/aoe_turf/blindness/cast(list/targets)
+/obj/effect/proc_holder/spell/aoe_turf/blindness/cast(list/targets,mob/user = usr)
for(var/mob/living/L in living_mob_list)
var/turf/T = get_turf(L.loc)
if(T && T in targets)
@@ -198,7 +198,7 @@
range = -1
include_user = 1
-/obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets)
+/obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets,mob/user = usr)
for(var/mob/living/target in targets)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target