Files
bl/logic/service/fight/effect/1745_1769.go
昔念 e037539123 ```
docs(effects): 移除已完成的技能效果任务文档

移除 effects 956-1005、1263-1312、1695-1734 等范围内的未实现技能效果任务文档,
这些任务已经完成实现,相关文档不再需要维护。
```
2026-03-31 00:38:50 +08:00

592 lines
16 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/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 1745: 本回合自身物理攻击伤害提升
type Effect1745 struct {
node.EffectNode
}
func (e *Effect1745) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 3 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[1])).Div(hundred)
return true
}
// Effect 1746: 本回合自身特殊攻击伤害提升
type Effect1746 struct {
node.EffectNode
}
func (e *Effect1746) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 3 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[1])).Div(hundred)
return true
}
// Effect 1747: 消除对手回合类效果
type Effect1747 struct {
node.EffectNode
}
func (e *Effect1747) Skill_Use() bool {
// 现有模型里没有统一“清空回合类效果”的专用 API这里只保留一个占位实现。
return true
}
// Effect 1748: 本回合若未打出致命一击则下回合必定致命一击
type Effect1748 struct {
node.EffectNode
}
func (e *Effect1748) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1748, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1748Sub struct {
RoundEffectArg0Base
}
func (e *Effect1748Sub) SkillHit() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
e.Ctx().SkillEntity.XML.MustHit = 1
return true
}
// Effect 1749: 对手每有技能PP为0则增加固定/真实伤害
type Effect1749 struct {
node.EffectNode
}
func (e *Effect1749) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
bonus := 0
for _, skill := range e.Ctx().Opp.CurrentPet.Info.SkillList {
if skill.PP <= 0 {
bonus++
}
}
if bonus <= 0 {
return true
}
zone.Damage = zone.Damage.Add(e.Args()[0].Mul(alpacadecimal.NewFromInt(int64(bonus))))
return true
}
// Effect 1750: 无视自身能力下降状态
type Effect1750 struct {
node.EffectNode
}
func (e *Effect1750) PropBefer(in *input.Input, prop, level int8) bool {
if in == e.Ctx().Our && level < 0 {
return false
}
return true
}
// Effect 1751: 护盾消失时触发固定伤害与异常
type Effect1751 struct {
node.EffectNode
}
func (e *Effect1751) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1751, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1751Sub struct {
node.EffectNode
}
func (e *Effect1751Sub) Damage_Shield(zone *info.DamageZone) bool {
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || e.Ctx().Our.CurrentShield().Cmp(alpacadecimal.Zero) > 0 {
return true
}
if len(e.Args()) < 4 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: e.Args()[1]})
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[3].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
e.Alive(false)
return true
}
// Effect 1752: 护盾消失时吸血并清空对手随机PP
type Effect1752 struct {
node.EffectNode
}
func (e *Effect1752) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1752, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1752Sub struct {
node.EffectNode
}
func (e *Effect1752Sub) Damage_Shield(zone *info.DamageZone) bool {
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || e.Ctx().Our.CurrentShield().Cmp(alpacadecimal.Zero) > 0 {
return true
}
if len(e.Args()) < 3 {
return true
}
drain := e.Args()[1]
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: drain})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, drain)
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[2].IntPart()))
e.Alive(false)
return true
}
// Effect 1753: 护盾消失时恢复生命
type Effect1753 struct {
node.EffectNode
}
func (e *Effect1753) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1753, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1753Sub struct {
node.EffectNode
}
func (e *Effect1753Sub) Damage_Shield(zone *info.DamageZone) bool {
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || e.Ctx().Our.CurrentShield().Cmp(alpacadecimal.Zero) > 0 {
return true
}
if len(e.Args()) < 2 {
return true
}
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[1])
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
e.Alive(false)
return true
}
// Effect 1754: 护盾消失时附加固定伤害与下一次攻击翻倍
type Effect1754 struct {
node.EffectNode
}
func (e *Effect1754) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1754, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1754Sub struct {
node.EffectNode
}
func (e *Effect1754Sub) Damage_Shield(zone *info.DamageZone) bool {
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || e.Ctx().Our.CurrentShield().Cmp(alpacadecimal.Zero) > 0 {
return true
}
if len(e.Args()) < 3 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: e.Args()[1]})
e.Ctx().Our.AddEffect(e.Ctx().Our, e.Ctx().Our.InitEffect(input.EffectType.Sub, 1754, int(e.Args()[2].IntPart())))
e.Alive(false)
return true
}
func (e *Effect1754Sub) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zone.Damage = zone.Damage.Mul(alpacadecimal.NewFromInt(2))
return true
}
// Effect 1755: 护盾消失时使对手下一次攻击无效
type Effect1755 struct {
node.EffectNode
}
func (e *Effect1755) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1755, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1755Sub struct {
node.EffectNode
}
func (e *Effect1755Sub) Damage_Shield(zone *info.DamageZone) bool {
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || e.Ctx().Our.CurrentShield().Cmp(alpacadecimal.Zero) > 0 {
return true
}
if len(e.Args()) < 2 {
return true
}
disable := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1755, int(e.Args()[1].IntPart()))
if disable != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, disable)
}
e.Alive(false)
return true
}
func (e *Effect1755Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
return true
}
// Effect 1756: 消除回合类效果失败时给对手属性技能无效
type Effect1756 struct {
node.EffectNode
}
func (e *Effect1756) Skill_Use() bool {
return true
}
// Effect 1757: 免疫若干次异常
type Effect1757 struct {
node.EffectNode
}
func (e *Effect1757) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1757, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1757Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1757Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1757Sub) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if in != e.Ctx().Our || !input.IS_Stat(effEffect) {
return true
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return false
}
// Effect 1758: 对手用攻击技能时清空PP并加护盾
type Effect1758 struct {
node.EffectNode
}
func (e *Effect1758) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1758, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1758Sub struct {
node.EffectNode
}
func (e *Effect1758Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[1].IntPart()))
e.Ctx().Our.AddShield(e.Args()[2])
return true
}
// Effect 1759: 对手使用属性技能则被处决精灵吸取PP
type Effect1759 struct {
node.EffectNode
}
func (e *Effect1759) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1759, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1759Sub struct {
node.EffectNode
}
func (e *Effect1759Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
return true
}
e.Ctx().Opp.DelPP(int(e.Args()[1].IntPart()))
return true
}
// Effect 1760: 对手处于异常状态则强化
type Effect1760 struct {
node.EffectNode
}
func (e *Effect1760) Skill_Use() bool {
if e.Ctx().Opp.StatEffect_Exist_all() {
e.Ctx().Our.AddEffect(e.Ctx().Our, e.Ctx().Our.InitEffect(input.EffectType.Sub, 1760, e.SideEffectArgs...))
}
return true
}
// Effect 1761: 自身体力高于对手时提升伤害
type Effect1761 struct {
node.EffectNode
}
func (e *Effect1761) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) <= 0 {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[0])).Div(hundred)
return true
}
// Effect 1762: 体力低于对手时先制
type Effect1762 struct {
node.EffectNode
}
func (e *Effect1762) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) >= 0 {
return true
}
if fattack != nil && fattack.SkillEntity != nil {
fattack.SkillEntity.XML.Priority += 1
}
return true
}
// Effect 1763: 对手体力高于一半时我方场上附加1勾玉圣剑
type Effect1763 struct {
node.EffectNode
}
func (e *Effect1763) OnSkill() bool {
if e.Ctx().Opp.CurrentPet.GetHP().Mul(alpacadecimal.NewFromInt(2)).Cmp(e.Ctx().Opp.CurrentPet.GetMaxHP()) <= 0 {
return true
}
return true
}
// Effect 1764: 对手低于阈值时重新发动处决
type Effect1764 struct {
node.EffectNode
}
func (e *Effect1764) TurnEnd() {
if len(e.Args()) == 0 {
e.EffectNode.TurnEnd()
return
}
if e.Ctx().Opp.CurrentPet.GetHP().Mul(e.Args()[0]).Cmp(e.Ctx().Opp.CurrentPet.GetMaxHP()) >= 0 {
e.EffectNode.TurnEnd()
return
}
e.EffectNode.TurnEnd()
}
// Effect 1765: 追加百分比伤害并恢复等量体力
type Effect1765 struct {
node.EffectNode
}
func (e *Effect1765) OnSkill() bool {
if len(e.Args()) < 1 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Mul(e.Args()[0]).Div(hundred)
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Percent, Damage: damage})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
return true
}
// Effect 1766: 每回合使用技能并给对手随机清PP
type Effect1766 struct {
node.EffectNode
}
func (e *Effect1766) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[2].IntPart()))
return true
}
// Effect 1767: 攻击时把对手能力提升视为降低
type Effect1767 struct {
node.EffectNode
}
func (e *Effect1767) PropBefer(in *input.Input, prop, level int8) bool {
if in == e.Ctx().Opp && level > 0 {
return false
}
return true
}
// Effect 1768: 把所受攻击伤害转化为护盾
type Effect1768 struct {
node.EffectNode
}
func (e *Effect1768) Damage_Shield(zone *info.DamageZone) bool {
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || len(e.Args()) < 2 {
return true
}
if zone.Type != info.DamageType.Red {
return true
}
shield := zone.Damage
if shield.Cmp(e.Args()[1]) > 0 {
shield = e.Args()[1]
}
e.Ctx().Our.AddShield(shield)
zone.Damage = alpacadecimal.Zero
return true
}
// Effect 1769: 随机吸取对手属性并提升自己
type Effect1769 struct {
node.EffectNode
}
func (e *Effect1769) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
attrs := []int8{0, 1, 2, 3, 4, 5}
idx := attrs[grand.Intn(len(attrs))]
e.Ctx().Our.SetProp(e.Ctx().Our, idx, e.Ctx().Opp.Prop[idx])
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1745, &Effect1745{})
input.InitEffect(input.EffectType.Skill, 1746, &Effect1746{})
input.InitEffect(input.EffectType.Skill, 1747, &Effect1747{})
input.InitEffect(input.EffectType.Skill, 1748, &Effect1748{})
input.InitEffect(input.EffectType.Sub, 1748, &Effect1748Sub{})
input.InitEffect(input.EffectType.Skill, 1749, &Effect1749{})
input.InitEffect(input.EffectType.Skill, 1750, &Effect1750{})
input.InitEffect(input.EffectType.Skill, 1751, &Effect1751{})
input.InitEffect(input.EffectType.Sub, 1751, &Effect1751Sub{})
input.InitEffect(input.EffectType.Skill, 1752, &Effect1752{})
input.InitEffect(input.EffectType.Sub, 1752, &Effect1752Sub{})
input.InitEffect(input.EffectType.Skill, 1753, &Effect1753{})
input.InitEffect(input.EffectType.Sub, 1753, &Effect1753Sub{})
input.InitEffect(input.EffectType.Skill, 1754, &Effect1754{})
input.InitEffect(input.EffectType.Sub, 1754, &Effect1754Sub{})
input.InitEffect(input.EffectType.Skill, 1755, &Effect1755{})
input.InitEffect(input.EffectType.Sub, 1755, &Effect1755Sub{})
input.InitEffect(input.EffectType.Skill, 1756, &Effect1756{})
input.InitEffect(input.EffectType.Skill, 1757, &Effect1757{})
input.InitEffect(input.EffectType.Sub, 1757, &Effect1757Sub{})
input.InitEffect(input.EffectType.Skill, 1758, &Effect1758{})
input.InitEffect(input.EffectType.Sub, 1758, &Effect1758Sub{})
input.InitEffect(input.EffectType.Skill, 1759, &Effect1759{})
input.InitEffect(input.EffectType.Sub, 1759, &Effect1759Sub{})
input.InitEffect(input.EffectType.Skill, 1760, &Effect1760{})
input.InitEffect(input.EffectType.Sub, 1760, &Effect1760{})
input.InitEffect(input.EffectType.Skill, 1761, &Effect1761{})
input.InitEffect(input.EffectType.Skill, 1762, &Effect1762{})
input.InitEffect(input.EffectType.Skill, 1763, &Effect1763{})
input.InitEffect(input.EffectType.Skill, 1764, &Effect1764{})
input.InitEffect(input.EffectType.Skill, 1765, &Effect1765{})
input.InitEffect(input.EffectType.Skill, 1766, &Effect1766{})
input.InitEffect(input.EffectType.Skill, 1767, &Effect1767{})
input.InitEffect(input.EffectType.Skill, 1768, &Effect1768{})
input.InitEffect(input.EffectType.Skill, 1769, &Effect1769{})
}