44 lines
716 B
Go
44 lines
716 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
func init() {
|
|
t := &Effect426{
|
|
EffectNode: node.EffectNode{},
|
|
}
|
|
|
|
input.InitEffect(input.EffectType.Skill, 426, t)
|
|
|
|
}
|
|
|
|
type Effect426 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
// 默认添加回合
|
|
func (e *Effect426) SetArgs(t *input.Input, a ...int) {
|
|
|
|
e.EffectNode.SetArgs(t, a...)
|
|
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
|
|
|
|
}
|
|
|
|
func (e *Effect426) SkillHit_ex() bool {
|
|
|
|
//fmt.Println(e.Ctx().SkillEntity)
|
|
if e.Ctx().SkillEntity == nil {
|
|
return true
|
|
}
|
|
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
|
|
if !success {
|
|
return true
|
|
}
|
|
|
|
e.Ctx().SkillEntity.SetMiss()
|
|
|
|
return true
|
|
}
|