-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add timed Nightsoul Blessing #2333
base: main
Are you sure you want to change the base?
Add timed Nightsoul Blessing #2333
Conversation
Add functions to Nightsoul module to allow setting up NS with an optional cb for when NS status ends. Kinich refactored to make use of this functionality. Users can get remaining NS duration through .<character>.status.nightsoul-blessing
internal/characters/kinich/burst.go
Outdated
@@ -33,8 +34,10 @@ func (c *char) Burst(p map[string]int) (action.Info, error) { | |||
c.AddStatus(burstKey, ajawDuration, false) | |||
if c.nightsoulState.HasBlessing() { | |||
// extend Nightsoul's Blessing time limit countdown | |||
duration := (c.exitStateF - c.Core.F) + 1.7*60 | |||
c.setNightsoulExitTimer(duration) | |||
duration := c.StatusDuration(nightsoul.NightsoulBlessingStatus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to create a method BlessingDuration
in NS.
what about xilonen? |
Xilonen can enter or leave NS through timer expiry, points expiry, or skill use, and can have NS extended through Normal attack and Plunge attack state. NS was rewritten to accommodate state extension
I've added more functionality to Nightsoul to enable duration extension on specified animation states. If a NS would expire naturally during a restricted animation state, and a cb function is given, the Nightsoul state will
If a player uses a timed NS duration and has no on expiry CB, and they expect an animation to extend the timed NS state, then that character will have to manually extend NS themselves. Otherwise, the nightsoul module can handle extension. I have not modified other behavior- if a character wants to remove NS status before the duration is over (e.g. on points expiry), then the character must still manually check animation state. It would be possible to add additional functionality to the NS module to handle an automatic expiry of the NS state upon points reaching 0, along with extending NS status until an animation is over, but that would be beyond the scope of this PR. Also created a function within the nightsoul module to return remaining NS duration. |
Add functions to Nightsoul module to allow setting up NS with an optional cb for when NS status ends. This CB will only be called if NS expires via the timer, not if NS is manually expired, and is intended to clean up the character state on Nightsoul expiry. As an alternative, an OnNightsoulExpiry event could be used, or an array of cb functions could be allowed.
Kinich refactored to make use of this functionality.
GCSL users can get remaining NS duration through ..status.nightsoul-blessing.
For now, it's assumed that all NS timers will be hitlag extended. If that is not the case, code can be further refactored to accept a hitlag bool, to be passed through to the char.AddStatus method call.
I manually tested a few Kinich configs and got matching results, but I have not run a full DB compare.
If desired, I can split this PR into two; one for NS changes and one for Kinich changes.