Merge pull request #7046 from mwerezak/stance

Adjusts damaged stance system
This commit is contained in:
Zuhayr
2014-11-19 23:12:43 +10:30
3 changed files with 15 additions and 12 deletions

View File

@@ -55,8 +55,7 @@
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
if(can_stand <= 1)
tally += 5 //hopping around on one foot is slow
tally += 2*stance_damage //damaged/missing feet or legs is slow
if(mRun in mutations)
tally = 0

View File

@@ -213,7 +213,7 @@
var/universal_speak = 0 // Set to 1 to enable the mob to speak to everyone -- TLE
var/universal_understand = 0 // Set to 1 to enable the mob to understand everyone, not necessarily speak
var/can_stand = 2 //Whether this mob have ability to stand
var/stance_damage = 0 //Whether this mob's ability to stand has been affected
var/immune_to_ssd = 0

View File

@@ -104,16 +104,20 @@
W.germ_level += 1
/mob/living/carbon/human/proc/handle_stance()
can_stand = 2
if (lying || resting)
return // don't need to process any of this if they aren't standing anyways
stance_damage = 0
for (var/organ in list("l_leg","l_foot","r_leg","r_foot"))
var/datum/organ/external/E = organs_by_name[organ]
if ((E.status & ORGAN_DESTROYED) || E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
can_stand-- // let it fail even if just foot&leg
if (E.status & ORGAN_DESTROYED)
stance_damage += 2 // let it fail even if just foot&leg
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
stance_damage += 1
// standing is poor
if(can_stand <= 0)
Weaken(10)
if (!(lying || resting))
if(species && !(species.flags & NO_PAIN))
emote("scream")
emote("collapse")
if(stance_damage >= 4 || (stance_damage >= 2 && prob(5)))
Weaken(5)
if(species && !(species.flags & NO_PAIN))
emote("scream")
emote("collapse")