Files
bl/logic/service/fight/effect/495.go
xinian 78a68148ce
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
chore: update fight logic and effect implementations
2026-04-05 02:25:44 +08:00

32 lines
654 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 495: 若对手处于{0}状态,则{1}%概率秒杀对手
type Effect495 struct {
node.EffectNode
}
func (e *Effect495) OnSkill() bool {
if e.TargetInput().StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) { // 对手处于异常状态
chance := 30 // 固定30%
success, _, _ := e.Input.Player.Roll(chance, 100)
if success {
// 秒杀对手
e.TargetInput().CurPet[0].Info.Hp = 0
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 495, &Effect495{})
}