Files
bl/logic/service/fight/boss/NewSeIdx_92.go
xinian 9c6f3988de
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构 CurrentPet 为 CurPet
2026-04-04 04:34:43 +08:00

64 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// eid: 92
// icon_id: -1
// isHide: 隐藏特性
// tips:
// - 自身攻击会附加上一回合的伤害, 附加上回合受到伤害(红伤+粉伤等量的粉伤对应BuffId 2056
//
// args:
// - 0 0
//
// tips_help:
// - 自身攻击会附加上一回合的伤害, 附加上回合受到伤害(红伤+粉伤等量的粉伤对应BuffId 2056
//
// T92. 属性技能无效
type NewSel92 struct {
NewSel0
n1 alpacadecimal.Decimal
n2 alpacadecimal.Decimal
}
func init() {
input.InitEffect(input.EffectType.NewSel, 92, &NewSel92{})
}
func (e *NewSel92) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
return
}
e.n1 = e.Ctx().Our.CurPet[0].GetHP()
}
func (e *NewSel92) TurnEnd() {
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
return
}
e.n2 = e.Ctx().Our.CurPet[0].GetHP()
}
func (e *NewSel92) DamageFloor(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
return true
}
//不是技能
if e.Ctx().SkillEntity == nil {
return true
}
if e.n2.Cmp(e.n1) == 1 {
t.Damage.Add(e.n2.Sub(e.n1))
}
return true
}