From 0739ea2b9702cfa462cf00ea3f6b713117476e5e Mon Sep 17 00:00:00 2001 From: Incoming Date: Thu, 18 Jul 2013 22:45:02 -0400 Subject: [PATCH] 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 --- code/datums/spells/inflict_handler.dm | 2 +- .../crates_lockers/closets/statue.dm | 71 +++++++++--------- .../mob/living/simple_animal/hostile/mimic.dm | 8 ++ icons/obj/statue.dmi | Bin 812 -> 810 bytes 4 files changed, 43 insertions(+), 38 deletions(-) diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm index 5c3efd333f6..f5fa4d9fa4b 100644 --- a/code/datums/spells/inflict_handler.dm +++ b/code/datums/spells/inflict_handler.dm @@ -61,4 +61,4 @@ target.eye_blurry += amt_eye_blurry //summoning if(summon_type) - new summon_type(target.loc) \ No newline at end of file + new summon_type(target.loc, target) \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 647a47d479d..3ff120e42ae 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 4fafd9db5e1..44432495122 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -141,6 +141,14 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca ..(loc) CopyObject(copy, creator) +/mob/living/simple_animal/hostile/mimic/copy/Life() + ..() + for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell + if(/obj/structure/closet/statue in contents) + return + else + Die() + /mob/living/simple_animal/hostile/mimic/copy/Die() for(var/atom/movable/M in src) diff --git a/icons/obj/statue.dmi b/icons/obj/statue.dmi index d50c18e660ed28c0b568bc7204ad1522606c6857..cfc1fbca9d35b025edb8a40f6f04bb5ec47001b6 100644 GIT binary patch delta 563 zcmV-30?hra2C4?I0|9>$Nklw3a42!=x(D$X9f|C=3Qr5PXLVixPbHJ8n2ggB?P21x&A`9ecvkn zLcofDQwNTKI0APFEuCkWdvNDj^gG_GdTEwLhmKiB%Yt?3JpX?g1c*QxKwtt?CtoMX z1bx|Bh)%-*1j9gvE**pg5cXZ@FHB}{2!`GTkPwDpH1)0_z^M9Y>1=?s0Epi$y#Ned z4$>-u{f1S2iNM;>AR|i)1;N;@staMX^)k+Ajc+{<6n=rUTDH`Ob|u(SroL zMaTdtqY;UnF~_m3bIQz^SuGI+ARmMlpxO!``4eg&hcXYZ=Srn90jlotiK!%fX{>V&Nklw3a42!;bLDsDY^|2I1zq}G0=Lm z@P>pmC8ht?0N_0x5hIH|dStOfKk?DDVEv1aHUTo~(FB|?SG-=%K?s@7)btm^?fVw^ z3n2&on>ug=#1S-yu%+`1a}UjV7X2sxgnDhB#ST52oIMNHrE`D#IRro;0}!|X)v2u$ z7(s8A7NS$v0YTT1qe};A0;F{p`VW)Y8H245^=#xPs z%Uil^C2G*#ks^OxK6~=zv&(V))BdWxIm2iL1isw=MuD*dP`9*~2_&uIzXuCKXuc}j zgc3j_glHdl^nvV-ZeP)6I|r0BI$s5fE5zb20Mhfb9%Y40!YjyfBUe*ahYfhXdgE!F%`x87L8Ne|Va=00000NkvXXu0mjf Db<6z+