diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 3f89cc9e4e..c300379f9f 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -67,6 +67,9 @@ src.attack_paw(user) return +/atom/proc/attack_larva(mob/user as mob) + return + // for metroids /atom/proc/attack_metroid(mob/user as mob) return @@ -654,6 +657,16 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl if ( (W) && !alien.restrained() ) W.afterattack(src, alien) + else if(islarva(usr)) + var/mob/living/carbon/alien/larva/alien = usr + if(alien.stat) + return + + var/in_range = in_range(src, alien) || src.loc == alien + + if (in_range) + if ( !alien.restrained() ) + attack_larva(alien) else if(ismetroid(usr)) var/mob/living/carbon/metroid/metroid = usr @@ -980,6 +993,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl usr.hud_used.move_intent.icon_state = "running" usr.update_icons() src.attack_alien(usr, usr.hand) + else if (istype(usr, /mob/living/carbon/alien/larva)) + src.attack_larva(usr) else if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) src.attack_ai(usr, usr.hand) else if(istype(usr, /mob/living/carbon/metroid)) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index fa81765201..968f773760 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -8,6 +8,7 @@ health = 25 var/amount_grown = 0 + var/max_grown = 200 //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/larva/New() @@ -64,7 +65,7 @@ stat(null, "Move Mode: [m_intent]") if (client.statpanel == "Status") - stat(null, "Progress: [amount_grown]/200") + stat(null, "Progress: [amount_grown]/[max_grown]") stat(null, "Plasma Stored: [getPlasma()]") diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 8879244570..76fb111c57 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -64,7 +64,7 @@ proc/handle_mutations_and_radiation() //grow!! but not if metroid or dead - if(health>-100 && amount_grown < 200) + if(health>-100 && amount_grown < max_grown) amount_grown++ if (radiation) @@ -235,7 +235,7 @@ mutations.Add(FAT) else if(nutrition > 500) - if(prob(5 + round((nutrition - 200) / 2))) + if(prob(5 + round((nutrition - max_grown) / 2))) src << "\red You suddenly feel blubbery!" mutations.Add(FAT) diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm index 2c6d214914..54cfa4727c 100644 --- a/code/modules/mob/living/carbon/alien/larva/powers.dm +++ b/code/modules/mob/living/carbon/alien/larva/powers.dm @@ -22,7 +22,7 @@ set desc = "Evolve into a fully grown Alien." set category = "Alien" - if(amount_grown >= 200) //TODO ~Carn + if(amount_grown >= max_grown) //TODO ~Carn src << "\green You are growing into a beautiful alien! It is time to choose a caste." src << "\green There are three to choose from:" src << "\green Hunters are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves." diff --git a/code/modules/mob/living/simple_animal/life.dm b/code/modules/mob/living/simple_animal/life.dm index d5c45afbe0..3a7c50c267 100644 --- a/code/modules/mob/living/simple_animal/life.dm +++ b/code/modules/mob/living/simple_animal/life.dm @@ -282,7 +282,9 @@ return /mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M as mob) + switch(M.a_intent) + if ("help") for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) @@ -320,6 +322,22 @@ return +/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob) + + switch(L.a_intent) + if("help") + visible_message("\blue [L] rubs it's head against [src]") + + else + + var/damage = rand(5, 10) + visible_message("\red [L] bites [src]!") + + if(stat != DEAD) + src.health -= damage + L.amount_grown = min(L.amount_grown + damage, L.max_grown) + + /mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri if(istype(O, /obj/item/stack/medical)) if(stat != DEAD)