Files
bl/logic/service/fight/effect/effect_62.go

64 lines
1.4 KiB
Go
Raw Normal View History

2025-08-27 14:41:06 +00:00
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
2025-08-27 14:41:06 +00:00
)
/**
* n回合内没有击败则对方死亡
*/
type Effect62 struct {
node.EffectNode
2025-08-27 15:29:34 +00:00
Hide bool // 是否隐藏 正常是命中就可用,镇魂歌是回合数到才可用
2025-08-27 14:41:06 +00:00
}
func init() {
input.InitEffect(input.EffectType.Skill, 62, &Effect62{
EffectNode: node.EffectNode{
Owner: true,
},
})
2025-08-27 14:41:06 +00:00
}
func (e *Effect62) AfterHit(*input.Input, *info.SkillEntity) {
if e.Duration() != 1 { //说明还没到生效节点
e.Hide = true //隐藏效果
} else {
e.Hide = false
2025-08-27 15:29:34 +00:00
}
if !e.Hide && e.Hit() { //说明是自身回合//如果还在隐藏,就直接返回
//defer e.EffectNode.NotALive() //失效
//应该是对方固定伤害等于自身血量
//e.Input.Death() //本只死亡
//否则触发秒杀 在对面使用技能后
//return true
}
}
// 默认添加回合
func (e *Effect62) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}
// 因为对方切精灵,这个效果也要无效掉
func (this *Effect62) OnSwitchIn() bool {
if this.Hide { //如果还在隐藏,就直接返回
return true
}
//this.GetBattle().Effects[this.GetInput().UserID].RemoveEffect(this)
//否则触发秒杀 在对面使用技能后
return true
2025-08-27 15:29:34 +00:00
}