Melee now applies AP to humans too, mech EMP armor fix. (#11855)

This commit is contained in:
Matt Atlas
2021-05-06 16:22:09 +02:00
committed by GitHub
parent e53d7854e6
commit 742357e0e8
4 changed files with 60 additions and 12 deletions
@@ -99,7 +99,7 @@
//Apply weapon damage
var/damage_flags = I.damage_flags()
apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags)
apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags, I.armor_penetration)
//Melee weapon embedded object code.
if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I))
+1 -8
View File
@@ -119,8 +119,6 @@
var/turf/simulated/location = get_turf(src)
if(istype(location)) location.add_blood_floor(src)
return blocked
//returns 0 if the effects failed to apply for some reason, 1 otherwise.
/mob/living/proc/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/hit_zone)
if(!effective_force)
@@ -132,13 +130,8 @@
//Apply weapon damage
var/damage_flags = I.damage_flags()
if(prob(blocked)) //armor provides a chance to turn sharp/edge weapon attacks into blunt ones
damage_flags &= ~DAM_SHARP
damage_flags &= ~DAM_EDGE
apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags, I.armor_penetration)
return TRUE
return apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags, I.armor_penetration)
//this proc handles being hit by a thrown atom
/mob/living/hitby(atom/movable/AM, var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve