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

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

424 lines
11 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"
)
// Effect 981: 直接造成{0}点电系伤害,自身每处于一种能力提升状态则造成的伤害提高{1}%
type Effect981 struct {
node.EffectNode
}
func (e *Effect981) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
boostCount := 0
for _, v := range e.Ctx().Our.Prop[:] {
if v > 0 {
boostCount++
}
}
damage := e.Args()[0]
if boostCount > 0 {
damage = damage.Add(damage.Mul(e.Args()[1]).Mul(alpacadecimal.NewFromInt(int64(boostCount))).Div(alpacadecimal.NewFromInt(100)))
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: damage})
return true
}
// Effect 982: {0}%使对手{1},自身每处于一种能力提升状态则概率提高{2}%
type Effect982 struct {
node.EffectNode
}
func (e *Effect982) OnSkill() bool {
if len(e.Args()) < 3 {
return true
}
chance := int(e.Args()[0].IntPart())
for _, v := range e.Ctx().Our.Prop[:] {
if v > 0 {
chance += int(e.Args()[2].IntPart())
}
}
if chance > 100 {
chance = 100
}
success, _, _ := e.Input.Player.Roll(chance, 100)
if !success {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return true
}
// Effect 983: 未击败对手则自身全属性+{0}
type Effect983 struct {
node.EffectNode
}
func (e *Effect983) Skill_Use() bool {
if e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
return true
}
applyAllPropUp(e.Ctx().Our, int8(e.Args()[0].IntPart()))
return true
}
// Effect 984: 未击败对手则下回合自身所有技能先制+{0}
type Effect984 struct {
node.EffectNode
}
func (e *Effect984) Skill_Use() bool {
if e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 984, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect984Sub struct {
RoundEffectArg0Base
}
func (e *Effect984Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil || current.SkillEntity.Category() == info.Category.STATUS {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[0].IntPart())
return true
}
// Effect 985: 吸取对手能力提升状态,吸取成功则下{0}回合对手属性技能无效
type Effect985 struct {
node.EffectNode
}
func (e *Effect985) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
cleared := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
cleared = true
}
}
if !cleared {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 985, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect985Sub struct {
RoundEffectArg0Base
}
func (e *Effect985Sub) 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 986: 先出手时造成的攻击伤害额外提升{0}%
type Effect986 struct {
node.EffectNode
}
func (e *Effect986) SkillHit() bool {
if len(e.Args()) == 0 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().Our.Prop[5] < e.Ctx().Opp.Prop[5] {
return true
}
addSkillPowerPercent(e.Ctx().SkillEntity, e.Args()[0])
return true
}
// Effect 987: 附加{0}点固定伤害,对手{1}时固定伤害翻倍
type Effect987 struct {
node.EffectNode
}
func (e *Effect987) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
damage := e.Args()[0]
if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[1].IntPart())) {
damage = damage.Mul(alpacadecimal.NewFromInt(2))
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: damage})
return true
}
// Effect 988: 消除对手能力提升状态,消除成功则对手下{0}回合技能失效
type Effect988 struct {
node.EffectNode
}
func (e *Effect988) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
cleared := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 988, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect988Sub struct {
RoundEffectArg0Base
}
func (e *Effect988Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil {
return true
}
e.Ctx().SkillEntity.SetMiss()
return true
}
// Effect 989: 造成的伤害低于{0}则附加{1}点固定伤害,自身体力低于对手时固定伤害翻倍
type Effect989 struct {
node.EffectNode
}
func (e *Effect989) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) >= 0 {
return true
}
damage := e.Args()[1]
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) < 0 {
damage = damage.Mul(alpacadecimal.NewFromInt(2))
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: damage})
return true
}
// Effect 990: 消除对手回合类效果,消除成功则附加{0}点固定伤害
type Effect990 struct {
node.EffectNode
}
func (e *Effect990) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: e.Args()[0]})
return true
}
// Effect 991: 未击败对手则对方下{0}次攻击技能将{1}%被己方闪避
type Effect991 struct {
node.EffectNode
}
func (e *Effect991) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 991, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect991Sub struct {
node.EffectNode
remaining int
}
func (e *Effect991Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect991Sub) DamageLockEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
zone.Damage = alpacadecimal.Zero
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 992: {0}回合内攻击技能附加自身当前体力{1}%的百分比伤害
type Effect992 struct {
RoundEffectArg0Base
}
func (e *Effect992) OnSkill() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
damage := e.Ctx().Our.CurrentPet.GetHP().Mul(e.Args()[1]).Div(alpacadecimal.NewFromInt(100))
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Percent, Damage: damage})
return true
}
// Effect 993: 全属性+{0},对手处于{1}状态时强化效果翻倍
type Effect993 struct {
node.EffectNode
}
func (e *Effect993) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
boost := int8(e.Args()[0].IntPart())
if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[1].IntPart())) {
boost *= 2
}
applyAllPropUp(e.Ctx().Our, boost)
return true
}
// Effect 994: 消除对手能力提升状态,消除成功则自身下{0}次技能先制+{1}
type Effect994 struct {
node.EffectNode
}
func (e *Effect994) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
cleared := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 994, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect994Sub struct {
RoundEffectArg0Base
}
func (e *Effect994Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil || current.SkillEntity.Category() == info.Category.STATUS {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
return true
}
// Effect 995: 消除对手能力提升状态消除成功则吸取对手最大体力的1/{0}
type Effect995 struct {
node.EffectNode
}
func (e *Effect995) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
cleared := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[0])
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
}
func init() {
input.InitEffect(input.EffectType.Skill, 981, &Effect981{})
input.InitEffect(input.EffectType.Skill, 982, &Effect982{})
input.InitEffect(input.EffectType.Skill, 983, &Effect983{})
input.InitEffect(input.EffectType.Skill, 984, &Effect984{})
input.InitEffect(input.EffectType.Sub, 984, &Effect984Sub{})
input.InitEffect(input.EffectType.Skill, 985, &Effect985{})
input.InitEffect(input.EffectType.Sub, 985, &Effect985Sub{})
input.InitEffect(input.EffectType.Skill, 986, &Effect986{})
input.InitEffect(input.EffectType.Skill, 987, &Effect987{})
input.InitEffect(input.EffectType.Skill, 988, &Effect988{})
input.InitEffect(input.EffectType.Sub, 988, &Effect988Sub{})
input.InitEffect(input.EffectType.Skill, 989, &Effect989{})
input.InitEffect(input.EffectType.Skill, 990, &Effect990{})
input.InitEffect(input.EffectType.Skill, 991, &Effect991{})
input.InitEffect(input.EffectType.Sub, 991, &Effect991Sub{})
input.InitEffect(input.EffectType.Skill, 992, &Effect992{})
input.InitEffect(input.EffectType.Skill, 993, &Effect993{})
input.InitEffect(input.EffectType.Skill, 994, &Effect994{})
input.InitEffect(input.EffectType.Sub, 994, &Effect994Sub{})
input.InitEffect(input.EffectType.Skill, 995, &Effect995{})
}