Files
bl/logic/service/fight/boss/NewSeIdx_74.go
xinian ca7eb04f6e
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重命名 ActionEndEx 为 Action_end_ex
2026-03-08 19:14:42 +08:00

46 lines
1.1 KiB
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"
)
// 74. 每次物理或特殊攻击命中对手后有百分之n的概率给对手叠加一层衰弱a1: n
type NewSel74 struct {
NewSel0
}
func (e *NewSel74) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
// 只处理物理或特殊攻击
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
// 检查概率是否触发
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if !success {
return true
}
// 给对手叠加衰弱状态(假设衰弱状态为特殊状态)
// 这里用99表示衰弱状态实际应根据游戏定义调整
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Weakened))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Opp, statusEffect)
}
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 74, &NewSel74{})
}