Skip to content

Commit

Permalink
Merge pull request #1290 from k0l11/hutao-pp-slide
Browse files Browse the repository at this point in the history
implement hu tao pp slide
  • Loading branch information
unleashurgeek authored Feb 16, 2023
2 parents dde7bfa + 754b9b7 commit e547e29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/characters/hutao/charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func (c *char) ChargeAttack(p map[string]int) action.ActionInfo {

func (c *char) ppChargeAttack(p map[string]int) action.ActionInfo {

// pp slide: add 1.8s to paramita on charge attack start which gets removed once the charge attack ends
c.ExtendStatus(paramitaBuff, 1.8*60)

//TODO: currently assuming snapshot is on cast since it's a bullet and nothing implemented re "pp slide"
ai := combat.AttackInfo{
ActorIndex: c.Index,
Expand Down Expand Up @@ -149,5 +152,10 @@ func (c *char) ppChargeAttack(p map[string]int) action.ActionInfo {
AnimationLength: ppChargeFrames[action.InvalidAction],
CanQueueAfter: 1,
State: action.ChargeAttackState,
OnRemoved: func(next action.AnimationState) {
if next != action.BurstState {
c.ExtendStatus(paramitaBuff, -1.8*60)
}
},
}
}
3 changes: 3 additions & 0 deletions pkg/modifier/modifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func (t *Base) SetEvent(evt glog.Event) { t.event = evt }
func (t *Base) AffectedByHitlag() bool { return t.Hitlag }
func (t *Base) Extend(amt int) {
t.extension += amt
if t.extension < 0 {
t.extension = 0
}
t.event.SetEnded(t.Expiry())
}
func (t *Base) SetExpiry(f int) {
Expand Down

0 comments on commit e547e29

Please sign in to comment.