继续消耗全继续

This commit is contained in:
xinian
2026-04-01 00:48:42 +08:00
committed by cnb
parent 0a016e9e7f
commit 1724c06eab
59 changed files with 5048 additions and 1321 deletions

View File

@@ -0,0 +1,107 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 1082: 造成的伤害低于{0}则附加自身最大体力{1}%的百分比伤害
type Effect1082 struct{ node.EffectNode }
func (e *Effect1082) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) >= 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Mul(e.Args()[1]).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
return true
}
// Effect 1083: 若后出手则消除对手回合类效果
type Effect1083 struct{ node.EffectNode }
func (e *Effect1083) Skill_Use() bool {
if e.IsFirst() {
return true
}
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
return true
}
// Effect 1084: 附加{0}点固定伤害,对手处于异常状态时固定伤害翻倍
type Effect1084 struct{ node.EffectNode }
func (e *Effect1084) Skill_Use() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Args()[0]
if e.Ctx().Opp.StatEffect_Exist_all() {
damage = damage.Mul(alpacadecimal.NewFromInt(2))
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
return true
}
// Effect 1085: {0}回合内受到的伤害低于{1}则附加{2}点固定伤害
type Effect1085 struct{ RoundEffectArg0Base }
func (e *Effect1085) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 3 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || zone.Damage.Cmp(e.Args()[1]) >= 0 {
return true
}
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[2],
})
return true
}
// Effect 1086: 自身体力低于对手时造成的伤害提高{0}%
type Effect1086 struct{ node.EffectNode }
func (e *Effect1086) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) == 0 {
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
}
func init() {
input.InitEffect(input.EffectType.Skill, 1082, &Effect1082{})
input.InitEffect(input.EffectType.Skill, 1083, &Effect1083{})
input.InitEffect(input.EffectType.Skill, 1084, &Effect1084{})
input.InitEffect(input.EffectType.Skill, 1085, &Effect1085{})
input.InitEffect(input.EffectType.Skill, 1086, &Effect1086{})
}

View File

@@ -0,0 +1,144 @@
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 1087: 反转自身能力下降状态,反转成功则对手下{0}回合技能无效
type Effect1087 struct{ node.EffectNode }
func (e *Effect1087) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
reversed := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -2*v) {
reversed = true
}
}
if !reversed {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1087, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1087Sub struct{ RoundEffectArg0Base }
func (e *Effect1087Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil {
return true
}
e.Ctx().SkillEntity.SetMiss()
return true
}
// Effect 1088: 造成的攻击伤害高于{0}则吸取对手最大体力的1/{1}
type Effect1088 struct{ node.EffectNode }
func (e *Effect1088) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) <= 0 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if damage.Cmp(alpacadecimal.Zero) > 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
}
// Effect 1089: {0}回合内对手使用攻击技能后随机附加给对手{1}种异常状态
type Effect1089 struct{ RoundEffectArg0Base }
func (e *Effect1089) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
applyRandomStatusToOpp(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
// Effect 1090: 击败对手则{0}回合内令对手攻击技能无法造成伤害且命中效果失效
type Effect1090 struct{ node.EffectNode }
func (e *Effect1090) Skill_Use() bool {
if len(e.Args()) == 0 || e.Ctx().Opp.CurrentPet == nil || e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1090, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1090Sub struct{ RoundEffectArg0Base }
func (e *Effect1090Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetNoSide()
e.Ctx().SkillEntity.AttackTime = 0
return true
}
// Effect 1091: 未击败对手则自身下{0}回合免疫并反弹异常状态
type Effect1091 struct{ node.EffectNode }
func (e *Effect1091) Skill_Use() bool {
if len(e.Args()) == 0 || e.Ctx().Opp.CurrentPet == nil || e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1091, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1091Sub struct{ RoundEffectArg0Base }
func (e *Effect1091Sub) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
if in != e.Ctx().Opp || !input.IS_Stat(effEffect) {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(effEffect.ID().Suffix()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return false
}
func init() {
input.InitEffect(input.EffectType.Skill, 1087, &Effect1087{})
input.InitEffect(input.EffectType.Sub, 1087, &Effect1087Sub{})
input.InitEffect(input.EffectType.Skill, 1088, &Effect1088{})
input.InitEffect(input.EffectType.Skill, 1089, &Effect1089{})
input.InitEffect(input.EffectType.Skill, 1090, &Effect1090{})
input.InitEffect(input.EffectType.Sub, 1090, &Effect1090Sub{})
input.InitEffect(input.EffectType.Skill, 1091, &Effect1091{})
input.InitEffect(input.EffectType.Sub, 1091, &Effect1091Sub{})
}

View File

@@ -0,0 +1,379 @@
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 1092: 后出手时使对手{0}未触发则附加自身当前体力1/{1}的百分比伤害
type Effect1092 struct{ node.EffectNode }
func (e *Effect1092) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
if !e.IsFirst() {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
if e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetHP().Div(e.Args()[1])
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
return true
}
// Effect 1093: 出手时若自身体力低于对手则恢复自身最大体力的1/{0}
type Effect1093 struct{ node.EffectNode }
func (e *Effect1093) Skill_Use() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) >= 0 {
return true
}
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if heal.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
}
return true
}
// Effect 1094: 消除对手回合类效果消除成功则令对手随机2项技能PP值归零消除对手能力提升状态消除成功则令自身下2回合使用技能触发星皇之怒的概率提升20%
type Effect1094 struct {
node.EffectNode
furyChanceBonusUses int
starFuryActive bool
}
func (e *Effect1094) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
if old := t.GetEffect(input.EffectType.Skill, 1094); old != nil {
if prev, ok := old.(*Effect1094); ok {
e.furyChanceBonusUses = prev.furyChanceBonusUses
}
}
}
func (e *Effect1094) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil {
return true
}
chance := 50
if e.furyChanceBonusUses > 0 {
chance += 20
e.furyChanceBonusUses--
}
beforeTurn := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if beforeTurn > 0 {
zeroRandomSkillPP(e.Ctx().Opp, 2)
}
if clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
e.furyChanceBonusUses = 2
}
if e.starFuryActive {
if !e.Ctx().Opp.HasPropADD() {
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(alpacadecimal.NewFromInt(3))
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
}
return true
}
if e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
ok, _, _ := e.Input.Player.Roll(chance, 100)
if !ok {
return true
}
furySkill := cloneSkillEntity(skill)
if furySkill == nil {
return true
}
if furySkill.Category() != info.Category.STATUS {
furySkill.XML.Power = halvePower(furySkill.XML.Power)
}
e.starFuryActive = true
executeExtraSkill(e.Ctx().Our, e.Ctx().Opp, furySkill)
e.starFuryActive = false
return true
}
// Effect 1095: 3回合内若对手使用属性技能则命中前令对手所有技能随机降低1-3点PP值3回合内若对手使用攻击技能则使用后受到对手最大体力1/3的百分比伤害己方免疫下2次受到的异常状态
type Effect1095 struct {
node.EffectNode
starFuryActive bool
}
func (e *Effect1095) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil {
return true
}
watch := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1095, 3)
if watch != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, watch)
}
immune := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1099, 2)
if immune != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, immune)
}
if e.starFuryActive {
rounds := 2
if !e.IsFirst() {
rounds++
}
protect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 821, rounds)
if protect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, protect)
}
priority := e.Ctx().Our.InitEffect(input.EffectType.Sub, 10951, 2, 2)
if priority != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, priority)
}
return true
}
if e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
ok, _, _ := e.Input.Player.Roll(50, 100)
if !ok {
return true
}
furySkill := cloneSkillEntity(skill)
if furySkill == nil {
return true
}
if furySkill.Category() != info.Category.STATUS {
furySkill.XML.Power = halvePower(furySkill.XML.Power)
}
e.starFuryActive = true
executeExtraSkill(e.Ctx().Our, e.Ctx().Opp, furySkill)
e.starFuryActive = false
return true
}
type Effect1095Sub struct{ RoundEffectArg0Base }
func (e *Effect1095Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
return true
}
e.Ctx().Opp.DelPP(grand.Intn(3) + 1)
return true
}
func (e *Effect1095Sub) Skill_Use_ex() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(alpacadecimal.NewFromInt(3))
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
return true
}
type Effect1095PrioritySub struct{ RoundEffectArg0Base }
func (e *Effect1095PrioritySub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil || len(e.Args()) < 2 {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
return true
}
// Effect 1096: 全属性+1自身当前体力低于最大体力的1/2时强化效果翻倍4回合内每回合使用技能吸取对手最大体力的1/3自身下2次使用技能触发星皇之怒的概率翻倍
type Effect1096 struct {
node.EffectNode
furyChanceDoubleUses int
starFuryActive bool
}
func (e *Effect1096) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
if old := t.GetEffect(input.EffectType.Skill, 1096); old != nil {
if prev, ok := old.(*Effect1096); ok {
e.furyChanceDoubleUses = prev.furyChanceDoubleUses
}
}
}
func (e *Effect1096) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil {
return true
}
chance := 50
if e.furyChanceDoubleUses > 0 {
chance *= 2
if chance > 100 {
chance = 100
}
e.furyChanceDoubleUses--
}
boost := int8(1)
if e.Ctx().Our.CurrentPet.GetHP().Mul(alpacadecimal.NewFromInt(2)).Cmp(e.Ctx().Our.CurrentPet.GetMaxHP()) < 0 {
boost = 2
}
applyAllPropUp(e.Ctx().Our, boost)
drain := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1096, 4)
if drain != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, drain)
}
e.furyChanceDoubleUses = 2
if e.starFuryActive {
damageBoost := e.Ctx().Our.InitEffect(input.EffectType.Sub, 10961, 2)
if damageBoost != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, damageBoost)
}
reduce := e.Ctx().Our.InitEffect(input.EffectType.Sub, 10962, 2)
if reduce != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, reduce)
}
return true
}
if e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
ok, _, _ := e.Input.Player.Roll(chance, 100)
if !ok {
return true
}
furySkill := cloneSkillEntity(skill)
if furySkill == nil {
return true
}
if furySkill.Category() != info.Category.STATUS {
furySkill.XML.Power = halvePower(furySkill.XML.Power)
}
e.starFuryActive = true
executeExtraSkill(e.Ctx().Our, e.Ctx().Opp, furySkill)
e.starFuryActive = false
return true
}
type Effect1096DrainSub struct{ RoundEffectArg0Base }
func (e *Effect1096DrainSub) OnSkill() bool {
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(alpacadecimal.NewFromInt(3))
if e.Ctx().Our.CurrentPet.GetHP().Mul(alpacadecimal.NewFromInt(2)).Cmp(e.Ctx().Our.CurrentPet.GetMaxHP()) < 0 {
damage = damage.Mul(alpacadecimal.NewFromInt(2))
}
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
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
}
type Effect1096DamageBoostSub struct{ RoundEffectArg0Base }
func (e *Effect1096DamageBoostSub) 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
}
type Effect1096DamageReduceSub struct {
node.EffectNode
remaining int
}
func (e *Effect1096DamageReduceSub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1096DamageReduceSub) DamageLockEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 {
return true
}
reduce := zone.Damage.Mul(alpacadecimal.NewFromInt(50)).Div(hundred)
if reduce.Cmp(zone.Damage) >= 0 {
zone.Damage = alpacadecimal.Zero
} else {
zone.Damage = zone.Damage.Sub(reduce)
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1092, &Effect1092{})
input.InitEffect(input.EffectType.Skill, 1093, &Effect1093{})
input.InitEffect(input.EffectType.Skill, 1094, &Effect1094{})
input.InitEffect(input.EffectType.Skill, 1095, &Effect1095{})
input.InitEffect(input.EffectType.Sub, 1095, &Effect1095Sub{})
input.InitEffect(input.EffectType.Sub, 10951, &Effect1095PrioritySub{})
input.InitEffect(input.EffectType.Skill, 1096, &Effect1096{})
input.InitEffect(input.EffectType.Sub, 1096, &Effect1096DrainSub{})
input.InitEffect(input.EffectType.Sub, 10961, &Effect1096DamageBoostSub{})
input.InitEffect(input.EffectType.Sub, 10962, &Effect1096DamageReduceSub{})
}

View File

