Skip to content

Commit

Permalink
[MIRROR] Fixes Mob Action Cooldowns (Ash Drake) (#744)
Browse files Browse the repository at this point in the history
* Fixes Mob Action Cooldowns (Ash Drake) (#81211)

## About The Pull Request

Fixes #80236 

Ash drake abilities were rewritten to not be slept and instead use async
which messed up the cooldown timing

Also rewrites several cooldowns to not use a 360 second cooldown hack

## Why It's Good For The Game

Abilities being used at the proper time is very cool

## Changelog

:cl:
fix: Ash drake's fire breath attack has proper cooldowns again
/:cl:

* Fixes Mob Action Cooldowns (Ash Drake)

---------

Co-authored-by: Whoneedspacee <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Feb 2, 2024
1 parent d513c01 commit de79cab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion code/datums/actions/mobs/assume_form.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
return ..()

/datum/action/cooldown/mob_cooldown/assume_form/Activate(atom/target_atom)
StartCooldown(360 SECONDS, 360 SECONDS)
disable_cooldown_actions()
determine_intent(target_atom)
StartCooldown()
enable_cooldown_actions()
return TRUE

/// Rapid proc to test if we can assume the form of a given atom. Returns TRUE if we can, FALSE if we can't. Done like this so we can be nice and explicit.
Expand Down
3 changes: 2 additions & 1 deletion code/datums/actions/mobs/defensive_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
return ..()

/datum/action/cooldown/mob_cooldown/defensive_mode/Activate(atom/target_atom)
StartCooldown(360 SECONDS, 360 SECONDS)
disable_cooldown_actions()
activate_defence(owner)
StartCooldown()
enable_cooldown_actions()
return TRUE

/datum/action/cooldown/mob_cooldown/defensive_mode/proc/activate_defence(mob/living/basic/owner_mob)
Expand Down
4 changes: 3 additions & 1 deletion code/datums/actions/mobs/fire_breath.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
var/mech_damage = 45

/datum/action/cooldown/mob_cooldown/fire_breath/Activate(atom/target_atom)
disable_cooldown_actions()
attack_sequence(target_atom)
StartCooldown()
enable_cooldown_actions()
return TRUE

/// Apply our specific fire breathing shape, in proc form so we can override it in subtypes
Expand Down Expand Up @@ -91,7 +93,7 @@
button_icon = 'icons/effects/fire.dmi'
button_icon_state = "1"
desc = "Breathe flames in all directions."
cooldown_time = 3 SECONDS
cooldown_time = 10.5 SECONDS
click_to_activate = FALSE
/// How many fire lines do we produce to turn a full circle?
var/sectors = 12
Expand Down

0 comments on commit de79cab

Please sign in to comment.