```
feat(fight/boss): 更新NewSeIdx_70技能效果实现 - 添加action包导入用于技能动作处理 - 将PropBefer方法重构为TurnStart方法,统一处理回合开始逻辑 - 修改技能效果触发条件,只在技能拥有者时执行 - 实现能力属性复制逻辑,将对手的能力提升同时加给自己 -
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
)
|
||||
@@ -10,21 +11,19 @@ type NewSel70 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel70) PropBefer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
// 只有对手提升能力时触发,且对手提升的技能是给自己用的
|
||||
if in != e.Ctx().Our || e.Ctx().Opp != e.Ctx().Our {
|
||||
return true
|
||||
}
|
||||
func (e *NewSel70) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||
|
||||
// 只处理能力增加时的情况
|
||||
if ptype != info.AbilityOpType.ADD {
|
||||
return true
|
||||
if !e.IsOwner() {
|
||||
return
|
||||
}
|
||||
|
||||
// 将对手的能力提升同时加给自己
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, prop, level, ptype)
|
||||
|
||||
return true
|
||||
for i := 0; i < 6; i++ {
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 1, info.AbilityOpType.COPY)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user