@@ -0,0 +1,24 @@
package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 1112: 先出手时随机附加{0}种控制类异常状态
type Effect1112 struct {
node.EffectNode
}
func (e *Effect1112) OnSkill() bool {
if len(e.Args()) == 0 || !e.IsFirst() {
return true
}
addRandomControlStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1112, &Effect1112{})
}

View File

@@ -0,0 +1,20 @@
package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 1113: 技能命中后消除自身能力提升状态
type Effect1113 struct {
node.EffectNode
}
func (e *Effect1113) OnSkill() bool {
clearPositiveProps(e.Ctx().Our, e.Ctx().Our)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1113, &Effect1113{})
}

View File

@@ -0,0 +1,32 @@
package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 1114: 消除对手回合类效果,消除成功则令对手随机{0}项技能PP值归零
type Effect1114 struct {
node.EffectNode
}
func (e *Effect1114) Skill_Use() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1114, &Effect1114{})
}

View File

@@ -0,0 +1,74 @@
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 1115: 解除自身能力下降状态,解除成功则令对手下{0}次使用的攻击技能无效
type Effect1115 struct {
node.EffectNode
}
func (e *Effect1115) Skill_Use() bool {
cleared := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared || len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1115, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1115Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1115Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1115Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1115, &Effect1115{})
input.InitEffect(input.EffectType.Sub, 1115, &Effect1115Sub{})
}

View File

@@ -0,0 +1,61 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/gogf/gf/v2/util/grand"
)
var effect1116StatusPool = []int{
int(info.PetStatus.Burned),
int(info.PetStatus.Frozen),
int(info.PetStatus.Poisoned),
int(info.PetStatus.Paralysis),
int(info.PetStatus.Fear),
int(info.PetStatus.Sleep),
}
func addRandomStatuses1116(owner, target *input.Input, count int) bool {
if owner == nil || target == nil || count <= 0 {
return false
}
if count > len(effect1116StatusPool) {
count = len(effect1116StatusPool)
}
perm := grand.Perm(len(effect1116StatusPool))
applied := false
for _, idx := range perm[:count] {
statusEffect := owner.InitEffect(input.EffectType.Status, effect1116StatusPool[idx])
if statusEffect != nil {
target.AddEffect(owner, statusEffect)
applied = true
}
}
return applied
}
// Effect 1116: 随机附加{0}种异常状态,未触发则消除对手回合类效果
type Effect1116 struct {
node.EffectNode
}
func (e *Effect1116) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
if count := int(e.Args()[0].IntPart()); addRandomStatuses1116(e.Ctx().Our, e.Ctx().Opp, count) {
return true
}
if e.Ctx().Opp != nil {
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1116, &Effect1116{})
}

View File

@@ -30,7 +30,14 @@ func (e *Effect1118) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1118, e.SideEffectArgs...)
sub := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
1118,
int(e.Args()[0].IntPart()),
int(e.Args()[1].IntPart()),
int(e.Args()[2].IntPart()),
int(e.Args()[3].IntPart()),
)
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
@@ -49,7 +56,7 @@ func (e *Effect1118Sub) Skill_Use_ex() bool {
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success {
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
}
return true
}

View File

@@ -0,0 +1,238 @@
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 1122: 使对手全属性-{0},未触发则对手{1}
type Effect1122 struct {
node.EffectNode
}
func (e *Effect1122) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
level := int8(e.Args()[0].IntPart())
applied := false
if level > 0 {
for i := range e.Ctx().Opp.Prop[:] {
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -level) {
applied = true
}
}
}
if applied {
return true
}
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
// Effect 1123: 吸取对手能力提升状态,吸取成功则下{0}回合自身所有技能先制+{1}
type Effect1123 struct {
node.EffectNode
}
func (e *Effect1123) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
absorbed := 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)
absorbed = true
}
}
if !absorbed {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1123, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1123Sub struct {
RoundEffectArg0Base
}
func (e *Effect1123Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil || len(e.Args()) < 2 {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
return true
}
// Effect 1124: 消除对手回合类效果,消除成功则自身下{0}回合造成的攻击伤害额外提升{1}%
type Effect1124 struct {
node.EffectNode
}
func (e *Effect1124) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1124, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1124Sub struct {
RoundEffectArg0Base
}
func (e *Effect1124Sub) 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
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[1])).Div(hundred)
return true
}
// Effect 1125: {0}回合内对手所有攻击必定Miss若对手命中则下{1}回合对手使用属性技能无效
type Effect1125 struct {
node.EffectNode
}
func (e *Effect1125) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1125, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1125Sub struct {
RoundEffectArg0Base
}
func (e *Effect1125Sub) SkillHit_ex() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
return true
}
func (e *Effect1125Sub) Action_end_ex() bool {
if len(e.Args()) < 2 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 11251, int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1125StatusLockSub struct {
RoundEffectArg0Base
}
func (e *Effect1125StatusLockSub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetNoSide()
e.Ctx().SkillEntity.AttackTime = 0
return true
}
// Effect 1126: 使对手随机{0}项技能PP值归零若当回合受到攻击则额外使对手随机{1}项技能PP值归零
type Effect1126 struct {
node.EffectNode
}
func (e *Effect1126) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[0].IntPart()))
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1126, int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1126Sub struct {
node.EffectNode
attacked bool
}
func (e *Effect1126Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(1)
}
func (e *Effect1126Sub) Action_end_ex() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
e.attacked = true
return true
}
func (e *Effect1126Sub) TurnEnd() {
if e.attacked && len(e.Args()) > 0 {
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[0].IntPart()))
}
e.EffectNode.TurnEnd()
}
func init() {
input.InitEffect(input.EffectType.Skill, 1122, &Effect1122{})
input.InitEffect(input.EffectType.Skill, 1123, &Effect1123{})
input.InitEffect(input.EffectType.Sub, 1123, &Effect1123Sub{})
input.InitEffect(input.EffectType.Skill, 1124, &Effect1124{})
input.InitEffect(input.EffectType.Sub, 1124, &Effect1124Sub{})
input.InitEffect(input.EffectType.Skill, 1125, &Effect1125{})
input.InitEffect(input.EffectType.Sub, 1125, &Effect1125Sub{})
input.InitEffect(input.EffectType.Sub, 11251, &Effect1125StatusLockSub{})
input.InitEffect(input.EffectType.Skill, 1126, &Effect1126{})
input.InitEffect(input.EffectType.Sub, 1126, &Effect1126Sub{})
}

View File

@@ -0,0 +1,164 @@
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 1127: 吸取对手能力提升状态,若对手不处于能力提升状态则使对手全属性-{0}
type Effect1127 struct {
node.EffectNode
}
func (e *Effect1127) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
absorbed := 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)
absorbed = true
}
}
if absorbed {
return true
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[0].IntPart()))
return true
}
// Effect 1128: 击败对手则令对手下{0}次使用的攻击技能无效
type Effect1128 struct {
node.EffectNode
}
func (e *Effect1128) Skill_Use() bool {
if len(e.Args()) == 0 || e.Ctx().Opp.CurrentPet == nil || e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1128, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1128Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1128Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1128Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1129: {0}%概率伤害为{1}倍,自身处于能力提升状态时概率翻倍
type Effect1129 struct {
node.EffectNode
}
func (e *Effect1129) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
return true
}
chance := int(e.Args()[0].IntPart())
if e.Ctx().Our.HasPropADD() {
chance *= 2
}
if ok, _, _ := e.Input.Player.Roll(chance, 100); ok {
zone.Damage = zone.Damage.Mul(e.Args()[1])
}
return true
}
// Effect 1130: 使对手全属性-{0},自身体力低于对手时弱化效果翻倍
type Effect1130 struct {
node.EffectNode
}
func (e *Effect1130) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
level := int8(e.Args()[0].IntPart())
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) < 0 {
level *= 2
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, level)
return true
}
// Effect 1131: 随机附加{0}-{1}点固定伤害,自身处于能力提升状态时变为{2}-{3}点固定伤害
type Effect1131 struct {
node.EffectNode
}
func (e *Effect1131) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
minDamage := int(e.Args()[0].IntPart())
maxDamage := int(e.Args()[1].IntPart())
if e.Ctx().Our.HasPropADD() {
minDamage = int(e.Args()[2].IntPart())
maxDamage = int(e.Args()[3].IntPart())
}
if maxDamage < minDamage {
maxDamage = minDamage
}
damage := minDamage
if maxDamage > minDamage {
damage += grand.Intn(maxDamage - minDamage + 1)
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: alpacadecimal.NewFromInt(int64(damage)),
})
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1127, &Effect1127{})
input.InitEffect(input.EffectType.Skill, 1128, &Effect1128{})
input.InitEffect(input.EffectType.Sub, 1128, &Effect1128Sub{})
input.InitEffect(input.EffectType.Skill, 1129, &Effect1129{})
input.InitEffect(input.EffectType.Skill, 1130, &Effect1130{})
input.InitEffect(input.EffectType.Skill, 1131, &Effect1131{})
}

View File

@@ -0,0 +1,166 @@
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 1132: 随机恢复自身{0}-{1}点体力,自身不处于能力提升状态时变为{2}-{3}点体力
type Effect1132 struct {
node.EffectNode
}
func (e *Effect1132) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
minHeal := int(e.Args()[0].IntPart())
maxHeal := int(e.Args()[1].IntPart())
if !e.Ctx().Our.HasPropADD() {
minHeal = int(e.Args()[2].IntPart())
maxHeal = int(e.Args()[3].IntPart())
}
if maxHeal < minHeal {
maxHeal = minHeal
}
healValue := minHeal
if maxHeal > minHeal {
healValue += grand.Intn(maxHeal - minHeal + 1)
}
if healValue <= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, alpacadecimal.NewFromInt(int64(healValue)))
return true
}
// Effect 1133: 对手每有{0}项能力等级与自身相同则附加{1}点固定伤害
type Effect1133 struct {
node.EffectNode
}
func (e *Effect1133) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
step := int(e.Args()[0].IntPart())
if step <= 0 {
return true
}
sameCount := 0
for i, v := range e.Ctx().Our.Prop[:] {
if e.Ctx().Opp.Prop[i] == v {
sameCount++
}
}
times := sameCount / step
if times <= 0 {
return true
}
damage := e.Args()[1].Mul(alpacadecimal.NewFromInt(int64(times)))
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
return true
}
// Effect 1134: 将自身能力下降状态反馈给对手,反馈失败则令自身全属性+{0}
type Effect1134 struct {
node.EffectNode
}
func (e *Effect1134) OnSkill() bool {
reflected := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), v) {
reflected = true
}
}
if reflected || len(e.Args()) == 0 {
return true
}
boost := int8(e.Args()[0].IntPart())
for i := range e.Ctx().Our.Prop[:] {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boost)
}
return true
}
// Effect 1135: 若自身当前体力低于最大体力的1/{0}则恢复自身全部体力并造成等量固定伤害
type Effect1135 struct {
node.EffectNode
}
func (e *Effect1135) OnSkill() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) >= 0 {
return true
}
missing := e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP())
if missing.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, missing)
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: missing,
})
return true
}
// Effect 1136: 自身体力高于1/{0}时附加自身当前体力1/{1}的百分比伤害
type Effect1136 struct {
node.EffectNode
}
func (e *Effect1136) Skill_Use() bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) <= 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetHP().Div(e.Args()[1])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1132, &Effect1132{})
input.InitEffect(input.EffectType.Skill, 1133, &Effect1133{})
input.InitEffect(input.EffectType.Skill, 1134, &Effect1134{})
input.InitEffect(input.EffectType.Skill, 1135, &Effect1135{})
input.InitEffect(input.EffectType.Skill, 1136, &Effect1136{})
}

View File

