Merge pull request #11818 from Couls/baseball-deflects

Baseball!
This commit is contained in:
variableundefined
2019-08-23 08:05:41 -04:00
committed by GitHub
6 changed files with 61 additions and 10 deletions
@@ -141,19 +141,19 @@ emp_act
if(l_hand && !istype(l_hand, /obj/item/clothing))
var/final_block_chance = l_hand.block_chance - (Clamp((armour_penetration-l_hand.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
if(l_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
if(l_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
return 1
if(r_hand && !istype(r_hand, /obj/item/clothing))
var/final_block_chance = r_hand.block_chance - (Clamp((armour_penetration-r_hand.armour_penetration)/2,0,100)) + block_chance_modifier //Need to reset the var so it doesn't carry over modifications between attempts
if(r_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
if(r_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
return 1
if(wear_suit)
var/final_block_chance = wear_suit.block_chance - (Clamp((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier
if(wear_suit.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
if(wear_suit.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
return 1
if(w_uniform)
var/final_block_chance = w_uniform.block_chance - (Clamp((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier
if(w_uniform.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
if(w_uniform.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
return 1
return 0
@@ -525,4 +525,4 @@ emp_act
if(head)
to_chat(src, "<span class='danger'>Your [head.name] protects you from the [hot ? "hot" : "cold"] liquid!</span>")
return FALSE
return TRUE
return TRUE