mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Statue Bugfixes
*the targeting for the spell has been reworked so there's no chance of people in the same loc getting stoned instead of your intended victim. As a result of this improvement, wizards can now cast the spell on other wizards with reckless abandon *Flesh to Stone and the Staff of Animation play nicer with each other now, no more mobs getting trapped in item mimics after escaping the statue. *Minor tweaks to the monkey statue, which looked dumb
This commit is contained in:
@@ -6,52 +6,51 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
flags = FPRINT
|
||||
health = 200 //destroying the statue kills the mob within
|
||||
health = 0 //destroying the statue kills the mob within
|
||||
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
|
||||
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
|
||||
var/intialBrute = 0
|
||||
var/intialOxy = 0
|
||||
var/timer = 240 //eventually the person will be freed
|
||||
|
||||
/obj/structure/closet/statue/New()
|
||||
/obj/structure/closet/statue/New(loc, var/mob/living/L)
|
||||
|
||||
for(var/atom/movable/AM in src.loc)
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/L = AM
|
||||
if((ishuman(L) || ismonkey(L) || iscorgi(L)) && (!L.mind || L.mind.special_role != "Wizard"))
|
||||
if(L.buckled)
|
||||
L.buckled = 0
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
AM.loc = src
|
||||
L.sdisabilities += MUTE
|
||||
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
intialFire = L.getFireLoss()
|
||||
intialBrute = L.getBruteLoss()
|
||||
intialOxy = L.getOxyLoss()
|
||||
if(ishuman(L))
|
||||
name = "statue of [L.name]"
|
||||
if(L.gender == "female")
|
||||
icon_state = "human_female"
|
||||
else if(ismonkey(L))
|
||||
name = "statue of a monkey"
|
||||
icon_state = "monkey"
|
||||
else if(iscorgi(L))
|
||||
name = "statue of a corgi"
|
||||
icon_state = "corgi"
|
||||
desc = "If it takes forever, I will wait for you..."
|
||||
break
|
||||
else
|
||||
del(src)
|
||||
if(ishuman(L) || ismonkey(L) || iscorgi(L))
|
||||
if(L.buckled)
|
||||
L.buckled = 0
|
||||
L.anchored = 0
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
L.loc = src
|
||||
L.sdisabilities += MUTE
|
||||
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
intialFire = L.getFireLoss()
|
||||
intialBrute = L.getBruteLoss()
|
||||
intialOxy = L.getOxyLoss()
|
||||
if(ishuman(L))
|
||||
name = "statue of [L.name]"
|
||||
if(L.gender == "female")
|
||||
icon_state = "human_female"
|
||||
else if(ismonkey(L))
|
||||
name = "statue of a monkey"
|
||||
icon_state = "monkey"
|
||||
else if(iscorgi(L))
|
||||
name = "statue of a corgi"
|
||||
icon_state = "corgi"
|
||||
desc = "If it takes forever, I will wait for you..."
|
||||
|
||||
if(health == 0) //meaning if the statue didn't find a valid target
|
||||
del(src)
|
||||
return
|
||||
|
||||
processing_objects.Add(src)
|
||||
..()
|
||||
|
||||
/obj/structure/closet/statue/process()
|
||||
timer--
|
||||
for(var/mob/living/M in src) //Gp-go gadget stasis field
|
||||
for(var/mob/living/M in src) //Go-go gadget stasis field
|
||||
M.setToxLoss(intialTox)
|
||||
M.adjustFireLoss(intialFire - M.getFireLoss())
|
||||
M.adjustBruteLoss(intialBrute - M.getBruteLoss())
|
||||
@@ -67,14 +66,12 @@
|
||||
O.loc = src.loc
|
||||
|
||||
for(var/mob/living/M in src)
|
||||
M.loc = get_turf(src) //src.loc not used to avoid an edge case where the mob was recursively stored
|
||||
M.loc = src.loc
|
||||
M.sdisabilities -= MUTE
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new the statue incurred is transfered to the mob
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
for(var/mob/living/simple_animal/hostile/mimic/copy/C in M.loc) //destroy animated statue if there is one
|
||||
C.health = 0
|
||||
|
||||
/obj/structure/closet/statue/take_contents()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user