diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index f2ba1899005..a0d3514d60f 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -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 diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index e645be44cd9..0b15975a30d 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -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) diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index 5ab7036c56f..63200121364 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index bec8484be9e..031b19925ba 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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)