diff --git a/__DEFINES/reagents.dm b/__DEFINES/reagents.dm index f2c56eccb686..55ddd68af6b7 100644 --- a/__DEFINES/reagents.dm +++ b/__DEFINES/reagents.dm @@ -164,6 +164,7 @@ #define HOLYSALTS "holysalts" #define CREATINE "creatine" #define CARPPHEROMONES "carppheromones" +#define KILLERPHEROMONES "killerpheromones" #define BLACKPEPPER "blackpepper" #define CINNAMON "cinnamon" #define ZAMSPICES "zamspices" diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 30d8d10e0f6f..0b27dd1777b2 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -684,6 +684,7 @@ display_name = "killer tomato plant" plant_dmi = 'icons/obj/hydroponics/killertomato.dmi' products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato) + chems = list(NUTRIMENT = list(1,10), KILLERPHEROMONES = list(5,4)) mutants = null yield = 2 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm index 9457bb09e883..967f3abc880a 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm @@ -8,7 +8,7 @@ if(!L.stat) stance = HOSTILE_STANCE_ATTACK return L - else + else if(!L.reagents || !L.reagents.has_reagent(KILLERPHEROMONES)) enemies -= L else if(istype(A, /obj/mecha)) var/obj/mecha/M = A diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index b5a602fe04d5..d1cba81c9eb0 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -1302,6 +1302,7 @@ /obj/item/weapon/reagent_containers/food/snacks/meat/tomatomeat/New() ..() reagents.add_reagent(NUTRIMENT, 3) + reagents.add_reagent(KILLERPHEROMONES, 3) src.bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/meat/spiderleg diff --git a/code/modules/reagents/reagents/reagents_bio.dm b/code/modules/reagents/reagents/reagents_bio.dm index 11be4d9c90a7..8e300949281f 100644 --- a/code/modules/reagents/reagents/reagents_bio.dm +++ b/code/modules/reagents/reagents/reagents_bio.dm @@ -312,6 +312,53 @@ to_chat(C, "You are engulfed by a [pick("tremendous", "foul", "disgusting", "horrible")] stench emanating from [M]!") +/datum/reagent/killer_pheromones + name = "Killer Pheromones" + id = KILLERPHEROMONES + description = "A viscous liquid with a strong smell that resembles blood and ketchup, which is like blood in the water to killer tomatoes if air was water." + reagent_state = REAGENT_STATE_LIQUID + color = "#993300" + custom_metabolism = 2 + density = 109.06 + var/list/mob/living/simple_animal/hostile/retaliate/horde = list() + +/datum/reagent/killer_pheromones/on_mob_life(var/mob/living/M) + if(..()) + return 1 + + if(!tick) + to_chat(M,"You feel like [pick("you're alerting a horde", "something is waiting to pounce on you", "carnivorous beings are nearby")]! [pick("Do you, perhaps...?","Maybe... just maybe...")]") + + if(volume < 3) + if(volume <= custom_metabolism) + to_chat(M,"You feel [pick("like the coast is clear", "out of danger", "less threatened")]!") + else if(!(tick%4)) + to_chat(M,"You feel [pick("further from danger", "like you're losing something chasing you", "less hunted down")]...") + + var/stench_radius = clamp(volume * 0.1, 1, 6) //Stench starts out with 1 tile radius and grows after every 10 reagents on you + + var/alerted = 0 + for(var/mob/living/simple_animal/hostile/retaliate/R in view(stench_radius, M)) //All other retaliating hostile mobs in radius + if(R == M || R.stat || R.hostile || (M in R.enemies)) + continue + + R.Retaliate() + horde += R + alerted++ + break + + if(alerted >= 2) + to_chat(M,"YOU HAVE ALERTED THE HORDE!") + +/datum/reagent/killer_pheromones/reagent_deleted() + if(..()) + return 1 + if(!holder) + return + var/mob/M = holder.my_atom + for(var/mob/living/simple_animal/hostile/retaliate/R in horde) + R.enemies -= M + /datum/reagent/ectoplasm name = "Ectoplasm" id = ECTOPLASM