mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
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:
@@ -78,6 +78,8 @@
|
||||
#define NO_MALF_EFFECT_2 (1<<17)
|
||||
/// Use when this shouldn't be obscured by large icons.
|
||||
#define CRITICAL_ATOM_2 (1<<18)
|
||||
/// Use this flag for items that can block randomly
|
||||
#define RANDOM_BLOCKER_2 (1<<19)
|
||||
|
||||
//Reagent flags
|
||||
#define REAGENT_NOREACT 1
|
||||
|
||||
@@ -610,6 +610,7 @@
|
||||
origin_tech = "materials=6;syndicate=4"
|
||||
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
|
||||
sharp = TRUE
|
||||
flags_2 = RANDOM_BLOCKER_2
|
||||
|
||||
/obj/item/twohanded/chainsaw/update_icon_state()
|
||||
if(wielded)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
throwforce = 1
|
||||
hitsound = 'sound/effects/ghost2.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "rended")
|
||||
flags_2 = RANDOM_BLOCKER_2
|
||||
var/summon_cooldown = 0
|
||||
var/list/mob/dead/observer/spirits
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user