refactor: 替换过时的上下文访问方法
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -19,7 +19,7 @@ type Effect1146 struct {
|
|||||||
func (e *Effect1146) OnSkill() bool {
|
func (e *Effect1146) OnSkill() bool {
|
||||||
// 1. 命中判定失败,不触发
|
// 1. 命中判定失败,不触发
|
||||||
count := 0
|
count := 0
|
||||||
for _, v := range e.Ctx().Opp.Prop[:] {
|
for _, v := range e.OpponentInput().Prop[:] {
|
||||||
if v > 0 {
|
if v > 0 {
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ func (e *Effect1146) OnSkill() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
e.OpponentInput().Damage(e.CarrierInput(), &info.DamageZone{
|
||||||
Type: info.DamageType.Fixed,
|
Type: info.DamageType.Fixed,
|
||||||
Damage: e.Args()[1],
|
Damage: e.Args()[1],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func (e *Effect171) ComparePre(fattack *action.SelectSkillAction, sattack *actio
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
//先手是自己
|
//先手是自己
|
||||||
if fattack.PlayerID == e.Ctx().Our.UserID {
|
if fattack.PlayerID == e.CarrierInput().UserID {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if sattack == nil {
|
if sattack == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user