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

38 lines
595 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* n%几率伤害为m倍
*/
func init() {
input.InitEffect(input.EffectType.Skill, 88, &Effect88{})
}
// Effect 88: {0}%概率伤害为{1}倍
type Effect88 struct {
node.EffectNode
}
func (e *Effect88) Damage_Mul(t *info.DamageZone) bool {
// 概率判定
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if !ok {
return true
}
if t.Type == info.DamageType.Red {
t.Damage = t.Damage.Mul(e.Args()[1])
}
return true
}