mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #8988 from mwerezak/droplimb
Adjusts threshold for limb removal due to damage
This commit is contained in:
@@ -214,17 +214,21 @@
|
|||||||
//If limb took enough damage, try to cut or tear it off
|
//If limb took enough damage, try to cut or tear it off
|
||||||
if(owner && loc == owner)
|
if(owner && loc == owner)
|
||||||
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
|
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
|
||||||
var/threshold = max_damage/3
|
var/threshold = max_damage
|
||||||
var/dropped
|
var/dropped
|
||||||
if((burn >= threshold) && prob(burn/3))
|
if((burn >= threshold) && prob(burn/3))
|
||||||
dropped = 1
|
dropped = 1
|
||||||
droplimb(0,DROPLIMB_BURN)
|
droplimb(0,DROPLIMB_BURN)
|
||||||
if(!dropped && prob(brute))
|
if(!dropped && prob(brute))
|
||||||
if(brute >= threshold)
|
var/edge_eligible = 0
|
||||||
if((sharp || edge) && istype(used_weapon,/obj/item))
|
if(edge && istype(used_weapon,/obj/item))
|
||||||
var/obj/item/W = used_weapon
|
var/obj/item/W = used_weapon
|
||||||
if(W.w_class >= 3)
|
if(W.w_class >= 3)
|
||||||
droplimb(0,DROPLIMB_EDGE)
|
edge_eligible = 1
|
||||||
|
|
||||||
|
if(brute >= threshold || (edge_eligible && brute >= threshold/3))
|
||||||
|
if((sharp || edge))
|
||||||
|
droplimb(0,DROPLIMB_EDGE)
|
||||||
else
|
else
|
||||||
droplimb(0,DROPLIMB_BLUNT)
|
droplimb(0,DROPLIMB_BLUNT)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user