@@ -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
1516var 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
3134func 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
112110func (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
214207func (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}
0 commit comments