Makes powerfist and wallbashing not ignore armor (#26981)

* Makes powerfist and wallbashing not ignore armor

* Safety for damage

* Lewc review

* Oops
This commit is contained in:
DGamerL
2024-10-29 17:24:02 +00:00
committed by GitHub
parent b941d365ed
commit 41f44ea833
3 changed files with 23 additions and 3 deletions
+7 -1
View File
@@ -101,7 +101,13 @@
user.do_attack_animation(target)
target.apply_damage(force * fisto_setting, BRUTE)
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_selected))
if(!affecting)
affecting = target.get_organ("chest")
var/armor_block = target.run_armor_check(affecting, MELEE)
target.apply_damage(force * fisto_setting, BRUTE, affecting, armor_block)
target.visible_message("<span class='danger'>[user]'s powerfist lets out a loud hiss as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
"<span class='userdanger'>You cry out in pain as [user]'s punch flings you backwards!</span>")
new /obj/effect/temp_visual/kinetic_blast(target.loc)
+8 -1
View File
@@ -275,12 +275,19 @@
if(mob_hurt) //Density check probably not needed, one should only bump into something if it is dense, and blob tiles are not dense, because of course they are not.
return
C.visible_message("<span class='danger'>[C] slams into [src]!</span>", "<span class='userdanger'>You slam into [src]!</span>")
C.take_organ_damage(damage)
if(!self_hurt)
take_damage(damage, BRUTE)
if(issilicon(C))
C.Weaken(3 SECONDS)
C.adjustBruteLoss(damage)
else
var/obj/item/organ/external/affecting = C.get_organ(ran_zone(throwingdatum.target_zone))
if(affecting)
var/armor_block = C.run_armor_check(affecting, MELEE)
C.apply_damage(damage, BRUTE, affecting, armor_block)
else
C.take_organ_damage(damage)
C.KnockDown(3 SECONDS)
/obj/handle_ricochet(obj/item/projectile/P)