Skip to content

Commit

Permalink
fix c1 & add c4
Browse files Browse the repository at this point in the history
  • Loading branch information
kengzzzz committed Jul 7, 2024
1 parent a7284aa commit 4d6e477
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
17 changes: 9 additions & 8 deletions internal/characters/emilie/burst.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ var (
)

const (
burstHitmark = 104
burstDuration = 168
burstInterval = 18
burstMarkKey = "emilie-burst-mark"
burstHitmark = 104
burstDuration = 168
burstInterval = 18
burstTargetICD = 42
burstMarkKey = "emilie-burst-mark"
)

func init() {
Expand Down Expand Up @@ -51,7 +52,7 @@ func (c *char) Burst(_ map[string]int) (action.Info, error) {
c.removeLumi(c.lumidouceSrc)()
}

for i := 21; i <= burstDuration; i += burstInterval {
for i := 21; i <= burstDuration+c.c4Dur(); i += burstInterval {
enemy := c.Core.Combat.RandomEnemyWithinArea(
burstArea,
func(e combat.Enemy) bool {
Expand All @@ -61,7 +62,7 @@ func (c *char) Burst(_ map[string]int) (action.Info, error) {
var pos geometry.Point
if enemy != nil {
pos = enemy.Pos()
enemy.AddStatus(burstMarkKey, 0.7*60, false)
enemy.AddStatus(burstMarkKey, burstTargetICD+c.c4Interval(), false)
} else {
pos = geometry.CalcRandomPointFromCenter(burstArea.Shape.Pos(), 0.5, 12.5, c.Core.Rand)
}
Expand All @@ -74,7 +75,7 @@ func (c *char) Burst(_ map[string]int) (action.Info, error) {
0,
)
}
}, 21)
}, 17)

c.QueueCharTask(func() {
c.lumidouceLvl = oldLvl
Expand All @@ -85,7 +86,7 @@ func (c *char) Burst(_ map[string]int) (action.Info, error) {

c.Core.Tasks.Add(c.lumiTick(c.Core.F), skillLumiFirstTick)
c.Core.Tasks.Add(c.removeLumi(c.Core.F), 22*60)
}, burstDuration)
}, burstDuration+c.c4Dur())

c.ConsumeEnergy(12)
c.SetCD(action.ActionBurst, 13.5*60)
Expand Down
22 changes: 20 additions & 2 deletions internal/characters/emilie/cons.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func (c *char) c1() {
c.AddStatus(c1ICDKey, c1ICDDur, false)
if c.lumidouceLvl < 4 {
c.lumidouceLvl++
} else if c.lumidouceLvl == 4 {
}
if c.lumidouceLvl == 4 {
c.lumidouceLvl = 2
c.Core.Events.Emit(event.OnEmilieA1)
}
Expand All @@ -71,7 +72,8 @@ func (c *char) c1() {
c.AddStatus(c1ICDKey, c1ICDDur, false)
if c.lumidouceLvl < 4 {
c.lumidouceLvl++
} else if c.lumidouceLvl == 4 {
}
if c.lumidouceLvl == 4 {
c.lumidouceLvl = 2
c.Core.Events.Emit(event.OnEmilieA1)
}
Expand Down Expand Up @@ -102,3 +104,19 @@ func (c *char) c2() {
return false
}, "emilie-c2")
}

func (c *char) c4Dur() int {
if c.Base.Cons < 4 {
return 0
}

return 120
}

func (c *char) c4Interval() int {
if c.Base.Cons < 4 {
return 0
}

return -0.3 * 60
}

0 comments on commit 4d6e477

Please sign in to comment.