mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Revamps limb-loss code (#16803)
* Revamps limb-loss code - Makes it so everyone isn't at squishy as necromorphs - Adds in a threshold for 'how damaged this limb needs to be prior' UNLESS you are dealing MASS DAMAGE to the limb, in which case it needs to be >1/2 the limb's hp (NOTE, GREATER THAN, NOT >=. This means the Eblade can not 1hit arms/legs) -Vital limbs divide damage recieved by 1.5x making it harder for them to hit the threshold to actually take vital limbs off. - When limbs enter 'critical state' (They were already at max damage and has been damaged even further) they are 3x more likely to get chopped off. - Projectiles are WAY too strong and have been WAY too powercrept. Damage dealt by them is divided by 1/2 for all of limbcode, meaning a 60 damage revolver is the equivalent of being hit by a 30 damage attack. If this is dealt to the head, this is the equivalent of being hit by a 20 damage attack. (no delimb) - Fixes a bug where sharp weapons were TRIPLE DIPPING their delimb chance. - Gets rid of brute weapon tearoff. They ONLY have the gib chance now. - Chances for objects removing your limbs has been HEAVILY lowered. * I guess mobs get projectile as well now
This commit is contained in:
@@ -464,10 +464,9 @@ This function restores all organs.
|
||||
return organs_by_name[zone]
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null)
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = FALSE)
|
||||
if(Debug2)
|
||||
to_world_log("## DEBUG: human/apply_damage() was called on [src], with [damage] damage, an armor value of [blocked], and a soak value of [soaked].")
|
||||
|
||||
var/obj/item/organ/external/organ = null
|
||||
if(isorgan(def_zone))
|
||||
organ = def_zone
|
||||
@@ -568,7 +567,7 @@ This function restores all organs.
|
||||
M.energy_source.use(M.damage_cost*damage)
|
||||
damage *= M.incoming_brute_damage_percent
|
||||
|
||||
if(organ.take_damage(damage, 0, sharp, edge, used_weapon))
|
||||
if(organ.take_damage(damage, 0, sharp, edge, used_weapon, projectile=projectile))
|
||||
UpdateDamageIcon()
|
||||
if(BURN)
|
||||
damageoverlaytemp = 20
|
||||
@@ -585,7 +584,7 @@ This function restores all organs.
|
||||
M.energy_source.use(M.damage_cost*damage)
|
||||
damage *= M.incoming_fire_damage_percent
|
||||
|
||||
if(organ.take_damage(0, damage, sharp, edge, used_weapon))
|
||||
if(organ.take_damage(0, damage, sharp, edge, used_weapon, projectile=projectile))
|
||||
UpdateDamageIcon()
|
||||
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Returns
|
||||
standard 0 if fail
|
||||
*/
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/used_weapon = null, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null)
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/used_weapon = null, var/sharp = FALSE, var/edge = FALSE, var/obj/used_weapon = null, var/projectile = 0)
|
||||
if(Debug2)
|
||||
to_world_log("## DEBUG: apply_damage() was called on [src], with [damage] damage, and an armor value of [blocked].")
|
||||
if(!damage || (blocked >= 100))
|
||||
|
||||
@@ -122,12 +122,12 @@
|
||||
if(P.taser_effect)
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, P, sharp=proj_sharp, edge=proj_edge, projectile=TRUE)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, soaked, 0, P, sharp=proj_sharp, edge=proj_edge, projectile=TRUE)
|
||||
P.on_hit(src, absorb, soaked, def_zone)
|
||||
|
||||
if(absorb == 100)
|
||||
|
||||
Reference in New Issue
Block a user