@@ -0,0 +1,206 @@
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 1137: 自身体力低于1/{0}时吸取对手最大体力的1/{1}
type Effect1137 struct {
node.EffectNode
}
func (e *Effect1137) OnSkill() bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) >= 0 {
return true
}
drain := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if drain.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: drain,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, drain)
return true
}
// Effect 1138: 消除对手回合类效果,消除成功则{0}%令对手{1},未触发则{2}%令对手{3}
type Effect1138 struct {
node.EffectNode
}
func (e *Effect1138) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
if ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
if ok, _, _ := e.Input.Player.Roll(int(e.Args()[2].IntPart()), 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[3].IntPart()))
}
return true
}
// Effect 1139: 消除敌我双方回合类效果并同时进入{0}回合{1},自身{2}状态解除后则恢复自身所有体力
type Effect1139 struct {
node.EffectNode
}
func (e *Effect1139) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
e.Ctx().Our.CancelTurn(e.Ctx().Our)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
duration := int(e.Args()[0].IntPart())
statusID := int(e.Args()[1].IntPart())
if duration > 0 {
addTimedStatus(e.Ctx().Our, e.Ctx().Our, statusID, duration)
addTimedStatus(e.Ctx().Our, e.Ctx().Opp, statusID, duration)
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1139, int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1139Sub struct {
node.EffectNode
statusID int
}
func (e *Effect1139Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.statusID = a[0]
}
}
func (e *Effect1139Sub) TurnEnd() {
if e.statusID > 0 && !e.Ctx().Our.StatEffect_Exist(info.EnumPetStatus(e.statusID)) {
missing := e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP())
if missing.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, missing)
}
e.Alive(false)
return
}
e.EffectNode.TurnEnd()
}
// Effect 1140: {0}回合内对手使用攻击技能则{1}
type Effect1140 struct {
node.EffectNode
}
func (e *Effect1140) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1140, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1140Sub struct {
RoundEffectArg0Base
}
func (e *Effect1140Sub) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
applyStatusByID(e.Ctx().Opp, e.Ctx().Our, int(e.Args()[1].IntPart()))
return true
}
// Effect 1141: 1回合做{0}~{1}次攻击,每次攻击{2}%令对手{3},攻击低于{4}次则每次攻击{5}%令对手{6}
type Effect1141 struct {
node.EffectNode
hits int
}
func (e *Effect1141) Skill_Use() bool {
if len(e.Args()) < 7 {
return true
}
minHits := int(e.Args()[0].IntPart())
maxHits := int(e.Args()[1].IntPart())
if maxHits < minHits {
maxHits = minHits
}
if minHits <= 0 {
minHits = 1
}
e.hits = minHits
if maxHits > minHits {
e.hits += grand.Intn(maxHits - minHits + 1)
}
if e.Ctx().SkillEntity != nil {
e.Ctx().SkillEntity.XML.AtkNum = e.hits
}
return true
}
func (e *Effect1141) OnSkill() bool {
if len(e.Args()) < 7 || e.hits <= 0 {
return true
}
chance := int(e.Args()[2].IntPart())
statusID := int(e.Args()[3].IntPart())
if e.hits < int(e.Args()[4].IntPart()) {
chance = int(e.Args()[5].IntPart())
statusID = int(e.Args()[6].IntPart())
}
for i := 0; i < e.hits; i++ {
if ok, _, _ := e.Input.Player.Roll(chance, 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, statusID)
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1137, &Effect1137{})
input.InitEffect(input.EffectType.Skill, 1138, &Effect1138{})
input.InitEffect(input.EffectType.Skill, 1139, &Effect1139{})
input.InitEffect(input.EffectType.Sub, 1139, &Effect1139Sub{})
input.InitEffect(input.EffectType.Skill, 1140, &Effect1140{})
input.InitEffect(input.EffectType.Sub, 1140, &Effect1140Sub{})
input.InitEffect(input.EffectType.Skill, 1141, &Effect1141{})
}

View File

@@ -0,0 +1,196 @@
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"
)
var effect1143StatusPool = []int{
int(info.PetStatus.Burned),
int(info.PetStatus.Frozen),
int(info.PetStatus.IceBound),
22, // 焚烬;当前仓库未见显式枚举常量,按配置 ID 透传
}
func addRandomStatuses1143(owner, target *input.Input, count int) int {
if owner == nil || target == nil || count <= 0 {
return 0
}
indexes := grand.Perm(len(effect1143StatusPool))
applied := 0
for _, idx := range indexes {
statusID := effect1143StatusPool[idx]
eff := owner.InitEffect(input.EffectType.Status, statusID)
if eff == nil {
continue
}
target.AddEffect(owner, eff)
applied++
if applied >= count {
break
}
}
return applied
}
// Effect 1142: 回合结束时将自身当前体力降低为{0},并附加本次降低体力值{1}%的百分比伤害
type Effect1142 struct {
node.EffectNode
}
func (e *Effect1142) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1142, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1142Sub struct {
FixedDuration1Base
}
func (e *Effect1142Sub) TurnEnd() {
if len(e.Args()) < 2 {
e.EffectNode.TurnEnd()
return
}
targetHP := alpacadecimal.NewFromInt(int64(e.Args()[0].IntPart()))
currentHP := e.Ctx().Our.CurrentPet.GetHP()
if currentHP.Cmp(targetHP) <= 0 {
e.EffectNode.TurnEnd()
return
}
reduce := currentHP.Sub(targetHP)
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: reduce,
})
damage := reduce.Mul(e.Args()[1]).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
e.EffectNode.TurnEnd()
}
// Effect 1143: 对手处于异常状态时附加{0}点固定伤害,不处于异常状态则下{1}回合使对手随机进入烧伤、冻伤、冰封、焚烬中的{2}种异常状态
type Effect1143 struct {
node.EffectNode
}
func (e *Effect1143) OnSkill() bool {
if len(e.Args()) < 3 {
return true
}
if e.Ctx().Opp.StatEffect_Exist_all() {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[0],
})
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1143, int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1143Sub struct {
RoundEffectArg0Base
}
func (e *Effect1143Sub) OnSkill() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
addRandomStatuses1143(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
// Effect 1144: 附加{0}~{1}点固定伤害并恢复等量体力
type Effect1144 struct {
node.EffectNode
}
func (e *Effect1144) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
minDamage := int(e.Args()[0].IntPart())
maxDamage := int(e.Args()[1].IntPart())
if maxDamage < minDamage {
maxDamage = minDamage
}
damage := minDamage
if maxDamage > minDamage {
damage += grand.Intn(maxDamage - minDamage + 1)
}
value := alpacadecimal.NewFromInt(int64(damage))
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: value,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, value)
return true
}
// Effect 1145: 令双方全属性+{0}
type Effect1145 struct {
node.EffectNode
}
func (e *Effect1145) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
boost := int8(e.Args()[0].IntPart())
for i := range e.Ctx().Our.Prop[:] {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boost)
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), boost)
}
return true
}
// Effect 1147: 未击败对手则消除对手能力提升状态
type Effect1147 struct {
node.EffectNode
}
func (e *Effect1147) Skill_Use() bool {
if e.Ctx().Opp.CurrentPet == nil || e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
clearPositiveProps(e.Ctx().Opp, e.Ctx().Our)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1142, &Effect1142{})
input.InitEffect(input.EffectType.Sub, 1142, &Effect1142Sub{})
input.InitEffect(input.EffectType.Skill, 1143, &Effect1143{})
input.InitEffect(input.EffectType.Sub, 1143, &Effect1143Sub{})
input.InitEffect(input.EffectType.Skill, 1144, &Effect1144{})
input.InitEffect(input.EffectType.Skill, 1145, &Effect1145{})
input.InitEffect(input.EffectType.Skill, 1147, &Effect1147{})
}

View File

@@ -0,0 +1,179 @@
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 1148: 随机吸取对手{0}-{1}点体力
type Effect1148 struct {
node.EffectNode
}
func (e *Effect1148) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
drain := randomInRange(int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if drain <= 0 {
return true
}
damage := alpacadecimal.NewFromInt(int64(drain))
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
return true
}
// Effect 1149: 若先出手则将本回合受到的攻击伤害{0}%反馈给对手双方同时死亡时对手残留1点体力
type Effect1149 struct {
node.EffectNode
}
func (e *Effect1149) Skill_Use() bool {
if len(e.Args()) == 0 || !e.IsFirst() {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1149, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1149Sub struct {
FixedDuration1Base
damage alpacadecimal.Decimal
}
func (e *Effect1149Sub) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.damage = e.damage.Add(zone.Damage)
return true
}
func (e *Effect1149Sub) TurnEnd() {
defer e.Alive(false)
if len(e.Args()) == 0 || e.damage.Cmp(alpacadecimal.Zero) <= 0 {
return
}
if e.Ctx().Opp == nil || e.Ctx().Opp.CurrentPet == nil || e.Ctx().Opp.CurrentPet.Info.Hp == 0 {
return
}
reflectDamage := e.damage.Mul(e.Args()[0]).Div(hundred)
if reflectDamage.Cmp(alpacadecimal.Zero) <= 0 {
return
}
if e.Ctx().Our != nil && e.Ctx().Our.CurrentPet != nil && e.Ctx().Our.CurrentPet.Info.Hp == 0 {
cap := e.Ctx().Opp.CurrentPet.GetHP().Sub(oneDecimal)
if cap.Cmp(alpacadecimal.Zero) < 0 {
cap = alpacadecimal.Zero
}
if reflectDamage.Cmp(cap) > 0 {
reflectDamage = cap
}
}
if reflectDamage.Cmp(alpacadecimal.Zero) <= 0 {
return
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: reflectDamage,
})
}
// Effect 1150: 消除对手能力上升状态,消除成功对手{0}
type Effect1150 struct {
node.EffectNode
}
func (e *Effect1150) Skill_Use() bool {
if len(e.Args()) == 0 || !clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
return true
}
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
// Effect 1151: {0}回合内若对手使用攻击技能则自身全属性+{1}
type Effect1151 struct {
node.EffectNode
}
func (e *Effect1151) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1151, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1151Sub struct {
RoundEffectArg0Base
}
func (e *Effect1151Sub) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
applyAllPropUp(e.Ctx().Our, int8(e.Args()[1].IntPart()))
return true
}
// Effect 1152: 自身不处于能力提升状态则造成的伤害提升{0}%
type Effect1152 struct {
node.EffectNode
}
func (e *Effect1152) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) == 0 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().Our.HasPropADD() {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[0])).Div(hundred)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1148, &Effect1148{})
input.InitEffect(input.EffectType.Skill, 1149, &Effect1149{})
input.InitEffect(input.EffectType.Sub, 1149, &Effect1149Sub{})
input.InitEffect(input.EffectType.Skill, 1150, &Effect1150{})
input.InitEffect(input.EffectType.Skill, 1151, &Effect1151{})
input.InitEffect(input.EffectType.Sub, 1151, &Effect1151Sub{})
input.InitEffect(input.EffectType.Skill, 1152, &Effect1152{})
}

View File

@@ -0,0 +1,192 @@
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 1153: 解除自身能力下降状态,解除成功则自身下{0}回合受到的伤害减少{1}点
type Effect1153 struct {
node.EffectNode
}
func (e *Effect1153) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
cleared := false
for i, v := range e.Ctx().Our.Prop[:] {
if v < 0 && e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1153, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1153Sub struct {
RoundEffectArg0Base
}
func (e *Effect1153Sub) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
return true
}
reduce := e.Args()[1]
if zone.Damage.Cmp(reduce) <= 0 {
zone.Damage = alpacadecimal.Zero
return true
}
zone.Damage = zone.Damage.Sub(reduce)
return true
}
// Effect 1154: {0}回合内使用技能附加{1}点固定伤害,若自身体力低于对手则效果翻倍
type Effect1154 struct {
RoundEffectArg0Base
}
func (e *Effect1154) Skill_Use() bool {
if len(e.Args()) < 2 {
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 1155: 附加自身最大体力值{0}%的百分比伤害,连续使用每次增加{1}%,最高{2}%
type Effect1155 struct {
node.EffectNode
bonus int
}
func (e *Effect1155) OnSkill() bool {
if len(e.Args()) < 3 {
return true
}
percent := int(e.Args()[0].IntPart()) + e.bonus
maxPercent := int(e.Args()[2].IntPart())
if percent > maxPercent {
percent = maxPercent
}
if percent <= 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Mul(alpacadecimal.NewFromInt(int64(percent))).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
e.bonus += int(e.Args()[1].IntPart())
return true
}
// Effect 1156: 击败对手则恢复自身全部体力和所有技能PP值
type Effect1156 struct {
node.EffectNode
}
func (e *Effect1156) OnSkill() bool {
if e.Ctx().Opp.CurrentPet.GetHP().Cmp(alpacadecimal.Zero) > 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.CurrentPet.GetMaxHP())
e.Ctx().Our.HealPP(-1)
return true
}
// Effect 1157: 消除双方能力提升、下降状态,消除任意一方成功则使对手下{0}次施放的技能无效(包括必中技能)
type Effect1157 struct {
node.EffectNode
}
func (e *Effect1157) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
cleared := false
for i := range e.Ctx().Our.Prop[:] {
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
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, 1157, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1157Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1157Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1157Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1153, &Effect1153{})
input.InitEffect(input.EffectType.Sub, 1153, &Effect1153Sub{})
input.InitEffect(input.EffectType.Skill, 1154, &Effect1154{})
input.InitEffect(input.EffectType.Skill, 1155, &Effect1155{})
input.InitEffect(input.EffectType.Skill, 1156, &Effect1156{})
input.InitEffect(input.EffectType.Skill, 1157, &Effect1157{})
input.InitEffect(input.EffectType.Sub, 1157, &Effect1157Sub{})
}

