Sharp attacks no longer get randomly blunted when the target is dead (#24552)

* extra blunt check no longer happens if target is dead

* un-inverts bloody check

* Ebba review
This commit is contained in:
cybercapitalism
2024-03-14 13:41:53 -05:00
committed by GitHub
parent b02091a835
commit a0bbeef2df
@@ -497,11 +497,15 @@ emp_act
return FALSE //item force is zero
var/armor = run_armor_check(affecting, MELEE, "<span class='warning'>Your armour has protected your [hit_area].</span>", "<span class='warning'>Your armour has softened hit to your [hit_area].</span>", armour_penetration_flat = I.armour_penetration_flat, armour_penetration_percentage = I.armour_penetration_percentage)
var/weapon_sharp = is_sharp(I)
if(weapon_sharp && prob(getarmor(user.zone_selected, MELEE)))
weapon_sharp = 0
if(armor == INFINITY)
return 0
return FALSE
var/weapon_sharp = I.sharp
// do not roll for random blunt if the target mob is dead for the ease of decaps
if(stat != DEAD)
if(weapon_sharp && prob(getarmor(user.zone_selected, MELEE)))
weapon_sharp = FALSE
var/bonus_damage = 0
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -509,11 +513,11 @@ emp_act
apply_damage(I.force + bonus_damage , I.damtype, affecting, armor, sharp = weapon_sharp, used_weapon = I)
var/bloody = 0
var/bloody = FALSE
if(I.damtype == BRUTE && I.force && prob(25 + I.force * 2))
I.add_mob_blood(src) //Make the weapon bloody, not the person.
if(prob(I.force * 2)) //blood spatter!
bloody = 1
bloody = TRUE
var/turf/location = loc
if(issimulatedturf(location))
add_splatter_floor(location, emittor_intertia = inertia_next_move > world.time ? last_movement_dir : null)