This commit is contained in:
Fox-McCloud
2014-12-12 06:52:20 -05:00
parent 1a425064a5
commit e76c8f26f3
27 changed files with 110 additions and 44 deletions
+2 -2
View File
@@ -303,7 +303,7 @@ proc/check_panel(mob/M)
if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.show_message("\red <B>[my_target] has been attacked with [weapon_name] by [src.name] </B>", 1)
my_target.halloss += 8
my_target.staminaloss += 30
if(prob(20)) my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
@@ -311,7 +311,7 @@ proc/check_panel(mob/M)
else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("\red <B>[src.name] has punched [my_target]!</B>", 1)
my_target.halloss += 4
my_target.staminaloss += 30
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
+5
View File
@@ -187,6 +187,11 @@
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1)
if(staminaloss)
if(staminaloss > 30)
src << "<span class='info'>You're completely exhausted.</span>"
else
src << "<span class='info'>You feel fatigued.</span>"
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else if(lying) // /vg/: For hugs. This is how update_icon figgers it out, anyway. - N3X15
@@ -33,7 +33,7 @@
visible_message("\red <B>[M] has punched [src]!</B>")
apply_damage(damage, HALLOSS, affecting, armor_block)
apply_damage(damage, STAMINA, affecting, armor_block)
if(damage >= 9)
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(4, WEAKEN, armor_block)
@@ -15,7 +15,7 @@
if((M_RUN in mutations)) return -1
var/health_deficiency = (100 - health)
var/health_deficiency = (100 - health + staminaloss)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
+4 -1
View File
@@ -1062,6 +1062,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
adjustHalLoss(-3)
else if(sleeping)
handle_dreams()
adjustStaminaLoss(-10)
adjustHalLoss(-3)
if (mind)
if((mind.active && client != null) || immune_to_ssd) //This also checks whether a client is connected, if not, sleep is not reduced.
@@ -1167,6 +1168,8 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(gloves && germ_level > gloves.germ_level && prob(10))
gloves.germ_level += 1
CheckStamina()
return 1
proc/handle_regular_hud_updates()
@@ -1356,7 +1359,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(2) healths.icon_state = "health7"
else
//switch(health - halloss)
switch(100 - ((species && species.flags & NO_PAIN) ? 0 : traumatic_shock))
switch(100 - ((species && species.flags & NO_PAIN) ? 0 : traumatic_shock) - staminaloss)
if(100 to INFINITY) healths.icon_state = "health0"
if(80 to 100) healths.icon_state = "health1"
if(60 to 80) healths.icon_state = "health2"
@@ -569,6 +569,9 @@
//Other
handle_statuses()
CheckStamina()
return 1
+4 -1
View File
@@ -24,11 +24,13 @@
adjustCloneLoss(damage/(blocked+1))
if(HALLOSS)
adjustHalLoss(damage/(blocked+1))
if(STAMINA)
adjustStaminaLoss(damage/(blocked+1))
updatehealth()
return 1
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/halloss = 0, var/def_zone = null, var/blocked = 0)
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/halloss = 0, var/def_zone = null, var/blocked = 0, var/stamina = 0)
if(blocked >= 2) return 0
if(brute) apply_damage(brute, BRUTE, def_zone, blocked)
if(burn) apply_damage(burn, BURN, def_zone, blocked)
@@ -36,6 +38,7 @@
if(oxy) apply_damage(oxy, OXY, def_zone, blocked)
if(clone) apply_damage(clone, CLONE, def_zone, blocked)
if(halloss) apply_damage(halloss, HALLOSS, def_zone, blocked)
if(stamina) apply_damage(stamina, STAMINA, def_zone, blocked)
return 1
+47 -1
View File
@@ -153,6 +153,17 @@
if(status_flags & GODMODE) return 0 //godmode
brainloss = amount
/mob/living/proc/getStaminaLoss()
return staminaloss
/mob/living/proc/adjustStaminaLoss(var/amount)
if(status_flags & GODMODE) return 0
staminaloss = min(max(staminaloss + amount, 0),(maxHealth*2))
/mob/living/proc/setStaminaLoss(var/amount)
if(status_flags & GODMODE) return 0
staminaloss = amount
/mob/living/proc/getHalLoss()
return halloss
@@ -291,6 +302,8 @@
setOxyLoss(0)
setCloneLoss(0)
setBrainLoss(0)
setStaminaLoss(0)
setHalLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
@@ -611,9 +624,11 @@
var/mob/living/carbon/CM = L
if(CM.on_fire && CM.canmove)
CM.fire_stacks -= 5
CM.weakened = 5
CM.Weaken(3)
CM.spin(32,2)
CM.visible_message("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
"<span class='notice'>You stop, drop, and roll!</span>")
sleep(30)
if(fire_stacks <= 0)
CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
"<span class='notice'>You extinguish yourself.</span>")
@@ -695,6 +710,37 @@
CM.legcuffed = null
CM.update_inv_legcuffed()
/mob/living/carbon/proc/spin(spintime, speed)
spawn()
var/D = dir
while(spintime >= speed)
sleep(speed)
switch(D)
if(NORTH)
D = EAST
if(SOUTH)
D = WEST
if(EAST)
D = SOUTH
if(WEST)
D = NORTH
dir = D
spintime -= speed
return
/mob/living/proc/CheckStamina()
if(staminaloss)
var/total_health = (health - staminaloss)
if(total_health <= config.health_threshold_softcrit && !stat)
Exhaust()
setStaminaLoss(health - 2)
return
setStaminaLoss(max((staminaloss - 2), 0))
/mob/living/proc/Exhaust()
src << "<span class='notice'>You're too exhausted to keep going...</span>"
Weaken(5)
/mob/living/update_gravity(has_gravity)
if(!ticker)
return
+2 -2
View File
@@ -14,8 +14,8 @@
var/fireloss = 0.0 //Burn damage caused by being way too hot, too cold or burnt.
var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off.
var/halloss = 0 //Hallucination damage; utilize this largely for fake "pain" based damage. Sleeping should cause it to wear of
var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this.
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
@@ -112,7 +112,7 @@
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -154,7 +154,7 @@
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -282,7 +282,7 @@
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -141,7 +141,7 @@
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -61,7 +61,7 @@
if(O.force)
if(prob(80))
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
health -= damage
visible_message("\red \b [src] has been attacked with the [O] by [user]. ")
@@ -46,7 +46,7 @@
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
@@ -161,7 +161,7 @@
if( abs(Environment.temperature - bodytemperature) > 40 )
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
if(min_oxy)
if(Environment.oxygen < min_oxy)
atmos_suitable = 0
@@ -188,7 +188,7 @@
atmos_suitable = 0
if(flags & NO_BREATHE || flags & IS_SYNTHETIC)
atmos_suitable = 1
//Atmos effect
if(bodytemperature < minbodytemp)
adjustBruteLoss(cold_damage_per_tick)
@@ -398,7 +398,7 @@
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
+1 -1
View File
@@ -36,7 +36,7 @@
if(O.force)
if(O.force >= 25)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
+1 -1
View File
@@ -245,7 +245,7 @@
mouthshoot = 0
return
in_chamber.on_hit(M)
if (in_chamber.damage_type != HALLOSS)
if (in_chamber.damage_type != STAMINA)
user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1)
user.death()
else
+2 -1
View File
@@ -66,6 +66,7 @@
icon_state = "omnilaser"
hitsound = null
damage = 0
damage_type = STAMINA
flag = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
@@ -75,7 +76,7 @@
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit))
if(M.wear_suit.type in suit_types)
M.adjustHalLoss(34)
M.adjustStaminaLoss(34)
return 1
/obj/item/projectile/lasertag/omni
@@ -75,7 +75,7 @@
name = "disabler beam"
icon_state = "omnilaser"
damage = 34
damage_type = HALLOSS
damage_type = STAMINA
var/range = 8
/obj/item/projectile/energy/disabler/Range()
+1 -1
View File
@@ -2088,7 +2088,7 @@ datum
data = 13
on_mob_life(var/mob/living/M)
M.adjustHalLoss(REM * data)
M.adjustStaminaLoss(REM * data)
data = max(data - 1, 3)
..()