Files
bl/logic/service/fight/effect/571.go
xinian c049bbd5ac
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix: 修复登录空指针及战斗效果
2026-03-21 00:24:34 +08:00

45 lines
926 B
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/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// {
// "id": 571,
// "argsNum": 2,
// "info": "{0}回合后对对手造成{1}点固定伤害 重复使用无法叠加"
// },
type Effect571 struct {
node.EffectNode
duy int
}
func (e *Effect571) TurnEnd() {
e.duy--
}
// 这个实际上在对方回合执行的
func (e *Effect571) Skill_Use() bool {
//fmt.Println("镇魂歌剩余回合", e.duy)
//defer e.Alive(false)
damage := e.Args()[1] // 固定伤害值
if e.duy <= 0 { //说明对方没有切换精灵
// 如果回合数为0或负数立即造成伤害
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 571, &Effect571{})
}