46 lines
1.3 KiB
Go
46 lines
1.3 KiB
Go
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.CurPet[0].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{})
|
||
}
|