Fixes rng block chance not working (#20255)

* fixes rng block chance not working

* Update code/__DEFINES/flags.dm

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

---------

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2023-01-28 09:26:11 +01:00
committed by GitHub
co-authored by Ryan
parent 8cb62e1c94
commit b5700cab3e
4 changed files with 8 additions and 0 deletions
@@ -244,6 +244,10 @@ emp_act
var/datum/component/parry/left_hand_parry = l_hand?.GetComponent(/datum/component/parry)
var/datum/component/parry/right_hand_parry = r_hand?.GetComponent(/datum/component/parry)
if(!right_hand_parry && !left_hand_parry)
if(l_hand?.flags_2 & RANDOM_BLOCKER_2)
return l_hand
if(r_hand?.flags_2 & RANDOM_BLOCKER_2)
return r_hand
return null // no parry component
if(right_hand_parry && left_hand_parry)