Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #98 from definitelynotspaghetti/king
Browse files Browse the repository at this point in the history
[MODULAR] Slowdown for King
  • Loading branch information
Blundir authored Nov 8, 2023
2 parents e24b691 + 905d358 commit 668781b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/~RUtgmc_defines/movespeed_modification.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//ids

#define MOVESPEED_ID_BOILER_DUMP "BOILER_DUMP"
#define MOVESPEED_ID_OFF_GUARD_SLOWDOWN "OFF_GUARD_SLOWDOWN"
14 changes: 14 additions & 0 deletions modular_RUtgmc/code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/status_effect/incapacitating/offguard_slowdown
id = "offguard_slow"
status_type = STATUS_EFFECT_REPLACE
var/off_guard_slowdown = 9

/datum/status_effect/incapacitating/offguard_slowdown/on_apply()
. = ..()
if(!.)
return
owner.add_movespeed_modifier(MOVESPEED_ID_OFF_GUARD_SLOWDOWN, TRUE, 0, NONE, TRUE, off_guard_slowdown)

/datum/status_effect/incapacitating/offguard_slowdown/on_remove()
owner.remove_movespeed_modifier(MOVESPEED_ID_OFF_GUARD_SLOWDOWN)
return ..()
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/datum/action/xeno_action/activable/off_guard/use_ability(atom/target)
var/mob/living/carbon/human/human_target = target
human_target.apply_status_effect(STATUS_EFFECT_GUN_SKILL_ACCURACY_DEBUFF, 8 SECONDS)
human_target.apply_status_effect(STATUS_EFFECT_GUN_SKILL_SCATTER_DEBUFF, 8 SECONDS)
human_target.apply_status_effect(/datum/status_effect/incapacitating/offguard_slowdown, 8 SECONDS)
human_target.log_message("has been off-guarded by [owner]", LOG_ATTACK, color="pink")
human_target.balloon_alert_to_viewers("confused")
playsound(human_target, 'sound/effects/off_guard_ability.ogg', 50)

add_cooldown()
succeed_activate()
2 changes: 2 additions & 0 deletions modular_RUtgmc/includes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,5 @@
#include "code\modules\clothing\modular_armor\jaeger.dm"
#include "code\modules\clothing\modular_armor\attachments\chest_plates.dm"
#include "code\modules\reagents\reactions\medical.dm"
#include "code\datums\status_effects\debuffs.dm"
#include "code\modules\mob\living\carbon\xenomorph\castes\king\abilities_king.dm"

0 comments on commit 668781b

Please sign in to comment.