38 lines
837 B
Go
38 lines
837 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
|
||
"github.com/alpacahq/alpacadecimal"
|
||
)
|
||
|
||
// 65. 物理攻击或特殊攻击伤害增加m%(a1: 1=物理/3=特殊, a2: m)
|
||
// TODO: 实现物理攻击或特殊攻击伤害增加m%(a1: 1=物理/3=特殊, a2: m)的核心逻辑
|
||
type NewSel65 struct {
|
||
NewSel0
|
||
}
|
||
|
||
func (e *NewSel65) DamageAdd(t *info.DamageZone) bool {
|
||
if !e.IsOwner() {
|
||
return true
|
||
}
|
||
|
||
if e.Ctx().SkillEntity == nil {
|
||
return true
|
||
}
|
||
|
||
if e.Ctx().SkillEntity.Category() != info.EnumCategory(e.Args()[0].IntPart()) {
|
||
return true
|
||
}
|
||
if t.Type != info.DamageType.Red {
|
||
return true
|
||
}
|
||
|
||
t.Damage = t.Damage.Add(t.Damage.Mul(e.Args()[1]).Div(alpacadecimal.NewFromInt(100)))
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 65, &NewSel65{})
|
||
}
|