Files
bl/logic/service/fight/effect/effect_182.go
xinian de8ce9fc81
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat: 新增多个战斗效果并修复逻辑问题
2026-03-07 14:51:32 +08:00

36 lines
688 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* 182
*/
func init() {
input.InitEffect(input.EffectType.Skill, 182, &Effect182{})
}
type Effect182 struct {
node.EffectNode
}
func (e *Effect182) OnSkill() bool {
if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) {
// 3. 概率判定Args()[1]为触发概率)
success, _, _ := e.Input.Player.Roll(int(e.Args()[2].IntPart()), 100)
if !success {
return true
}
e.Ctx().Our.SetProp(e.Ctx().Our, int8(e.Args()[1].IntPart()), int8(e.Args()[3].IntPart()), info.AbilityOpType.ADD)
}
return true
}