diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 128621dff3..698adfd9d7 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -1259,22 +1259,23 @@ return if(iscyborg(target)) return ..() - if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, null) & BLOCK_SUCCESS) //No message; run_block() handles that + var/list/return_list = list() + if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, return_list) & BLOCK_SUCCESS) //No message; run_block() handles that playsound(target, 'sound/weapons/genhit.ogg', 50, 1) return FALSE if(user.a_intent != INTENT_HARM) - if(stun_act(target, user)) + if(stun_act(target, user, null, return_list)) user.do_attack_animation(target) user.adjustStaminaLossBuffered(stun_stam_cost) return - else if(!harm_act(target, user)) + else if(!harm_act(target, user, null, return_list)) return ..() //if you can't fry them just beat them with it else //we did harm act them user.do_attack_animation(target) user.adjustStaminaLossBuffered(lethal_stam_cost) -/obj/item/twohanded/electrostaff/proc/stun_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE) - var/stunforce = stun_stamdmg +/obj/item/twohanded/electrostaff/proc/stun_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE, list/block_return = list()) + var/stunforce = block_calculate_resultant_damage(stun_stamdmg, block_return) if(!no_charge_and_force) if(!on) target.visible_message("[user] has bapped [target] with [src]. Luckily it was off.", \ @@ -1304,8 +1305,8 @@ H.forcesay(GLOB.hit_appends) return TRUE -/obj/item/twohanded/electrostaff/proc/harm_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE) - var/lethal_force = lethal_damage +/obj/item/twohanded/electrostaff/proc/harm_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE, list/block_return = list()) + var/lethal_force = block_calculate_resultant_damage(lethal_damage, block_return) if(!no_charge_and_force) if(!on) return FALSE //standard item attack diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 5378ea2276..e4417a6d64 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -432,15 +432,18 @@ /obj/item/shield/changeling name = "shield-like mass" desc = "A mass of tough, boney tissue. You can still see the fingers as a twisted pattern in the shield." - item_flags = ABSTRACT | DROPDEL + item_flags = ABSTRACT | DROPDEL | ITEM_CAN_BLOCK icon = 'icons/obj/items_and_weapons.dmi' icon_state = "ling_shield" lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi' righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi' - block_chance = 50 + block_parry_data = /datum/block_parry_data/shield/changeling var/remaining_uses //Set by the changeling ability. +/datum/block_parry_data/shield/changeling + block_slowdown = 0 + /obj/item/shield/changeling/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) @@ -451,7 +454,7 @@ block_return[BLOCK_RETURN_BLOCK_CAPACITY] = (block_return[BLOCK_RETURN_BLOCK_CAPACITY] || 0) + remaining_uses return ..() -/obj/item/shield/changeling/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) +/obj/item/shield/changeling/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) . = ..() if(--remaining_uses < 1) if(ishuman(loc))