All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix(fight): 修复技能效果ID配置错误 - 修复NewSeIdx_66.go中空指针检查,避免程序崩溃 - 修正effect/407.go中技能ID从138改为407 - 修正effect/440.go中技能ID从138改为440,并修复类型引用错误 - 修正effect/523.go中属性设置对象错误,从Ctx().Opp改为Ctx().Our - 修正effect_517.go中技能ID从452改为517 ```
43 lines
990 B
Go
43 lines
990 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/action"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
)
|
||
|
||
// 407 - 下回合起,每回合XX等级+n,持续m回合
|
||
type Effect407 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect407) Skill_Use() bool {
|
||
// 创建一个延迟生效的效果,在下一回合开始生效
|
||
effectType := int8(e.Args()[0].IntPart()) // XX类型
|
||
effectValue := int8(e.Args()[1].IntPart()) // 等级+n
|
||
duration := int(e.Args()[2].IntPart()) // 持续m回合
|
||
|
||
e.GenSub(&Effect407_sub{
|
||
effectType: effectType,
|
||
effectValue: effectValue,
|
||
}, duration)
|
||
|
||
return true
|
||
}
|
||
|
||
type Effect407_sub struct {
|
||
node.EffectNode
|
||
effectType int8
|
||
effectValue int8
|
||
}
|
||
|
||
func (e *Effect407_sub) ActionStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, e.effectType, e.effectValue)
|
||
return true
|
||
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 407, &Effect407{})
|
||
|
||
}
|