Reworks the syndicate chainsaw (#18252)

* Reworks the syndicate chainsaw

* fixes merge conflict

* not work on dead people

* makes stun absorption removal respect stamina

* requested changes
This commit is contained in:
Qwertytoforty
2022-07-11 22:15:47 +01:00
committed by GitHub
parent f028d4a9bf
commit 69a9206b78
6 changed files with 58 additions and 6 deletions
+2
View File
@@ -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 //
+36 -3
View File
@@ -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 = "<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
+10 -2
View File
@@ -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(.)
@@ -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
+9
View File
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 63 KiB