Feeding poly crackers (existing mechanic) will now boost his speak chance permanently

Some arbitrary renaming of the new savefile vars

makes what was essentially a prob call a prob call.
This commit is contained in:
Incoming
2016-02-06 18:50:23 -05:00
parent 995352b818
commit 7939d069dc
2 changed files with 7 additions and 6 deletions
@@ -335,6 +335,7 @@
user.drop_item()
if(health < maxHealth)
adjustBruteLoss(-10)
speak_chance *= 2
user << "<span class='notice'>[src] eagerly devours the cracker.</span>"
..()
return
@@ -892,8 +893,8 @@
/mob/living/simple_animal/parrot/Poly/proc/Read_Memory()
var/savefile/S = new /savefile("data/npc_saves/Poly.sav")
S["phrases"] >> speech_buffer
S["rounds survived"] >> rounds_survived
S["longest survival"] >> longest_survival
S["rounds_survived"] >> rounds_survived
S["longest_survival"] >> longest_survival
if(isnull(speech_buffer))
speech_buffer = list()
@@ -902,10 +903,10 @@
var/savefile/S = new /savefile("data/npc_saves/Poly.sav")
S["phrases"] << speech_buffer
if(health > 0)
S["rounds survived"] << rounds_survived + 1
S["rounds_survived"] << rounds_survived + 1
if(rounds_survived == longest_survival)
S["longest survival"] << longest_survival + 1
S["longest_survival"] << longest_survival + 1
else
S["rounds survived"] << 0
S["rounds_survived"] << 0
memory_saved = 1
@@ -150,7 +150,7 @@
/mob/living/simple_animal/proc/handle_automated_speech(var/override)
if(speak_chance)
if(rand(0,100) < speak_chance || override)
if(prob(speak_chance) || override)
if(speak && speak.len)
if((emote_hear && emote_hear.len) || (emote_see && emote_see.len))
var/length = speak.len