Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworks the syndicate chainsaw #18252

Merged
merged 6 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 //
Expand Down
39 changes: 36 additions & 3 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = "<span class='danger'>... guts, huge guts! Kill them... must kill them all!</span>"
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
12 changes: 10 additions & 2 deletions code/game/objects/items/weapons/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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(.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions code/modules/mob/living/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
hal9000PR marked this conversation as resolved.
Show resolved Hide resolved
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

Expand Down
Binary file modified icons/mob/screen_alert.dmi
Binary file not shown.