- 修改 `ChangePet` 方法,记录初始攻击值并在切换时正确传递 - 简化多个 effect 的初始化方式,移除冗余的 `EffectNode` 字段 - 增强 Effect58 和 Effect67 的逻辑判断,增加空指针检查和类型判断 - 引入 decimal 包用于精确血量计算 - 统一 `Switch` 接口参数,增强状态类和节点类的兼容性 - 修正部分技能效果的触发条件和持续时间设置 - 调整回合结束逻辑,注释掉原有后手增益机制
43 lines
942 B
Go
43 lines
942 B
Go
package node
|
|
|
|
import (
|
|
"blazing/logic/service/fight/action"
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
)
|
|
|
|
func (e *EffectNode) Skill_Hit_Pre(fattack, sattack *action.SelectSkillAction) bool {
|
|
return true
|
|
}
|
|
|
|
func (e *EffectNode) Compare_Pre(fattack, sattack *action.SelectSkillAction) bool { //比较前对优先级的修改 {
|
|
return true
|
|
}
|
|
|
|
func (e *EffectNode) Turn_Start(fattack, sattack *action.SelectSkillAction) {
|
|
//panic("not implemented") // TODO: Implement
|
|
}
|
|
func (e *EffectNode) Turn_End() {
|
|
|
|
if e.duration == 0 { // 保留 (负数表示永久)
|
|
|
|
e.Alive(false)
|
|
|
|
} else {
|
|
// e.trunl.Do(func() {
|
|
|
|
// if !e.Ctx().Our.FightC.IsFirst(e.Ctx().Our.Player) { //如果我方后手,那就给回合+1
|
|
// e.duration++
|
|
// // e.Alive(true)
|
|
// }
|
|
|
|
// })
|
|
e.duration--
|
|
}
|
|
|
|
}
|
|
|
|
func (e *EffectNode) OnDefeat(*input.Input, *info.SkillEntity) bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|