741 lines
19 KiB
Go
741 lines
19 KiB
Go
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 956: 未击败对手则下回合使用技能后附加{0}点固定伤害,遇到天敌时附加的固定伤害翻倍
|
||
type Effect956 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect956) Skill_Use() bool {
|
||
if len(e.Args()) == 0 || e.Ctx().Opp.CurPet[0].Info.Hp <= 0 {
|
||
return true
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 956, int(e.Args()[0].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect956Sub struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect956Sub) Skill_Use() bool {
|
||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||
return true
|
||
}
|
||
|
||
damage := e.Args()[0]
|
||
if e.ISNaturalEnemy() {
|
||
damage = damage.Mul(alpacadecimal.NewFromInt(2))
|
||
}
|
||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.Fixed,
|
||
Damage: damage,
|
||
})
|
||
return true
|
||
}
|
||
|
||
// Effect 957: 使对手全属性-{0},若对手处于{1}状态则自身额外全属性+{2}
|
||
type Effect957 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect957) OnSkill() bool {
|
||
if len(e.Args()) < 3 {
|
||
return true
|
||
}
|
||
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[0].IntPart()))
|
||
if !e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[1].IntPart())) {
|
||
return true
|
||
}
|
||
applyAllPropUp(e.Ctx().Our, int8(e.Args()[2].IntPart()))
|
||
return true
|
||
}
|
||
|
||
// Effect 958: 若对手处于{0}状态则先制+{1}
|
||
type Effect958 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect958) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||
if len(e.Args()) < 2 {
|
||
return true
|
||
}
|
||
if !e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) {
|
||
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 += int(e.Args()[1].IntPart())
|
||
return true
|
||
}
|
||
|
||
// Effect 959: 消除对手回合类效果,消除成功则自身全属性+{0}
|
||
type Effect959 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect959) 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
|
||
}
|
||
applyAllPropUp(e.Ctx().Our, int8(e.Args()[0].IntPart()))
|
||
return true
|
||
}
|
||
|
||
// Effect 960: {0}回合内若自身处于能力提升状态则每回合使用技能{1}%令对手{2}
|
||
type Effect960 struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect960) OnSkill() bool {
|
||
if len(e.Args()) < 3 || !e.Ctx().Our.HasPropADD() {
|
||
return true
|
||
}
|
||
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
|
||
if !success {
|
||
return true
|
||
}
|
||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
|
||
if statusEffect != nil {
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||
}
|
||
return true
|
||
}
|
||
|
||
// Effect 961: 反转自身能力下降,反转成功则自身下{0}回合免疫攻击伤害
|
||
type Effect961 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect961) Skill_Use() bool {
|
||
if len(e.Args()) == 0 {
|
||
return true
|
||
}
|
||
reversed := false
|
||
for i, v := range e.Ctx().Our.Prop[:] {
|
||
if v >= 0 {
|
||
continue
|
||
}
|
||
reversed = true
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -v)
|
||
}
|
||
if !reversed {
|
||
return true
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 961, int(e.Args()[0].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect961Sub struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect961Sub) DamageLockEx(zone *info.DamageZone) bool {
|
||
if zone == nil || zone.Type != info.DamageType.Red {
|
||
return true
|
||
}
|
||
zone.Damage = alpacadecimal.Zero
|
||
return true
|
||
}
|
||
|
||
// Effect 962: 全属性+{0},自身不处于能力提升状态时强化效果翻倍
|
||
type Effect962 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect962) OnSkill() bool {
|
||
if len(e.Args()) == 0 {
|
||
return true
|
||
}
|
||
boost := int8(e.Args()[0].IntPart())
|
||
if !e.Ctx().Our.HasPropADD() {
|
||
boost *= 2
|
||
}
|
||
applyAllPropUp(e.Ctx().Our, boost)
|
||
return true
|
||
}
|
||
|
||
// Effect 963: 若自身处于能力提升状态则吸取对手最大体力的1/{0}
|
||
type Effect963 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect963) OnSkill() bool {
|
||
if len(e.Args()) == 0 || !e.Ctx().Our.HasPropADD() {
|
||
return true
|
||
}
|
||
if e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
|
||
return true
|
||
}
|
||
damage := e.Ctx().Opp.CurPet[0].GetMaxHP().Div(e.Args()[0])
|
||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.Percent,
|
||
Damage: damage,
|
||
})
|
||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
|
||
return true
|
||
}
|
||
|
||
// Effect 964: 未击败对手则自身能力提升状态翻倍
|
||
type Effect964 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect964) Skill_Use() bool {
|
||
if e.Ctx().Opp.CurPet[0].Info.Hp <= 0 {
|
||
return true
|
||
}
|
||
for i, v := range e.Ctx().Our.Prop[:] {
|
||
if v <= 0 {
|
||
continue
|
||
}
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
|
||
}
|
||
return true
|
||
}
|
||
|
||
// Effect 965: {0}回合内自身攻击技能命中则对手全属性-{1}
|
||
type Effect965 struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect965) SkillHit() bool {
|
||
if len(e.Args()) < 2 {
|
||
return true
|
||
}
|
||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||
return true
|
||
}
|
||
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[1].IntPart()))
|
||
return true
|
||
}
|
||
|
||
// Effect 966: {0}%的概率使对手{1},未触发则自身全属性+{2}
|
||
type Effect966 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect966) OnSkill() bool {
|
||
if len(e.Args()) < 3 {
|
||
return true
|
||
}
|
||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||
if success {
|
||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
|
||
if statusEffect != nil {
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||
}
|
||
return true
|
||
}
|
||
applyAllPropUp(e.Ctx().Our, int8(e.Args()[2].IntPart()))
|
||
return true
|
||
}
|
||
|
||
// Effect 967: 攻击结束时附加对手双防之和{0}%的百分比伤害
|
||
type Effect967 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect967) Skill_Use() bool {
|
||
if len(e.Args()) == 0 {
|
||
return true
|
||
}
|
||
defenseSum := int64(e.Ctx().Opp.Prop[1]) + int64(e.Ctx().Opp.Prop[3])
|
||
if defenseSum <= 0 {
|
||
return true
|
||
}
|
||
damage := alpacadecimal.NewFromInt(defenseSum).Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
|
||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.Percent,
|
||
Damage: damage,
|
||
})
|
||
return true
|
||
}
|
||
|
||
// Effect 968: 命中对手后有{0}%使对手{1},先出手时概率翻倍
|
||
type Effect968 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect968) OnSkill() bool {
|
||
if len(e.Args()) < 2 {
|
||
return true
|
||
}
|
||
chance := int(e.Args()[0].IntPart())
|
||
if e.Ctx().Our.Prop[5] >= e.Ctx().Opp.Prop[5] {
|
||
chance *= 2
|
||
}
|
||
if chance > 100 {
|
||
chance = 100
|
||
}
|
||
success, _, _ := e.Input.Player.Roll(chance, 100)
|
||
if !success {
|
||
return true
|
||
}
|
||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
|
||
if statusEffect != nil {
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||
}
|
||
return true
|
||
}
|
||
|
||
// Effect 969: 后出手时下回合受到的伤害降低{0}点
|
||
type Effect969 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect969) Skill_Use() bool {
|
||
if len(e.Args()) == 0 {
|
||
return true
|
||
}
|
||
if e.Ctx().Our.Prop[5] >= e.Ctx().Opp.Prop[5] {
|
||
return true
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 969, int(e.Args()[0].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect969Sub struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect969Sub) Damage_Floor(zone *info.DamageZone) bool {
|
||
if zone == nil || zone.Type != info.DamageType.Red {
|
||
return true
|
||
}
|
||
reduce := e.Args()[0]
|
||
if zone.Damage.Cmp(reduce) <= 0 {
|
||
zone.Damage = alpacadecimal.Zero
|
||
return true
|
||
}
|
||
zone.Damage = zone.Damage.Sub(reduce)
|
||
return true
|
||
}
|
||
|
||
// Effect 970: 双倍反转对手能力提升状态,反转成功则下回合自身所有技能先制+{0},反转失败则消除对手能力提升状态
|
||
type Effect970 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect970) Skill_Use() bool {
|
||
if len(e.Args()) == 0 {
|
||
return true
|
||
}
|
||
cleared := false
|
||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||
if v <= 0 {
|
||
continue
|
||
}
|
||
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -v) {
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
|
||
cleared = true
|
||
}
|
||
}
|
||
if !cleared {
|
||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||
if v <= 0 {
|
||
continue
|
||
}
|
||
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
|
||
}
|
||
return true
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 970, int(e.Args()[0].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect970Sub struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect970Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||
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 += int(e.Args()[0].IntPart())
|
||
return true
|
||
}
|
||
|
||
// Effect 971: {0}回合内每回合使用技能吸取对手最大体力的1/{1},吸取体力时若自身体力低于最大体力的1/{2}则吸取效果翻倍
|
||
type Effect971 struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect971) OnSkill() bool {
|
||
if len(e.Args()) < 3 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
|
||
return true
|
||
}
|
||
damage := e.Ctx().Opp.CurPet[0].GetMaxHP().Div(e.Args()[1])
|
||
if e.Ctx().Our.CurPet[0].GetHP().Mul(e.Args()[2]).Cmp(e.Ctx().Our.CurPet[0].GetMaxHP()) < 0 {
|
||
damage = damage.Mul(alpacadecimal.NewFromInt(2))
|
||
}
|
||
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 972: 出手时若自身体力低于对手,则免疫下{0}次受到的攻击伤害
|
||
type Effect972 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect972) Skill_Use() bool {
|
||
if len(e.Args()) == 0 {
|
||
return true
|
||
}
|
||
if e.Ctx().Our.CurPet[0].GetHP().Cmp(e.Ctx().Opp.CurPet[0].GetHP()) >= 0 {
|
||
return true
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 972, int(e.Args()[0].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect972Sub struct {
|
||
node.EffectNode
|
||
remaining int
|
||
}
|
||
|
||
func (e *Effect972Sub) SetArgs(t *input.Input, a ...int) {
|
||
e.EffectNode.SetArgs(t, a...)
|
||
e.Duration(-1)
|
||
if len(a) > 0 {
|
||
e.remaining = a[0]
|
||
}
|
||
}
|
||
|
||
func (e *Effect972Sub) DamageLockEx(zone *info.DamageZone) bool {
|
||
if zone == nil || zone.Type != info.DamageType.Red {
|
||
return true
|
||
}
|
||
if e.remaining <= 0 {
|
||
e.Alive(false)
|
||
return true
|
||
}
|
||
e.remaining--
|
||
zone.Damage = alpacadecimal.Zero
|
||
if e.remaining <= 0 {
|
||
e.Alive(false)
|
||
}
|
||
return true
|
||
}
|
||
|
||
// Effect 973: 消除对手回合类效果,消除成功则{0}%令对手{1}
|
||
type Effect973 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect973) 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
|
||
}
|
||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||
if !success {
|
||
return true
|
||
}
|
||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
|
||
if statusEffect != nil {
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||
}
|
||
return true
|
||
}
|
||
|
||
// Effect 974: {0}%使对手{1},若未触发则使对手受到相当于自身当前体力1/{2}的百分比伤害
|
||
type Effect974 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect974) OnSkill() bool {
|
||
if len(e.Args()) < 3 {
|
||
return true
|
||
}
|
||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||
if success {
|
||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
|
||
if statusEffect != nil {
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||
}
|
||
return true
|
||
}
|
||
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
|
||
return true
|
||
}
|
||
damage := e.Ctx().Our.CurPet[0].GetHP().Div(e.Args()[2])
|
||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.Percent,
|
||
Damage: damage,
|
||
})
|
||
return true
|
||
}
|
||
|
||
// Effect 975: {0}%的概率威力{1}倍,若未触发则下回合自身先制+{2}
|
||
type Effect975 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect975) SkillHit() bool {
|
||
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||
return true
|
||
}
|
||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||
if success {
|
||
e.Ctx().SkillEntity.XML.Power = e.Ctx().SkillEntity.XML.Power * int(e.Args()[1].IntPart())
|
||
return true
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 975, int(e.Args()[2].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect975Sub struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect975Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||
if current == nil || current.SkillEntity == nil || current.SkillEntity.Category() == info.Category.STATUS {
|
||
return true
|
||
}
|
||
current.SkillEntity.XML.Priority += int(e.Args()[0].IntPart())
|
||
return true
|
||
}
|
||
|
||
// Effect 976: 消除对手回合类效果,若消除成功则使对手下{0}次使用的属性技能失效
|
||
type Effect976 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect976) 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
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 976, int(e.Args()[0].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect976Sub struct {
|
||
node.EffectNode
|
||
remaining int
|
||
}
|
||
|
||
func (e *Effect976Sub) SetArgs(t *input.Input, a ...int) {
|
||
e.EffectNode.SetArgs(t, a...)
|
||
e.Duration(-1)
|
||
if len(a) > 0 {
|
||
e.remaining = a[0]
|
||
}
|
||
}
|
||
|
||
func (e *Effect976Sub) ActionStart(a, b *action.SelectSkillAction) bool {
|
||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||
return true
|
||
}
|
||
if e.remaining <= 0 {
|
||
e.Alive(false)
|
||
return true
|
||
}
|
||
e.Ctx().SkillEntity.SetMiss()
|
||
e.remaining--
|
||
if e.remaining <= 0 {
|
||
e.Alive(false)
|
||
}
|
||
return true
|
||
}
|
||
|
||
// Effect 977: 吸取对手最大体力的1/{0},自身体力低于1/{1}时吸取效果翻倍
|
||
type Effect977 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect977) OnSkill() bool {
|
||
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
|
||
return true
|
||
}
|
||
damage := e.Ctx().Opp.CurPet[0].GetMaxHP().Div(e.Args()[0])
|
||
if e.Ctx().Our.CurPet[0].GetHP().Mul(e.Args()[1]).Cmp(e.Ctx().Our.CurPet[0].GetMaxHP()) < 0 {
|
||
damage = damage.Mul(alpacadecimal.NewFromInt(2))
|
||
}
|
||
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 978: 吸取并反转对手能力提升状态
|
||
type Effect978 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect978) OnSkill() bool {
|
||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||
if v <= 0 {
|
||
continue
|
||
}
|
||
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -v) {
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
|
||
}
|
||
}
|
||
return true
|
||
}
|
||
|
||
// Effect 979: 消除对手回合类效果,消除成功则自身下{0}回合所有技能先制+{1}
|
||
type Effect979 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect979) 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, 979, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||
if sub != nil {
|
||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect979Sub struct {
|
||
RoundEffectArg0Base
|
||
}
|
||
|
||
func (e *Effect979Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||
if current == nil || current.SkillEntity == nil || current.SkillEntity.Category() == info.Category.STATUS {
|
||
return true
|
||
}
|
||
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
|
||
return true
|
||
}
|
||
|
||
// Effect 980: 先出手时对手当回合属性技能无效
|
||
type Effect980 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect980) Skill_Use() bool {
|
||
if e.Ctx().Our.Prop[5] < e.Ctx().Opp.Prop[5] {
|
||
return true
|
||
}
|
||
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 980)
|
||
if sub != nil {
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, sub)
|
||
}
|
||
return true
|
||
}
|
||
|
||
type Effect980Sub struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect980Sub) ActionStart(a, b *action.SelectSkillAction) bool {
|
||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||
return true
|
||
}
|
||
e.Ctx().SkillEntity.SetMiss()
|
||
return true
|
||
}
|
||
|
||
func applyAllPropUp(owner *input.Input, level int8) {
|
||
if owner == nil || level <= 0 {
|
||
return
|
||
}
|
||
for i := range owner.Prop {
|
||
owner.SetProp(owner, int8(i), level)
|
||
}
|
||
}
|
||
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 956, &Effect956{})
|
||
input.InitEffect(input.EffectType.Sub, 956, &Effect956Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 957, &Effect957{})
|
||
input.InitEffect(input.EffectType.Skill, 958, &Effect958{})
|
||
input.InitEffect(input.EffectType.Skill, 959, &Effect959{})
|
||
input.InitEffect(input.EffectType.Skill, 960, &Effect960{})
|
||
input.InitEffect(input.EffectType.Skill, 961, &Effect961{})
|
||
input.InitEffect(input.EffectType.Sub, 961, &Effect961Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 962, &Effect962{})
|
||
input.InitEffect(input.EffectType.Skill, 963, &Effect963{})
|
||
input.InitEffect(input.EffectType.Skill, 964, &Effect964{})
|
||
input.InitEffect(input.EffectType.Skill, 965, &Effect965{})
|
||
input.InitEffect(input.EffectType.Skill, 966, &Effect966{})
|
||
input.InitEffect(input.EffectType.Skill, 967, &Effect967{})
|
||
input.InitEffect(input.EffectType.Skill, 968, &Effect968{})
|
||
input.InitEffect(input.EffectType.Skill, 969, &Effect969{})
|
||
input.InitEffect(input.EffectType.Sub, 969, &Effect969Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 970, &Effect970{})
|
||
input.InitEffect(input.EffectType.Sub, 970, &Effect970Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 971, &Effect971{})
|
||
input.InitEffect(input.EffectType.Skill, 972, &Effect972{})
|
||
input.InitEffect(input.EffectType.Sub, 972, &Effect972Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 973, &Effect973{})
|
||
input.InitEffect(input.EffectType.Skill, 974, &Effect974{})
|
||
input.InitEffect(input.EffectType.Skill, 975, &Effect975{})
|
||
input.InitEffect(input.EffectType.Sub, 975, &Effect975Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 976, &Effect976{})
|
||
input.InitEffect(input.EffectType.Sub, 976, &Effect976Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 977, &Effect977{})
|
||
input.InitEffect(input.EffectType.Skill, 978, &Effect978{})
|
||
input.InitEffect(input.EffectType.Skill, 979, &Effect979{})
|
||
input.InitEffect(input.EffectType.Sub, 979, &Effect979Sub{})
|
||
input.InitEffect(input.EffectType.Skill, 980, &Effect980{})
|
||
input.InitEffect(input.EffectType.Sub, 980, &Effect980Sub{})
|
||
}
|