refactor: 重构 CurrentPet 为 CurPet
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-04-04 04:34:43 +08:00
committed by cnb
parent 6439995434
commit 9c6f3988de
395 changed files with 1424 additions and 1424 deletions

View File

@@ -82,7 +82,7 @@ func (e *ContinuousDamage) ActionStart(attacker, defender *action.SelectSkillAct
Type: info.DamageType.True,
Damage: damage,
})
if e.Ctx().Opp.CurrentPet[0].GetHP().IntPart() == 0 {
if e.Ctx().Opp.CurPet[0].GetHP().IntPart() == 0 {
return true
}
@@ -93,7 +93,7 @@ func (e *ContinuousDamage) ActionStart(attacker, defender *action.SelectSkillAct
// 计算伤害最大生命值的1/8
func (e *ContinuousDamage) calculateDamage() alpacadecimal.Decimal {
return alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurrentPet[0].Info.MaxHp)).
return alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurPet[0].Info.MaxHp)).
Div(alpacadecimal.NewFromInt(8))
}
@@ -125,7 +125,7 @@ func (e *ParasiticSeed) SwitchOut(in *input.Input) bool {
func (e *ParasiticSeed) ActionStartEx(attacker, defender *action.SelectSkillAction) bool {
// 过滤特定类型单位假设1是植物类型使用枚举替代魔法数字
damage := alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurrentPet[0].Info.MaxHp)).
damage := alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurPet[0].Info.MaxHp)).
Div(alpacadecimal.NewFromInt(8))
// 对我方造成真实伤害
@@ -133,7 +133,7 @@ func (e *ParasiticSeed) ActionStartEx(attacker, defender *action.SelectSkillActi
Type: info.DamageType.True,
Damage: damage,
})
if e.Ctx().Opp.CurrentPet[0].GetHP().IntPart() == 0 {
if e.Ctx().Opp.CurPet[0].GetHP().IntPart() == 0 {
return true
}