Skip to content

Commit 149eb43

Browse files
committed
bug fixes pt. 2
1 parent dd446a4 commit 149eb43

7 files changed

Lines changed: 128 additions & 90 deletions

File tree

internal/characters/traveler/common/pyro/asc.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const a4OnReactICD = "travelerpyro-a4-icd"
66

77
func (c *Traveler) a4() {
88
fReactionHook := func(args ...interface{}) bool {
9-
// if PMC is in NS Blessinng, then the active character should
9+
// if PMC is in NS Blessing, then the active character should
1010
// be inside a Blazing Threshold or Scorching Threshold since it
1111
// always follows active character
1212
if !c.nightsoulState.HasBlessing() {
@@ -16,11 +16,7 @@ func (c *Traveler) a4() {
1616
return false
1717
}
1818

19-
if c.Base.Cons >= 2 && c.StatusIsActive(c2StatusKey) && c.c2ActivationsPerSkill < 2 {
20-
c.nightsoulState.GeneratePoints(14)
21-
}
22-
23-
c.AddStatus(a4OnReactICD, 12, false) // TODO: hitlag affected?
19+
c.AddStatus(a4OnReactICD, 12, true)
2420
c.AddEnergy("travelerpyro-a4-energy", 5)
2521
return false
2622
}

internal/characters/traveler/common/pyro/burst.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ func (c *Traveler) Burst(p map[string]int) (action.Info, error) {
4848
StrikeType: attacks.StrikeTypeDefault,
4949
Element: attributes.Pyro,
5050
Durability: 25,
51-
Mult: burst[c.TalentLvlSkill()],
51+
Mult: burst[c.TalentLvlBurst()],
5252
}
5353

5454
c.Core.QueueAttack(
5555
ai,
56-
combat.NewCircleHitOnTarget(c.Core.Combat.PrimaryTarget(), nil, 6.5),
56+
combat.NewCircleHitOnTarget(c.Core.Combat.PrimaryTarget(), nil, 4.5),
5757
burstHitmark,
5858
burstHitmark,
5959
)

internal/characters/traveler/common/pyro/cons.go

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"github.com/genshinsim/gcsim/pkg/core/attacks"
66
"github.com/genshinsim/gcsim/pkg/core/attributes"
77
"github.com/genshinsim/gcsim/pkg/core/combat"
8+
"github.com/genshinsim/gcsim/pkg/core/event"
89
"github.com/genshinsim/gcsim/pkg/core/player/character"
910
"github.com/genshinsim/gcsim/pkg/modifier"
1011
)
@@ -31,7 +32,7 @@ func (c *Traveler) c1AddMod() {
3132
}
3233
mDmg[attributes.DmgP] = 0.06
3334
if this.StatusIsActive(nightsoul.NightsoulBlessingStatus) {
34-
mDmg[attributes.DmgP] += 0.06
35+
mDmg[attributes.DmgP] += 0.09
3536
}
3637
return mDmg, true
3738
},
@@ -40,6 +41,32 @@ func (c *Traveler) c1AddMod() {
4041
}
4142

4243
func (c *Traveler) c2() {
44+
if c.Base.Cons < 2 {
45+
return
46+
}
47+
fReactionHook := func(args ...interface{}) bool {
48+
if c.StatusIsActive(c2StatusKey) {
49+
return false
50+
}
51+
52+
if c.c2ActivationsPerSkill < 2 {
53+
c.c2ActivationsPerSkill++
54+
c.nightsoulState.GeneratePoints(14)
55+
}
56+
57+
return false
58+
}
59+
60+
c.Core.Events.Subscribe(event.OnBurning, fReactionHook, "travelerpyro-c2-onburning")
61+
c.Core.Events.Subscribe(event.OnVaporize, fReactionHook, "travelerpyro-a4-onvaporize")
62+
c.Core.Events.Subscribe(event.OnMelt, fReactionHook, "travelerpyro-c2-onmelt")
63+
c.Core.Events.Subscribe(event.OnOverload, fReactionHook, "travelerpyro-c2-onoverload")
64+
c.Core.Events.Subscribe(event.OnBurgeon, fReactionHook, "travelerpyro-c2-onburgeon")
65+
c.Core.Events.Subscribe(event.OnSwirlPyro, fReactionHook, "travelerpyro-c2-onswirlpyro")
66+
c.Core.Events.Subscribe(event.OnCrystallizePyro, fReactionHook, "travelerpyro-c2-oncrystallizepyro")
67+
}
68+
69+
func (c *Traveler) c2OnSkill() {
4370
if c.Base.Cons < 2 {
4471
return
4572
}
@@ -77,6 +104,9 @@ func (c *Traveler) c6AddMod() {
77104
default:
78105
return nil, false
79106
}
107+
if !c.nightsoulState.HasBlessing() {
108+
return nil, false
109+
}
80110
return mCD, true
81111
},
82112
})

