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

Meathook now uses KnockDown instead of just Weaken #18255

Merged
merged 2 commits into from
Jul 10, 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
1 change: 1 addition & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#define STUN "stun"
#define WEAKEN "weaken"
#define KNOCKDOWN "knockdown"
#define PARALYZE "paralize"
#define IRRADIATE "irradiate"
#define STUTTER "stutter"
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mining/lavaland/loot/tendril_loot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@
armour_penetration = 100
damage_type = BRUTE
hitsound = 'sound/effects/splat.ogg'
weaken = 6 SECONDS
weaken = 1 SECONDS
knockdown = 6 SECONDS

/obj/item/projectile/hook/fire(setAngle)
if(firer)
Expand Down
6 changes: 5 additions & 1 deletion code/modules/mob/living/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
Stun(effect * blocked)
if(WEAKEN)
Weaken(effect * blocked)
if(KNOCKDOWN)
KnockDown(effect * blocked)
if(PARALYZE)
Paralyse(effect * blocked)
if(IRRADIATE)
Expand All @@ -101,13 +103,15 @@
updatehealth("apply effect")
return TRUE

/mob/living/proc/apply_effects(stun = 0, weaken = 0, paralyze = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = 0, stamina = 0, jitter = 0)
/mob/living/proc/apply_effects(stun = 0, weaken = 0, knockdown = 0, paralyze = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = 0, stamina = 0, jitter = 0)
if(blocked >= 100)
return FALSE
if(stun)
apply_effect(stun, STUN, blocked)
if(weaken)
apply_effect(weaken, WEAKEN, blocked)
if(knockdown)
apply_effect(knockdown, KNOCKDOWN, blocked)
if(paralyze)
apply_effect(paralyze, PARALYZE, blocked)
if(irradiate)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
//Effects
var/stun = 0
var/weaken = 0
var/knockdown = 0
var/paralyze = 0
var/irradiate = 0
var/stutter = 0
Expand Down Expand Up @@ -176,7 +177,7 @@

if(!log_override && firer && !alwayslog)
add_attack_logs(firer, L, "Shot with a [type][additional_log_text]")
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
return L.apply_effects(stun, weaken, knockdown, paralyze, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)

/obj/item/projectile/proc/get_splatter_blockage(turf/step_over, atom/target, splatter_dir, target_loca) //Check whether the place we want to splatter blood is blocked (i.e. by windows).
var/turf/step_cardinal = !(splatter_dir in list(NORTH, SOUTH, EAST, WEST)) ? get_step(target_loca, get_cardinal_dir(target_loca, step_over)) : null
Expand Down