View File

@@ -0,0 +1,221 @@
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 1158: 自身每处于{0}种能力提升状态则附加{1}点固定伤害,遇到天敌时效果翻倍
type Effect1158 struct {
node.EffectNode
}
func (e *Effect1158) OnSkill() bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
count := countPositivePropKinds(e.Ctx().Our) / int(e.Args()[0].IntPart())
if count <= 0 {
return true
}
damage := e.Args()[1].Mul(alpacadecimal.NewFromInt(int64(count)))
if e.ISNaturalEnemy() {
damage = damage.Mul(alpacadecimal.NewFromInt(2))
}
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
return true
}
// Effect 1159: 吸取对手能力提升状态,吸取成功则自身免疫下{0}次受到的异常状态
type Effect1159 struct {
node.EffectNode
}
func (e *Effect1159) Skill_Use() bool {
copied := 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)
copied = true
}
}
if !copied || len(e.Args()) == 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1099, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
// Effect 1160: 获得{0}点护盾,护盾消失时吸取对手{1}点体力且令对手随机{2}个技能的PP值归零
type Effect1160 struct {
node.EffectNode
}
func (e *Effect1160) Skill_Use() bool {
if len(e.Args()) < 3 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.AddShield(e.Args()[0])
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1160, int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1160Sub struct {
node.EffectNode
}
func (e *Effect1160Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(-1)
}
func (e *Effect1160Sub) ShieldChange(before, after alpacadecimal.Decimal) bool {
if len(e.Args()) < 2 {
return true
}
if before.Cmp(alpacadecimal.Zero) <= 0 || after.Cmp(alpacadecimal.Zero) > 0 {
return true
}
damage := e.Args()[0]
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[1].IntPart()))
e.Alive(false)
return true
}
// Effect 1161: {0}回合内若对手恢复体力则自身恢复等量体力的{1}%
type Effect1161 struct {
node.EffectNode
}
func (e *Effect1161) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1161, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1161Sub struct {
RoundEffectArg0Base
}
func (e *Effect1161Sub) Heal_Pre(ac action.BattleActionI, value *int) bool {
if len(e.Args()) < 2 || value == nil || *value <= 0 {
return true
}
heal := alpacadecimal.NewFromInt(int64(*value)).Mul(e.Args()[1]).Div(hundred)
if heal.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Heal(e.Ctx().Opp, &action.SelectSkillAction{}, heal)
return true
}
// Effect 1162: {0}回合内每回合都有{1}%概率令对手{2},未触发则下{4}次受到的伤害减少{5}点
type Effect1162 struct {
RoundEffectArg0Base
}
func (e *Effect1162) TurnEnd() {
if len(e.Args()) < 6 {
e.RoundEffectArg0Base.TurnEnd()
return
}
if ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
e.RoundEffectArg0Base.TurnEnd()
return
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1162, int(e.Args()[4].IntPart()), int(e.Args()[5].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
e.RoundEffectArg0Base.TurnEnd()
}
type Effect1162Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1162Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1162Sub) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
return true
}
if e.remaining <= 0 {
e.Alive(false)
return true
}
reduce := e.Args()[1]
if zone.Damage.Cmp(reduce) <= 0 {
zone.Damage = alpacadecimal.Zero
} else {
zone.Damage = zone.Damage.Sub(reduce)
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1158, &Effect1158{})
input.InitEffect(input.EffectType.Skill, 1159, &Effect1159{})
input.InitEffect(input.EffectType.Skill, 1160, &Effect1160{})
input.InitEffect(input.EffectType.Sub, 1160, &Effect1160Sub{})
input.InitEffect(input.EffectType.Skill, 1161, &Effect1161{})
input.InitEffect(input.EffectType.Sub, 1161, &Effect1161Sub{})
input.InitEffect(input.EffectType.Skill, 1162, &Effect1162{})
input.InitEffect(input.EffectType.Sub, 1162, &Effect1162Sub{})
}

View File

@@ -0,0 +1,168 @@
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 1163: 附加自身特攻值与速度值总和{0}%的百分比伤害,每次使用增加{1}%,最高{2}%
type Effect1163 struct {
node.EffectNode
bonus int
}
func (e *Effect1163) OnSkill() bool {
if len(e.Args()) < 3 {
return true
}
percent := int(e.Args()[0].IntPart()) + e.bonus
maxPercent := int(e.Args()[2].IntPart())
if percent > maxPercent {
percent = maxPercent
}
if percent <= 0 {
return true
}
base := e.Ctx().Our.GetProp(2).Add(e.Ctx().Our.GetProp(4))
damage := base.Mul(alpacadecimal.NewFromInt(int64(percent))).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
e.bonus += int(e.Args()[1].IntPart())
return true
}
// Effect 1164: 反转对手能力提升状态,若该效果未满足条件或反转失败则消除对手能力提升状态和回合类效果
type Effect1164 struct {
node.EffectNode
}
func (e *Effect1164) Skill_Use() bool {
reversed := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -2*v) {
reversed = true
}
}
if reversed {
return true
}
clearPositiveProps(e.Ctx().Opp, e.Ctx().Our)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
return true
}
// Effect 1165: {0}回合内若对手使用攻击技能,则使用攻击技能后的下{1}回合属性技能命中效果失效
type Effect1165 struct {
node.EffectNode
}
func (e *Effect1165) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1165, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1165Sub struct{ RoundEffectArg0Base }
func (e *Effect1165Sub) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 11651, int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1165StatusLockSub struct{ RoundEffectArg0Base }
func (e *Effect1165StatusLockSub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetNoSide()
e.Ctx().SkillEntity.AttackTime = 0
return true
}
// Effect 1166: 解除自身能力下降效果,解除成功则下{0}回合先制+{1}
type Effect1166 struct{ node.EffectNode }
func (e *Effect1166) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
cleared := false
for i, v := range e.Ctx().Our.Prop[:] {
if v < 0 && e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1312, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
// Effect 1167: 解除自身能力下降状态,解除成功则恢复自身所有体力
type Effect1167 struct{ node.EffectNode }
func (e *Effect1167) Skill_Use() bool {
cleared := false
for i, v := range e.Ctx().Our.Prop[:] {
if v < 0 && e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP())
if heal.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1163, &Effect1163{})
input.InitEffect(input.EffectType.Skill, 1164, &Effect1164{})
input.InitEffect(input.EffectType.Skill, 1165, &Effect1165{})
input.InitEffect(input.EffectType.Sub, 1165, &Effect1165Sub{})
input.InitEffect(input.EffectType.Sub, 11651, &Effect1165StatusLockSub{})
input.InitEffect(input.EffectType.Skill, 1166, &Effect1166{})
input.InitEffect(input.EffectType.Skill, 1167, &Effect1167{})
}

View File

@@ -0,0 +1,262 @@
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 1178: 自身不处于能力提升状态则造成的伤害翻倍
type Effect1178 struct{ node.EffectNode }
func (e *Effect1178) 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
}
if e.Ctx().Our.HasPropADD() {
return true
}
zone.Damage = zone.Damage.Mul(alpacadecimal.NewFromInt(2))
return true
}
// Effect 1179: 消除对手回合类效果,消除成功则自身下{0}次攻击技能造成的伤害额外提升{1}%
type Effect1179 struct{ node.EffectNode }
func (e *Effect1179) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1179, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1179Sub struct {
node.EffectNode
remaining int
percent alpacadecimal.Decimal
}
func (e *Effect1179Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
if len(a) > 1 {
e.percent = alpacadecimal.NewFromInt(int64(a[1]))
}
}
func (e *Effect1179Sub) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.percent)).Div(hundred)
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1180: 吸取对手能力提升状态,吸取成功则自身下{0}回合必定致命一击
type Effect1180 struct{ node.EffectNode }
func (e *Effect1180) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
copied := 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)
copied = true
}
}
if !copied {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1180, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1180Sub struct{ RoundEffectArg0Base }
func (e *Effect1180Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
// Effect 1181: {0}回合内每回合使用技能{1}%令对手{2},未触发则令对手全属性-{3}
type Effect1181 struct{ RoundEffectArg0Base }
func (e *Effect1181) OnSkill() bool {
if len(e.Args()) < 4 {
return true
}
if ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
return true
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[3].IntPart()))
return true
}
// Effect 1182: 牺牲自己进行自爆,将对手体力降为{0}点,令我方下一只出场精灵获得{1}次奇迹之力效果
type Effect1182 struct{ node.EffectNode }
func (e *Effect1182) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().Our == nil || e.Ctx().Our.CurrentPet == nil || e.Ctx().Opp == nil || e.Ctx().Opp.CurrentPet == nil {
return true
}
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Our.CurrentPet.GetHP(),
})
targetHP := e.Args()[0]
if targetHP.Cmp(alpacadecimal.Zero) < 0 {
targetHP = alpacadecimal.Zero
}
if e.Ctx().Opp.CurrentPet.GetHP().Cmp(targetHP) > 0 {
e.Ctx().Opp.CurrentPet.Info.Hp = uint32(targetHP.IntPart())
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1182, int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1182Sub struct {
node.EffectNode
remaining int
active bool
doubled bool
}
func (e *Effect1182Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
e.CanStack(false)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1182Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if e.remaining <= 0 {
e.Alive(false)
return true
}
if current == nil || current.SkillEntity == nil || current.SkillEntity.Category() == info.Category.STATUS {
return true
}
current.SkillEntity.XML.Priority += 1
e.active = true
e.doubled, _, _ = e.Input.Player.Roll(50, 100)
return true
}
func (e *Effect1182Sub) Damage_Mul(zone *info.DamageZone) bool {
if !e.active || !e.doubled || 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
}
func (e *Effect1182Sub) OnSkill() bool {
if !e.active || e.remaining <= 0 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Div(alpacadecimal.NewFromInt(3))
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
}
return true
}
func (e *Effect1182Sub) Action_end() bool {
if e.active {
e.remaining--
e.active = false
e.doubled = false
if e.remaining <= 0 {
e.Alive(false)
}
}
return true
}
func (e *Effect1182Sub) Action_end_ex() bool {
if e.active {
e.remaining--
e.active = false
e.doubled = false
if e.remaining <= 0 {
e.Alive(false)
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1178, &Effect1178{})
input.InitEffect(input.EffectType.Skill, 1179, &Effect1179{})
input.InitEffect(input.EffectType.Sub, 1179, &Effect1179Sub{})
input.InitEffect(input.EffectType.Skill, 1180, &Effect1180{})
input.InitEffect(input.EffectType.Sub, 1180, &Effect1180Sub{})
input.InitEffect(input.EffectType.Skill, 1181, &Effect1181{})
input.InitEffect(input.EffectType.Skill, 1182, &Effect1182{})
input.InitEffect(input.EffectType.Sub, 1182, &Effect1182Sub{})
}

View File

@@ -0,0 +1,203 @@
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 1183: 解除自身能力下降状态,解除成功则自身{0}回合内造成的伤害提高{1}%
type Effect1183 struct{ node.EffectNode }
func (e *Effect1183) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
cleared := false
for i, v := range e.Ctx().Our.Prop[:] {
if v < 0 && e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1183, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1183Sub struct {
node.EffectNode
percent alpacadecimal.Decimal
}
func (e *Effect1183Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
if len(a) > 0 {
e.Duration(a[0])
}
if len(a) > 1 {
e.percent = alpacadecimal.NewFromInt(int64(a[1]))
}
}
func (e *Effect1183Sub) 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(hundred.Add(e.percent)).Div(hundred)
return true
}
// Effect 1184: 激发自身潜能,使用后下{0}回合自身获得奇迹之力效果
type Effect1184 struct{ node.EffectNode }
func (e *Effect1184) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1184, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1184Sub struct {
RoundEffectArg0Base
active bool
doubled bool
}
func (e *Effect1184Sub) 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 += 1
e.active = true
e.doubled, _, _ = e.Input.Player.Roll(50, 100)
return true
}
func (e *Effect1184Sub) Damage_Mul(zone *info.DamageZone) bool {
if !e.active || !e.doubled || 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
}
func (e *Effect1184Sub) OnSkill() bool {
if !e.active {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Div(alpacadecimal.NewFromInt(3))
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
}
return true
}
func (e *Effect1184Sub) Action_end() bool {
e.active = false
e.doubled = false
return true
}
func (e *Effect1184Sub) Action_end_ex() bool {
e.active = false
e.doubled = false
return true
}
// Effect 1185: 消耗自身当前最大体力的1/{0}并使对手受到等量百分比伤害
type Effect1185 struct{ node.EffectNode }
func (e *Effect1185) Skill_Use() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: damage})
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Percent, Damage: damage})
return true
}
// Effect 1186: {0}回合内每回合攻击附加自身双防值总和{1}%的百分比伤害
type Effect1186 struct{ RoundEffectArg0Base }
func (e *Effect1186) OnSkill() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
totalDefense := e.Ctx().Our.GetProp(1).Add(e.Ctx().Our.GetProp(3))
damage := totalDefense.Mul(e.Args()[1]).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
return true
}
// Effect 1187: {0}%令对手{1},未触发则消除对手回合类效果
type Effect1187 struct{ node.EffectNode }
func (e *Effect1187) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
if ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1183, &Effect1183{})
input.InitEffect(input.EffectType.Sub, 1183, &Effect1183Sub{})
input.InitEffect(input.EffectType.Skill, 1184, &Effect1184{})
input.InitEffect(input.EffectType.Sub, 1184, &Effect1184Sub{})
input.InitEffect(input.EffectType.Skill, 1185, &Effect1185{})
input.InitEffect(input.EffectType.Skill, 1186, &Effect1186{})
input.InitEffect(input.EffectType.Skill, 1187, &Effect1187{})
}

