64 lines
1.5 KiB
Go
64 lines
1.5 KiB
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/action"
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
|
||
"github.com/alpacahq/alpacadecimal"
|
||
)
|
||
|
||
// eid: 92
|
||
// icon_id: -1
|
||
// isHide: 隐藏特性
|
||
// tips:
|
||
// - 自身攻击会附加上一回合的伤害, 附加上回合受到伤害(红伤+粉伤)等量的粉伤,对应BuffId 2056
|
||
//
|
||
// args:
|
||
// - 0 0
|
||
//
|
||
// tips_help:
|
||
// - 自身攻击会附加上一回合的伤害, 附加上回合受到伤害(红伤+粉伤)等量的粉伤,对应BuffId 2056
|
||
//
|
||
// T92. 属性技能无效
|
||
type NewSel92 struct {
|
||
NewSel0
|
||
n1 alpacadecimal.Decimal
|
||
n2 alpacadecimal.Decimal
|
||
}
|
||
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 92, &NewSel92{})
|
||
}
|
||
func (e *NewSel92) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
|
||
return
|
||
}
|
||
e.n1 = e.Ctx().Our.CurPet[0].GetHP()
|
||
|
||
}
|
||
func (e *NewSel92) TurnEnd() {
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||
e.n2, e.n1 = alpacadecimal.Zero, alpacadecimal.Zero
|
||
return
|
||
}
|
||
e.n2 = e.Ctx().Our.CurPet[0].GetHP()
|
||
|
||
}
|
||
func (e *NewSel92) DamageFloor(t *info.DamageZone) bool {
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||
return true
|
||
}
|
||
|
||
//不是技能
|
||
if e.Ctx().SkillEntity == nil {
|
||
return true
|
||
}
|
||
if e.n2.Cmp(e.n1) == 1 {
|
||
t.Damage.Add(e.n2.Sub(e.n1))
|
||
}
|
||
|
||
return true
|
||
}
|