From d56f48d24169a323982efd2624e7e1958f07f873 Mon Sep 17 00:00:00 2001 From: Ergovisavi Date: Wed, 29 Jan 2014 14:56:06 -0800 Subject: [PATCH] Walking mushrooms will now hunt and eat eachother, growing stronger when they do! The stronger they get, the better the quality of the mushroom slices you can butcher out of them! Don't smack em yourself though, or you'll bruise them, and they won't get stronger from being eaten. --- code/modules/hydroponics/grown.dm | 4 +- .../living/simple_animal/friendly/mushroom.dm | 15 ---- .../living/simple_animal/hostile/mushroom.dm | 71 +++++++++++++++++++ code/modules/mob/transform_procs.dm | 2 +- code/modules/projectiles/projectile/magic.dm | 2 +- tgstation.dme | 2 +- 6 files changed, 76 insertions(+), 20 deletions(-) delete mode 100644 code/modules/mob/living/simple_animal/friendly/mushroom.dm create mode 100644 code/modules/mob/living/simple_animal/hostile/mushroom.dm diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 8e2632dd24f..2c525559c6f 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -881,7 +881,7 @@ /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user as mob) if(istype(user.loc,/turf/space)) return - new /mob/living/simple_animal/mushroom(user.loc) + new /mob/living/simple_animal/hostile/mushroom(user.loc) del(src) user << "You plant the walking mushroom." @@ -1080,4 +1080,4 @@ ..() spawn(5) //So potency can be set in the proc that creates these crops reagents.add_reagent("teapowder", 1+round((potency / 10), 2)) - reagents.add_reagent("kelotane", 1+round((potency / 20), 1)) + reagents.add_reagent("kelotane", 1+round((potency / 20), 1)) diff --git a/code/modules/mob/living/simple_animal/friendly/mushroom.dm b/code/modules/mob/living/simple_animal/friendly/mushroom.dm deleted file mode 100644 index e99470ca03c..00000000000 --- a/code/modules/mob/living/simple_animal/friendly/mushroom.dm +++ /dev/null @@ -1,15 +0,0 @@ -/mob/living/simple_animal/mushroom - name = "walking mushroom" - desc = "It's a massive mushroom... with legs?" - icon_state = "mushroom" - icon_living = "mushroom" - icon_dead = "mushroom_dead" - speak_chance = 0 - turns_per_move = 1 - maxHealth = 5 - health = 5 - meat_type = /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice - response_help = "pets" - response_disarm = "gently pushes aside" - response_harm = "whacks" - harm_intent_damage = 5 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm new file mode 100644 index 00000000000..777373763dd --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -0,0 +1,71 @@ +/mob/living/simple_animal/hostile/mushroom + name = "walking mushroom" + desc = "It's a massive mushroom... with legs?" + icon_state = "mushroom" + icon_living = "mushroom" + icon_dead = "mushroom_dead" + speak_chance = 0 + turns_per_move = 1 + maxHealth = 50 + health = 50 + meat_type = /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "whacks" + harm_intent_damage = 5 + melee_damage_lower = 5 + melee_damage_upper = 15 + attack_same = 2 + attacktext = "chomps" + faction = "mushroom" + environment_smash = 0 + stat_attack = 2 + var/powerlevel = 0 //Tracks our killcount + var/bruised = 0 //If someone tries to cheat the system by attacking a shroom to lower its health, punish them so that it wont award levels to shrooms that eat it + +/mob/living/simple_animal/hostile/mushroom/attack_animal(var/mob/living/L) + if(istype(L, /mob/living/simple_animal/hostile/mushroom) && stat == 2) + var/mob/living/simple_animal/hostile/mushroom/M = L + M.visible_message("The [M.name] devours the [src.name]!") + if(!bruised) + M.LevelUp() + del(src) + ..() + +/mob/living/simple_animal/hostile/mushroom/proc/LevelUp() + if(powerlevel <= 9) + powerlevel += 1 + melee_damage_lower += 5 + melee_damage_upper += 5 + maxHealth += 5 + health = maxHealth + +/mob/living/simple_animal/hostile/mushroom/proc/Bruise() + if(!bruised && !stat) + src.visible_message("The [src.name] was bruised!") + bruised = 1 + +/mob/living/simple_animal/hostile/mushroom/attackby(obj/item/weapon/W as obj, mob/user as mob) + ..() + Bruise() + +/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M as mob) + ..() + if(M.a_intent == "harm") + Bruise() + +/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM) + ..() + if(istype(AM, /obj/item)) + var/obj/item/T = AM + if(T.throwforce) + Bruise() + +/mob/living/simple_animal/hostile/mushroom/harvest() + var/counter + for(counter=0, counter<=powerlevel, counter++) + var/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice/S = new /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice(src.loc) + S.reagents.add_reagent("mushroomhallucinogen", powerlevel) + S.reagents.add_reagent("doctorsdelight", powerlevel) + S.reagents.add_reagent("synaptizine", powerlevel) + del(src) \ No newline at end of file diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index b8281e65b0e..ac38a35b839 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -478,7 +478,7 @@ return 1 if(ispath(MP, /mob/living/simple_animal/hostile/carp)) return 1 - if(ispath(MP, /mob/living/simple_animal/mushroom)) + if(ispath(MP, /mob/living/simple_animal/hostile/mushroom)) return 1 if(ispath(MP, /mob/living/simple_animal/shade)) return 1 diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 0aee7b729e2..12b8f565b05 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -170,7 +170,7 @@ proc/wabbajack(mob/living/M) if("cat") new_mob = new /mob/living/simple_animal/cat(M.loc) if("carp") new_mob = new /mob/living/simple_animal/hostile/carp(M.loc) if("bear") new_mob = new /mob/living/simple_animal/hostile/bear(M.loc) - if("mushroom") new_mob = new /mob/living/simple_animal/mushroom(M.loc) + if("mushroom") new_mob = new /mob/living/simple_animal/hostile/mushroom(M.loc) if("tomato") new_mob = new /mob/living/simple_animal/tomato(M.loc) if("mouse") new_mob = new /mob/living/simple_animal/mouse(M.loc) if("chicken") new_mob = new /mob/living/simple_animal/chicken(M.loc) diff --git a/tgstation.dme b/tgstation.dme index 072b55cdcbc..dbdff9390f6 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1016,7 +1016,6 @@ #include "code\modules\mob\living\simple_animal\friendly\farm_animals.dm" #include "code\modules\mob\living\simple_animal\friendly\lizard.dm" #include "code\modules\mob\living\simple_animal\friendly\mouse.dm" -#include "code\modules\mob\living\simple_animal\friendly\mushroom.dm" #include "code\modules\mob\living\simple_animal\friendly\pug.dm" #include "code\modules\mob\living\simple_animal\friendly\slime.dm" #include "code\modules\mob\living\simple_animal\friendly\tomato.dm" @@ -1030,6 +1029,7 @@ #include "code\modules\mob\living\simple_animal\hostile\hostile.dm" #include "code\modules\mob\living\simple_animal\hostile\mimic.dm" #include "code\modules\mob\living\simple_animal\hostile\mining_mobs.dm" +#include "code\modules\mob\living\simple_animal\hostile\mushroom.dm" #include "code\modules\mob\living\simple_animal\hostile\pirate.dm" #include "code\modules\mob\living\simple_animal\hostile\russian.dm" #include "code\modules\mob\living\simple_animal\hostile\syndicate.dm"