35 lines
911 B
Go
35 lines
911 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
)
|
|
|
|
// Effect 174: 未在 effectInfo.json 配置说明
|
|
type Effect174 struct {
|
|
RoundEffectArg0Base
|
|
}
|
|
|
|
func (e *Effect174) Skill_Use_ex() bool {
|
|
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
|
chance := e.Args()[0].IntPart()
|
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
if success {
|
|
// 提升自身能力等级
|
|
effectType := e.Args()[1].IntPart() // 状态类型
|
|
effectValue := e.Args()[2].IntPart() // 等级提升数量
|
|
|
|
boostEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(effectType))
|
|
if boostEffect != nil {
|
|
boostEffect.SetArgs(e.Ctx().Our, int(effectValue))
|
|
e.Ctx().Our.AddEffect(e.Ctx().Our, boostEffect)
|
|
}
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 174, &Effect174{})
|
|
}
|