Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jwalk-511
Copy link
Contributor

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.

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
@@ -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)
Copy link
Collaborator

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.

@imring
Copy link
Collaborator

imring commented Feb 16, 2025

what about xilonen?

@imring imring added area: internal Related to artifacts/weapons/characters kind: design limitation Constraints of the existing architecture prevent this from being fixed labels Feb 16, 2025
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
@jwalk-511
Copy link
Contributor Author

what about xilonen?

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

  • grant the character a permanent NS duration
  • subscribe to onEventChanged
  • Remove the NS status and call the on NS Expiry CB when the EventChange is triggered

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area: internal Related to artifacts/weapons/characters kind: design limitation Constraints of the existing architecture prevent this from being fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants