Files
bl/logic/service/fight/effect/effect_4_5.go

58 lines
1.4 KiB
Go
Raw Normal View History

2025-08-28 02:44:10 +00:00
package effect
import (
2026-04-15 22:16:56 +08:00
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
2025-08-28 02:44:10 +00:00
)
// -----------------------------------------------------------
// 注册
// -----------------------------------------------------------
2025-08-28 02:44:10 +00:00
func init() {
initskill(4, &Effect4{})
initskill(5, &Effect5{})
2025-08-28 02:44:10 +00:00
}
// Effect 4: 技能使用成功时,{1}%改变自身{0}等级{2}
type Effect4 struct {
node.EffectNode
2025-08-28 02:44:10 +00:00
}
// -----------------------------------------------------------
// 技能触发时调用
// -----------------------------------------------------------
func (e *Effect4) Skill_Use() bool {
ok, _, _ := e.Input.Player.Roll(e.SideEffectArgs[1], 100)
if !ok {
return true
}
e.Ctx().Our.SetProp(e.Ctx().Our, int8(e.SideEffectArgs[0]), int8(e.SideEffectArgs[2]))
return true
}
// Effect 5: 技能使用成功时,{1}%改变对手{0}等级{2}
type Effect5 struct {
node.EffectNode
}
// -----------------------------------------------------------
// 技能触发时调用
// -----------------------------------------------------------
func (e *Effect5) Skill_Use() bool {
// 概率判定
ok, _, _ := e.Input.Player.Roll(e.SideEffectArgs[1], 100)
if !ok {
return true
}
2026-04-15 22:16:56 +08:00
forEachEnemyTargetBySkill(e.Ctx().Our, e.Ctx().Opp, e.Ctx().SkillEntity, func(target *input.Input) bool {
target.SetProp(e.Ctx().Our, int8(e.SideEffectArgs[0]), int8(e.SideEffectArgs[2]))
return true
})
return true
2025-08-28 02:44:10 +00:00
}