feat(fight): 添加新效果类型574并优化现有战斗逻辑 - 重命名NewSel409结构体的Action_end_ex方法为Skill_Use_ex - 将effect/523中HP检查改为Alive()方法调用 - 修复selfkill效果中的代码格式问题 - 新增效果类型574:消耗自身全部体力使下次技能必定先手、命中且暴击 - 实现Effect574的ComparePre和ActionStart方法处理先手、命中和暴击逻辑 ```
32 lines
589 B
Go
32 lines
589 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
)
|
||
|
||
// 523 - 若当回合未击败对手,则自身1 1 1 1 1 1能力+1
|
||
type Effect523 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect523) Action_end() bool {
|
||
// 检查对手是否还活着
|
||
if e.Ctx().Opp.CurrentPet.Alive() {
|
||
// 提升自身的全部能力等级
|
||
for i, v := range e.SideEffectArgs {
|
||
if v == 0 {
|
||
continue
|
||
}
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(v))
|
||
}
|
||
|
||
}
|
||
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 523, &Effect523{})
|
||
|
||
}
|