Skip to content

Commit ea0624b

Browse files
committed
fix vivid buff for varesa mini burst
1 parent be310fd commit ea0624b

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

internal/characters/varesa/burst.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (c *char) volcanicKablam() action.Info {
127127
Frames: frames.NewAbilFunc(volcanicFrames),
128128
AnimationLength: volcanicFrames[action.InvalidAction],
129129
CanQueueAfter: volcanicFrames[action.ActionSwap],
130-
State: action.BurstState, // TODO: or plunge state?
130+
State: action.PlungeAttackState,
131131
OnRemoved: func(next action.AnimationState) {
132132
c.clearNightsoulCB(next)
133133
c.usedShortBurst = false

internal/weapons/catalyst/vividnotions/vividnotions.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55

66
"github.com/genshinsim/gcsim/pkg/core"
7+
"github.com/genshinsim/gcsim/pkg/core/action"
78
"github.com/genshinsim/gcsim/pkg/core/attacks"
89
"github.com/genshinsim/gcsim/pkg/core/attributes"
910
"github.com/genshinsim/gcsim/pkg/core/combat"
@@ -65,8 +66,11 @@ func NewWeapon(c *core.Core, char *character.CharWrapper, p info.WeaponProfile)
6566
},
6667
})
6768

68-
c.Events.Subscribe(event.OnPlunge, func(args ...interface{}) bool {
69-
char.AddStatus(plungeBuff, 15*60, true)
69+
c.Events.Subscribe(event.OnStateChange, func(args ...interface{}) bool {
70+
next := args[1].(action.AnimationState)
71+
if next == action.PlungeAttackState {
72+
char.AddStatus(plungeBuff, 15*60, true)
73+
}
7074
return false
7175
}, fmt.Sprintf("vividnotions-plunge-%s", char.Base.Key.String()))
7276

@@ -93,10 +97,16 @@ func NewWeapon(c *core.Core, char *character.CharWrapper, p info.WeaponProfile)
9397
}
9498

9599
// TODO: hitlag affected?
100+
plungeF := char.StatusExpiry(plungeBuff)
101+
skillBurstF := char.StatusExpiry(skillBurstBuff)
96102
char.QueueCharTask(func() {
97-
char.DeleteStatus(plungeBuff)
98-
char.DeleteStatus(skillBurstBuff)
99-
}, 0.05*60)
103+
if plungeF == char.StatusExpiry(plungeBuff) {
104+
char.DeleteStatus(plungeBuff)
105+
}
106+
if skillBurstF == char.StatusExpiry(skillBurstBuff) {
107+
char.DeleteStatus(skillBurstBuff)
108+
}
109+
}, 0.1*60)
100110

101111
return false
102112
}, fmt.Sprintf("vividnotions-%s", char.Base.Key.String()))

0 commit comments

Comments
 (0)