37 lines
819 B
Go
37 lines
819 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.Ctx().Opp.CurrentPet.Type, e.Ctx().Our.CurrentPet.Type)
|
|
|
|
if t <= 1 {
|
|
return true
|
|
}
|
|
|
|
chance := e.Args()[0].IntPart()
|
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
if success {
|
|
burnEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Burned))
|
|
if burnEffect != nil {
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, burnEffect)
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 464, &Effect464{})
|
|
|
|
}
|