Files
bl/logic/service/fight/boss/NewSeIdx_92.go
xinian c049bbd5ac
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix: 修复登录空指针及战斗效果
2026-03-21 00:24:34 +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.CurrentPet.Info.CatchTime {
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
return
}
e.n1 = e.Ctx().Our.CurrentPet.GetHP()
}
func (e *NewSel92) TurnEnd() {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
return
}
e.n2 = e.Ctx().Our.CurrentPet.GetHP()
}
func (e *NewSel92) DamageFloor(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.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
}