internal/characters/traveler/common/pyro/skill.go

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/genshinsim/gcsim/pkg/core/combat"
1111
"github.com/genshinsim/gcsim/pkg/core/event"
1212
"github.com/genshinsim/gcsim/pkg/core/targets"
13+
"github.com/genshinsim/gcsim/pkg/enemy"
1314
)
1415

1516
var skillFrames [][]int
@@ -23,9 +24,11 @@ const (
2324
tapCdStart = 19
2425
holdCdStart = 48
2526
enterNightsoulDelay = 19
26-
nightsoulReduceDelay = 10
27+
nightsoulReduceDelay = 8 // From wiki: consumption is 7.5 points per second -> 1 per 8f
28+
scorchingThresholdICD = 180
2729
particleICDKey = "travelerpyro-particle-icd"
2830
scoringThresholdKey = "travelerpyro-e"
31+
scorchingThresholdICDKey = "travelerpyro-scorching-threshold-icd"
2932
)
3033

3134
func init() {
@@ -76,7 +79,7 @@ func (c *Traveler) Skill(p map[string]int) (action.Info, error) {
7679
}
7780

7881
c.c1AddMod()
79-
c.c2()
82+
c.c2OnSkill()
8083
c.c6AddMod()
8184

8285
if hold == 0 {
@@ -90,12 +93,7 @@ func (c *Traveler) SkillTap(p map[string]int) (action.Info, error) {
9093
skillSrc := c.Core.F + enterNightsoulDelay
9194
c.QueueCharTask(func() {
9295
c.nightsoulSrc = skillSrc
93-
if c.nightsoulState.HasBlessing() {
94-
c.nightsoulState.ClearPoints()
95-
c.nightsoulState.GeneratePoints(42)
96-
} else {
97-
c.nightsoulState.EnterBlessing(42)
98-
}
96+
c.nightsoulState.EnterTimedBlessing(42, 12*60, nil)
9997
c.QueueCharTask(c.nightsoulPointReduceFunc(c.nightsoulSrc), nightsoulReduceDelay)
10098
}, enterNightsoulDelay)
10199
c.SetCDWithDelay(action.ActionSkill, 18*60, tapCdStart)
@@ -104,18 +102,14 @@ func (c *Traveler) SkillTap(p map[string]int) (action.Info, error) {
104102
return action.Info{
105103
Frames: frames.NewAbilFunc(skillFrames[c.gender]),
106104
AnimationLength: skillFrames[c.gender][action.InvalidAction],
107-
CanQueueAfter: skillFrames[c.gender][action.ActionDash], // earliest cancel
105+
CanQueueAfter: skillFrames[c.gender][action.ActionSwap], // earliest cancel
108106
State: action.SkillState,
109107
}, nil
110108
}
111109

112110
func (c *Traveler) SkillHold(p map[string]int) (action.Info, error) {
113111
c.QueueCharTask(func() {
114-
if c.nightsoulState.HasBlessing() {
115-
c.nightsoulState.GeneratePoints(42)
116-
} else {
117-
c.nightsoulState.EnterBlessing(42)
118-
}
112+
c.nightsoulState.EnterTimedBlessing(42, 12*60, nil)
119113
c.nightsoulSrc = c.Core.F
120114
c.QueueCharTask(c.nightsoulPointReduceFunc(c.Core.F), nightsoulReduceDelay)
121115
}, 48)
@@ -135,7 +129,7 @@ func (c *Traveler) SkillHold(p map[string]int) (action.Info, error) {
135129

136130
c.Core.QueueAttack(
137131
ai,
138-
combat.NewCircleHitOnTarget(c.Core.Combat.PrimaryTarget(), nil, 6.5),
132+
combat.NewCircleHitOnTarget(c.Core.Combat.PrimaryTarget(), nil, 3.0),
139133
skillHoldHitmark,
140134
skillHoldHitmark,
141135
)
@@ -145,7 +139,7 @@ func (c *Traveler) SkillHold(p map[string]int) (action.Info, error) {
145139
return action.Info{
146140
Frames: frames.NewAbilFunc(skillHoldFrames[c.gender]),
147141
AnimationLength: skillHoldFrames[c.gender][action.InvalidAction],
148-
CanQueueAfter: skillHoldFrames[c.gender][action.ActionDash], // earliest cancel
142+
CanQueueAfter: skillHoldFrames[c.gender][action.ActionSwap], // earliest cancel
149143
State: action.SkillState,
150144
}, nil
151145
}
@@ -201,10 +195,9 @@ func (c *Traveler) blazingThresholdHit(src int) func() {
201195
Durability: 25,
202196
Mult: blazingThreshold[c.TalentLvlSkill()],
203197
}
204-
// TODO: change hurtbox
205-
radius := 4.
198+
radius := 0.5
206199
if c.Base.Ascension >= 1 && c.nightsoulState.Points() >= 20 {
207-
radius = 6.
200+
radius = 3.
208201
}
209202
c.Core.QueueAttack(ai, combat.NewCircleHitOnTarget(c.Core.Combat.Player(), nil, radius), 0, 0, c.particleCB)
210203
c.QueueCharTask(c.blazingThresholdHit(src), blazingThresholdInterval)
@@ -213,9 +206,13 @@ func (c *Traveler) blazingThresholdHit(src int) func() {
213206

214207
func (c *Traveler) scorchingThresholdOnDamage() {
215208
c.Core.Events.Subscribe(event.OnEnemyDamage, func(args ...interface{}) bool {
209+
_, ok := args[0].(*enemy.Enemy)
216210
ae := args[1].(*combat.AttackEvent)
217211
dmg := args[2].(float64)
218-
if c.scorchingThresholdICD > c.Core.F {
212+
if !ok {
213+
return false
214+
}
215+
if c.StatusIsActive(scorchingThresholdICDKey) {
219216
return false
220217
}
221218
if !c.StatusIsActive(scoringThresholdKey) {
@@ -227,20 +224,14 @@ func (c *Traveler) scorchingThresholdOnDamage() {
227224
ae.Info.AttackTag == attacks.AttackTagSwirlHydro {
228225
return false
229226
}
230-
// ignore self dmg
231-
if ae.Info.ActorIndex == c.Index &&
232-
ae.Info.AttackTag == attacks.AttackTagElementalArt &&
233-
ae.Info.StrikeType == attacks.StrikeTypeSlash {
234-
return false
235-
}
236227
// ignore 0 damage
237228
if dmg == 0 {
238229
return false
239230
}
240231

241232
ai := combat.AttackInfo{
242233
ActorIndex: c.Index,
243-
Abil: "Scorching Threshold DMG",
234+
Abil: "Scorching Threshold",
244235
AttackTag: attacks.AttackTagElementalArt,
245236
AdditionalTags: []attacks.AdditionalTag{attacks.AdditionalTagNightsoul},
246237
ICDTag: attacks.ICDTagTravelerScorchingThreshold,
@@ -250,15 +241,14 @@ func (c *Traveler) scorchingThresholdOnDamage() {
250241
Durability: 25,
251242
Mult: scorchingThreshold[c.TalentLvlSkill()],
252243
}
253-
// TODO: change hurtbox
254-
radius := 4.
244+
radius := 1.5
255245
if c.Base.Ascension >= 1 && c.nightsoulState.Points() >= 20 {
256-
radius = 6.
246+
radius = 4.
257247
}
258248
c.Core.QueueAttack(ai, combat.NewCircleHitOnTarget(c.Core.Combat.Player(), nil, radius),
259249
scorchingThresholdHitmarkDelay, scorchingThresholdHitmarkDelay, c.particleCB)
260250

261-
c.scorchingThresholdICD = c.Core.F + 180 // 3 sec icd
251+
c.AddStatus(scorchingThresholdICDKey, scorchingThresholdICD, false)
262252
return false
263253
}, "travelerpyro-scorching-threshold")
264254
}

internal/characters/traveler/common/pyro/stats.go

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -164,69 +164,73 @@ var (
164164
},
165165
},
166166
}
167+
// skill: blazingThreshold = [0]
167168
blazingThreshold = []float64{
168-
0.281,
169-
0.302,
170-
0.323,
169+
0.2808,
170+
0.30186,
171+
0.32292,
171172
0.351,
172-
0.372,
173-
0.393,
174-
0.421,
175-
0.449,
173+
0.37206,
174+
0.39312,
175+
0.4212,
176+
0.44928,
176177
0.47736,
177-
0.505,
178-
0.534,
178+
0.50544,
179+
0.53352,
179180
0.5616,
180-
0.597,
181-
0.632,
182-
0.667,
181+
0.5967,
182+
0.6318,
183+
0.6669,
183184
}
185+
// skill: holdDMG = [1]
184186
holdDMG = []float64{
185187
0.988,
186-
1.062,
187-
1.136,
188+
1.0621,
189+
1.1362,
188190
1.235,
189-
1.309,
190-
1.383,
191+
1.3091,
192+
1.3832,
191193
1.482,
192-
1.581,
194+
1.5808,
193195
1.6796,
194-
1.778,
195-
1.877,
196+
1.7784,
197+
1.8772,
196198
1.976,
197-
2.100,
199+
2.0995,
198200
2.223,
199-
2.346,
201+
2.3465,
200202
}
203+
// skill: scorchingThreshold = [2]
201204
scorchingThreshold = []float64{
202-
0.814,
203-
0.875,
204-
0.937,
205+
0.8144,
206+
0.87548,
207+
0.93656,
205208
1.018,
206-
1.079,
207-
1.14,
208-
1.222,
209-
1.303,
210-
1.384,
211-
1.466,
212-
1.547,
213-
1.629,
214-
1.731,
215-
1.832,
216-
1.934,
209+
1.07908,
210+
1.14016,
211+
1.2216,
212+
1.30304,
213+
1.38448,
214+
1.46592,
215+
1.54736,
216+
1.6288,
217+
1.7306,
218+
1.8324,
219+
1.9342,
217220
}
221+
// burst: burst = [0]
218222
burst = []float64{
219223
4.272,
220-
4.592,
221-
4.913,
222-
5.340,
223-
5.660,
224-
5.981,
224+
4.5924,
225+
4.9128,
226+
5.34,
227+
5.6604,
228+
5.9808,
225229
6.408,
226-
6.835,
230+
6.8352,
227231
7.2624,
228-
7.690,
229-
8.117,
232+
7.6896,
233+
8.1168,
230234
8.544,
231235
9.078,
232236
9.612,

internal/characters/traveler/common/pyro/travelerpyro.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ type Traveler struct {
1515
*tmpl.Character
1616
nightsoulState *nightsoul.State
1717
nightsoulSrc int
18-
scorchingThresholdICD int
1918
gender int
2019
c2ActivationsPerSkill int
2120
}
@@ -44,6 +43,7 @@ func NewTraveler(s *core.Core, w *character.CharWrapper, p info.CharacterProfile
4443
func (c *Traveler) Init() error {
4544
c.scorchingThresholdOnDamage()
4645
c.a4()
46+
c.c2()
4747
return nil
4848
}
4949

0 commit comments

Comments
 (0)