View File

@@ -0,0 +1,110 @@
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 1188: {0}回合内自身受到攻击则使对手{1}未触发则吸取对手最大体力的1/{2}
type Effect1188 struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1188) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 3 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || e.triggered {
return true
}
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
e.triggered = true
return true
}
func (e *Effect1188) TurnEnd() {
if !e.triggered && e.Duration() == 1 && len(e.Args()) >= 3 && e.Args()[2].Cmp(alpacadecimal.Zero) > 0 {
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[2])
if damage.Cmp(alpacadecimal.Zero) > 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)
}
}
e.EffectNode.TurnEnd()
}
// Effect 1189: 后出手时吸取对手{0}点体力
type Effect1189 struct{ node.EffectNode }
func (e *Effect1189) Skill_Use() bool {
if len(e.Args()) == 0 || e.IsFirst() {
return true
}
damage := e.Args()[0]
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
return true
}
// Effect 1191: 100%令自身全属性-{0}
type Effect1191 struct{ node.EffectNode }
func (e *Effect1191) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
level := int8(e.Args()[0].IntPart())
for i := range e.Ctx().Our.Prop[:] {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -level)
}
return true
}
// Effect 1192: 将自身能力下降状态反馈给对手,反馈失败则解除自身能力下降状态
type Effect1192 struct{ node.EffectNode }
func (e *Effect1192) Skill_Use() bool {
copied := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), v) {
copied = true
}
}
if copied {
return true
}
for i, v := range e.Ctx().Our.Prop[:] {
if v < 0 {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0)
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1188, &Effect1188{})
input.InitEffect(input.EffectType.Skill, 1189, &Effect1189{})
input.InitEffect(input.EffectType.Skill, 1191, &Effect1191{})
input.InitEffect(input.EffectType.Skill, 1192, &Effect1192{})
}

View File

@@ -0,0 +1,241 @@
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 1193: 当自身血量少于1/2时先制+2
type Effect1193 struct{ node.EffectNode }
func (e *Effect1193) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if e.Ctx().Our.CurrentPet.GetHP().Mul(alpacadecimal.NewFromInt(2)).Cmp(e.Ctx().Our.CurrentPet.GetMaxHP()) >= 0 {
return true
}
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current != nil && current.SkillEntity != nil {
current.SkillEntity.XML.Priority += 2
}
return true
}
// Effect 1194: 反转自身能力下降状态,反转成功则自身{0}回合内免疫能力下降状态
type Effect1194 struct{ node.EffectNode }
func (e *Effect1194) Skill_Use() bool {
reversed := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -2*v) {
reversed = true
}
}
if !reversed || len(e.Args()) == 0 {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect47{}, -1)
return true
}
// Effect 1195: {0}回合内自身受到攻击{1}%使对手{2},若未触发则对手受到{3}点固定伤害
type Effect1195 struct{ RoundEffectArg0Base }
func (e *Effect1195) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 4 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
return true
}
if e.Args()[3].Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[3],
})
}
return true
}
// Effect 1196: {0}回合内每回合{1}%令对手使用的攻击技能无效,未触发则令对手下{2}次使用的属性技能无效
type Effect1196 struct{ node.EffectNode }
func (e *Effect1196) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1196, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1196Sub struct{ RoundEffectArg0Base }
func (e *Effect1196Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100); ok {
e.Ctx().SkillEntity.SetMiss()
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 11961, int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1196StatusLockSub struct {
node.EffectNode
remaining int
}
func (e *Effect1196StatusLockSub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1196StatusLockSub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetNoSide()
e.Ctx().SkillEntity.AttackTime = 0
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1197: 获得{0}点护盾,护盾消失时附加{1}点固定伤害同时使自身下{2}次攻击造成的伤害翻倍
type Effect1197 struct{ node.EffectNode }
func (e *Effect1197) Skill_Use() bool {
if len(e.Args()) < 3 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.AddShield(e.Args()[0])
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1197, int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1197Sub struct{ node.EffectNode }
func (e *Effect1197Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(-1)
}
func (e *Effect1197Sub) 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
}
if e.Args()[0].Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[0],
})
}
boost := e.Ctx().Our.InitEffect(input.EffectType.Sub, 11971, int(e.Args()[1].IntPart()))
if boost != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, boost)
}
e.Alive(false)
return true
}
type Effect1197BoostSub struct {
node.EffectNode
remaining int
}
func (e *Effect1197BoostSub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1197BoostSub) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zone.Damage = zone.Damage.Mul(alpacadecimal.NewFromInt(2))
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1190: 消除对手回合类效果,消除成功对手{0}
type Effect1190 struct{ node.EffectNode }
func (e *Effect1190) Skill_Use() bool {
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
for i, v := range e.SideEffectArgs[:min(len(e.SideEffectArgs), 6)] {
if v == 0 {
continue
}
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), int8(v))
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1193, &Effect1193{})
input.InitEffect(input.EffectType.Skill, 1194, &Effect1194{})
input.InitEffect(input.EffectType.Skill, 1195, &Effect1195{})
input.InitEffect(input.EffectType.Skill, 1196, &Effect1196{})
input.InitEffect(input.EffectType.Sub, 1196, &Effect1196Sub{})
input.InitEffect(input.EffectType.Sub, 11961, &Effect1196StatusLockSub{})
input.InitEffect(input.EffectType.Skill, 1197, &Effect1197{})
input.InitEffect(input.EffectType.Sub, 1197, &Effect1197Sub{})
input.InitEffect(input.EffectType.Sub, 11971, &Effect1197BoostSub{})
}

View File

