From 9155953e568a0b685822386f72b9b8c5f434ad8c Mon Sep 17 00:00:00 2001 From: Shizuka Date: Wed, 13 Apr 2022 14:01:32 +0400 Subject: [PATCH 1/3] Run gofmt on codebase --- internal/characters/itto/stats.go | 93 +++++++++++++++---------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/internal/characters/itto/stats.go b/internal/characters/itto/stats.go index 01d6ad741..f3bd2ad20 100644 --- a/internal/characters/itto/stats.go +++ b/internal/characters/itto/stats.go @@ -35,7 +35,6 @@ var ( 1.9189, 2.0625, 2.2191, - }, { 0.9164, @@ -73,55 +72,55 @@ var ( }, } akCombo = []float64{ - 0.9116, - 0.9858, - 1.06, - 1.166, - 1.2402, - 1.325, - 1.4416, - 1.5582, - 1.6748, - 1.802, - 1.9478, - 2.1192, - 2.2906, - 2.462, - 2.6489, + 0.9116, + 0.9858, + 1.06, + 1.166, + 1.2402, + 1.325, + 1.4416, + 1.5582, + 1.6748, + 1.802, + 1.9478, + 2.1192, + 2.2906, + 2.462, + 2.6489, } akFinal = []float64{ - 1.9092, - 2.0646, - 2.22, - 2.442, - 2.5974, - 2.775, - 3.0192, - 3.2634, - 3.5076, - 3.774, - 4.0793, - 4.4382, - 4.7972, - 5.1562, - 5.5478, + 1.9092, + 2.0646, + 2.22, + 2.442, + 2.5974, + 2.775, + 3.0192, + 3.2634, + 3.5076, + 3.774, + 4.0793, + 4.4382, + 4.7972, + 5.1562, + 5.5478, } saichiSlash = []float64{ - 0.9047, - 0.9784, - 1.052, - 1.1572, - 1.2308, - 1.315, - 1.4307, - 1.5464, - 1.6622, - 1.7884, - 1.9331, - 2.1032, - 2.2733, - 2.4434, - 2.6289, + 0.9047, + 0.9784, + 1.052, + 1.1572, + 1.2308, + 1.315, + 1.4307, + 1.5464, + 1.6622, + 1.7884, + 1.9331, + 2.1032, + 2.2733, + 2.4434, + 2.6289, } skill = []float64{ 3.072, @@ -157,4 +156,4 @@ var ( 1.296, 1.368, } -) \ No newline at end of file +) From cbf0e7747a2ffac7abbf8bd86a03c4dfd12a772a Mon Sep 17 00:00:00 2001 From: Shizuka Date: Wed, 13 Apr 2022 14:53:45 +0400 Subject: [PATCH 2/3] Move mods/events under init --- internal/characters/albedo/albedo.go | 10 +++++--- internal/characters/aloy/aloy.go | 8 +++++-- internal/characters/amber/amber.go | 14 +++++++---- internal/characters/ayaka/ayaka.go | 13 ++++++++-- internal/characters/ayato/ayato.go | 13 ++++++---- internal/characters/barbara/barbara.go | 8 ++++++- internal/characters/beidou/beidou.go | 8 +++++-- internal/characters/bennett/bennett.go | 10 ++++---- internal/characters/chongyun/chongyun.go | 10 +++++--- internal/characters/diluc/diluc.go | 9 ++++--- internal/characters/diona/diona.go | 9 ++++--- internal/characters/eula/eula.go | 12 ++++++++-- internal/characters/fischl/fischl.go | 13 +++++----- internal/characters/ganyu/ganyu.go | 11 ++++++--- internal/characters/gorou/gorou.go | 13 +++++----- internal/characters/hutao/hutao.go | 8 +++++-- internal/characters/itto/itto.go | 14 +++++++---- internal/characters/jean/jean.go | 8 +++++-- internal/characters/kaeya/kaeya.go | 10 ++++---- internal/characters/kazuha/kazuha.go | 6 ++--- internal/characters/keqing/abil.go | 4 +++- internal/characters/keqing/keqing.go | 11 +++++---- internal/characters/klee/klee.go | 11 ++++++--- internal/characters/kokomi/kokomi.go | 8 +++++-- internal/characters/lisa/lisa.go | 8 +++++-- internal/characters/mona/mona.go | 7 +++--- internal/characters/ningguang/ningguang.go | 9 +++++-- internal/characters/noelle/noelle.go | 3 ++- internal/characters/qiqi/qiqi.go | 17 ++++++------- internal/characters/raiden/raiden.go | 12 ++++++---- internal/characters/rosaria/rosaria.go | 8 +++++-- internal/characters/shenhe/shenhe.go | 24 +++++++++---------- internal/characters/sucrose/sucrose.go | 5 ++-- internal/characters/tartaglia/tartaglia.go | 14 +++++++---- .../travelerelectro/travelerelectro.go | 8 +++++-- .../characters/travelergeo/travelergeo.go | 1 - internal/characters/xiangling/xiangling.go | 2 +- internal/characters/xiao/xiao.go | 15 ++++++++---- internal/characters/xingqiu/xingqiu.go | 23 +++++++++--------- internal/characters/yaemiko/yaemiko.go | 2 +- internal/characters/yanfei/yanfei.go | 18 ++++++++------ internal/characters/yoimiya/yoimiya.go | 13 +++++----- internal/characters/yunjin/yunjin.go | 18 +++++++------- internal/characters/zhongli/zhongli.go | 8 +++++-- 44 files changed, 289 insertions(+), 167 deletions(-) diff --git a/internal/characters/albedo/albedo.go b/internal/characters/albedo/albedo.go index 5486e74d7..809447ae5 100644 --- a/internal/characters/albedo/albedo.go +++ b/internal/characters/albedo/albedo.go @@ -36,19 +36,23 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.EnergyMax = 40 c.Weapon.Class = core.WeaponClassSword c.NormalHitNum = 5 + c.icdSkill = 0 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.skillHook() if c.Base.Cons >= 4 { c.c4() } - if c.Base.Cons == 6 { c.c6() } - - return &c, nil } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/aloy/aloy.go b/internal/characters/aloy/aloy.go index e6cd1e61d..b3228edee 100644 --- a/internal/characters/aloy/aloy.go +++ b/internal/characters/aloy/aloy.go @@ -38,10 +38,14 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.Tags["coil_stacks"] = 0 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.coilMod() c.onExitField() - - return &c, nil } // Add coil mod at the beginning of the sim diff --git a/internal/characters/amber/amber.go b/internal/characters/amber/amber.go index a44ef5fea..97ee44dae 100644 --- a/internal/characters/amber/amber.go +++ b/internal/characters/amber/amber.go @@ -34,17 +34,23 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 + c.bunnies = make([]bunny, 0, 2) + if c.Base.Cons >= 4 { c.SetNumCharges(core.ActionSkill, 2) } + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + + c.a2() + if c.Base.Cons >= 2 { c.overloadExplode() } - c.a2() - c.bunnies = make([]bunny, 0, 2) - - return &c, nil } func (c *char) a2() { diff --git a/internal/characters/ayaka/ayaka.go b/internal/characters/ayaka/ayaka.go index 23eea5513..0441549e2 100644 --- a/internal/characters/ayaka/ayaka.go +++ b/internal/characters/ayaka/ayaka.go @@ -36,7 +36,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 c.NormalHitNum = 5 - c.InitCancelFrames() c.icdC1 = -1 c.c6CDTimerAvail = false @@ -44,12 +43,22 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { // Start with C6 ability active if c.Base.Cons == 6 { c.c6CDTimerAvail = true - c.c6AddBuff() } + c.InitCancelFrames() + return &c, nil } +func (c *char) Init() { + c.Tmpl.Init() + + // Start with C6 ability active + if c.Base.Cons == 6 { + c.c6AddBuff() + } +} + func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { switch a { case core.ActionDash: diff --git a/internal/characters/ayato/ayato.go b/internal/characters/ayato/ayato.go index 33dd7c352..677a60ce6 100644 --- a/internal/characters/ayato/ayato.go +++ b/internal/characters/ayato/ayato.go @@ -44,16 +44,23 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 5 c.shunsuikenCounter = 3 - c.stacksMax = 4 c.particleICD = 0 c.a4ICD = 0 c.c6ready = false + c.stacksMax = 4 + if c.Base.Cons >= 2 { + c.stacksMax = 5 + } + + c.InitCancelFrames() + return &c, nil } func (c *char) Init() { c.Tmpl.Init() + c.a2() c.a4() c.onExitField() @@ -62,15 +69,11 @@ func (c *char) Init() { c.c1() } if c.Base.Cons >= 2 { - c.stacksMax = 5 c.c2() } if c.Base.Cons >= 6 { c.c6() } - - c.InitCancelFrames() - } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/barbara/barbara.go b/internal/characters/barbara/barbara.go index 1c813617a..a590081ec 100644 --- a/internal/characters/barbara/barbara.go +++ b/internal/characters/barbara/barbara.go @@ -24,6 +24,7 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { } c.Tmpl = t c.Base.Element = core.Hydro + e, ok := p.Params["start_energy"] if !ok { e = 80 @@ -35,6 +36,12 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 5 c.NormalHitNum = 4 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.a1() if c.Base.Cons >= 1 { @@ -46,7 +53,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { if c.Base.Cons >= 6 { c.c6() } - return &c, nil } func (c *char) a1() { diff --git a/internal/characters/beidou/beidou.go b/internal/characters/beidou/beidou.go index 0625086c8..546905889 100644 --- a/internal/characters/beidou/beidou.go +++ b/internal/characters/beidou/beidou.go @@ -35,14 +35,18 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 5 c.CharZone = core.ZoneLiyue + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.burstProc() c.a4() if c.Base.Cons >= 4 { c.c4() } - - return &c, nil } /** diff --git a/internal/characters/bennett/bennett.go b/internal/characters/bennett/bennett.go index c1b2dd8b5..51d302309 100644 --- a/internal/characters/bennett/bennett.go +++ b/internal/characters/bennett/bennett.go @@ -34,13 +34,15 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 5 c.Base.Element = core.Pyro + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + if c.Base.Cons >= 2 { c.c2() } - - //add effect for burst - - return &c, nil } func (c *char) c2() { diff --git a/internal/characters/chongyun/chongyun.go b/internal/characters/chongyun/chongyun.go index 7d902f4ef..c6445d4ce 100644 --- a/internal/characters/chongyun/chongyun.go +++ b/internal/characters/chongyun/chongyun.go @@ -35,19 +35,23 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 c.CharZone = core.ZoneLiyue + c.fieldSrc = -601 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.onSwapHook() if c.Base.Cons >= 4 { c.c4() } - if c.Base.Cons == 6 && c.Core.Flags.DamageMode { c.c6() } - - return &c, nil } func (c *char) c4() { diff --git a/internal/characters/diluc/diluc.go b/internal/characters/diluc/diluc.go index 703923b0b..5cb95bd08 100644 --- a/internal/characters/diluc/diluc.go +++ b/internal/characters/diluc/diluc.go @@ -35,18 +35,21 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.Weapon.Class = core.WeaponClassClaymore c.NormalHitNum = 4 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + if c.Base.Cons >= 1 && c.Core.Flags.DamageMode { c.c1() } if c.Base.Cons >= 2 { c.c2() } - if c.Base.Cons >= 4 { c.c4() } - - return &c, nil } func (c *char) c1() { diff --git a/internal/characters/diona/diona.go b/internal/characters/diona/diona.go index 2333a978c..cd2db7ba2 100644 --- a/internal/characters/diona/diona.go +++ b/internal/characters/diona/diona.go @@ -33,17 +33,20 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.a2() if c.Base.Cons == 6 { c.c6() } - if c.Base.Cons >= 2 { c.c2() } - - return &c, nil } func (c *char) a2() { diff --git a/internal/characters/eula/eula.go b/internal/characters/eula/eula.go index c73463c8f..90025254b 100644 --- a/internal/characters/eula/eula.go +++ b/internal/characters/eula/eula.go @@ -37,14 +37,23 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.a4() + c.burstStacks() c.onExitField() if c.Base.Cons >= 4 { c.c4() } +} - s.Events.Subscribe(core.OnDamage, func(args ...interface{}) bool { +func (c *char) burstStacks() { + c.Core.Events.Subscribe(core.OnDamage, func(args ...interface{}) bool { atk := args[1].(*core.AttackEvent) if c.Core.Status.Duration("eulaq") == 0 { return false @@ -74,7 +83,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.burstCounterICD = c.Core.F + 6 return false }, "eula-burst-counter") - return &c, nil } func (c *char) a4() { diff --git a/internal/characters/fischl/fischl.go b/internal/characters/fischl/fischl.go index 117828f8f..0c00008d2 100644 --- a/internal/characters/fischl/fischl.go +++ b/internal/characters/fischl/fischl.go @@ -41,16 +41,17 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.ozSource = -1 c.ozActiveUntil = -1 - //register A4 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.a4() - if p.Base.Cons == 6 { + if c.Base.Cons == 6 { c.c6() } - - // f.turbo() - - return &c, nil } // func (c *char) ozAttack() { diff --git a/internal/characters/ganyu/ganyu.go b/internal/characters/ganyu/ganyu.go index 54c7072d6..77ea73241 100644 --- a/internal/characters/ganyu/ganyu.go +++ b/internal/characters/ganyu/ganyu.go @@ -37,12 +37,17 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.a1Expiry = -1 - if c.Base.Cons >= 1 { - c.c1() - } if c.Base.Cons >= 2 { c.SetNumCharges(core.ActionSkill, 2) } return &c, nil } + +func (c *char) Init() { + c.Tmpl.Init() + + if c.Base.Cons >= 1 { + c.c1() + } +} diff --git a/internal/characters/gorou/gorou.go b/internal/characters/gorou/gorou.go index 418877a19..ed088f067 100644 --- a/internal/characters/gorou/gorou.go +++ b/internal/characters/gorou/gorou.go @@ -51,13 +51,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 3 c.CharZone = core.ZoneInazuma - if c.Base.Cons > 0 { - c.c1() - } - if c.Base.Cons >= 2 { - c.c2() - } - return &c, nil } @@ -112,4 +105,10 @@ func (c *char) Init() { c.c6buff[core.CD] = 0.4 } + if c.Base.Cons > 0 { + c.c1() + } + if c.Base.Cons >= 2 { + c.c2() + } } diff --git a/internal/characters/hutao/hutao.go b/internal/characters/hutao/hutao.go index 333ccba4a..1ddfdf7b4 100644 --- a/internal/characters/hutao/hutao.go +++ b/internal/characters/hutao/hutao.go @@ -38,6 +38,12 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 6 c.CharZone = core.ZoneLiyue + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.ppHook() c.onExitField() c.a4() @@ -45,8 +51,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { if c.Base.Cons == 6 { c.c6() } - - return &c, nil } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/itto/itto.go b/internal/characters/itto/itto.go index f062f94e9..58f7b3b9b 100644 --- a/internal/characters/itto/itto.go +++ b/internal/characters/itto/itto.go @@ -33,19 +33,25 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.EnergyMax = 70 c.Weapon.Class = core.WeaponClassClaymore c.NormalHitNum = 4 + c.SkillCon = 3 + c.BurstCon = 5 + c.dasshuUsed = false c.dasshuCount = 0 c.Tags["strStack"] = 0 c.sCACount = 0 - c.SkillCon = 3 - c.BurstCon = 5 + + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() c.onExitField() + if c.Base.Cons == 6 { c.c6() } - - return &c, nil } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/jean/jean.go b/internal/characters/jean/jean.go index 692d9c94a..6bb164d03 100644 --- a/internal/characters/jean/jean.go +++ b/internal/characters/jean/jean.go @@ -36,11 +36,15 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + if c.Base.Cons == 6 { c.c6() } - - return &c, nil } func (c *char) ActionFrames(a core.ActionType, p map[string]int) (int, int) { diff --git a/internal/characters/kaeya/kaeya.go b/internal/characters/kaeya/kaeya.go index 2bf6e945e..26669986d 100644 --- a/internal/characters/kaeya/kaeya.go +++ b/internal/characters/kaeya/kaeya.go @@ -36,17 +36,19 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 5 c.icicleICD = make([]int, 4) - // c.burstICD() + + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() if c.Base.Cons > 0 { c.c1() } - if c.Base.Cons >= 4 { c.c4() } - - return &c, nil } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/kazuha/kazuha.go b/internal/characters/kazuha/kazuha.go index 58f3f4649..46abf2c58 100644 --- a/internal/characters/kazuha/kazuha.go +++ b/internal/characters/kazuha/kazuha.go @@ -39,17 +39,17 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 5 c.CharZone = core.ZoneInazuma - c.InitCancelFrames() - c.infuseCheckLocation = core.NewDefCircHit(1.5, false, core.TargettableEnemy, core.TargettablePlayer, core.TargettableObject) + c.InitCancelFrames() + return &c, nil } func (c *char) Init() { c.Tmpl.Init() - c.a4() + c.a4() } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/keqing/abil.go b/internal/characters/keqing/abil.go index 2fc14fb2c..486d60eeb 100644 --- a/internal/characters/keqing/abil.go +++ b/internal/characters/keqing/abil.go @@ -6,6 +6,8 @@ import ( "github.com/genshinsim/gcsim/pkg/core" ) +var hitmarks = [][]int{{8}, {20}, {25}, {25, 35}, {34}} + func (c *char) Attack(p map[string]int) (int, int) { //apply attack speed f, a := c.ActionFrames(core.ActionAttack, p) @@ -22,7 +24,7 @@ func (c *char) Attack(p map[string]int) (int, int) { for i, mult := range attack[c.NormalCounter] { ai.Mult = mult[c.TalentLvlAttack()] - c.Core.Combat.QueueAttack(ai, core.NewDefCircHit(0.1, false, core.TargettableEnemy), delay[c.NormalCounter][i], delay[c.NormalCounter][i]) + c.Core.Combat.QueueAttack(ai, core.NewDefCircHit(0.1, false, core.TargettableEnemy), hitmarks[c.NormalCounter][i], hitmarks[c.NormalCounter][i]) } if c.Base.Cons == 6 { diff --git a/internal/characters/keqing/keqing.go b/internal/characters/keqing/keqing.go index d39b1d3a0..246abd33e 100644 --- a/internal/characters/keqing/keqing.go +++ b/internal/characters/keqing/keqing.go @@ -36,19 +36,20 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 5 c.CharZone = core.ZoneLiyue + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + if c.Base.Cons >= 2 { c.c2() } - if c.Base.Cons >= 4 { c.c4() } - - return &c, nil } -var delay = [][]int{{8}, {20}, {25}, {25, 35}, {34}} - func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { switch a { case core.ActionDash: diff --git a/internal/characters/klee/klee.go b/internal/characters/klee/klee.go index 5cc5a6230..c527cb69d 100644 --- a/internal/characters/klee/klee.go +++ b/internal/characters/klee/klee.go @@ -33,16 +33,21 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.Weapon.Class = core.WeaponClassCatalyst c.NormalHitNum = 3 - c.SetNumCharges(core.ActionSkill, 2) c.sparkICD = -1 + c.SetNumCharges(core.ActionSkill, 2) + + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.a4() if c.Base.Cons >= 4 { c.c4() } - - return &c, nil } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/kokomi/kokomi.go b/internal/characters/kokomi/kokomi.go index d20ef3245..2417b9366 100644 --- a/internal/characters/kokomi/kokomi.go +++ b/internal/characters/kokomi/kokomi.go @@ -43,12 +43,16 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.swapEarlyF = 0 c.c4ICDExpiry = 0 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.passive() c.onExitField() c.burstActiveHook() c.a4() - - return &c, nil } // Passive 2 - permanently modify stats for +25% healing bonus and -100% CR diff --git a/internal/characters/lisa/lisa.go b/internal/characters/lisa/lisa.go index a903ce10c..f747d449b 100644 --- a/internal/characters/lisa/lisa.go +++ b/internal/characters/lisa/lisa.go @@ -34,13 +34,17 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.skillHoldMult() if c.Base.Cons == 6 { c.c6() } - - return &c, nil } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/mona/mona.go b/internal/characters/mona/mona.go index 4c4ccd0df..b1a4dd744 100644 --- a/internal/characters/mona/mona.go +++ b/internal/characters/mona/mona.go @@ -42,9 +42,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.c2icd = -1 - c.burstHook() - c.a4() - return &c, nil } @@ -63,6 +60,10 @@ func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { func (c *char) Init() { c.Tmpl.Init() + + c.burstHook() + c.a4() + //add damage mod for omen //add E hook val := make([]float64, core.EndStatType) diff --git a/internal/characters/ningguang/ningguang.go b/internal/characters/ningguang/ningguang.go index 17441836c..fb5af785a 100644 --- a/internal/characters/ningguang/ningguang.go +++ b/internal/characters/ningguang/ningguang.go @@ -36,15 +36,20 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 c.CharZone = core.ZoneLiyue + // Initialize at some very low value so these happen correctly at start of sim c.c2reset = -9999 c.particleICD = -9999 - c.a4() - return &c, nil } +func (c *char) Init() { + c.Tmpl.Init() + + c.a4() +} + func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { switch a { case core.ActionDash: diff --git a/internal/characters/noelle/noelle.go b/internal/characters/noelle/noelle.go index 52c37930a..3d7b975b6 100644 --- a/internal/characters/noelle/noelle.go +++ b/internal/characters/noelle/noelle.go @@ -34,12 +34,13 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.Weapon.Class = core.WeaponClassClaymore c.NormalHitNum = 4 + c.InitCancelFrames() + return &c, nil } func (c *char) Init() { c.Tmpl.Init() - c.InitCancelFrames() c.a2() } diff --git a/internal/characters/qiqi/qiqi.go b/internal/characters/qiqi/qiqi.go index 6a1739ef4..19647a002 100644 --- a/internal/characters/qiqi/qiqi.go +++ b/internal/characters/qiqi/qiqi.go @@ -47,14 +47,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.skillLastUsed = 0 - c.talismanHealHook() - c.onNACAHitHook() - c.a1() - - if c.Base.Cons >= 2 { - c.c2() - } - return &c, nil } @@ -62,8 +54,13 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - // c.talismanExpiry = make([]int, len(c.Core.Targets)) - // c.talismanICDExpiry = make([]int, len(c.Core.Targets)) + c.talismanHealHook() + c.onNACAHitHook() + c.a1() + + if c.Base.Cons >= 2 { + c.c2() + } } //Qiqi's Normal and Charge Attack DMG against opponents affected by Cryo is increased by 15%. diff --git a/internal/characters/raiden/raiden.go b/internal/characters/raiden/raiden.go index c7c149fc6..35b677159 100644 --- a/internal/characters/raiden/raiden.go +++ b/internal/characters/raiden/raiden.go @@ -41,15 +41,19 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 5 c.CharZone = core.ZoneInazuma - if c.Base.Cons == 6 { - c.c6() - } + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() c.eyeOnDamage() c.onBurstStackCount() c.onSwapClearBurst() - return &c, nil + if c.Base.Cons == 6 { + c.c6() + } } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/rosaria/rosaria.go b/internal/characters/rosaria/rosaria.go index 2c7febd61..538da13cf 100644 --- a/internal/characters/rosaria/rosaria.go +++ b/internal/characters/rosaria/rosaria.go @@ -33,14 +33,18 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 3 c.NormalHitNum = 5 + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + if c.Base.Cons >= 1 { c.c1() } if c.Base.Cons >= 4 { c.c4() } - - return &c, nil } // Adds event checker for C1: Unholy Revelation diff --git a/internal/characters/shenhe/shenhe.go b/internal/characters/shenhe/shenhe.go index 8ba3afcc7..0c53d1866 100644 --- a/internal/characters/shenhe/shenhe.go +++ b/internal/characters/shenhe/shenhe.go @@ -50,25 +50,23 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SetNumCharges(core.ActionSkill, 2) } - if c.Base.Cons >= 4 { - c.c4() - } - if c.Base.Cons >= 6 { - c.c6() - } - - c.quillDamageMod() - return &c, nil } func (c *char) Init() { c.Tmpl.Init() - // if c.Base.Cons >= 6 { - // c.c6() - // } - c.a2() + c.quillcount = make([]int, len(c.Core.Chars)) + + c.a2() + c.quillDamageMod() + + if c.Base.Cons >= 4 { + c.c4() + } + if c.Base.Cons >= 6 { + c.c6() + } } // Helper function to update tags that can be used in configs diff --git a/internal/characters/sucrose/sucrose.go b/internal/characters/sucrose/sucrose.go index b5e4af502..22d2921cc 100644 --- a/internal/characters/sucrose/sucrose.go +++ b/internal/characters/sucrose/sucrose.go @@ -36,17 +36,18 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.Weapon.Class = core.WeaponClassCatalyst c.NormalHitNum = 4 + c.infuseCheckLocation = core.NewDefCircHit(0.1, false, core.TargettableEnemy, core.TargettablePlayer, core.TargettableObject) + if c.Base.Cons >= 1 { c.SetNumCharges(core.ActionSkill, 2) } - c.infuseCheckLocation = core.NewDefCircHit(0.1, false, core.TargettableEnemy, core.TargettablePlayer, core.TargettableObject) - return &c, nil } func (c *char) Init() { c.Tmpl.Init() + c.a1() } diff --git a/internal/characters/tartaglia/tartaglia.go b/internal/characters/tartaglia/tartaglia.go index 6a2ac2f32..2bc4fbc7d 100644 --- a/internal/characters/tartaglia/tartaglia.go +++ b/internal/characters/tartaglia/tartaglia.go @@ -46,18 +46,24 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 3 c.BurstCon = 5 c.NormalHitNum = 6 + c.eCast = 0 + c.rtParticleICD = 0 + if c.Base.Cons >= 6 { c.mlBurstUsed = false } - c.rtParticleICD = 0 - c.Core.Flags.ChildeActive = true + + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.onExitField() c.onDefeatTargets() - // c.applyRT() - return &c, nil } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { diff --git a/internal/characters/travelerelectro/travelerelectro.go b/internal/characters/travelerelectro/travelerelectro.go index 535c8ad29..d2c6a5b71 100644 --- a/internal/characters/travelerelectro/travelerelectro.go +++ b/internal/characters/travelerelectro/travelerelectro.go @@ -39,7 +39,11 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 5 c.NormalHitNum = 5 - c.burstProc() - return &c, nil } + +func (c *char) Init() { + c.Tmpl.Init() + + c.burstProc() +} diff --git a/internal/characters/travelergeo/travelergeo.go b/internal/characters/travelergeo/travelergeo.go index 6a367bcd0..5dfd60fd6 100644 --- a/internal/characters/travelergeo/travelergeo.go +++ b/internal/characters/travelergeo/travelergeo.go @@ -42,7 +42,6 @@ func (c *char) Init() { if c.Base.Cons > 0 { c.c1() } - } //Party members within the radius of Wake of Earth have their CRIT Rate increased by 10% diff --git a/internal/characters/xiangling/xiangling.go b/internal/characters/xiangling/xiangling.go index aa92bd8c9..fc9a8a3f7 100644 --- a/internal/characters/xiangling/xiangling.go +++ b/internal/characters/xiangling/xiangling.go @@ -42,10 +42,10 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() + //add in a guoba c.guoba = newGuoba(c.Core) c.Core.AddTarget(c.guoba) - } func (c *char) ActionFrames(a core.ActionType, p map[string]int) (int, int) { diff --git a/internal/characters/xiao/xiao.go b/internal/characters/xiao/xiao.go index 3caec2212..42ecdcec3 100644 --- a/internal/characters/xiao/xiao.go +++ b/internal/characters/xiao/xiao.go @@ -40,22 +40,27 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 3 c.NormalHitNum = 6 + c.c6Count = 0 + c.SetNumCharges(core.ActionSkill, 2) if c.Base.Cons >= 1 { c.SetNumCharges(core.ActionSkill, 3) } + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + + c.onExitField() + if c.Base.Cons >= 2 { c.c2() } if c.Base.Cons >= 6 { - c.c6Count = 0 c.c6() } - - c.onExitField() - - return &c, nil } func (c *char) a4() { diff --git a/internal/characters/xingqiu/xingqiu.go b/internal/characters/xingqiu/xingqiu.go index cbf08be84..c0420e3b5 100644 --- a/internal/characters/xingqiu/xingqiu.go +++ b/internal/characters/xingqiu/xingqiu.go @@ -43,6 +43,14 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.NormalHitNum = 5 c.CharZone = core.ZoneLiyue + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + + c.burstStateHook() + c.AddMod(core.CharStatMod{ Key: "a4", Amount: func() ([]float64, bool) { @@ -52,19 +60,8 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { }, Expiry: -1, }) - // c.burstHook() - c.burstStateHook() - - /** c6 - Activating 2 of Guhua Sword: Raincutter's sword rain attacks greatly increases the DMG of the third. - Xingqiu regenerates 3 Energy when sword rain attacks hit opponents. - **/ - - return &c, nil } -var delay = [][]int{{8}, {24}, {24, 43}, {36}, {43, 78}} - func (c *char) ActionFrames(a core.ActionType, p map[string]int) (int, int) { switch a { case core.ActionAttack: @@ -96,6 +93,8 @@ func (c *char) ActionFrames(a core.ActionType, p map[string]int) (int, int) { } } +var hitmarks = [][]int{{8}, {24}, {24, 43}, {36}, {43, 78}} + func (c *char) Attack(p map[string]int) (int, int) { //apply attack speed f, a := c.ActionFrames(core.ActionAttack, p) @@ -112,7 +111,7 @@ func (c *char) Attack(p map[string]int) (int, int) { for i, mult := range attack[c.NormalCounter] { ai.Abil = fmt.Sprintf("Normal %v", c.NormalCounter) ai.Mult = mult[c.TalentLvlAttack()] - c.Core.Combat.QueueAttack(ai, core.NewDefCircHit(0.1, false, core.TargettableEnemy), delay[c.NormalCounter][i], delay[c.NormalCounter][i]) + c.Core.Combat.QueueAttack(ai, core.NewDefCircHit(0.1, false, core.TargettableEnemy), hitmarks[c.NormalCounter][i], hitmarks[c.NormalCounter][i]) } //add a 75 frame attackcounter reset diff --git a/internal/characters/yaemiko/yaemiko.go b/internal/characters/yaemiko/yaemiko.go index 8e8cde9c1..03dc90fa5 100644 --- a/internal/characters/yaemiko/yaemiko.go +++ b/internal/characters/yaemiko/yaemiko.go @@ -37,7 +37,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.EnergyMax = 90 c.Weapon.Class = core.WeaponClassCatalyst c.NormalHitNum = 3 - c.BurstCon = 5 c.SkillCon = 3 @@ -48,6 +47,7 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() + c.a4() } diff --git a/internal/characters/yanfei/yanfei.go b/internal/characters/yanfei/yanfei.go index 65ca20b02..1a47f0910 100644 --- a/internal/characters/yanfei/yanfei.go +++ b/internal/characters/yanfei/yanfei.go @@ -37,18 +37,11 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 3 c.NormalHitNum = 3 - c.onExitField() - c.a4() - c.maxTags = 3 if c.Base.Cons == 6 { c.maxTags = 4 } - if c.Base.Cons >= 2 { - c.c2() - } - c.sealStamReduction = 0.15 if c.Base.Cons > 0 { c.sealStamReduction = 0.25 @@ -57,6 +50,17 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { return &c, nil } +func (c *char) Init() { + c.Tmpl.Init() + + c.onExitField() + c.a4() + + if c.Base.Cons >= 2 { + c.c2() + } +} + // Hook that clears yanfei burst status and seals when she leaves the field func (c *char) onExitField() { c.Core.Events.Subscribe(core.OnCharacterSwap, func(args ...interface{}) bool { diff --git a/internal/characters/yoimiya/yoimiya.go b/internal/characters/yoimiya/yoimiya.go index 0088ba799..bbf0bfa81 100644 --- a/internal/characters/yoimiya/yoimiya.go +++ b/internal/characters/yoimiya/yoimiya.go @@ -36,6 +36,12 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.SkillCon = 3 c.CharZone = core.ZoneInazuma + return &c, nil +} + +func (c *char) Init() { + c.Tmpl.Init() + c.a2() c.onExit() c.burstHook() @@ -46,13 +52,6 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { if c.Base.Cons >= 2 { c.c2() } - // if c.Base.Cons == 6 { - // c.c6() - // } - - //add effect for burst - - return &c, nil } func (c *char) a2() { diff --git a/internal/characters/yunjin/yunjin.go b/internal/characters/yunjin/yunjin.go index f6bd99bbe..9bfaee709 100644 --- a/internal/characters/yunjin/yunjin.go +++ b/internal/characters/yunjin/yunjin.go @@ -38,16 +38,12 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.BurstCon = 3 c.SkillCon = 5 + c.partyElementalTypes = 0 + for i := range c.burstTriggers { c.burstTriggers[i] = 30 } - c.getPartyElementalTypeCounts() - if c.Base.Cons >= 4 { - c.c4() - } - c.burstProc() - return &c, nil } @@ -55,8 +51,12 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - c.partyElementalTypes = 0 c.getPartyElementalTypeCounts() + c.burstProc() + + if c.Base.Cons >= 4 { + c.c4() + } } // Helper function to update tags that can be used in configs @@ -74,10 +74,8 @@ func (c *char) getPartyElementalTypeCounts() { for _, char := range c.Core.Chars { partyElementalTypes[char.Ele()]++ } - for i := range partyElementalTypes { + for range partyElementalTypes { c.partyElementalTypes += 1 - // Is there a more elegant way to get go to not complain about variable not used? - i += 0 } c.Core.Log.NewEvent("Yun Jin Party Elemental Types (A4)", core.LogCharacterEvent, c.Index, "party_elements", c.partyElementalTypes) } diff --git a/internal/characters/zhongli/zhongli.go b/internal/characters/zhongli/zhongli.go index fd2cc5022..5374584ca 100644 --- a/internal/characters/zhongli/zhongli.go +++ b/internal/characters/zhongli/zhongli.go @@ -45,11 +45,15 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { c.maxStele = 2 } - c.a2() - return &c, nil } +func (c *char) Init() { + c.Tmpl.Init() + + c.a2() +} + func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { switch a { case core.ActionDash: From 072fa9aa0b83c174da78548116d3ef794ca409b5 Mon Sep 17 00:00:00 2001 From: Shizuka Date: Wed, 13 Apr 2022 14:55:51 +0400 Subject: [PATCH 3/3] Rename A2 to A1 --- CONTRIBUTING.md | 2 -- internal/characters/albedo/albedo.go | 4 +-- internal/characters/amber/abil.go | 21 +---------- internal/characters/amber/amber.go | 30 ++++++++++++---- internal/characters/ayaka/abil.go | 2 +- internal/characters/ayato/ayato.go | 8 ++--- internal/characters/chongyun/chongyun.go | 2 +- internal/characters/diona/diona.go | 10 +++--- internal/characters/eula/abil.go | 2 +- internal/characters/gorou/abil.go | 2 +- internal/characters/kazuha/abil.go | 26 +++++++------- internal/characters/kazuha/kazuha.go | 2 +- internal/characters/keqing/abil.go | 14 ++------ internal/characters/keqing/keqing.go | 27 ++++++++++---- internal/characters/klee/klee.go | 2 +- internal/characters/noelle/noelle.go | 14 ++++---- internal/characters/raiden/raiden.go | 2 +- internal/characters/shenhe/abil.go | 4 +-- internal/characters/shenhe/shenhe.go | 6 ++-- internal/characters/travelergeo/abil.go | 2 +- internal/characters/xingqiu/xingqiu.go | 14 +++++--- internal/characters/yaemiko/yaemiko.go | 2 +- internal/characters/yoimiya/abil.go | 6 ++-- internal/characters/yoimiya/cons.go | 45 +++++------------------- internal/characters/yoimiya/yoimiya.go | 24 ++++++------- internal/characters/zhongli/shield.go | 6 ++-- internal/characters/zhongli/zhongli.go | 6 ++-- pkg/core/shield.go | 2 +- 28 files changed, 132 insertions(+), 155 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0fdc508eb..7860949de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,6 @@ A rough guideline for your comment is as follows: - [ ] C0 Skill - [ ] C0 Burst - [ ] A1 -- [ ] A2 - [ ] A4 - [ ] Sanity Test Cases - [ ] C1 @@ -37,7 +36,6 @@ A rough guideline for your comment is as follows: - [ ] C0 Skill - [ ] C0 Burst - [ ] A1 -- [ ] A2 - [ ] A4 - [ ] Sanity Test Cases - [ ] C1 diff --git a/internal/characters/albedo/albedo.go b/internal/characters/albedo/albedo.go index 809447ae5..b1eea94a1 100644 --- a/internal/characters/albedo/albedo.go +++ b/internal/characters/albedo/albedo.go @@ -69,7 +69,7 @@ func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { /** -a2: skill tick deal 25% more dmg if enemy hp < 50% +a1: skill tick deal 25% more dmg if enemy hp < 50% a4: burst increase party em by 125 for 10s @@ -226,7 +226,7 @@ func (c *char) skillHook() { if c.Core.Flags.DamageMode && t.HP()/t.MaxHP() < .5 { snap.Stats[core.DmgP] += 0.25 - c.Core.Log.NewEvent("a2 proc'd, dealing extra dmg", core.LogCharacterEvent, c.Index, "hp %", t.HP()/t.MaxHP(), "final dmg", snap.Stats[core.DmgP]) + c.Core.Log.NewEvent("a1 proc'd, dealing extra dmg", core.LogCharacterEvent, c.Index, "hp %", t.HP()/t.MaxHP(), "final dmg", snap.Stats[core.DmgP]) } c.Core.Combat.QueueAttackWithSnap(c.skillAttackInfo, snap, core.NewDefCircHit(3, false, core.TargettableEnemy), 1) diff --git a/internal/characters/amber/abil.go b/internal/characters/amber/abil.go index 9765c8678..61c112304 100644 --- a/internal/characters/amber/abil.go +++ b/internal/characters/amber/abil.go @@ -65,26 +65,7 @@ func (c *char) Aimed(p map[string]int) (int, int) { Mult: aim[c.TalentLvlAttack()], HitWeakPoint: weakspot == 1, } - - // d.AnimationFrames = f - - //add 15% since 360noscope - cb := func(a core.AttackCB) { - if a.AttackEvent.Info.HitWeakPoint { - c.AddMod(core.CharStatMod{ - Key: "a2", - Amount: func() ([]float64, bool) { - val := make([]float64, core.EndStatType) - val[core.ATKP] = 0.15 - return val, true - }, - Expiry: c.Core.F + 600, - }) - } - - } - - c.Core.Combat.QueueAttack(ai, core.NewDefSingleTarget(1, core.TargettableEnemy), f, f+travel, cb) + c.Core.Combat.QueueAttack(ai, core.NewDefSingleTarget(1, core.TargettableEnemy), f, f+travel, c.a4) if c.Base.Cons >= 1 { ai.Mult = .2 * ai.Mult diff --git a/internal/characters/amber/amber.go b/internal/characters/amber/amber.go index 97ee44dae..a09adb665 100644 --- a/internal/characters/amber/amber.go +++ b/internal/characters/amber/amber.go @@ -46,21 +46,39 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - c.a2() + c.a1() if c.Base.Cons >= 2 { c.overloadExplode() } } -func (c *char) a2() { +func (c *char) a1() { + m := make([]float64, core.EndStatType) + m[core.CR] = .1 + c.AddPreDamageMod(core.PreDamageMod{ - Key: "amber-a2", + Key: "amber-a1", Expiry: -1, Amount: func(atk *core.AttackEvent, t core.Target) ([]float64, bool) { - v := make([]float64, core.EndStatType) - v[core.CR] = .1 - return v, atk.Info.AttackTag == core.AttackTagElementalBurst + return m, atk.Info.AttackTag == core.AttackTagElementalBurst + }, + }) +} + +func (c *char) a4(a core.AttackCB) { + if !a.AttackEvent.Info.HitWeakPoint { + return + } + + m := make([]float64, core.EndStatType) + m[core.ATKP] = 0.15 + + c.AddMod(core.CharStatMod{ + Key: "amber-a4", + Expiry: c.Core.F + 600, + Amount: func() ([]float64, bool) { + return m, true }, }) } diff --git a/internal/characters/ayaka/abil.go b/internal/characters/ayaka/abil.go index 8031c2425..be550f245 100644 --- a/internal/characters/ayaka/abil.go +++ b/internal/characters/ayaka/abil.go @@ -95,7 +95,7 @@ func (c *char) Dash(p map[string]int) (int, int) { c.Core.RestoreStam(10) val := make([]float64, core.EndStatType) val[core.CryoP] = 0.18 - //a2 increase normal + ca dmg by 30% for 6s + //a1 increase normal + ca dmg by 30% for 6s c.AddMod(core.CharStatMod{ Key: "ayaka-a4", Expiry: c.Core.F + 600, diff --git a/internal/characters/ayato/ayato.go b/internal/characters/ayato/ayato.go index 677a60ce6..669350463 100644 --- a/internal/characters/ayato/ayato.go +++ b/internal/characters/ayato/ayato.go @@ -61,7 +61,7 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - c.a2() + c.a1() c.a4() c.onExitField() @@ -119,15 +119,15 @@ func (c *char) c6() { }, "ayato-c6") } -func (c *char) a2() { +func (c *char) a1() { c.Core.Events.Subscribe(core.PostSkill, func(args ...interface{}) bool { if c.Core.ActiveChar != c.CharIndex() { return false } c.stacks = 2 - c.Core.Log.NewEvent("ayato a2 proc'd", core.LogCharacterEvent, c.Index) + c.Core.Log.NewEvent("ayato a1 proc'd", core.LogCharacterEvent, c.Index) return false - }, "ayato-a2") + }, "ayato-a1") } func (c *char) a4() { diff --git a/internal/characters/chongyun/chongyun.go b/internal/characters/chongyun/chongyun.go index c6445d4ce..dfda30ff5 100644 --- a/internal/characters/chongyun/chongyun.go +++ b/internal/characters/chongyun/chongyun.go @@ -125,7 +125,7 @@ func (c *char) infuse(char core.Character) { return } - //a2 adds 8% atkspd for 2.1 seconds + //a1 adds 8% atkspd for 2.1 seconds val := make([]float64, core.EndStatType) val[core.AtkSpd] = 0.08 char.AddMod(core.CharStatMod{ diff --git a/internal/characters/diona/diona.go b/internal/characters/diona/diona.go index cd2db7ba2..06701ae67 100644 --- a/internal/characters/diona/diona.go +++ b/internal/characters/diona/diona.go @@ -39,17 +39,17 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - c.a2() + c.a1() - if c.Base.Cons == 6 { - c.c6() - } if c.Base.Cons >= 2 { c.c2() } + if c.Base.Cons == 6 { + c.c6() + } } -func (c *char) a2() { +func (c *char) a1() { c.Core.AddStamMod(func(a core.ActionType) (float64, bool) { if c.Core.Shields.Get(core.ShieldDionaSkill) != nil { return -0.1, false diff --git a/internal/characters/eula/abil.go b/internal/characters/eula/abil.go index 203426712..a1264c151 100644 --- a/internal/characters/eula/abil.go +++ b/internal/characters/eula/abil.go @@ -135,7 +135,7 @@ func (c *char) holdE() { c.Core.Combat.QueueAttack(ai, core.NewDefCircHit(1.5, false, core.TargettableEnemy), 0, 92+i*7, shredCB) } - //A2 + //A1 if v == 2 { ai := core.AttackInfo{ ActorIndex: c.Index, diff --git a/internal/characters/gorou/abil.go b/internal/characters/gorou/abil.go index dce23323e..2c6e2f089 100644 --- a/internal/characters/gorou/abil.go +++ b/internal/characters/gorou/abil.go @@ -240,7 +240,7 @@ func (c *char) Burst(p map[string]int) (int, int) { //TODO: If Gorou falls, the effects of General's Glory will be cleared. - //A2: After using Juuga: Forward Unto Victory, all nearby party members' DEF is increased by 25% for 12s. + //A1: After using Juuga: Forward Unto Victory, all nearby party members' DEF is increased by 25% for 12s. val := make([]float64, core.EndStatType) val[core.DEFP] = .25 for _, char := range c.Core.Chars { diff --git a/internal/characters/kazuha/abil.go b/internal/characters/kazuha/abil.go index bd282baa0..a72f45124 100644 --- a/internal/characters/kazuha/abil.go +++ b/internal/characters/kazuha/abil.go @@ -101,23 +101,23 @@ func (c *char) HighPlungeAttack(p map[string]int) (int, int) { c.Core.Combat.QueueAttack(ai, core.NewDefCircHit(1.5, false, core.TargettableEnemy), f, f) - // a2 if applies - if c.a2Ele != core.NoElement { + // a1 if applies + if c.a1Ele != core.NoElement { ai := core.AttackInfo{ ActorIndex: c.Index, - Abil: "Kazuha A2", + Abil: "Kazuha A1", AttackTag: core.AttackTagPlunge, ICDTag: core.ICDTagNone, ICDGroup: core.ICDGroupDefault, StrikeType: core.StrikeTypeDefault, - Element: c.a2Ele, + Element: c.a1Ele, Durability: 25, Mult: 2, IgnoreInfusion: true, } c.Core.Combat.QueueAttack(ai, core.NewDefCircHit(1.5, false, core.TargettableEnemy), f-1, f-1) - c.a2Ele = core.NoElement + c.a1Ele = core.NoElement } return f, a @@ -125,7 +125,7 @@ func (c *char) HighPlungeAttack(p map[string]int) (int, int) { func (c *char) Skill(p map[string]int) (int, int) { hold := p["hold"] - c.a2Ele = core.NoElement + c.a1Ele = core.NoElement if hold == 0 { return c.skillPress(p) } @@ -149,7 +149,7 @@ func (c *char) skillPress(p map[string]int) (int, int) { c.QueueParticle("kazuha", 3, core.Anemo, 100) - c.AddTask(c.absorbCheckA2(c.Core.F, 0, int(f/6)), "kaz-a2-absorb-check", 1) + c.AddTask(c.absorbCheckA1(c.Core.F, 0, int(f/6)), "kaz-a1-absorb-check", 1) cd := 360 if c.Base.Cons > 0 { @@ -181,7 +181,7 @@ func (c *char) skillHold(p map[string]int) (int, int) { c.QueueParticle("kazuha", 4, core.Anemo, 100) - c.AddTask(c.absorbCheckA2(c.Core.F, 0, int(f/6)), "kaz-a2-absorb-check", 1) + c.AddTask(c.absorbCheckA1(c.Core.F, 0, int(f/6)), "kaz-a1-absorb-check", 1) cd := 540 if c.Base.Cons > 0 { cd = 486 @@ -290,22 +290,22 @@ func (c *char) absorbCheckQ(src, count, max int) func() { } } -func (c *char) absorbCheckA2(src, count, max int) func() { +func (c *char) absorbCheckA1(src, count, max int) func() { return func() { if count == max { return } - c.a2Ele = c.Core.AbsorbCheck(c.infuseCheckLocation, core.Pyro, core.Hydro, core.Electro, core.Cryo) + c.a1Ele = c.Core.AbsorbCheck(c.infuseCheckLocation, core.Pyro, core.Hydro, core.Electro, core.Cryo) - if c.a2Ele != core.NoElement { + if c.a1Ele != core.NoElement { c.Core.Log.NewEventBuildMsg( core.LogCharacterEvent, c.Index, - "kazuha a2 infused ", c.a2Ele.String(), + "kazuha a1 infused ", c.a1Ele.String(), ) return } //otherwise queue up - c.AddTask(c.absorbCheckA2(src, count+1, max), "kaz-a2-absorb-check", 6) + c.AddTask(c.absorbCheckA1(src, count+1, max), "kaz-a1-absorb-check", 6) } } diff --git a/internal/characters/kazuha/kazuha.go b/internal/characters/kazuha/kazuha.go index 46abf2c58..ba6ed5261 100644 --- a/internal/characters/kazuha/kazuha.go +++ b/internal/characters/kazuha/kazuha.go @@ -12,7 +12,7 @@ func init() { type char struct { *character.Tmpl a4Expiry int - a2Ele core.EleType + a1Ele core.EleType qInfuse core.EleType c6Active int infuseCheckLocation core.AttackPattern diff --git a/internal/characters/keqing/abil.go b/internal/characters/keqing/abil.go index 486d60eeb..3cbc8cd45 100644 --- a/internal/characters/keqing/abil.go +++ b/internal/characters/keqing/abil.go @@ -153,7 +153,7 @@ func (c *char) skillNext(p map[string]int) (int, int) { c.Core.Status.AddStatus("keqinginfuse", 300) c.AddWeaponInfuse(core.WeaponInfusion{ - Key: "a2", + Key: "keqing-a1", Ele: core.Electro, Tags: []core.AttackTag{core.AttackTagNormal, core.AttackTagExtra, core.AttackTagPlunge}, Expiry: c.Core.F + 300, @@ -195,15 +195,8 @@ func (c *char) skillNext(p map[string]int) (int, int) { func (c *char) Burst(p map[string]int) (int, int) { f, a := c.ActionFrames(core.ActionBurst, p) - //a4 increase crit + ER - val := make([]float64, core.EndStatType) - val[core.CR] = 0.15 - val[core.ER] = 0.15 - c.AddMod(core.CharStatMod{ - Key: "a4", - Amount: func() ([]float64, bool) { return val, true }, - Expiry: c.Core.F + 480, - }) + + c.a4() //first hit 70 frame //first tick 74 frame @@ -242,7 +235,6 @@ func (c *char) Burst(p map[string]int) (int, int) { } c.ConsumeEnergy(60) - // c.CD[def.BurstCD] = c.Core.F + 720 //12s c.SetCDWithDelay(core.ActionBurst, 720, 60) return f, a diff --git a/internal/characters/keqing/keqing.go b/internal/characters/keqing/keqing.go index 246abd33e..293d96660 100644 --- a/internal/characters/keqing/keqing.go +++ b/internal/characters/keqing/keqing.go @@ -50,6 +50,20 @@ func (c *char) Init() { } } +func (c *char) a4() { + m := make([]float64, core.EndStatType) + m[core.CR] = 0.15 + m[core.ER] = 0.15 + + c.AddMod(core.CharStatMod{ + Key: "keqing-a4", + Expiry: c.Core.F + 480, + Amount: func() ([]float64, bool) { + return m, true + }, + }) +} + func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { switch a { case core.ActionDash: @@ -63,24 +77,23 @@ func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { } func (c *char) c4() { + m := make([]float64, core.EndStatType) + m[core.ATKP] = 0.25 cb := func(args ...interface{}) bool { - atk := args[1].(*core.AttackEvent) if atk.Info.ActorIndex != c.Index { return false } c.AddMod(core.CharStatMod{ - Key: "c4", + Key: "keqing-c4", + Expiry: c.Core.F + 600, Amount: func() ([]float64, bool) { - - val := make([]float64, core.EndStatType) - val[core.ATKP] = 0.25 - return val, true + return m, true }, - Expiry: c.Core.F + 600, }) + return false } diff --git a/internal/characters/klee/klee.go b/internal/characters/klee/klee.go index c527cb69d..7e3e0b03b 100644 --- a/internal/characters/klee/klee.go +++ b/internal/characters/klee/klee.go @@ -95,7 +95,7 @@ func (c *char) a4() { x.AddEnergy("klee-a4", 2) } return false - }, "kleea2") + }, "kleea1") } func (c *char) c1(delay int) { diff --git a/internal/characters/noelle/noelle.go b/internal/characters/noelle/noelle.go index 3d7b975b6..6a7c7c175 100644 --- a/internal/characters/noelle/noelle.go +++ b/internal/characters/noelle/noelle.go @@ -42,12 +42,12 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - c.a2() + c.a1() } /** -a2: shielding if fall below hp threshold, not implemented +a1: shielding if fall below hp threshold, not implemented a4: every 4 hit decrease breastplate cd by 1; implement as hook @@ -59,7 +59,7 @@ c6: sweeping time increase additional 50%; add 1s up to 10s everytime opponent k **/ -func (c *char) a2() { +func (c *char) a1() { icd := 0 c.Core.Events.Subscribe(core.OnCharacterHurt, func(args ...interface{}) bool { if c.Core.F < icd { @@ -72,7 +72,7 @@ func (c *char) a2() { icd = c.Core.F + 3600 ai := core.AttackInfo{ ActorIndex: c.Index, - Abil: "A2 Shield", + Abil: "A1 Shield", AttackTag: core.AttackTagNone, } snap := c.Snapshot(&ai) @@ -81,14 +81,14 @@ func (c *char) a2() { x := snap.BaseDef*(1+snap.Stats[core.DEFP]) + snap.Stats[core.DEF] c.Core.Shields.Add(&shield.Tmpl{ Src: c.Core.F, - ShieldType: core.ShieldNoelleA2, - Name: "Noelle A2", + ShieldType: core.ShieldNoelleA1, + Name: "Noelle A1", HP: 4 * x, Ele: core.Cryo, Expires: c.Core.F + 1200, //20 sec }) return false - }, "noelle-a2") + }, "noelle-a1") } // Noelle Geo infusion can't be overridden, so it must be a snapshot modification rather than a weapon infuse diff --git a/internal/characters/raiden/raiden.go b/internal/characters/raiden/raiden.go index 35b677159..75c489501 100644 --- a/internal/characters/raiden/raiden.go +++ b/internal/characters/raiden/raiden.go @@ -74,7 +74,7 @@ func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { func (c *char) Snapshot(a *core.AttackInfo) core.Snapshot { s := c.Tmpl.Snapshot(a) - //a2 add dmg based on ER% + //a1 add dmg based on ER% excess := int(s.Stats[core.ER] / 0.01) s.Stats[core.ElectroP] += float64(excess) * 0.004 /// 0.4% extra dmg diff --git a/internal/characters/shenhe/abil.go b/internal/characters/shenhe/abil.go index ac1892ec6..14bc968bb 100644 --- a/internal/characters/shenhe/abil.go +++ b/internal/characters/shenhe/abil.go @@ -227,7 +227,7 @@ func (c *char) skillPressBuff() { c.quillcount[i] = 5 c.updateBuffTags() char.AddPreDamageMod(core.PreDamageMod{ - Key: "shenhe-a2-press", + Key: "shenhe-a1-press", Expiry: c.Core.F + 10*60, Amount: func(a *core.AttackEvent, t core.Target) ([]float64, bool) { if a.Info.AttackTag != core.AttackTagElementalBurst && a.Info.AttackTag != core.AttackTagElementalArt && a.Info.AttackTag != core.AttackTagElementalArtHold { @@ -246,7 +246,7 @@ func (c *char) skillHoldBuff() { c.quillcount[i] = 7 c.updateBuffTags() char.AddPreDamageMod(core.PreDamageMod{ - Key: "shenhe-a2-hold", + Key: "shenhe-a1-hold", Expiry: c.Core.F + 15*60, Amount: func(a *core.AttackEvent, t core.Target) ([]float64, bool) { if a.Info.AttackTag != core.AttackTagNormal && a.Info.AttackTag != core.AttackTagExtra && a.Info.AttackTag != core.AttackTagPlunge { diff --git a/internal/characters/shenhe/shenhe.go b/internal/characters/shenhe/shenhe.go index 0c53d1866..11ebdad6c 100644 --- a/internal/characters/shenhe/shenhe.go +++ b/internal/characters/shenhe/shenhe.go @@ -58,7 +58,7 @@ func (c *char) Init() { c.quillcount = make([]int, len(c.Core.Chars)) - c.a2() + c.a1() c.quillDamageMod() if c.Base.Cons >= 4 { @@ -93,7 +93,7 @@ func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { // inspired from barbara c2 // TODO: technically always assumes you are inside shenhe burst -func (c *char) a2() { +func (c *char) a1() { val := make([]float64, core.EndStatType) val[core.CryoP] = 0.15 for _, char := range c.Core.Chars { @@ -101,7 +101,7 @@ func (c *char) a2() { // continue // } char.AddMod(core.CharStatMod{ - Key: "shenhe-a2", + Key: "shenhe-a1", Expiry: -1, Amount: func() ([]float64, bool) { if c.Core.Status.Duration("shenheburst") > 0 { diff --git a/internal/characters/travelergeo/abil.go b/internal/characters/travelergeo/abil.go index bf5e6b467..e7897fd39 100644 --- a/internal/characters/travelergeo/abil.go +++ b/internal/characters/travelergeo/abil.go @@ -27,7 +27,7 @@ func (c *char) Attack(p map[string]int) (int, int) { //add 60% as geo dmg ai := core.AttackInfo{ ActorIndex: c.Index, - Abil: "A2", + Abil: "A1", AttackTag: core.AttackTagNormal, ICDTag: core.ICDTagNone, ICDGroup: core.ICDGroupDefault, diff --git a/internal/characters/xingqiu/xingqiu.go b/internal/characters/xingqiu/xingqiu.go index c0420e3b5..102125a7e 100644 --- a/internal/characters/xingqiu/xingqiu.go +++ b/internal/characters/xingqiu/xingqiu.go @@ -49,16 +49,20 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() + c.a4() c.burstStateHook() +} + +func (c *char) a4() { + m := make([]float64, core.EndStatType) + m[core.HydroP] = 0.2 c.AddMod(core.CharStatMod{ - Key: "a4", + Key: "xingqiu-a4", + Expiry: -1, Amount: func() ([]float64, bool) { - a4 := make([]float64, core.EndStatType) - a4[core.HydroP] = 0.2 - return a4, true + return m, true }, - Expiry: -1, }) } diff --git a/internal/characters/yaemiko/yaemiko.go b/internal/characters/yaemiko/yaemiko.go index 03dc90fa5..3ba30a782 100644 --- a/internal/characters/yaemiko/yaemiko.go +++ b/internal/characters/yaemiko/yaemiko.go @@ -65,7 +65,7 @@ func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { func (c *char) a4() { m := make([]float64, core.EndStatType) c.AddPreDamageMod(core.PreDamageMod{ - Key: "yaemiko-a2", + Key: "yaemiko-a1", Expiry: -1, Amount: func(atk *core.AttackEvent, t core.Target) ([]float64, bool) { // only trigger on elemental art damage diff --git a/internal/characters/yoimiya/abil.go b/internal/characters/yoimiya/abil.go index edd1aad0e..55c974ad4 100644 --- a/internal/characters/yoimiya/abil.go +++ b/internal/characters/yoimiya/abil.go @@ -85,8 +85,8 @@ func (c *char) Skill(p map[string]int) (int, int) { c.Core.Status.AddStatus("yoimiyaskill", 600) //activate for 10 // log.Println(c.Core.Status.Duration("yoimiyaskill")) - if c.Core.Status.Duration("yoimiyaa2") == 0 { - c.a2stack = 0 + if c.Core.Status.Duration("yoimiyaa1") == 0 { + c.a1stack = 0 } c.SetCD(core.ActionSkill, 1080) @@ -121,7 +121,7 @@ func (c *char) Burst(p map[string]int) (int, int) { c.Core.Status.AddStatus("aurous", duration) val := make([]float64, core.EndStatType) //attack buff - val[core.ATKP] = 0.1 + float64(c.a2stack)*0.01 + val[core.ATKP] = 0.1 + float64(c.a1stack)*0.01 for i, char := range c.Core.Chars { if i == c.Index { continue diff --git a/internal/characters/yoimiya/cons.go b/internal/characters/yoimiya/cons.go index 4088a9a7d..f9a9abd30 100644 --- a/internal/characters/yoimiya/cons.go +++ b/internal/characters/yoimiya/cons.go @@ -3,16 +3,16 @@ package yoimiya import "github.com/genshinsim/gcsim/pkg/core" func (c *char) c1() { - val := make([]float64, core.EndStatType) - val[core.ATKP] = 0.2 + m := make([]float64, core.EndStatType) + m[core.ATKP] = 0.2 c.Core.Events.Subscribe(core.OnTargetDied, func(args ...interface{}) bool { //we assume target is affected if it's active if c.Core.Status.Duration("aurous") > 0 { c.AddMod(core.CharStatMod{ - Key: "c1", + Key: "yoimiya-c1", Expiry: c.Core.F + 1200, Amount: func() ([]float64, bool) { - return val, true + return m, true }, }) } @@ -21,49 +21,20 @@ func (c *char) c1() { } func (c *char) c2() { - val := make([]float64, core.EndStatType) - val[core.PyroP] = 0.25 + m := make([]float64, core.EndStatType) + m[core.PyroP] = 0.25 c.Core.Events.Subscribe(core.OnDamage, func(args ...interface{}) bool { atk := args[1].(*core.AttackEvent) crit := args[3].(bool) if atk.Info.ActorIndex == c.Index && crit { c.AddMod(core.CharStatMod{ - Key: "c2", + Key: "yoimiya-c2", Expiry: c.Core.F + 360, Amount: func() ([]float64, bool) { - return val, true + return m, true }, }) } return false }, "yoimiya-c2") } - -// func (c *char) c6() { -// c.Core.Events.Subscribe(core.PostAttack, func(args ...interface{}) bool { -// if c.Core.ActiveChar != c.Index { -// return false -// } -// if c.Core.Rand.Float64() < 0.5 { -// return false -// } -// if c.Core.Status.Duration("yoimiyaskill") > 0 { -// //trigger attack -// d := c.Snapshot( -// //fmt.Sprintf("Normal %v", c.NormalCounter), -// "Kindling (C6)", -// core.AttackTagNormal, -// core.ICDTagNormalAttack, -// core.ICDGroupDefault, -// core.StrikeTypePierce, -// core.Pyro, -// 25, -// aimExtra[c.TalentLvlAttack()], -// ) -// c.QueueDmg(&d, 20) -// } - -// return false - -// }, "yoimiya-c6") -// } diff --git a/internal/characters/yoimiya/yoimiya.go b/internal/characters/yoimiya/yoimiya.go index bbf0bfa81..162f11481 100644 --- a/internal/characters/yoimiya/yoimiya.go +++ b/internal/characters/yoimiya/yoimiya.go @@ -11,7 +11,7 @@ func init() { type char struct { *character.Tmpl - a2stack int + a1stack int lastPart int } @@ -42,7 +42,7 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - c.a2() + c.a1() c.onExit() c.burstHook() @@ -54,17 +54,17 @@ func (c *char) Init() { } } -func (c *char) a2() { +func (c *char) a1() { c.AddMod(core.CharStatMod{ - Key: "yoimiya-a2", + Key: "yoimiya-a1", Expiry: -1, Amount: func() ([]float64, bool) { val := make([]float64, core.EndStatType) - if c.Core.Status.Duration("yoimiyaa2") > 0 { - val[core.PyroP] = float64(c.a2stack) * 0.02 + if c.Core.Status.Duration("yoimiyaa1") > 0 { + val[core.PyroP] = float64(c.a1stack) * 0.02 return val, true } - c.a2stack = 0 + c.a1stack = 0 return nil, false }, }) @@ -80,13 +80,13 @@ func (c *char) a2() { return false } //here we can add stacks up to 10 - if c.a2stack < 10 { - c.a2stack++ + if c.a1stack < 10 { + c.a1stack++ } - c.Core.Status.AddStatus("yoimiyaa2", 180) - // c.a2expiry = c.Core.F + 180 // 3 seconds + c.Core.Status.AddStatus("yoimiyaa1", 180) + // c.a1expiry = c.Core.F + 180 // 3 seconds return false - }, "yoimiya-a2") + }, "yoimiya-a1") } func (c *char) Snapshot(ai *core.AttackInfo) core.Snapshot { diff --git a/internal/characters/zhongli/shield.go b/internal/characters/zhongli/shield.go index fcef2c82d..e73875f57 100644 --- a/internal/characters/zhongli/shield.go +++ b/internal/characters/zhongli/shield.go @@ -35,7 +35,7 @@ func (c *char) addJadeShield() { func (c *char) removeJadeShield() { c.Tags["shielded"] = 0 - c.Tags["a2"] = 0 + c.Tags["a1"] = 0 //deactivate resist mods //add resist mod whenever we get a shield res := []core.EleType{core.Pyro, core.Hydro, core.Cryo, core.Electro, core.Geo, core.Anemo, core.Physical} @@ -93,8 +93,8 @@ func (s *shd) OnDamage(dmg float64, ele core.EleType, bonus float64) (float64, b if !ok { s.c.removeJadeShield() } - if s.c.Tags["a2"] < 5 { - s.c.Tags["a2"]++ + if s.c.Tags["a1"] < 5 { + s.c.Tags["a1"]++ } return taken, ok } diff --git a/internal/characters/zhongli/zhongli.go b/internal/characters/zhongli/zhongli.go index 5374584ca..6c6541604 100644 --- a/internal/characters/zhongli/zhongli.go +++ b/internal/characters/zhongli/zhongli.go @@ -51,7 +51,7 @@ func NewChar(s *core.Core, p core.CharacterProfile) (core.Character, error) { func (c *char) Init() { c.Tmpl.Init() - c.a2() + c.a1() } func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { @@ -67,11 +67,11 @@ func (c *char) ActionStam(a core.ActionType, p map[string]int) float64 { } -func (c *char) a2() { +func (c *char) a1() { c.Core.Shields.AddBonus(func() float64 { if c.Tags["shielded"] == 0 { return 0 } - return float64(c.Tags["a2"]) * 0.05 + return float64(c.Tags["a1"]) * 0.05 }) } diff --git a/pkg/core/shield.go b/pkg/core/shield.go index 6e4c99e12..90bd84ded 100644 --- a/pkg/core/shield.go +++ b/pkg/core/shield.go @@ -5,7 +5,7 @@ type ShieldType int const ( ShieldCrystallize ShieldType = iota //lasts 15 seconds ShieldNoelleSkill - ShieldNoelleA2 + ShieldNoelleA1 ShieldZhongliJadeShield ShieldDionaSkill ShieldBeidouThunderShield