diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index d6c48800626..39fef054bcf 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -43,6 +43,8 @@ #define STATUS_EFFECT_BLOOD_RUSH /datum/status_effect/blood_rush // speed boost for gargantua vampires +#define STATUS_EFFECT_CHAINSAW_SLAYING /datum/status_effect/chainsaw_slaying // Stun immunity, very slight damage resistance + ///////////// // DEBUFFS // diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 4730729fb72..ba53a952fde 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -51,7 +51,7 @@ /datum/status_effect/his_grace/on_remove() add_attack_logs(owner, owner, "lost His Grace's stun immunity", ATKLOG_ALL) if(islist(owner.stun_absorption) && owner.stun_absorption["hisgrace"]) - owner.stun_absorption -= "hisgrace" + owner.remove_stun_absorption("hisgrace") /datum/status_effect/shadow_mend id = "shadow_mend" @@ -132,7 +132,7 @@ add_attack_logs(owner, owner, "lost blood-drunk stun immunity", ATKLOG_ALL) REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, "blooddrunk") if(islist(owner.stun_absorption) && owner.stun_absorption["blooddrunk"]) - owner.stun_absorption -= "blooddrunk" + owner.remove_stun_absorption("blooddrunk") /datum/status_effect/bloodswell id = "bloodswell" @@ -212,7 +212,7 @@ var/mob/living/carbon/human/H = owner H.cut_overlay(shield) if(islist(owner.stun_absorption) && owner.stun_absorption["[id]"]) - owner.stun_absorption -= "[id]" + owner.remove_stun_absorption("[id]") H.physiology.stamina_mod /= 0.1 H.physiology.brute_mod /= 0.5 H.physiology.burn_mod /= 0.5 @@ -393,3 +393,36 @@ owner.emote("gasp") cling.genetic_damage += stacks cling = null + +/datum/status_effect/chainsaw_slaying + id = "chainsaw_slaying" + duration = 5 SECONDS + status_type = STATUS_EFFECT_REFRESH + alert_type = /obj/screen/alert/status_effect/chainsaw + +/obj/screen/alert/status_effect/chainsaw + name = "Revved up!" + desc = "... guts, huge guts! Kill them... must kill them all!" + icon_state = "chainsaw" + +/datum/status_effect/chainsaw_slaying/on_apply() + . = ..() + if(.) + if(ishuman(owner)) + var/mob/living/carbon/human/H = owner + H.physiology.brute_mod *= 0.8 + H.physiology.burn_mod *= 0.8 + H.physiology.stamina_mod *= 0.8 + add_attack_logs(owner, owner, "gained chainsaw stun immunity", ATKLOG_ALL) + owner.add_stun_absorption("chainsaw", INFINITY, 4) + owner.playsound_local(get_turf(owner), 'sound/effects/singlebeat.ogg', 40, TRUE, use_reverb = FALSE) + +/datum/status_effect/chainsaw_slaying/on_remove() + add_attack_logs(owner, owner, "lost chainsaw stun immunity", ATKLOG_ALL) + if(islist(owner.stun_absorption) && owner.stun_absorption["chainsaw"]) + owner.remove_stun_absorption("chainsaw") + if(ishuman(owner)) + var/mob/living/carbon/human/H = owner + H.physiology.brute_mod /= 0.8 + H.physiology.burn_mod /=0.8 + H.physiology.stamina_mod /= 0.8 diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index ccd38589bbf..c8beea57c42 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -625,13 +625,21 @@ if(!isliving(target)) return else - target.Weaken(8 SECONDS) - ..() + user.apply_status_effect(STATUS_EFFECT_CHAINSAW_SLAYING) + if(..()) + target.KnockDown(8 SECONDS) return else playsound(loc, "swing_hit", 50, 1, -1) return ..() +/obj/item/twohanded/chainsaw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + if(attack_type == PROJECTILE_ATTACK) + final_block_chance = 0 //It's a chainsaw, you try blocking bullets with it + else if(owner.has_status_effect(STATUS_EFFECT_CHAINSAW_SLAYING)) + final_block_chance = 80 //Need to be ready to ruuuummbllleeee + return ..() + /obj/item/twohanded/chainsaw/wield() //you can't disarm an active chainsaw, you crazy person. . = ..() if(.) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 586a3224d8b..dd9eb59770d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -115,7 +115,7 @@ Difficulty: Medium /obj/item/melee/energy/cleaving_saw/miner/attack(mob/living/target, mob/living/carbon/human/user) target.add_stun_absorption("miner", 10, INFINITY) ..() - target.stun_absorption -= "miner" + target.remove_stun_absorption("miner") /obj/item/projectile/kinetic/miner damage = 20 diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 7469b602161..faafe256ed9 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -853,6 +853,15 @@ moving up or down retains their old lying angle priority_absorb_key["stuns_absorbed"] += amount return TRUE +/mob/living/proc/remove_stun_absorption(id_flag) + stun_absorption -= id_flag + if(ishuman(src)) + var/mob/living/carbon/human/H = src + if(H.getStaminaLoss() <= 100) + return + H.enter_stamcrit() + + /mob/living/proc/set_shocked() flags_2 |= SHOCKED_2 diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index 13e4b43f274..a45d4b060ee 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