Files
bl/logic/service/fight/boss/NewSeIdx_1.go
xinian 9c6f3988de
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构 CurrentPet 为 CurPet
2026-04-04 04:34:43 +08:00

61 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 基类特性
// 特性的ID=PET cacthtime+eid 这样保证不重复
type NewSel0 struct {
node.EffectNode
//Catchtime int //保存精灵的唯一指令,保证在上场时候正确注入
//Hide bool //是否隐藏 ,所属精灵下场后特性就应该消失
//如果2只精灵一个特性怎么办每次切精灵注入特性
}
// 重写回合结束效果,特性都是无线回合类的
// 次数类本质上也是这种
// 特性,无法被切精灵消除
func (e *NewSel0) SwitchOut(in *input.Input) bool {
return true
}
func (e *NewSel0) IsOwner() bool {
if e.Ctx().Our == nil {
return false
}
if e.Ctx().Our.CurPet[0] == nil {
return false
}
return e.ID().GetCatchTime() == e.Ctx().Our.CurPet[0].Info.CatchTime
}
// 免疫"能力(battle_lv)下降"
type NewSel1 struct {
NewSel0
}
func (e *NewSel1) PropBefer(in *input.Input, prop int8, level int8) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if !e.IsOwner() {
return true
}
if in == e.Ctx().Our {
return true
}
//能力下降类
if level < 0 {
return false
}
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 1, &NewSel1{})
}