Adds the vortex feedback inversion arm. (#19821)

* start of mess

* reflect/parries works

* more pog-ress

* temp icons, .33 to 0.4

* more work, sound, rnd, fixes me breaking shields

* removes this since open pr fixes

* better codee

* attack log

* Final changes / sprites by ramon

* fixes issue

* shoot ramon for the white pixel :^)

* But what if it was a purple glass shard

* Fixes the throw parry

* sorry for so many commits, lower callback

* Apply suggestions from code review

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

* Early return, no need to typecast

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2022-12-27 10:45:59 -05:00
committed by GitHub
co-authored by Sirryan2002
parent 4cd66496a5
commit f86374a504
13 changed files with 169 additions and 15 deletions
@@ -32,8 +32,12 @@ emp_act
return -1
//Shields
if(check_shields(P, P.damage, "the [P.name]", PROJECTILE_ATTACK, P.armour_penetration_flat, P.armour_penetration_percentage))
var/shield_check_result = check_shields(P, P.damage, "the [P.name]", PROJECTILE_ATTACK, P.armour_penetration_flat, P.armour_penetration_percentage)
if(shield_check_result == 1)
return 2
else if(shield_check_result == -1)
P.reflect_back(src)
return -1
if(mind?.martial_art?.deflection_chance) //Some martial arts users can deflect projectiles!
if(!IS_HORIZONTAL(src) && !HAS_TRAIT(src, TRAIT_HULK) && mind.martial_art.try_deflect(src)) //But only if they're not lying down, and hulks can't do it
@@ -219,9 +223,11 @@ emp_act
/mob/living/carbon/human/proc/check_shields(atom/AM, damage, attack_text = "the attack", attack_type = MELEE_ATTACK, armour_penetration_flat = 0, armour_penetration_percentage = 0)
var/obj/item/shield = get_best_shield()
if(shield?.hit_reaction(src, AM, attack_text, 0, damage, attack_type))
var/shield_result = shield?.hit_reaction(src, AM, attack_text, 0, damage, attack_type)
if(shield_result >= 1)
return TRUE
if(shield_result == -1)
return -1
if(wear_suit && wear_suit.hit_reaction(src, AM, attack_text, 0, damage, attack_type))
return TRUE