37 lines
706 B
Go
37 lines
706 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
)
|
|
|
|
// Effect 110: {0}回合内每次躲避攻击都有{1}%概率使自身{2}提升1个等级
|
|
type Effect110 struct {
|
|
RoundEffectSideArg0Base
|
|
}
|
|
|
|
// 默认添加回合
|
|
|
|
func (e *Effect110) Skill_Use_ex() bool {
|
|
|
|
if e.Ctx().SkillEntity != nil {
|
|
if e.Ctx().SkillEntity.AttackTime != 0 { //没有闪避掉
|
|
return true
|
|
}
|
|
|
|
}
|
|
chance := e.EffectNode.SideEffectArgs[1]
|
|
success, _, _ := e.Input.Player.Roll(chance, 100)
|
|
if !success {
|
|
return true
|
|
}
|
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, int8(e.SideEffectArgs[2]), 1)
|
|
|
|
return true
|
|
}
|
|
|
|
// ---- 注册所有效果 ----
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 110, &Effect110{})
|
|
}
|