Files
bl/logic/service/fight/effect/effect_110.go
xinian 875ad668aa
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 实现战斗效果逻辑和接口重构
2026-03-28 21:57:22 +08:00

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{})
}