This commit is contained in:
36
logic/service/fight/effect/464.go
Normal file
36
logic/service/fight/effect/464.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
element "blazing/common/data/Element"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
)
|
||||
|
||||
// 464 - 遇到天敌时m%令对手烧伤
|
||||
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{})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user