36 lines
566 B
Go
36 lines
566 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
)
|
|
|
|
func init() {
|
|
t := &Effect426{}
|
|
|
|
input.InitEffect(input.EffectType.Skill, 426, t)
|
|
|
|
}
|
|
|
|
// Effect 426: {0}回合内每回合{1}%闪避对手攻击
|
|
type Effect426 struct {
|
|
RoundEffectSideArg0Base
|
|
}
|
|
|
|
// 默认添加回合
|
|
|
|
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
|
|
}
|