Skip to content

Commit e6eac12

Browse files
authored
Merge pull request #715 from k0l11/eula-bugfix
eula & pale flame bug fixes
2 parents 31cc926 + 0067619 commit e6eac12

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

internal/artifacts/paleflame/paleflame.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/genshinsim/gcsim/pkg/core/attributes"
88
"github.com/genshinsim/gcsim/pkg/core/combat"
99
"github.com/genshinsim/gcsim/pkg/core/event"
10+
"github.com/genshinsim/gcsim/pkg/core/glog"
1011
"github.com/genshinsim/gcsim/pkg/core/keys"
1112
"github.com/genshinsim/gcsim/pkg/core/player/artifact"
1213
"github.com/genshinsim/gcsim/pkg/core/player/character"
@@ -19,7 +20,6 @@ func init() {
1920

2021
type Set struct {
2122
stacks int
22-
icd int
2323
buff []float64
2424
Index int
2525
}
@@ -35,7 +35,7 @@ func (s *Set) updateBuff() {
3535
s.buff[attributes.ATKP] = 0.09 * float64(s.stacks)
3636
}
3737

38-
const pf4key = "paleflame-4pc"
38+
const pf4key = "pf-4pc"
3939

4040
func NewSet(c *core.Core, char *character.CharWrapper, count int, param map[string]int) (artifact.Set, error) {
4141
s := Set{}
@@ -77,9 +77,12 @@ func NewSet(c *core.Core, char *character.CharWrapper, count int, param map[stri
7777
}
7878
s.updateBuff()
7979

80+
c.Log.NewEvent("paleflame gained stack", glog.LogArtifactEvent, char.Index).
81+
Write("stacks", s.stacks)
82+
8083
char.AddStatus(icdKey, icd, true)
8184
char.AddStatMod(character.StatMod{
82-
Base: modifier.NewBaseWithHitlag("pf-4pc", 420),
85+
Base: modifier.NewBaseWithHitlag(pf4key, 420),
8386
AffectedStat: attributes.NoStat,
8487
Amount: func() ([]float64, bool) {
8588
return s.buff, true

internal/characters/eula/burst.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,24 @@ func (c *char) Burst(p map[string]int) action.ActionInfo {
5858
c.ResetActionCooldown(action.ActionSkill)
5959
c.Core.Log.NewEvent("eula a4 reset skill cd", glog.LogCharacterEvent, c.Index)
6060

61-
// lights up 9.5s from cast
62-
//deployable; not affected by hitlag
61+
// handle Eula Q status start
62+
// lightfall sword lights up ~9.5s from cast
63+
// deployable; not affected by hitlag
6364
c.Core.Tasks.Add(func() {
64-
c.Core.Status.Add(burstKey, 9*60)
65+
c.Core.Status.Add(burstKey, 600-lightfallHitmark-burstFrames[action.ActionWalk]+1)
6566
c.Core.Log.NewEvent("eula burst started", glog.LogCharacterEvent, c.Index).
6667
Write("stacks", c.burstCounter).
67-
Write("expiry", c.Core.Status.Duration(burstKey))
68-
}, burstFrames[action.ActionWait]) // start at earliest point
68+
Write("expiry", c.Core.F+600-lightfallHitmark-burstFrames[action.ActionWalk]+1)
69+
}, burstFrames[action.ActionWalk]) // start Q status at earliest point
6970

71+
// handle Eula Q damage
7072
// lightfall hitmark is 600f from cast
7173
c.Core.Tasks.Add(func() {
7274
//check to make sure it hasn't already exploded due to exiting field
7375
if c.Core.Status.Duration(burstKey) > 0 {
7476
c.triggerBurst()
7577
}
76-
}, 600-lightfallHitmark)
78+
}, 600-lightfallHitmark) // check if we can trigger Q damage right before Q status would normally expire
7779

7880
//energy does not deplete until after animation
7981
c.ConsumeEnergy(107)

0 commit comments

Comments
 (0)