mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Parrot stress relief pull:
Buffs parrots health from 20 to 80. Parrots have gone from opportune attackers (attack weak babies) to aggressive idiots (attack so long as I have good health) Fixes a obscure little bug where a parrot left alone without anyone to hear them couldn't speak through radios. Ghost poly can now posses people who try to attack them and force them to spout parrot lines. The ghost poly easter egg now has a very rare chance of happening every time poly dies.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/datum/disease/parrot_possession
|
||||
name = "Parrot Possession"
|
||||
max_stages = 1
|
||||
spread_text = "Paranormal"
|
||||
spread_flags = SPECIAL
|
||||
disease_flags = CURABLE
|
||||
cure_text = "Holy Water."
|
||||
cures = list("holywater")
|
||||
cure_chance = 20
|
||||
agent = "Avian Vengence"
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
desc = "Subject is possesed by the vengeful spirit of a parrot. Call the priest."
|
||||
severity = MEDIUM
|
||||
var/mob/living/simple_animal/parrot/Poly/ghost/parrot
|
||||
|
||||
/datum/disease/parrot_possession/stage_act()
|
||||
..()
|
||||
if(!parrot || parrot.loc != affected_mob)
|
||||
cure()
|
||||
else if(prob(parrot.speak_chance))
|
||||
affected_mob.say(pick(parrot.speech_buffer))
|
||||
|
||||
/datum/disease/parrot_possession/cure()
|
||||
if(parrot && parrot.loc == affected_mob)
|
||||
parrot.loc = affected_mob.loc
|
||||
affected_mob.visible_message("<span class='danger'>[parrot] is violently driven out of [affected_mob]!</span>", "<span class='userdanger'>[parrot] bursts out of your chest!</span>")
|
||||
..()
|
||||
@@ -34,6 +34,8 @@
|
||||
icon_living = "parrot_fly"
|
||||
icon_dead = "parrot_dead"
|
||||
density = 0
|
||||
health = 80
|
||||
maxHealth = 80
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
|
||||
speak = list("Hi!","Hello!","Cracker?","BAWWWWK george mellons griffing me!")
|
||||
@@ -148,6 +150,8 @@
|
||||
if(speech_buffer.len >= 500)
|
||||
speech_buffer -= pick(speech_buffer)
|
||||
speech_buffer |= html_decode(raw_message)
|
||||
if(speaker == src && !client) //If a parrot squawks in the woods and no one is around to hear it, does it make a sound? This code says yes!
|
||||
return message
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/radio(message, message_mode, list/spans) //literally copied from human/radio(), but there's no other way to do this. at least it's better than it used to be.
|
||||
@@ -286,7 +290,7 @@
|
||||
parrot_interest = M
|
||||
parrot_state = PARROT_SWOOP //The parrot just got hit, it WILL move, now to pick a direction..
|
||||
|
||||
if(M.health < 50) //Weakened mob? Fight back!
|
||||
if(health > 30) //Let's get in there and squawk it up!
|
||||
parrot_state |= PARROT_ATTACK
|
||||
else
|
||||
parrot_state |= PARROT_FLEE //Otherwise, fly like a bat out of hell!
|
||||
@@ -325,8 +329,8 @@
|
||||
|
||||
parrot_interest = user
|
||||
parrot_state = PARROT_SWOOP
|
||||
if (user.health < 50)
|
||||
parrot_state |= PARROT_ATTACK //weakened mob? fight back!
|
||||
if(health > 30) //Let's get in there and squawk it up!
|
||||
parrot_state |= PARROT_ATTACK
|
||||
else
|
||||
parrot_state |= PARROT_FLEE
|
||||
icon_state = "parrot_fly"
|
||||
@@ -902,7 +906,7 @@
|
||||
/mob/living/simple_animal/parrot/Poly/death(gibbed)
|
||||
if(!memory_saved)
|
||||
var/go_ghost = 0
|
||||
if(rounds_survived == longest_survival || rounds_survived == longest_deathstreak)
|
||||
if(rounds_survived == longest_survival || rounds_survived == longest_deathstreak || prob(0.666))
|
||||
go_ghost = 1
|
||||
rounds_survived = min(--rounds_survived,0)
|
||||
if(rounds_survived < longest_deathstreak)
|
||||
@@ -948,7 +952,26 @@
|
||||
memory_saved = 1 //At this point nothing is saved
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/ghost/handle_automated_speech()
|
||||
if(ismob(loc))
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/ghost/handle_automated_movement()
|
||||
if(isliving(parrot_interest))
|
||||
parrot_interest = null
|
||||
if(!ishuman(parrot_interest))
|
||||
parrot_interest = null
|
||||
else if(parrot_state == (PARROT_SWOOP | PARROT_ATTACK) && Adjacent(parrot_interest))
|
||||
walk_to(src, parrot_interest, 0, parrot_speed)
|
||||
Possess(parrot_interest)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/ghost/proc/Possess(mob/living/carbon/human/H)
|
||||
if(!ishuman(H))
|
||||
return
|
||||
var/datum/disease/parrot_possession/P = new
|
||||
P.parrot = src
|
||||
loc = H
|
||||
H.ContractDisease(P)
|
||||
parrot_interest = null
|
||||
H.visible_message("<span class='danger'>[src] dive bombs into [H]'s chest and vanishes!</span>", "<span class='userdanger'>[src] dive bombs into your chest, vanishing! This can't be good!</span>")
|
||||
@@ -195,6 +195,7 @@
|
||||
#include "code\datums\diseases\fluspanish.dm"
|
||||
#include "code\datums\diseases\gbs.dm"
|
||||
#include "code\datums\diseases\magnitis.dm"
|
||||
#include "code\datums\diseases\parrotpossession.dm"
|
||||
#include "code\datums\diseases\pierrot_throat.dm"
|
||||
#include "code\datums\diseases\retrovirus.dm"
|
||||
#include "code\datums\diseases\rhumba_beat.dm"
|
||||
|
||||
Reference in New Issue
Block a user