diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index ef3da25a0c..ef54ea282e 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -365,7 +365,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) // afterattack() and attack() prototypes moved to _onclick/item_attack.dm for consistency -/obj/item/proc/hit_reaction(mob/living/carbon/human/owner, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) +/obj/item/proc/hit_reaction(mob/living/carbon/human/owner, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, atom/movable/AM) if(prob(final_block_chance)) owner.visible_message("[owner] blocks [attack_text] with [src]!") return 1 diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index ab99ddac24..4f5759e90d 100755 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -232,8 +232,9 @@ /obj/item/weapon/flamethrower/full/tank create_with_tank = TRUE -/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type) - if(ptank && damage && attack_type == PROJECTILE_ATTACK && prob(15)) +/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type, atom/movable/AM) + var/obj/item/projectile/P = AM + if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15)) owner.visible_message("[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!") var/target_turf = get_turf(owner) igniter.ignite_turf(src,target_turf, release_amount = 100) diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 81ccd127c8..f75ff4655b 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -104,8 +104,9 @@ /obj/item/weapon/grenade/attack_paw(mob/user) return attack_hand(user) -/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type) - if(damage && attack_type == PROJECTILE_ATTACK && prob(15)) +/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type, atom/movable/AM) + var/obj/item/projectile/P = AM + if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15)) owner.visible_message("[attack_text] hits [owner]'s [src], setting it off! What a shot!") prime() return 1 //It hit the grenade, not them diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 38e15db5a0..636b88871d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -91,15 +91,15 @@ for(var/obj/item/I in held_items) if(!istype(I, /obj/item/clothing)) 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.hit_reaction(src, attack_text, final_block_chance, damage, attack_type)) + if(I.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