diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 02bf1712e2..ca06fad93e 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -3,6 +3,7 @@ icon = 'icons/obj/shields.dmi' block_chance = 50 item_flags = ITEM_CAN_BLOCK + block_parry_data = /datum/block_parry_data/shield armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70) /// Shield flags var/shield_flags = SHIELD_FLAGS_DEFAULT @@ -23,6 +24,9 @@ /// Shield bashing push distance var/shieldbash_push_distance = 1 +/datum/block_parry_data/shield + + /obj/item/shield/examine(mob/user) . = ..() if(shield_flags & SHIELD_CAN_BASH) diff --git a/code/modules/mob/living/living_block.dm b/code/modules/mob/living/living_block.dm index 39e0c8b3bb..6245859bf0 100644 --- a/code/modules/mob/living/living_block.dm +++ b/code/modules/mob/living/living_block.dm @@ -38,7 +38,7 @@ if(real_attack) for(var/obj/item/I in tocheck) // i don't like this too - var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example + var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example var/results if(I == active_block_item) results = I.active_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list) @@ -50,7 +50,7 @@ else for(var/obj/item/I in tocheck) // i don't like this too - var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example + var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example if(I == active_block_item) //block is long termed enough we give a damn. parry, not so much. I.check_active_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list) else