refactor: 替换过时的上下文访问方法
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-04-04 07:26:08 +08:00
committed by cnb
parent c89632b409
commit 80cfa0a07e
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ type Effect1146 struct {
func (e *Effect1146) OnSkill() bool {
// 1. 命中判定失败,不触发
count := 0
for _, v := range e.Ctx().Opp.Prop[:] {
for _, v := range e.OpponentInput().Prop[:] {
if v > 0 {
count++
}
@@ -29,7 +29,7 @@ func (e *Effect1146) OnSkill() bool {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
e.OpponentInput().Damage(e.CarrierInput(), &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[1],
})

View File

@@ -20,7 +20,7 @@ func (e *Effect171) ComparePre(fattack *action.SelectSkillAction, sattack *actio
return true
}
//先手是自己
if fattack.PlayerID == e.Ctx().Our.UserID {
if fattack.PlayerID == e.CarrierInput().UserID {
return true
}
if sattack == nil {