37 lines
840 B
Go
37 lines
840 B
Go
package effect
|
|
|
|
import (
|
|
element "blazing/common/data/Element"
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 464: 遇到天敌时{0}%令对手烧伤
|
|
type Effect464 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect464) OnSkill() bool {
|
|
t, _ := element.Calculator.GetOffensiveMultiplier(e.TargetInput().CurPet[0].Type, e.CarrierInput().CurPet[0].Type)
|
|
|
|
if t <= 1 {
|
|
return true
|
|
}
|
|
|
|
chance := e.Args()[0].IntPart()
|
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
if success {
|
|
burnEffect := e.CarrierInput().InitEffect(input.EffectType.Status, int(info.PetStatus.Burned))
|
|
if burnEffect != nil {
|
|
e.TargetInput().AddEffect(e.CarrierInput(), burnEffect)
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 464, &Effect464{})
|
|
|
|
}
|