Files
bl/logic/service/fight/boss/NewSeIdx_48.go
2026-04-04 04:28:04 +08:00

50 lines
1.1 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"
)
// 48. 对方某种攻击类型无效a1: 攻击类型)
type NewSel48 struct {
NewSel0
}
func (e *NewSel48) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 检查对手是否使用了指定攻击类型
if e.Ctx().SkillEntity == nil {
return true
}
if t.Type != info.DamageType.Red {
return true
}
// 检查攻击类型是否匹配攻击类型1=物理攻击2=特殊攻击)
attackCategory := int(e.Args()[0].IntPart())
switch attackCategory {
case 1:
if e.Ctx().Category() == info.Category.PHYSICAL {
// 物理攻击无效
t.Damage = alpacadecimal.Zero
}
case 2:
if e.Ctx().Category() == info.Category.SPECIAL {
// 特殊攻击无效
t.Damage = alpacadecimal.Zero
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 48, &NewSel48{})
}