2025-11-25 18:25:52 +08:00
|
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2026-03-28 21:57:22 +08:00
|
|
|
|
"blazing/logic/service/fight/info"
|
2025-11-25 18:25:52 +08:00
|
|
|
|
"blazing/logic/service/fight/input"
|
2026-03-28 21:57:22 +08:00
|
|
|
|
|
|
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
2025-11-25 18:25:52 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// 401. n%几率攻击技能的伤害翻倍(a1: n)
|
|
|
|
|
|
type NewSel401 struct {
|
|
|
|
|
|
NewSel0
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-28 21:57:22 +08:00
|
|
|
|
func (e *NewSel401) DamageAdd(t *info.DamageZone) bool {
|
|
|
|
|
|
if !e.IsOwner() {
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
|
|
|
|
|
if !success {
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
t.Damage = t.Damage.Mul(alpacadecimal.NewFromInt(2))
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-25 18:25:52 +08:00
|
|
|
|
func init() {
|
|
|
|
|
|
input.InitEffect(input.EffectType.NewSel, 401, &NewSel401{})
|
|
|
|
|
|
}
|