You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Several bigger mods which introduce or change active skills, will introduce the concept of cooldowns. Most commonly by making skills only usable once per turn. But some times they want a multiple turn cooldown on it.
Every mod/skill doing that needs to implement the cooldown system by themselves.
Another use case would be one skill which puts other active skills on a character on a cooldown. For example a spell could put all attack skills on the enemy on a cooldown.
Describe the solution you'd like
Introduce a simple but unique (because MSU doesn't wanna accidentally overwrite commonly used names) private cooldown variable in skill.nut. E.g. MSU_CurrentCooldown = 0, which is the current active cooldown.
If this is != 0 then the function isUsable will always return false
that variable will be decremented onTurnStarted() up to a minimum of 0
a new setter and getter will help manipulate this value
Additional context
This system does not automatically apply the cooldown and is not meant to do that. So there is not yet a CooldownOnUse = 2 variable or something similar. That has to be implemented by the mods using this system. Or maybe MSU will ship such a second variable aswell
With such a backend adjustment every mod can cross compatibly apply or reduce cooldowns for any other possible skills.
The text was updated successfully, but these errors were encountered:
I agree Cooldown functionality is useful. I started preparing a branch for this in MSU a long time ago but then I realized that Cooldown is something that is a very niche use case for skills so I thought the functionality isn't that useful and the skills that need it can just implement it themselves on a case to case basis.
However, if we want this functionality for all skills then we must discuss what is better:
Adding Cooldown functionality to base skill just because "a few" skills may use it.
Adding a helper function that you can call for a skill that adds a "hook" on the skill to add cooldown functionality for skills where you need it (e.g. how you did for sling skills in Reforged). This would look like ::MSU.enableCooldown(_skillObject).
Is your feature request related to a problem? Please describe.
Several bigger mods which introduce or change active skills, will introduce the concept of cooldowns. Most commonly by making skills only usable once per turn. But some times they want a multiple turn cooldown on it.
Every mod/skill doing that needs to implement the cooldown system by themselves.
Another use case would be one skill which puts other active skills on a character on a cooldown. For example a spell could put all attack skills on the enemy on a cooldown.
Describe the solution you'd like
skill.nut
. E.g.MSU_CurrentCooldown = 0
, which is the current active cooldown.!= 0
then thefunction isUsable
will always returnfalse
onTurnStarted()
up to a minimum of 0Additional context
This system does not automatically apply the cooldown and is not meant to do that. So there is not yet a
CooldownOnUse = 2
variable or something similar. That has to be implemented by the mods using this system. Or maybe MSU will ship such a second variable aswellWith such a backend adjustment every mod can cross compatibly apply or reduce cooldowns for any other possible skills.
The text was updated successfully, but these errors were encountered: