Files
bl/logic/service/fight/effect/584.go
xinian 9c6f3988de
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构 CurrentPet 为 CurPet
2026-04-04 04:34:43 +08:00

36 lines
705 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
)
// Effect 584: {0}回合内自己的所有攻击技能都附有{1}%的秒杀概率
type Effect584 struct {
RoundEffectArg0Base
}
func (e *Effect584) DamageFloor(t *info.DamageZone) bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if t.Type != info.DamageType.Red {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !ok {
return true
}
t.Damage = e.Ctx().Opp.CurPet[0].GetMaxHP()
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 584, &Effect584{})
}