Files
bl/logic/service/fight/boss/NewSeIdx_52.go
2026-01-21 20:46:05 +00:00

46 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/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 52. 第3n+1回合免疫特殊攻击第3n+2回合免疫物理攻击第3n+3回合免疫属性攻击
type NewSel52 struct {
NewSel0
}
func (e *NewSel52) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
// 获取当前回合数
r := e.Ctx().Our.FightC.GetOverInfo()
roundMod := r.Round % 3
// 第3n+1回合免疫特殊攻击第3n+2回合免疫物理攻击
if e.Ctx().SkillEntity == nil {
return true
}
// 检查攻击类型
if roundMod == 1 && e.Ctx().SkillEntity.Category() == info.Category.SPECIAL {
// 第3n+1回合免疫特殊攻击伤害为0
t.Damage = alpacadecimal.Zero
} else if roundMod == 2 && e.Ctx().SkillEntity.Category() == info.Category.PHYSICAL {
// 第3n+2回合免疫物理攻击伤害为0
t.Damage = alpacadecimal.Zero
}
// 第3n+3回合免疫属性攻击这里暂时没有明确的属性类型可能需要更复杂的处理
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 52, &NewSel52{})
}