@@ -0,0 +1,177 @@
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 1198: 对手不处于能力下降状态则造成的伤害提高{0}%
type Effect1198 struct{ node.EffectNode }
func (e *Effect1198) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) == 0 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().Opp.HasPropSub() {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[0])).Div(hundred)
return true
}
// Effect 1199: 吸取对手能力提升状态,吸取成功则对手{0}回合内无法通过自身技能恢复体力
type Effect1199 struct{ node.EffectNode }
func (e *Effect1199) Skill_Use() bool {
absorbed := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if !e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
continue
}
absorbed = true
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
}
if !absorbed || len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 679, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
// Effect 1200: {0}回合内受到攻击则{1}%对手{2},未触发则消除对手回合类效果
type Effect1200 struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1200) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 3 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
e.triggered = true
}
return true
}
func (e *Effect1200) TurnEnd() {
if !e.triggered && e.Duration() == 1 {
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
}
e.EffectNode.TurnEnd()
}
// Effect 1201: 先出手时{0}%使对手{1},未触发则下{2}回合自身先制+{3}
type Effect1201 struct{ node.EffectNode }
func (e *Effect1201) Skill_Use() bool {
if len(e.Args()) < 4 || !e.IsFirst() {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if success {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1201, int(e.Args()[2].IntPart()), int(e.Args()[3].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1201Sub struct{ RoundEffectArg0Base }
func (e *Effect1201Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil || len(e.Args()) < 2 {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
return true
}
// Effect 1202: 造成的伤害低于{0}则自身下{1}次受到的伤害降低{2}点
type Effect1202 struct{ node.EffectNode }
func (e *Effect1202) Skill_Use() bool {
if len(e.Args()) < 3 || e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) >= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1202, int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1202Sub struct {
node.EffectNode
remaining int
reduce int
}
func (e *Effect1202Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
if len(a) > 1 {
e.reduce = a[1]
}
}
func (e *Effect1202Sub) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 || e.reduce <= 0 {
return true
}
reduceDamage := alpacadecimal.NewFromInt(int64(e.reduce))
if zone.Damage.Cmp(reduceDamage) > 0 {
zone.Damage = zone.Damage.Sub(reduceDamage)
} else {
zone.Damage = alpacadecimal.Zero
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1198, &Effect1198{})
input.InitEffect(input.EffectType.Skill, 1199, &Effect1199{})
input.InitEffect(input.EffectType.Skill, 1200, &Effect1200{})
input.InitEffect(input.EffectType.Skill, 1201, &Effect1201{})
input.InitEffect(input.EffectType.Sub, 1201, &Effect1201Sub{})
input.InitEffect(input.EffectType.Skill, 1202, &Effect1202{})
input.InitEffect(input.EffectType.Sub, 1202, &Effect1202Sub{})
}

View File

@@ -0,0 +1,202 @@
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 1203: 造成的伤害低于{0}则自身下{1}次技能先制+{2}
type Effect1203 struct{ node.EffectNode }
func (e *Effect1203) Skill_Use() bool {
if len(e.Args()) < 3 || e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) >= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1203, int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1203Sub struct {
node.EffectNode
remaining int
priority int
}
func (e *Effect1203Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
if len(a) > 1 {
e.priority = a[1]
}
}
func (e *Effect1203Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
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 += e.priority
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1204: 自身下{0}次攻击必定致命一击
type Effect1204 struct{ node.EffectNode }
func (e *Effect1204) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1204, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1204Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1204Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1204Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1205: 后出手时自身全属性+{0}
type Effect1205 struct{ node.EffectNode }
func (e *Effect1205) Skill_Use() bool {
if len(e.Args()) == 0 || e.IsFirst() {
return true
}
applyAllPropUp(e.Ctx().Our, int8(e.Args()[0].IntPart()))
return true
}
// Effect 1206: 附加自身最大体力{0}%的百分比伤害,每次使用增加{1}%,最高{2}%
type Effect1206 struct {
node.EffectNode
bonus int
}
func (e *Effect1206) OnSkill() bool {
if len(e.Args()) < 3 {
return true
}
percent := int(e.Args()[0].IntPart()) + e.bonus
maxPercent := int(e.Args()[2].IntPart())
if percent > maxPercent {
percent = maxPercent
}
if percent <= 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Mul(alpacadecimal.NewFromInt(int64(percent))).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
e.bonus += int(e.Args()[1].IntPart())
return true
}
// Effect 1207: 双倍吸取对手能力提升状态,吸取成功则使对手下{0}回合先制-{1}
type Effect1207 struct{ node.EffectNode }
func (e *Effect1207) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
absorbed := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if !e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
continue
}
absorbed = true
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v*2)
}
if !absorbed {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1207, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1207Sub struct{ RoundEffectArg0Base }
func (e *Effect1207Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil || len(e.Args()) < 2 {
return true
}
current.SkillEntity.XML.Priority -= int(e.Args()[1].IntPart())
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1203, &Effect1203{})
input.InitEffect(input.EffectType.Sub, 1203, &Effect1203Sub{})
input.InitEffect(input.EffectType.Skill, 1204, &Effect1204{})
input.InitEffect(input.EffectType.Sub, 1204, &Effect1204Sub{})
input.InitEffect(input.EffectType.Skill, 1205, &Effect1205{})
input.InitEffect(input.EffectType.Skill, 1206, &Effect1206{})
input.InitEffect(input.EffectType.Skill, 1207, &Effect1207{})
input.InitEffect(input.EffectType.Sub, 1207, &Effect1207Sub{})
}

View File

@@ -0,0 +1,241 @@
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 1208: 反转自身能力下降状态,反转成功则令对手下{0}次使用的攻击技能无效
type Effect1208 struct{ node.EffectNode }
func (e *Effect1208) Skill_Use() bool {
reversed := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -2*v) {
reversed = true
}
}
if !reversed || len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1208, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1208Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1208Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1208Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1209: 消除双方能力上升、下降状态,消除成功则附加消除总段数乘以{0}的固定伤害
type Effect1209 struct{ node.EffectNode }
func (e *Effect1209) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
clearedStages := clearAllPropsAndCount(e.Ctx().Our, e.Ctx().Opp)
if clearedStages <= 0 {
return true
}
damage := e.Args()[0].Mul(alpacadecimal.NewFromInt(int64(clearedStages)))
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
}
return true
}
// Effect 1210: {0}%使对手{1},自身体力低于对手时概率翻倍
type Effect1210 struct{ node.EffectNode }
func (e *Effect1210) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
chance := int(e.Args()[0].IntPart())
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) < 0 {
chance *= 2
}
if chance > 100 {
chance = 100
}
if ok, _, _ := e.Input.Player.Roll(chance, 100); ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
}
return true
}
// Effect 1211: 消除双方能力提升状态及能力下降状态,消除任意一方成功则为自身附加{0}点护盾
type Effect1211 struct{ node.EffectNode }
func (e *Effect1211) Skill_Use() bool {
if clearAllPropsAndCount(e.Ctx().Our, e.Ctx().Opp) <= 0 || len(e.Args()) == 0 {
return true
}
if e.Args()[0].Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Our.AddShield(e.Args()[0])
}
return true
}
// Effect 1212: 消耗自身全部体力,使己方下只出战精灵令对手下{0}次使用的攻击技能无效且{1}回合内造成的攻击伤害额外提升{2}%
type Effect1212 struct{ node.EffectNode }
func (e *Effect1212) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Our.CurrentPet.GetHP(),
})
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1212, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1212Sub struct{ node.EffectNode }
func (e *Effect1212Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(1)
}
func (e *Effect1212Sub) SwitchIn(in *input.Input) bool {
if in != e.Ctx().Our || len(e.Args()) < 3 {
return true
}
lockSub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 12121, int(e.Args()[0].IntPart()))
if lockSub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, lockSub)
}
damageSub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 12122, int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
if damageSub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, damageSub)
}
e.Alive(false)
return true
}
type Effect1212LockSub struct {
node.EffectNode
remaining int
}
func (e *Effect1212LockSub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1212LockSub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
type Effect1212DamageSub struct{ RoundEffectArg0Base }
func (e *Effect1212DamageSub) 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
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[1])).Div(hundred)
return true
}
func clearAllPropsAndCount(owner, target *input.Input) int {
total := 0
for _, current := range []*input.Input{owner, target} {
for i, v := range current.Prop[:] {
if v == 0 {
continue
}
if !current.SetProp(owner, int8(i), 0) {
continue
}
if v > 0 {
total += int(v)
} else {
total += int(-v)
}
}
}
return total
}
func init() {
input.InitEffect(input.EffectType.Skill, 1208, &Effect1208{})
input.InitEffect(input.EffectType.Sub, 1208, &Effect1208Sub{})
input.InitEffect(input.EffectType.Skill, 1209, &Effect1209{})
input.InitEffect(input.EffectType.Skill, 1210, &Effect1210{})
input.InitEffect(input.EffectType.Skill, 1211, &Effect1211{})
input.InitEffect(input.EffectType.Skill, 1212, &Effect1212{})
input.InitEffect(input.EffectType.Sub, 1212, &Effect1212Sub{})
input.InitEffect(input.EffectType.Sub, 12121, &Effect1212LockSub{})
input.InitEffect(input.EffectType.Sub, 12122, &Effect1212DamageSub{})
}

View File

@@ -0,0 +1,180 @@
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 1313: 命中后使对手受到{0}点固定伤害,未命中则自身死亡,同时使对手下次施放的技能无效(包括必中技能)
type Effect1313 struct{ node.EffectNode }
func (e *Effect1313) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.AttackTime == 0 {
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Our.CurrentPet.GetHP(),
})
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1313, 1)
if sub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
}
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[0],
})
return true
}
type Effect1313Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1313Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1313Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1314: 令自身下{0}次受到的攻击伤害转化为体力
type Effect1314 struct{ node.EffectNode }
func (e *Effect1314) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1314, int(e.Args()[0].IntPart()))
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1314Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1314Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1314Sub) DamageLockEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := zone.Damage
zone.Damage = alpacadecimal.Zero
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1315: {0}%的概率打出致命一击
type Effect1315 struct{ node.EffectNode }
func (e *Effect1315) SkillHit() bool {
if len(e.Args()) == 0 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if ok {
e.Ctx().SkillEntity.XML.CritRate = 16
}
return true
}
// Effect 1316: 先出手时令自身随机{0}项属性+{1}
type Effect1316 struct{ node.EffectNode }
func (e *Effect1316) Skill_Use() bool {
if len(e.Args()) < 2 || !e.IsFirst() {
return true
}
count := int(e.Args()[0].IntPart())
if count <= 0 {
return true
}
level := int8(e.Args()[1].IntPart())
if level <= 0 {
return true
}
indexes := grand.Perm(6)
if count > len(indexes) {
count = len(indexes)
}
for _, idx := range indexes[:count] {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(idx), level)
}
return true
}
// Effect 1317: 后出手时恢复自身最大体力的1/{0}
type Effect1317 struct{ node.EffectNode }
func (e *Effect1317) Skill_Use() bool {
if len(e.Args()) == 0 || e.IsFirst() || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if heal.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1313, &Effect1313{})
input.InitEffect(input.EffectType.Sub, 1313, &Effect1313Sub{})
input.InitEffect(input.EffectType.Skill, 1314, &Effect1314{})
input.InitEffect(input.EffectType.Sub, 1314, &Effect1314Sub{})
input.InitEffect(input.EffectType.Skill, 1315, &Effect1315{})
input.InitEffect(input.EffectType.Skill, 1316, &Effect1316{})
input.InitEffect(input.EffectType.Skill, 1317, &Effect1317{})
}

View File

@@ -0,0 +1,198 @@
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 1318: {0}%的概率秒杀对手,未触发则令对手全属性-{1}
type Effect1318 struct {
node.EffectNode
success bool
}
func (e *Effect1318) DamageFloor(zone *info.DamageZone) bool {
e.success = false
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 || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if !ok {
return true
}
zone.Damage = e.Ctx().Opp.CurrentPet.GetMaxHP()
e.success = true
return true
}
func (e *Effect1318) Skill_Use() bool {
if e.success || len(e.Args()) < 2 {
return true
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[1].IntPart()))
return true
}
// Effect 1319: 自身下次被击败后下一只出场的精灵{0}
type Effect1319 struct{ node.EffectNode }
func (e *Effect1319) Skill_Use() bool {
if len(e.Args()) < 6 {
return true
}
sub := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
1319,
int(e.Args()[0].IntPart()),
int(e.Args()[1].IntPart()),
int(e.Args()[2].IntPart()),
int(e.Args()[3].IntPart()),
int(e.Args()[4].IntPart()),
int(e.Args()[5].IntPart()),
)
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1319Sub struct {
node.EffectNode
pending bool
}
func (e *Effect1319Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(-1)
}
func (e *Effect1319Sub) SwitchOut(in *input.Input) bool {
if in != e.Ctx().Our || e.Ctx().Our == nil || e.Ctx().Our.CurrentPet == nil || e.Ctx().Our.CurrentPet.Alive() {
return true
}
e.pending = true
return true
}
func (e *Effect1319Sub) SwitchIn(in *input.Input) bool {
if !e.pending || in != e.Ctx().Our || len(e.Args()) < 6 {
return true
}
changes := make([]int, 6)
for i := 0; i < 6; i++ {
changes[i] = int(e.Args()[i].IntPart())
}
applyEffectPropChanges(e.Ctx().Our, e.Ctx().Our, changes, false)
e.Alive(false)
return true
}
// Effect 1320: {0}回合内若对手攻击MISS则回合结束时吸取对手最大体力的1/{1}
type Effect1320 struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1320) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().SkillEntity.AttackTime != 0 {
return true
}
e.triggered = true
return true
}
func (e *Effect1320) TurnEnd() {
if e.triggered && len(e.Args()) >= 2 && e.Args()[1].Cmp(alpacadecimal.Zero) > 0 {
drain := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if drain.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: drain,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, drain)
}
}
e.triggered = false
e.EffectNode.TurnEnd()
}
// Effect 1321: 解除自身能力下降状态并消除对手提升状态,消除任意一项成功则{0}%对手{1}
type Effect1321 struct{ node.EffectNode }
func (e *Effect1321) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
changed := false
for i, v := range e.Ctx().Our.Prop[:] {
if v < 0 && e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
changed = true
}
}
if clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
changed = true
}
if !changed {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
}
return true
}
// Effect 1322: {0}回合内受到攻击则{1}%使对手进入{2},未触发则使对手全属性-{3}
type Effect1322 struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1322) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 4 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if ok {
applyStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
e.triggered = true
}
return true
}
func (e *Effect1322) TurnEnd() {
if !e.triggered && e.Duration() == 1 && len(e.Args()) >= 4 {
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[3].IntPart()))
}
e.EffectNode.TurnEnd()
}
func init() {
input.InitEffect(input.EffectType.Skill, 1318, &Effect1318{})
input.InitEffect(input.EffectType.Skill, 1319, &Effect1319{})
input.InitEffect(input.EffectType.Sub, 1319, &Effect1319Sub{})
input.InitEffect(input.EffectType.Skill, 1320, &Effect1320{})
input.InitEffect(input.EffectType.Skill, 1321, &Effect1321{})
input.InitEffect(input.EffectType.Skill, 1322, &Effect1322{})
}

View File

@@ -0,0 +1,117 @@
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 1323: 造成伤害的{0}%恢复自身体力,若打出致命一击则附加恢复体力值等量的百分比伤害
type Effect1323 struct{ node.EffectNode }
func (e *Effect1323) Skill_Use() bool {
if len(e.Args()) == 0 || e.Ctx().Our.SumDamage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
heal := e.Ctx().Our.SumDamage.Mul(e.Args()[0]).Div(hundred)
if heal.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Crit != 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Percent, Damage: heal})
}
return true
}
// Effect 1324: 消耗自身全部体力使对手受到等同于自身最大体力1/1的百分比伤害且3回合内对手无法通过技能恢复自身体力
type Effect1324 struct{ node.EffectNode }
func (e *Effect1324) Skill_Use() bool {
if e.Ctx().Our.CurrentPet == nil || e.Ctx().Opp.CurrentPet == nil {
return true
}
selfHP := e.Ctx().Our.CurrentPet.GetHP()
if selfHP.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed, Damage: selfHP})
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP()
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Percent, Damage: damage})
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 679, 3)
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
// Effect 1325: 对手不处于能力下降状态则必定打出致命一击
type Effect1325 struct{ node.EffectNode }
func (e *Effect1325) SkillHit() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().Opp.HasPropSub() {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
// Effect 1326: 全属性+{0},自身处于护盾状态时强化效果翻倍
type Effect1326 struct{ node.EffectNode }
func (e *Effect1326) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
boost := int8(e.Args()[0].IntPart())
if e.Ctx().Our.HasShield() {
boost *= 2
}
for i := range e.Ctx().Our.Prop[:] {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boost)
}
return true
}
// Effect 1327: 造成的伤害低于{0}则吸取对手最大体力的1/{1}并为自身附加等量的护盾
type Effect1327 struct{ node.EffectNode }
func (e *Effect1327) Skill_Use() bool {
if len(e.Args()) < 2 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) >= 0 {
return true
}
drain := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if drain.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Percent, Damage: drain})
e.Ctx().Our.AddShield(drain)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1323, &Effect1323{})
input.InitEffect(input.EffectType.Skill, 1324, &Effect1324{})
input.InitEffect(input.EffectType.Skill, 1325, &Effect1325{})
input.InitEffect(input.EffectType.Skill, 1326, &Effect1326{})
input.InitEffect(input.EffectType.Skill, 1327, &Effect1327{})
}

