-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] [READY] The Tackleling: Unarmed bonuses and features contrib…
…ute to tackle success and failure, significant outcome overhaul, among other things [MDB IGNORE] (#776) * [READY] The Tackleling: Unarmed bonuses and features contribute to tackle success and failure, significant outcome overhaul, among other things * Update tackle.dm * Update living.dm * Update tackle.dm --------- Co-authored-by: SkyratBot <[email protected]> Co-authored-by: necromanceranne <[email protected]> Co-authored-by: Bloop <[email protected]>
- Loading branch information
1 parent
14b08cf
commit ae02eba
Showing
16 changed files
with
249 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/datum/status_effect/staggered | ||
id = "staggered" | ||
tick_interval = 0.5 SECONDS | ||
alert_type = null | ||
remove_on_fullheal = TRUE | ||
|
||
/datum/status_effect/staggered/on_creation(mob/living/new_owner, duration = 10 SECONDS) | ||
src.duration = duration | ||
return ..() | ||
|
||
/datum/status_effect/staggered/on_apply() | ||
|
||
//a very mild animation, but you can't stagger the dead. | ||
if(owner.stat == DEAD) | ||
owner.do_stagger_animation(duration / 10) | ||
return FALSE | ||
|
||
RegisterSignal(owner, COMSIG_LIVING_DEATH, PROC_REF(clear_staggered)) | ||
owner.add_movespeed_modifier(/datum/movespeed_modifier/staggered) | ||
return TRUE | ||
|
||
/datum/status_effect/staggered/on_remove() | ||
UnregisterSignal(owner, COMSIG_LIVING_DEATH) | ||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/staggered) | ||
// Resetting both X on remove so we're back to normal | ||
owner.pixel_x = owner.base_pixel_x | ||
|
||
/// Signal proc that self deletes our staggered effect | ||
/datum/status_effect/staggered/proc/clear_staggered(datum/source) | ||
SIGNAL_HANDLER | ||
|
||
qdel(src) | ||
|
||
/datum/status_effect/staggered/tick(seconds_between_ticks) | ||
owner.do_stagger_animation() | ||
|
||
/// Helper proc that causes the mob to do a stagger animation. | ||
/// Doesn't change significantly, just meant to represent swaying back and forth | ||
/mob/living/proc/do_stagger_animation() | ||
animate(src, pixel_x = 4, time = 0.2 SECONDS, loop = 6, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL) | ||
animate(pixel_x = -4, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters