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

42 lines
889 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"
)
// Effect 151: 对手烧伤时,{0}%对方疲惫1回合对手未烧伤时{1}%对方疲惫1回合
type Effect151 struct {
node.EffectNode
}
func init() {
input.InitEffect(input.EffectType.Skill, 151, &Effect151{})
}
// 命中之后
func (e *Effect151) Skill_Use() bool {
if e.Ctx().Opp.StatEffect_Exist(info.PetStatus.Burned) {
chance := e.EffectNode.SideEffectArgs[0]
success, _, _ := e.Input.Player.Roll(chance, 100)
if !success {
return true
}
} else {
chance := e.EffectNode.SideEffectArgs[1]
success, _, _ := e.Input.Player.Roll(chance, 100)
if !success {
return true
}
}
r := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Tired))
e.Ctx().Opp.AddEffect(e.Ctx().Our, r)
return true
}