View File

@@ -0,0 +1,227 @@
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"
)
func applyEvilDragonBite(owner *input.Input) {
if owner == nil || owner.CurrentPet == nil || owner.Opp == nil || owner.Opp.CurrentPet == nil {
return
}
damage := alpacadecimal.NewFromInt(int64(randomInRange(150, 300)))
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return
}
owner.Opp.Damage(owner, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
owner.Heal(owner, &action.SelectSkillAction{}, damage)
}
func addEvilDragonBiteSub(owner *input.Input, count int) {
if owner == nil || count <= 0 {
return
}
effect := owner.InitEffect(input.EffectType.Sub, 1330, count)
if effect != nil {
owner.AddEffect(owner, effect)
}
}
// Effect 1328: {0}%的概率造成{1}倍伤害,每次使用概率增加{2}%,最高概率{3}%
type Effect1328 struct {
node.EffectNode
useCount int
trigger bool
}
func (e *Effect1328) ActionStart(a, b *action.SelectSkillAction) bool {
e.trigger = false
if len(e.Args()) < 4 || e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
chance := int(e.Args()[0].IntPart()) + e.useCount*int(e.Args()[2].IntPart())
maxChance := int(e.Args()[3].IntPart())
if chance > maxChance {
chance = maxChance
}
ok, _, _ := e.Input.Player.Roll(chance, 100)
e.trigger = ok
e.useCount++
return true
}
func (e *Effect1328) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || !e.trigger || len(e.Args()) < 2 {
return true
}
zone.Damage = zone.Damage.Mul(e.Args()[1])
return true
}
// Effect 1329: {0}回合内对手使用攻击技能则自身下{1}次攻击技能必定触发邪龙之噬
type Effect1329 struct{ node.EffectNode }
func (e *Effect1329) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1329, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1329Sub struct{ RoundEffectArg0Base }
func (e *Effect1329Sub) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
addEvilDragonBiteSub(e.Ctx().Our, int(e.Args()[1].IntPart()))
return true
}
// Effect 1330: 使自身下{0}次攻击技能必定触发邪龙之噬
type Effect1330 struct{ node.EffectNode }
func (e *Effect1330) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
addEvilDragonBiteSub(e.Ctx().Our, int(e.Args()[0].IntPart()))
return true
}
type Effect1330Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1330Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1330Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
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 += 1
return true
}
func (e *Effect1330Sub) Skill_Use() bool {
if e.Ctx().SkillEntity == nil || e.remaining <= 0 {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().SkillEntity.AttackTime != 0 {
applyEvilDragonBite(e.Ctx().Our)
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1331: 击败对手则令对手下一只出场的精灵{0},且使自身下{1}次攻击技能必定触发邪龙之噬
type Effect1331 struct{ node.EffectNode }
func (e *Effect1331) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().Opp.CurrentPet == nil || e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
return true
}
statusSub := e.Ctx().Opp.InitEffect(input.EffectType.Sub, 1331, int(e.Args()[0].IntPart()))
if statusSub != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusSub)
}
addEvilDragonBiteSub(e.Ctx().Our, int(e.Args()[1].IntPart()))
return true
}
type Effect1331Sub struct{ node.EffectNode }
func (e *Effect1331Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(1)
}
func (e *Effect1331Sub) SwitchIn(in *input.Input) bool {
if in != e.Ctx().Our || len(e.Args()) == 0 {
return true
}
applyStatusByID(e.Ctx().Opp, e.Ctx().Our, int(e.Args()[0].IntPart()))
e.Alive(false)
return true
}
// Effect 1332: 消除对手回合类效果,消除成功则随机附加{0}种异常状态
type Effect1332 struct{ node.EffectNode }
func (e *Effect1332) 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
}
addRandomStatuses1116(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1328, &Effect1328{})
input.InitEffect(input.EffectType.Skill, 1329, &Effect1329{})
input.InitEffect(input.EffectType.Sub, 1329, &Effect1329Sub{})
input.InitEffect(input.EffectType.Skill, 1330, &Effect1330{})
input.InitEffect(input.EffectType.Sub, 1330, &Effect1330Sub{})
input.InitEffect(input.EffectType.Skill, 1331, &Effect1331{})
input.InitEffect(input.EffectType.Sub, 1331, &Effect1331Sub{})
input.InitEffect(input.EffectType.Skill, 1332, &Effect1332{})
}

View File

@@ -0,0 +1,175 @@
package effect
import (
"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 1333: 自身处于能力提升状态时{0}%使对手进入{1}状态
type Effect1333 struct{ node.EffectNode }
func (e *Effect1333) OnSkill() bool {
if len(e.Args()) < 2 || !e.Ctx().Our.HasPropADD() {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if ok {
addStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
}
return true
}
// Effect 1334: 造成的伤害低于{0}则使{1}%对手进入{2}状态,未触发则下{3}次自身技能{4}%使对手进入{5}状态
type Effect1334 struct{ node.EffectNode }
func (e *Effect1334) Skill_Use() bool {
if len(e.Args()) < 6 {
return true
}
triggered := false
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) < 0 {
ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if ok {
triggered = addStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
}
}
if triggered {
return true
}
sub := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
1334,
int(e.Args()[3].IntPart()),
int(e.Args()[4].IntPart()),
int(e.Args()[5].IntPart()),
)
if sub != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
}
return true
}
type Effect1334Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1334Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1334Sub) Skill_Use() bool {
if e.Ctx().SkillEntity == nil || e.remaining <= 0 || len(e.Args()) < 3 {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if ok {
addStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1335: {0}%令对手{1},未触发则随机吸取对手{2}项属性-{3},并将该属性附加给自己
type Effect1335 struct{ node.EffectNode }
func (e *Effect1335) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if ok {
addStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
count := int(e.Args()[2].IntPart())
level := int8(e.Args()[3].IntPart())
if count <= 0 || level <= 0 {
return true
}
if count > 6 {
count = 6
}
applied := 0
for _, idx := range grand.Perm(6) {
prop := int8(idx)
if !e.Ctx().Opp.SetProp(e.Ctx().Our, prop, -level) {
continue
}
e.Ctx().Our.SetProp(e.Ctx().Our, prop, level)
applied++
if applied >= count {
break
}
}
return true
}
// Effect 1336: {0}回合内每回合使用技能附加自身最大体力值与攻击值总和{1}%的百分比伤害
type Effect1336 struct{ RoundEffectArg0Base }
func (e *Effect1336) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
base := e.Ctx().Our.CurrentPet.GetMaxHP().Add(e.Ctx().Our.GetProp(0))
damage := base.Mul(e.Args()[1]).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
// Effect 1337: 自身体力高于对手则{0}%令对手{1},未触发{2}则消除对手回合类效果
type Effect1337 struct{ node.EffectNode }
func (e *Effect1337) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) > 0 {
ok, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if ok && addStatusByID(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart())) {
return true
}
}
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1333, &Effect1333{})
input.InitEffect(input.EffectType.Skill, 1334, &Effect1334{})
input.InitEffect(input.EffectType.Sub, 1334, &Effect1334Sub{})
input.InitEffect(input.EffectType.Skill, 1335, &Effect1335{})
input.InitEffect(input.EffectType.Skill, 1336, &Effect1336{})
input.InitEffect(input.EffectType.Skill, 1337, &Effect1337{})
}

View File

