feat(fight): 添加新效果类型574并优化现有战斗逻辑 - 重命名NewSel409结构体的Action_end_ex方法为Skill_Use_ex - 将effect/523中HP检查改为Alive()方法调用 - 修复selfkill效果中的代码格式问题 - 新增效果类型574:消耗自身全部体力使下次技能必定先手、命中且暴击 - 实现Effect574的ComparePre和ActionStart方法处理先手、命中和暴击逻辑 ```
37 lines
618 B
Go
37 lines
618 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// {
|
|
// "id": 537,
|
|
// "argsNum": 1,
|
|
// "info": "自身攻击{0},若对手处于能力提升状态则强化效果翻倍"
|
|
// },
|
|
type Effect537 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect537) SkillHit() bool {
|
|
for i, v := range e.SideEffectArgs {
|
|
if v == 0 {
|
|
continue
|
|
}
|
|
if e.Ctx().Opp.HasPropADD() {
|
|
v *= 2
|
|
|
|
}
|
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(v))
|
|
|
|
}
|
|
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 537, &Effect537{})
|
|
}
|