Skip to content

Commit

Permalink
Fix clorinde E-NA counter and atkspd not applying (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
shizukayuki authored Jan 27, 2025
1 parent ae3b232 commit 73b50d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
6 changes: 5 additions & 1 deletion internal/characters/clorinde/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,13 @@ func (c *char) skillAttack(_ map[string]int) (action.Info, error) {
}, skillAttackHitmarks[c.normalSCounter])

defer c.AdvanceNormalIndex()
n := c.normalSCounter
atkspd := c.Stat(attributes.AtkSpd)

return action.Info{
Frames: frames.NewAbilFunc(skillAttackFrames[c.normalSCounter]),
Frames: func(next action.Action) int {
return frames.AtkSpdAdjust(skillAttackFrames[n][next], atkspd)
},
AnimationLength: skillAttackFrames[c.normalSCounter][action.InvalidAction],
CanQueueAfter: skillAttackFrames[c.normalSCounter][action.ActionBurst],
State: action.NormalAttackState,
Expand Down
15 changes: 12 additions & 3 deletions internal/characters/clorinde/clorinde.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (c *char) Init() error {
return nil
}

func (c *char) ResetNormalCounter() {
c.normalSCounter = 0
c.Character.ResetNormalCounter()
}

func (c *char) AdvanceNormalIndex() {
if c.StatusIsActive(skillStateKey) {
c.normalSCounter++
Expand All @@ -60,10 +65,14 @@ func (c *char) AdvanceNormalIndex() {
}
return
}
c.NormalCounter++
if c.NormalCounter == c.NormalHitNum {
c.NormalCounter = 0
c.Character.AdvanceNormalIndex()
}

func (c *char) NextNormalCounter() int {
if c.StatusIsActive(skillStateKey) {
return c.normalSCounter + 1
}
return c.Character.NextNormalCounter()
}

func (c *char) ActionReady(a action.Action, p map[string]int) (bool, action.Failure) {
Expand Down

0 comments on commit 73b50d8

Please sign in to comment.