@@ -631,6 +631,21 @@ var effectInfoByID = map[int]string{
1079: "命中后{0}%令对手{1},未触发则下{2}回合自身攻击技能先制+{3}",
1080: "连续使用时先制+1",
1081: "若对手处于能力提升状态则先制+1",
1082: "造成的伤害低于{0}则附加自身最大体力{1}%的百分比伤害",
1083: "若后出手则消除对手回合类效果",
1084: "附加{0}点固定伤害,对手处于异常状态时固定伤害翻倍",
1085: "{0}回合内受到的伤害低于{1}则附加{2}点固定伤害",
1086: "自身体力低于对手时造成的伤害提高{0}%",
1087: "反转自身能力下降状态,反转成功则对手下{0}回合技能无效",
1088: "造成的攻击伤害高于{0}则吸取对手最大体力的1/{1}",
1089: "{0}回合内对手使用攻击技能后随机附加给对手{1}种异常状态",
1090: "击败对手则{0}回合内令对手攻击技能无法造成伤害且命中效果失效",
1091: "未击败对手则自身下{0}回合免疫并反弹异常状态",
1092: "后出手时使对手{0}未触发则附加自身当前体力1/{1}的百分比伤害",
1093: "出手时若自身体力低于对手则恢复自身最大体力的1/{0}",
1094: "消除对手回合类效果消除成功则令对手随机2项技能PP值归零消除对手能力提升状态消除成功则令自身下2回合使用技能触发星皇之怒的概率提升20%;技能结束后对手体力值高于0则50%进行一次额外行动以触发星皇之怒星皇之怒若对手不处于能力提升状态则附加对手最大体力1/3的百分比伤害",
1095: "3回合内若对手使用属性技能则命中前令对手所有技能随机降低1-3点PP值3回合内若对手使用攻击技能则使用后受到对手最大体力1/3的百分比伤害己方免疫下2次受到的异常状态;技能结束后对手体力值高于0则50%进行一次额外行动以触发星皇之怒星皇之怒令自身2回合内回合类效果无法被消除后出手则延续至下2回合下2回合自身所有技能先制+2",
1096: "全属性+1自身当前体力低于最大体力的1/2时强化效果翻倍4回合内每回合使用技能吸取对手最大体力的1/3吸取体力时若自身体力低于最大体力的1/2则吸取效果翻倍自身下2次使用技能触发星皇之怒的概率翻倍;技能结束后对手体力值高于0则50%进行一次额外行动以触发星皇之怒星皇之怒下2回合自身造成的攻击伤害翻倍下2次自身受到的攻击伤害额外减少50%",
1097: "造成的攻击伤害若低于280则令对手疲惫未击败对手则令对手下1回合使用的攻击技能无效;技能结束后对手体力值高于0则50%进行一次额外行动以触发星皇之怒星皇之怒50%令对手失明未触发则2回合内令对手使用的属性技能无效",
1098: "致命一击率提升20%每次使用增加20%最高100%打出致命一击后令自身下2次技能触发的星皇之怒威力不再减少;技能结束后对手体力值高于0则50%进行一次额外行动以触发星皇之怒星皇之怒下2次自身使用的攻击技能先制+2",
1099: "消除对手能力提升状态,消除成功则自身免疫下{0}次受到的异常状态",
@@ -646,7 +661,102 @@ var effectInfoByID = map[int]string{
1109: "{0}回合内若自身能力提升状态被消除则吸取对手最大体力的1/{1}",
1110: "反转对手能力提升状态,反转成功则令对手下{0}次属性技能失效,反转失败则消除对手能力提升状态",
1111: "{0}%令对手{1},未触发则{2}回合内自身造成的攻击伤害额外提升{3}%",
1112: "先出手时随机附加{0}种控制类异常状态",
1113: "技能命中后消除自身能力提升状态",
1114: "消除对手回合类效果,消除成功则令对手随机{0}项技能PP值归零",
1115: "解除自身能力下降状态,解除成功则令对手下{0}次使用的攻击技能无效",
1116: "随机附加{0}种异常状态,未触发则消除对手回合类效果",
1117: "若自身体力低于最大体力的1/2则先制+2",
1118: "{0}回合内对手若使用攻击技能则{1}%{2},若使用属性技能则全属性-{3}",
1119: "消除双方能力提升状态,消除任意一方成功则使自身下{0}回合先制+{1}",
1120: "造成的伤害低于{0}则为自身附加{1}点护盾",
1121: "下{0}次受到的固定伤害和百分比伤害减少{1}%",
1122: "使对手全属性-{0},未触发则对手{1}",
1123: "吸取对手能力提升状态,吸取成功则下{0}回合自身所有技能先制+{1}",
1124: "消除对手回合类效果,消除成功则自身下{0}回合造成的攻击伤害额外提升{1}%",
1125: "{0}回合内对手所有攻击必定Miss若对手命中则下{1}回合对手使用属性技能无效",
1126: "使对手随机{0}项技能PP值归零若当回合受到攻击则额外使对手随机{1}项技能PP值归零",
1127: "吸取对手能力提升状态,若对手不处于能力提升状态则使对手全属性-{0}",
1128: "击败对手则令对手下{0}次使用的攻击技能无效",
1129: "{0}%概率伤害为{1}倍,自身处于能力提升状态时概率翻倍",
1130: "使对手全属性-{0},自身体力低于对手时弱化效果翻倍",
1131: "随机附加{0}-{1}点固定伤害,自身处于能力提升状态时变为{2}-{3}点固定伤害",
1132: "随机恢复自身{0}-{1}点体力,自身不处于能力提升状态时变为{2}-{3}点体力",
1133: "对手每有{0}项能力等级与自身相同则附加{1}点固定伤害",
1134: "将自身能力下降状态反馈给对手,反馈失败则令自身全属性+{0}",
1135: "若自身当前体力低于最大体力的1/{0}则恢复自身全部体力并造成等量固定伤害",
1136: "自身体力高于1/{0}时附加自身当前体力1/{1}的百分比伤害",
1137: "自身体力低于1/{0}时吸取对手最大体力的1/{1}",
1138: "消除对手回合类效果,消除成功则{0}%令对手{1},未触发则{2}%令对手{3}",
1139: "消除敌我双方回合类效果并同时进入{0}回合{1},自身{2}状态解除后则恢复自身所有体力",
1140: "{0}回合内对手使用攻击技能则{1}",
1141: "1回合做{0}~{1}次攻击,每次攻击{2}%令对手{3},攻击低于{4}次则每次攻击{5}%令对手{6}",
1142: "回合结束时将自身当前体力降低为{0},并附加本次降低体力值{1}%的百分比伤害",
1143: "对手处于异常状态时附加{0}点固定伤害,不处于异常状态则下{1}回合使对手随机进入烧伤、冻伤、冰封、焚烬中的{2}种异常状态",
1144: "附加{0}~{1}点固定伤害并恢复等量体力",
1145: "令双方全属性+{0}",
1146: "双方每处于{0}种能力提升状态则附加{1}点固定伤害",
1147: "未击败对手则消除对手能力提升状态",
1148: "随机吸取对手{0}-{1}点体力",
1149: "若先出手则将本回合受到的攻击伤害{0}%反馈给对手双方同时死亡时对手残留1点体力",
1150: "消除对手能力上升状态,消除成功对手{0}",
1151: "{0}回合内若对手使用攻击技能则自身全属性+{1}",
1152: "自身不处于能力提升状态则造成的伤害提升{0}%",
1153: "解除自身能力下降状态,解除成功则自身下{0}回合受到的伤害减少{1}点",
1154: "{0}回合内使用技能附加{1}点固定伤害,若自身体力低于对手则效果翻倍",
1155: "附加自身最大体力值{0}%的百分比伤害,连续使用每次增加{1}%,最高{2}%",
1156: "击败对手则恢复自身全部体力和所有技能PP值",
1157: "消除双方能力提升、下降状态,消除任意一方成功则使对手下{0}次施放的技能无效(包括必中技能)",
1158: "自身每处于{0}种能力提升状态则附加{1}点固定伤害,遇到天敌时效果翻倍",
1159: "吸取对手能力提升状态,吸取成功则自身免疫下{0}次受到的异常状态",
1160: "获得{0}点护盾,护盾消失时吸取对手{1}点体力且令对手随机{2}个技能的PP值归零",
1161: "{0}回合内若对手恢复体力则自身恢复等量体力的{1}%",
1162: "{0}回合内每回合都有{1}%概率令对手{2},未触发则下{4}次受到的伤害减少{5}点",
1163: "附加自身特攻值与速度值总和{0}%的百分比伤害,每次使用增加{1}%,最高{2}%",
1164: "反转对手能力提升状态,若该效果未满足条件或反转失败则消除对手能力提升状态和回合类效果",
1165: "{0}回合内若对手使用攻击技能,则使用攻击技能后的下{1}回合属性技能命中效果失效",
1166: "解除自身能力下降效果,解除成功则下{0}回合先制+{1}",
1167: "解除自身能力下降状态,解除成功则恢复自身所有体力",
1168: "全属性+{0},双方任意一方处于异常状态则强化效果翻倍",
1169: "若自身处于异常状态则造成的攻击伤害额外提升{0}%且回合结束后解除自身所有异常状态",
1170: "消除对手能力提升状态,消除成功则附加{0}点固定伤害",
1171: "未击败对手则使自身下{0}回合受到的伤害减少{1}点",
1172: "{0}回合做{1}~{2}次攻击,每次攻击都有{3}%的概率令自身{4}",
1178: "自身不处于能力提升状态则造成的伤害翻倍",
1179: "消除对手回合类效果,消除成功则自身下{0}次攻击技能造成的伤害额外提升{1}%",
1180: "吸取对手能力提升状态,吸取成功则自身下{0}回合必定致命一击",
1181: "{0}回合内每回合使用技能{1}%令对手{2},未触发则令对手全属性-{3}",
1182: "牺牲自己进行自爆,将对手体力降为{0}点,令我方下一只出场精灵获得{1}次奇迹之力效果",
1183: "解除自身能力下降状态,解除成功则自身{0}回合内造成的伤害提高{1}%",
1184: "激发自身潜能,使用后下{0}回合自身获得奇迹之力效果",
1185: "消耗自身当前最大体力的1/{0}并使对手受到等量百分比伤害",
1186: "{0}回合内每回合攻击附加自身双防值总和{1}%的百分比伤害",
1187: "{0}%令对手{1},未触发则消除对手回合类效果",
1188: "{0}回合内自身受到攻击则使对手{1}未触发则吸取对手最大体力的1/{2}",
1189: "后出手时吸取对手{0}点体力",
1190: "消除对手回合类效果,消除成功对手{0}",
1191: "100%令自身全属性-{0}",
1192: "将自身能力下降状态反馈给对手,反馈失败则解除自身能力下降状态",
1193: "当自身血量少于1/2时先制+2",
1194: "反转自身能力下降状态,反转成功则自身{0}回合内免疫能力下降状态",
1195: "{0}回合内自身受到攻击{1}%使对手{2},若未触发则对手受到{3}点固定伤害",
1196: "{0}回合内每回合{1}%令对手使用的攻击技能无效,未触发则令对手下{2}次使用的属性技能无效",
1197: "获得{0}点护盾,护盾消失时附加{1}点固定伤害同时使自身下{2}次攻击造成的伤害翻倍",
1198: "对手不处于能力下降状态则造成的伤害提高{0}%",
1199: "吸取对手能力提升状态,吸取成功则对手{0}回合内无法通过自身技能恢复体力",
1200: "{0}回合内受到攻击则{1}%对手{2},未触发则消除对手回合类效果",
1201: "先出手时{0}%使对手{1},未触发则下{2}回合自身先制+{3}",
1202: "造成的伤害低于{0}则自身下{1}次受到的伤害降低{2}点",
1203: "造成的伤害低于{0}则自身下{1}次技能先制+{2}",
1204: "自身下{0}次攻击必定致命一击",
1205: "后出手时自身全属性+{0}",
1206: "附加自身最大体力{0}%的百分比伤害,每次使用增加{1}%,最高{2}%",
1207: "双倍吸取对手能力提升状态,吸取成功则使对手下{0}回合先制-{1}",
1208: "反转自身能力下降状态,反转成功则令对手下{0}次使用的攻击技能无效",
1209: "消除双方能力上升、下降状态,消除成功则附加消除总段数乘以{0}的固定伤害",
1210: "{0}%使对手{1},自身体力低于对手时概率翻倍",
1211: "消除双方能力提升状态及能力下降状态,消除任意一方成功则为自身附加{0}点护盾",
1212: "消耗自身全部体力,使己方下只出战精灵令对手下{0}次使用的攻击技能无效且{1}回合内造成的攻击伤害额外提升{2}%",
1173: "未击败对手则回合结束后附加对手最大体力1/{0}的百分比伤害自身体力为0时也可触发",
1174: "若自身处于能力提升状态则先制+2",
1175: "获得{0}点护盾护盾消失时恢复自身最大体力的1/{1}",
@@ -752,6 +862,31 @@ var effectInfoByID = map[int]string{
1310: "吸取对手能力提升状态,吸取成功则自身下{0}回合必定先出手",
1311: "{0}回合内对手使用属性技能则对手全属性-{1}",
1312: "解除自身能力下降状态,解除成功则自身下{0}回合先制+{1}",
1313: "命中后使对手受到{0}点固定伤害,未命中则自身死亡,同时使对手下次施放的技能无效(包括必中技能)",
1314: "令自身下{0}次受到的攻击伤害转化为体力",
1315: "{0}%的概率打出致命一击",
1316: "先出手时令自身随机{0}项属性+{1}",
1317: "后出手时恢复自身最大体力的1/{0}",
1318: "{0}%的概率秒杀对手,未触发则令对手全属性-{1}",
1319: "自身下次被击败后下一只出场的精灵{0}",
1320: "{0}回合内若对手攻击MISS则回合结束时吸取对手最大体力的1/{1}",
1321: "解除自身能力下降状态并消除对手提升状态,消除任意一项成功则{0}%对手{1}",
1322: "{0}回合内受到攻击则{1}%使对手进入{2},未触发则使对手全属性-{3}",
1323: "造成伤害的{0}%恢复自身体力,若打出致命一击则附加恢复体力值等量的百分比伤害",
1324: "消耗自身全部体力使对手受到等同于自身最大体力1/1的百分比伤害且3回合内对手无法通过技能恢复自身体力",
1325: "对手不处于能力下降状态则必定打出致命一击",
1326: "全属性+{0},自身处于护盾状态时强化效果翻倍",
1327: "造成的伤害低于{0}则吸取对手最大体力的1/{1}并为自身附加等量的护盾",
1328: "{0}%的概率造成{1}倍伤害,每次使用概率增加{2}%,最高概率{3}%",
1329: "{0}回合内对手使用攻击技能则自身下{1}次攻击技能必定触发邪龙之噬",
1330: "使自身下{0}次攻击技能必定触发邪龙之噬",
1331: "击败对手则令对手下一只出场的精灵{0},且使自身下{1}次攻击技能必定触发邪龙之噬",
1332: "消除对手回合类效果,消除成功则随机附加{0}种异常状态",
1333: "自身处于能力提升状态时{0}%使对手进入{1}状态",
1334: "造成的伤害低于{0}则使{1}%对手进入{2}状态,未触发则下{3}次自身技能{4}%使对手进入{5}状态",
1335: "{0}%令对手{1},未触发则随机吸取对手{2}项属性-{3},并将该属性附加给自己",
1336: "{0}回合内每回合使用技能附加自身最大体力值与攻击值总和{1}%的百分比伤害",
1337: "自身体力高于对手则{0}%令对手{1},未触发{2}则消除对手回合类效果",
1393: "{0}回合内每回合使用技能则造成伤害前令对手防御-{1}、速度-{2}未触发则附加对手最大体力1/{3}的百分比伤害",
1394: "{0}回合内对手使用属性技能则随机进入{1}种异常状态",
1395: "若先出手则必定打出致命一击",