-
Notifications
You must be signed in to change notification settings - Fork 90
/
layla.go
52 lines (41 loc) · 929 Bytes
/
layla.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package layla
import (
tmpl "github.com/genshinsim/gcsim/internal/template/character"
"github.com/genshinsim/gcsim/pkg/core"
"github.com/genshinsim/gcsim/pkg/core/keys"
"github.com/genshinsim/gcsim/pkg/core/player/character"
"github.com/genshinsim/gcsim/pkg/core/player/character/profile"
)
func init() {
core.RegisterCharFunc(keys.Layla, NewChar)
}
type char struct {
*tmpl.Character
a1Stack int
particleCBSwitch bool
starTickSrc int
shootStarSrc int
}
func NewChar(s *core.Core, w *character.CharWrapper, _ profile.CharacterProfile) error {
c := char{}
c.Character = tmpl.NewWithWrapper(s, w)
c.EnergyMax = 40
c.NormalHitNum = normalHitNum
c.BurstCon = 5
c.SkillCon = 3
w.Character = &c
return nil
}
func (c *char) Init() error {
c.starTickSrc = -1
c.shootStarSrc = -1
c.starsSkill()
c.a1()
if c.Base.Cons >= 4 {
c.c4()
}
if c.Base.Cons >= 6 {
c.c6()
}
return nil
}