From 45e89b5190aa070c9a42d0a73e05b2b4840ffefd Mon Sep 17 00:00:00 2001 From: Incoming Date: Wed, 18 Dec 2013 12:28:38 -0500 Subject: [PATCH] Bugfix: Adds a var to simple animals "player_controlled" to surpress behaviors in simple_animals that have players assigned. Bugfix: Dead player mice won't be converted to items so they can still be revived. Bugfix: Players playing chicks won't die by developing into chickens anymore Bugfix: Fixes an edge case where a poor soul struck by multiple polymorphing shots at once ends up in a state where they can't move. Feature: Renames the wand of resurrection to the wand of healing to drive home the fact that it does the same things the staff of healing can do Balancing: Gives the wand of healing more shots. 10, 5, 5, 4 up from 3, 2, 2, 1 --- .../mob/living/simple_animal/friendly/farm_animals.dm | 2 +- code/modules/mob/living/simple_animal/friendly/mouse.dm | 7 ++++--- code/modules/mob/living/simple_animal/simple_animal.dm | 6 ++++++ code/modules/projectiles/guns/magic/wand.dm | 4 ++-- code/modules/projectiles/projectile/magic.dm | 2 ++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 6b52786b5e0..04e3f4abab0 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -177,7 +177,7 @@ . =..() if(!.) return - if(!stat) + if(!stat && !player_controlled) amount_grown += rand(1,2) if(amount_grown >= 100) new /mob/living/simple_animal/chicken(src.loc) diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index b55d2fe889a..4dee403e796 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -36,9 +36,10 @@ /mob/living/simple_animal/mouse/Die() ..() - var/obj/item/trash/deadmouse/M = new(src.loc) - M.icon_state = src.icon_dead - del (src) + if(!player_controlled) + var/obj/item/trash/deadmouse/M = new(src.loc) + M.icon_state = src.icon_dead + del (src) /mob/living/simple_animal/mouse/Crossed(AM as mob|obj) if( ishuman(AM) ) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 64d25530f96..18d27972238 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -57,6 +57,8 @@ var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster + var/player_controlled = 0 //Set to true if the simple animal ever had someone behind the steering wheel, even if they aren't currently + /mob/living/simple_animal/New() ..() verbs -= /mob/verb/observe @@ -195,6 +197,10 @@ adjustBruteLoss(unsuitable_atoms_damage) return 1 + //Player check + if(!player_controlled && mind) + player_controlled = 1 + /mob/living/simple_animal/Bumped(AM as mob|obj) if(!AM) return diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 3ec8880b6cd..bc9dd552202 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -60,11 +60,11 @@ ..() /obj/item/weapon/gun/magic/wand/resurrection - name = "wand of resurrection" + name = "wand of healing" desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason." projectile_type = "/obj/item/projectile/magic/resurrection" icon_state = "revivewand" - max_charges = 3 //3, 2, 2, 1 + max_charges = 10 //10, 5, 5, 4 /obj/item/weapon/gun/magic/wand/resurrection/zap_self(mob/living/user as mob) user.revive() diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index fa7160a8a3d..78ab4db6cd2 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -220,6 +220,8 @@ proc/wabbajack(mob/living/M) new_mob << "Your form morphs into that of a [randomize]." del(M) + if(!new_mob.canmove) //edge case of someone getting hit with two bolts at the same time + new_mob.canmove = 1 return new_mob /obj/item/projectile/magic/animate