新增大量战斗效果逻辑实现,包括效果ID 678-708、734-743、744-748,并更新对应的效果描述映射。
This commit is contained in:
585
logic/service/fight/effect/678_703.go
Normal file
585
logic/service/fight/effect/678_703.go
Normal file
@@ -0,0 +1,585 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
"math"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
)
|
||||
|
||||
var effect697IgnoredLimitIDs = map[int]struct{}{
|
||||
8: {},
|
||||
125: {},
|
||||
576: {},
|
||||
}
|
||||
|
||||
func restoreTemporarilyDisabledEffects(effects []input.Effect) {
|
||||
for _, effect := range effects {
|
||||
if effect == nil {
|
||||
continue
|
||||
}
|
||||
effect.Alive(true)
|
||||
}
|
||||
}
|
||||
|
||||
// Effect 678: 当回合未击败对手则下{0}回合每回合{1}+{2}
|
||||
type Effect678 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect678) Skill_Use() bool {
|
||||
if len(e.Args()) < 3 || e.Ctx().Opp.CurrentPet.Info.Hp == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(
|
||||
input.EffectType.Sub,
|
||||
678,
|
||||
int(e.Args()[0].IntPart()),
|
||||
int(e.Args()[1].IntPart()),
|
||||
int(e.Args()[2].IntPart()),
|
||||
)
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect678Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect678Sub) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if len(e.Args()) < 3 {
|
||||
return true
|
||||
}
|
||||
|
||||
propID := int8(e.Args()[1].IntPart())
|
||||
if propID < 0 || int(propID) >= len(e.Ctx().Our.Prop) {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, propID, int8(e.Args()[2].IntPart()))
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 679: {0}回合内对手无法通过自身技能恢复体力
|
||||
type Effect679 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect679) Skill_Use() bool {
|
||||
if len(e.Args()) == 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
|
||||
}
|
||||
|
||||
type Effect679Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect679Sub) Heal_Pre(ac action.BattleActionI, value *int) bool {
|
||||
if value == nil || *value <= 0 {
|
||||
return true
|
||||
}
|
||||
if _, ok := ac.(*action.SelectSkillAction); !ok || ac.GetPlayerID() != e.Ctx().Our.UserID {
|
||||
return true
|
||||
}
|
||||
|
||||
*value = 0
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 691: 命中后{0}%秒杀对手
|
||||
type Effect691 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect691) DamageFloor(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.AttackTime == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||||
if !success {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = e.Ctx().Opp.CurrentPet.GetMaxHP()
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 692: {0}回合内免疫受到的致命一击伤害并直接扣除对手等量体力
|
||||
type Effect692 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect692) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 692, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect692Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect692Sub) DamageLockEx(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Crit == 0 {
|
||||
return true
|
||||
}
|
||||
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
damage := zone.Damage
|
||||
zone.Damage = alpacadecimal.Zero
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: damage,
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 693: 下{0}回合造成的攻击伤害额外提升{1}%
|
||||
type Effect693 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect693) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(
|
||||
input.EffectType.Sub,
|
||||
693,
|
||||
int(e.Args()[0].IntPart()),
|
||||
int(e.Args()[1].IntPart()),
|
||||
)
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect693Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect693Sub) 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 694: 下{0}回合攻击必定先出手
|
||||
type Effect694 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect694) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 694, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect694Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect694Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||||
if current == nil || current.SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if current.SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
current.SkillEntity.XML.Priority = math.MaxInt
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 695: {0}回合内{1}%令对手使用的属性技能无效
|
||||
type Effect695 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect695) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(
|
||||
input.EffectType.Sub,
|
||||
695,
|
||||
int(e.Args()[0].IntPart()),
|
||||
int(e.Args()[1].IntPart()),
|
||||
)
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect695Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect695Sub) SkillHit_ex() bool {
|
||||
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
|
||||
if success {
|
||||
e.Ctx().SkillEntity.SetNoSide()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 696: 暴击率提升{0}%,每次使用额外提升{1}%,最高概率{2}%
|
||||
type Effect696 struct {
|
||||
node.EffectNode
|
||||
skillID int
|
||||
useCount int
|
||||
}
|
||||
|
||||
func (e *Effect696) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
currentSkillID := e.Ctx().SkillEntity.XML.ID
|
||||
if e.skillID != 0 && e.skillID != currentSkillID {
|
||||
e.skillID = 0
|
||||
e.useCount = 0
|
||||
e.Alive(false)
|
||||
return true
|
||||
}
|
||||
|
||||
chance := int(e.Args()[0].IntPart()) + e.useCount*int(e.Args()[1].IntPart())
|
||||
maxChance := int(e.Args()[2].IntPart())
|
||||
if chance > maxChance {
|
||||
chance = maxChance
|
||||
}
|
||||
e.Ctx().SkillEntity.XML.CritRate += chance
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect696) SkillHit() bool {
|
||||
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Duration(-1)
|
||||
e.CanStack(true)
|
||||
e.skillID = e.Ctx().SkillEntity.XML.ID
|
||||
e.useCount++
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect696) SwitchOut(in *input.Input) bool {
|
||||
if in == e.Ctx().Our {
|
||||
e.Alive(false)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 697: 无视伤害限制效果
|
||||
type Effect697 struct {
|
||||
node.EffectNode
|
||||
disabled []input.Effect
|
||||
}
|
||||
|
||||
func (e *Effect697) SkillHit() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.disabled = e.disabled[:0]
|
||||
for _, effect := range e.Ctx().Opp.Effects {
|
||||
if effect == nil || !effect.Alive() {
|
||||
continue
|
||||
}
|
||||
if _, ok := effect697IgnoredLimitIDs[int(effect.ID().Suffix())]; !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
effect.Alive(false)
|
||||
e.disabled = append(e.disabled, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect697) Skill_Use() bool {
|
||||
restoreTemporarilyDisabledEffects(e.disabled)
|
||||
e.disabled = e.disabled[:0]
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect697) Action_end() bool {
|
||||
restoreTemporarilyDisabledEffects(e.disabled)
|
||||
e.disabled = e.disabled[:0]
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 698: 当回合击败对手时,对方下只精灵出战时{0}%{1}
|
||||
type Effect698 struct {
|
||||
FixedDuration1Base
|
||||
pending bool
|
||||
}
|
||||
|
||||
func (e *Effect698) SwitchOut(in *input.Input) bool {
|
||||
if in == e.Ctx().Our {
|
||||
e.Alive(false)
|
||||
return true
|
||||
}
|
||||
if in != e.Ctx().Opp || e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.pending = true
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect698) SwitchIn(in *input.Input) bool {
|
||||
if !e.pending || in != e.Ctx().Opp || len(e.Args()) < 2 {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
e.pending = false
|
||||
e.Alive(false)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 699: 无视攻击免疫效果
|
||||
type Effect699 struct {
|
||||
node.EffectNode
|
||||
disabled []input.Effect
|
||||
}
|
||||
|
||||
func (e *Effect699) SkillHit() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.disabled = e.disabled[:0]
|
||||
for _, effect := range e.Ctx().Opp.Effects {
|
||||
if effect == nil || !effect.Alive() {
|
||||
continue
|
||||
}
|
||||
if _, ok := effect1508IgnoredImmunityIDs[int(effect.ID().Suffix())]; !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
effect.Alive(false)
|
||||
e.disabled = append(e.disabled, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect699) Skill_Use() bool {
|
||||
restoreTemporarilyDisabledEffects(e.disabled)
|
||||
e.disabled = e.disabled[:0]
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect699) Action_end() bool {
|
||||
restoreTemporarilyDisabledEffects(e.disabled)
|
||||
e.disabled = e.disabled[:0]
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 700: 先出手时降低对手所有PP{0}点
|
||||
type Effect700 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect700) OnSkill() bool {
|
||||
if len(e.Args()) == 0 || !e.IsFirst() {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Opp.DelPP(int(e.Args()[0].IntPart()))
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 701: 若对手本回合恢复体力,则下{0}回合自身所有攻击致命一击
|
||||
type Effect701 struct {
|
||||
FixedDuration1Base
|
||||
}
|
||||
|
||||
func (e *Effect701) TurnEnd() {
|
||||
if len(e.Args()) > 0 && e.Ctx().Opp.AttackValue.GainHp > 0 {
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 701, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
}
|
||||
e.EffectNode.TurnEnd()
|
||||
}
|
||||
|
||||
type Effect701Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect701Sub) 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 702: 下{0}回合若打出致命一击则必定恢复全部体力
|
||||
type Effect702 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect702) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 702, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect702Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect702Sub) Skill_Use() bool {
|
||||
skill := e.Ctx().SkillEntity
|
||||
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || skill.Crit == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.CurrentPet.GetMaxHP())
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 703: {0}回合内若对手使用属性技能降低对手最大体力的1/{1}
|
||||
type Effect703 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect703) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(
|
||||
input.EffectType.Sub,
|
||||
703,
|
||||
int(e.Args()[0].IntPart()),
|
||||
int(e.Args()[1].IntPart()),
|
||||
)
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect703Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect703Sub) Skill_Use_ex() bool {
|
||||
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity.Category() != info.Category.STATUS || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Percent,
|
||||
Damage: damage,
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 678, &Effect678{})
|
||||
input.InitEffect(input.EffectType.Sub, 678, &Effect678Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 679, &Effect679{})
|
||||
input.InitEffect(input.EffectType.Sub, 679, &Effect679Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 691, &Effect691{})
|
||||
input.InitEffect(input.EffectType.Skill, 692, &Effect692{})
|
||||
input.InitEffect(input.EffectType.Sub, 692, &Effect692Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 693, &Effect693{})
|
||||
input.InitEffect(input.EffectType.Sub, 693, &Effect693Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 694, &Effect694{})
|
||||
input.InitEffect(input.EffectType.Sub, 694, &Effect694Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 695, &Effect695{})
|
||||
input.InitEffect(input.EffectType.Sub, 695, &Effect695Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 696, &Effect696{})
|
||||
input.InitEffect(input.EffectType.Skill, 697, &Effect697{})
|
||||
input.InitEffect(input.EffectType.Skill, 698, &Effect698{})
|
||||
input.InitEffect(input.EffectType.Skill, 699, &Effect699{})
|
||||
input.InitEffect(input.EffectType.Skill, 700, &Effect700{})
|
||||
input.InitEffect(input.EffectType.Skill, 701, &Effect701{})
|
||||
input.InitEffect(input.EffectType.Sub, 701, &Effect701Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 702, &Effect702{})
|
||||
input.InitEffect(input.EffectType.Sub, 702, &Effect702Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 703, &Effect703{})
|
||||
input.InitEffect(input.EffectType.Sub, 703, &Effect703Sub{})
|
||||
}
|
||||
139
logic/service/fight/effect/704_708.go
Normal file
139
logic/service/fight/effect/704_708.go
Normal file
@@ -0,0 +1,139 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
)
|
||||
|
||||
// Effect 704: 恢复{0}点体力,若当前体力低于{1}则直接回满
|
||||
type Effect704 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect704) OnSkill() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
healAmount := e.Args()[0]
|
||||
currentHP := e.Ctx().Our.CurrentPet.GetHP()
|
||||
if currentHP.Cmp(e.Args()[1]) < 0 {
|
||||
healAmount = e.Ctx().Our.CurrentPet.GetMaxHP().Sub(currentHP)
|
||||
}
|
||||
if healAmount.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 705: 与对手互换当前体力
|
||||
type Effect705 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect705) OnSkill() bool {
|
||||
ourHP := e.Ctx().Our.CurrentPet.Info.Hp
|
||||
oppHP := e.Ctx().Opp.CurrentPet.Info.Hp
|
||||
|
||||
e.Ctx().Our.CurrentPet.Info.Hp = 0
|
||||
e.Ctx().Our.CurrentPet.Info.ModelHP(int64(oppHP))
|
||||
e.Ctx().Opp.CurrentPet.Info.Hp = 0
|
||||
e.Ctx().Opp.CurrentPet.Info.ModelHP(int64(ourHP))
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 706: 将自身的能力下降状态{0}倍返还给对手
|
||||
type Effect706 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect706) OnSkill() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
multiplier := int8(e.Args()[0].IntPart())
|
||||
if multiplier <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
for i, v := range e.Ctx().Our.Prop[:] {
|
||||
if v >= 0 {
|
||||
continue
|
||||
}
|
||||
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), v*multiplier)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 707: {0}回合内每回合使用技能恢复自身最大体力的1/{1},恢复体力时若自身体力低于最大体力的1/{2}则恢复效果翻倍
|
||||
type Effect707 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect707) Skill_Use() bool {
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 707, e.SideEffectArgs...)
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect707Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect707Sub) Skill_Use() bool {
|
||||
if len(e.Args()) < 3 {
|
||||
return true
|
||||
}
|
||||
|
||||
healAmount := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[1])
|
||||
if e.Args()[2].IntPart() > 0 &&
|
||||
e.Ctx().Our.CurrentPet.GetHP().Mul(e.Args()[2]).Cmp(e.Ctx().Our.CurrentPet.GetMaxHP()) < 0 {
|
||||
healAmount = healAmount.Mul(alpacadecimal.NewFromInt(2))
|
||||
}
|
||||
if healAmount.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 708: 恢复自身{0}点体力,自身体力少于1/{1}时恢复效果翻倍
|
||||
type Effect708 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect708) OnSkill() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
healAmount := e.Args()[0]
|
||||
if e.Args()[1].IntPart() > 0 &&
|
||||
e.Ctx().Our.CurrentPet.GetHP().Mul(e.Args()[1]).Cmp(e.Ctx().Our.CurrentPet.GetMaxHP()) < 0 {
|
||||
healAmount = healAmount.Mul(alpacadecimal.NewFromInt(2))
|
||||
}
|
||||
if healAmount.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 704, &Effect704{})
|
||||
input.InitEffect(input.EffectType.Skill, 705, &Effect705{})
|
||||
input.InitEffect(input.EffectType.Skill, 706, &Effect706{})
|
||||
input.InitEffect(input.EffectType.Skill, 707, &Effect707{})
|
||||
input.InitEffect(input.EffectType.Sub, 707, &Effect707Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 708, &Effect708{})
|
||||
}
|
||||
215
logic/service/fight/effect/734_738.go
Normal file
215
logic/service/fight/effect/734_738.go
Normal file
@@ -0,0 +1,215 @@
|
||||
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 734: 若对手不处于能力提升或下降状态时则恢复{0}点体力
|
||||
type Effect734 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect734) OnSkill() bool {
|
||||
if len(e.Args()) == 0 || e.Ctx().Opp.HasPropADD() || e.Ctx().Opp.HasPropSub() {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Args()[0])
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 735: 若对手处于能力提升状态则下{0}回合先制+{1}
|
||||
type Effect735 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect735) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 || !e.Ctx().Opp.HasPropADD() {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 735, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect735Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect735Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||||
if current == nil || current.SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 736: 消除对手能力提升状态,消除成功则{0}回合内令对手使用的属性技能无效
|
||||
type Effect736 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect736) OnSkill() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
cleared := false
|
||||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||||
if v <= 0 {
|
||||
continue
|
||||
}
|
||||
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
|
||||
cleared = true
|
||||
}
|
||||
}
|
||||
if !cleared {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 736, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect736Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect736Sub) SkillHit_ex() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().SkillEntity.SetNoSide()
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 737: {0}%使对手{1},若没有触发,则回合结束时减少对手1/{2}最大体力
|
||||
type Effect737 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect737) OnSkill() bool {
|
||||
if len(e.Args()) < 3 {
|
||||
return true
|
||||
}
|
||||
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||||
if success {
|
||||
statusType := int(e.Args()[1].IntPart())
|
||||
statusEff := e.Ctx().Our.InitEffect(input.EffectType.Status, statusType)
|
||||
if statusEff != nil {
|
||||
statusEff.SetArgs(e.Ctx().Our, 2)
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEff)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 737, int(e.Args()[2].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect737Sub struct {
|
||||
FixedDuration1Base
|
||||
}
|
||||
|
||||
func (e *Effect737Sub) TurnEnd() {
|
||||
if len(e.Args()) == 0 || e.Args()[0].IntPart() <= 0 {
|
||||
e.Alive(false)
|
||||
return
|
||||
}
|
||||
|
||||
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[0])
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Percent,
|
||||
Damage: damage,
|
||||
})
|
||||
e.Alive(false)
|
||||
}
|
||||
|
||||
// Effect 738: {0}回合内若对手使用属性技能,则使用属性技能后的下{1}回合攻击技能无法造成伤害且命中效果失效
|
||||
type Effect738 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect738) Skill_Use() bool {
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 738, e.SideEffectArgs...)
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect738Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect738Sub) Skill_Use_ex() bool {
|
||||
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
lock := e.Ctx().Our.InitEffect(input.EffectType.Sub, 7381, int(e.Args()[1].IntPart()))
|
||||
if lock != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, lock)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect738Lock struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect738Lock) SkillHit() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().SkillEntity.SetNoSide()
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect738Lock) 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 = alpacadecimal.Zero
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 734, &Effect734{})
|
||||
input.InitEffect(input.EffectType.Skill, 735, &Effect735{})
|
||||
input.InitEffect(input.EffectType.Sub, 735, &Effect735Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 736, &Effect736{})
|
||||
input.InitEffect(input.EffectType.Sub, 736, &Effect736Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 737, &Effect737{})
|
||||
input.InitEffect(input.EffectType.Sub, 737, &Effect737Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 738, &Effect738{})
|
||||
input.InitEffect(input.EffectType.Sub, 738, &Effect738Sub{})
|
||||
input.InitEffect(input.EffectType.Sub, 7381, &Effect738Lock{})
|
||||
}
|
||||
150
logic/service/fight/effect/739_743.go
Normal file
150
logic/service/fight/effect/739_743.go
Normal file
@@ -0,0 +1,150 @@
|
||||
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 zeroAllSkillPP(target *input.Input) {
|
||||
if target == nil || target.CurrentPet == nil {
|
||||
return
|
||||
}
|
||||
for i := range target.CurrentPet.Info.SkillList {
|
||||
target.CurrentPet.Info.SkillList[i].PP = 0
|
||||
}
|
||||
}
|
||||
|
||||
// Effect 739: 当回合未击败对手则有{0}%将对手所有技能PP值降为0
|
||||
type Effect739 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect739) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 || e.Ctx().Opp.CurrentPet.Info.Hp == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||||
if !success {
|
||||
return true
|
||||
}
|
||||
|
||||
zeroAllSkillPP(e.Ctx().Opp)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 740: {0}回合内每回合自身的能力下降状态都会反馈到对手身上
|
||||
type Effect740 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect740) TurnEnd() {
|
||||
for i, v := range e.Ctx().Our.Prop[:] {
|
||||
if v < 0 {
|
||||
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), v)
|
||||
}
|
||||
}
|
||||
e.EffectNode.TurnEnd()
|
||||
}
|
||||
|
||||
// Effect 741: {0}回合内免疫大于{1}的攻击伤害
|
||||
type Effect741 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect741) DamageLockEx(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
if zone.Damage.Cmp(e.Args()[1]) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = alpacadecimal.Zero
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 742: {0}回合内若对手造成的伤害低于{1},则对手{2}
|
||||
type Effect742 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect742) Skill_Use_ex() bool {
|
||||
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().Our.SumDamage.Cmp(e.Args()[1]) >= 0 {
|
||||
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 743: 反转对手能力提升,反转成功下{0}回合先制+{1}
|
||||
type Effect743 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect743) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
reversed := false
|
||||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||||
if v > 0 && e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -2*v) {
|
||||
reversed = true
|
||||
}
|
||||
}
|
||||
if !reversed {
|
||||
return true
|
||||
}
|
||||
|
||||
sub := e.Ctx().Our.InitEffect(
|
||||
input.EffectType.Sub,
|
||||
743,
|
||||
int(e.Args()[0].IntPart()),
|
||||
int(e.Args()[1].IntPart()),
|
||||
)
|
||||
if sub != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect743Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect743Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||||
if current == nil || current.SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 739, &Effect739{})
|
||||
input.InitEffect(input.EffectType.Skill, 740, &Effect740{})
|
||||
input.InitEffect(input.EffectType.Skill, 741, &Effect741{})
|
||||
input.InitEffect(input.EffectType.Skill, 742, &Effect742{})
|
||||
input.InitEffect(input.EffectType.Skill, 743, &Effect743{})
|
||||
input.InitEffect(input.EffectType.Sub, 743, &Effect743Sub{})
|
||||
}
|
||||
136
logic/service/fight/effect/744_748.go
Normal file
136
logic/service/fight/effect/744_748.go
Normal file
@@ -0,0 +1,136 @@
|
||||
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"
|
||||
)
|
||||
|
||||
var fiveDecimal = alpacadecimal.NewFromInt(5)
|
||||
|
||||
// Effect 744: 攻击时若自身体力大于对手体力,则附加{0}点固定伤害
|
||||
type Effect744 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect744) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 || e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: e.Args()[0],
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 745: 使对手{0},对手处于异常状态时弱化效果翻倍
|
||||
type Effect745 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect745) OnSkill() bool {
|
||||
multiplier := int8(1)
|
||||
if e.Ctx().Opp.StatEffect_Exist_all() {
|
||||
multiplier = 2
|
||||
}
|
||||
|
||||
for i, arg := range e.Args() {
|
||||
if i >= len(e.Ctx().Opp.Prop) {
|
||||
break
|
||||
}
|
||||
level := int8(arg.IntPart()) * multiplier
|
||||
if level == 0 {
|
||||
continue
|
||||
}
|
||||
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), level)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 746: {0}回合内若对手恢复体力则自身也恢复等量体力的{1}/5倍
|
||||
type Effect746 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect746) OnSkill() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 746, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect746Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect746Sub) 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(fiveDecimal)
|
||||
if heal.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Opp.Heal(e.Ctx().Opp, &action.SelectSkillAction{}, heal)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 747: 自身处于能力下降时先制+1
|
||||
type Effect747 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect747) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||||
if !e.Ctx().Our.HasPropSub() || len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||||
if current == nil || current.SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
current.SkillEntity.XML.Priority += int(e.Args()[0].IntPart())
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 748: 若打出的伤害在{0}至{1}之间则对手{2}
|
||||
type Effect748 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect748) OnSkill() bool {
|
||||
if len(e.Args()) < 3 || e.Ctx().Our.SumDamage.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) < 0 || e.Ctx().Our.SumDamage.Cmp(e.Args()[1]) > 0 {
|
||||
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
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 744, &Effect744{})
|
||||
input.InitEffect(input.EffectType.Skill, 745, &Effect745{})
|
||||
input.InitEffect(input.EffectType.Skill, 746, &Effect746{})
|
||||
input.InitEffect(input.EffectType.Sub, 746, &Effect746Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 747, &Effect747{})
|
||||
input.InitEffect(input.EffectType.Skill, 748, &Effect748{})
|
||||
}
|
||||
169
logic/service/fight/effect/749_753.go
Normal file
169
logic/service/fight/effect/749_753.go
Normal file
@@ -0,0 +1,169 @@
|
||||
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 749: {0}%令对手全属性-{1}
|
||||
type Effect749 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect749) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||||
if !success {
|
||||
return true
|
||||
}
|
||||
|
||||
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[1].IntPart()))
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 750: 先出手时无视伤害限制效果
|
||||
type Effect750 struct {
|
||||
node.EffectNode
|
||||
disabled []input.Effect
|
||||
}
|
||||
|
||||
func (e *Effect750) SkillHit() bool {
|
||||
if !e.IsFirst() || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.disabled = e.disabled[:0]
|
||||
for _, effect := range e.Ctx().Opp.Effects {
|
||||
if effect == nil || !effect.Alive() {
|
||||
continue
|
||||
}
|
||||
if _, ok := effect697IgnoredLimitIDs[int(effect.ID().Suffix())]; !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
effect.Alive(false)
|
||||
e.disabled = append(e.disabled, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect750) Skill_Use() bool {
|
||||
restoreTemporarilyDisabledEffects(e.disabled)
|
||||
e.disabled = e.disabled[:0]
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect750) Action_end() bool {
|
||||
restoreTemporarilyDisabledEffects(e.disabled)
|
||||
e.disabled = e.disabled[:0]
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 751: 附加对手当前体力{0}%的伤害
|
||||
type Effect751 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect751) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
damage := e.Ctx().Opp.CurrentPet.GetHP().Mul(e.Args()[0]).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 752: 若对手处于异常状态则回合结束时减少对手1/{0}最大体力
|
||||
type Effect752 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect752) OnSkill() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 752, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect752Sub struct {
|
||||
FixedDuration1Base
|
||||
}
|
||||
|
||||
func (e *Effect752Sub) TurnEnd() {
|
||||
if len(e.Args()) == 0 || !e.Ctx().Opp.StatEffect_Exist_all() {
|
||||
e.Alive(false)
|
||||
return
|
||||
}
|
||||
|
||||
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[0])
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Percent,
|
||||
Damage: damage,
|
||||
})
|
||||
e.Alive(false)
|
||||
}
|
||||
|
||||
// Effect 753: 消耗自身全部体力,使对手{0}回合内使用属性技能失效(延续到对手所有精灵)
|
||||
type Effect753 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect753) OnSkill() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 753, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
|
||||
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.MaxHp)),
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect753Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect753Sub) SkillHit_ex() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().SkillEntity.SetNoSide()
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 749, &Effect749{})
|
||||
input.InitEffect(input.EffectType.Skill, 750, &Effect750{})
|
||||
input.InitEffect(input.EffectType.Skill, 751, &Effect751{})
|
||||
input.InitEffect(input.EffectType.Skill, 752, &Effect752{})
|
||||
input.InitEffect(input.EffectType.Sub, 752, &Effect752Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 753, &Effect753{})
|
||||
input.InitEffect(input.EffectType.Sub, 753, &Effect753Sub{})
|
||||
}
|
||||
225
logic/service/fight/effect/754_758.go
Normal file
225
logic/service/fight/effect/754_758.go
Normal file
@@ -0,0 +1,225 @@
|
||||
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 oneDecimal = alpacadecimal.NewFromInt(1)
|
||||
|
||||
// Effect 754: 消耗自身全部体力,使下只出场精灵前{0}回合必定先手必定暴击必定命中
|
||||
type Effect754 struct {
|
||||
node.EffectNode
|
||||
armed bool
|
||||
started bool
|
||||
remaining int
|
||||
}
|
||||
|
||||
func (e *Effect754) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.SetArgs(t, a...)
|
||||
e.Duration(-1)
|
||||
if len(a) > 0 {
|
||||
e.remaining = a[0]
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Effect754) OnSkill() bool {
|
||||
if e.armed {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: e.Ctx().Our.CurrentPet.GetMaxHP(),
|
||||
})
|
||||
e.armed = true
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect754) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||||
if !e.armed || e.remaining <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||||
if current == nil || current.SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
e.started = true
|
||||
current.SkillEntity.XML.Priority += 7
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect754) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if !e.armed || e.remaining <= 0 || e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
e.started = true
|
||||
e.Ctx().SkillEntity.XML.MustHit = 1
|
||||
if e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||||
e.Ctx().SkillEntity.XML.CritRate = 16
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect754) TurnEnd() {
|
||||
if !e.started || e.remaining <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
e.remaining--
|
||||
if e.remaining <= 0 {
|
||||
e.Alive(false)
|
||||
}
|
||||
}
|
||||
|
||||
// Effect 755: 比较双方体力后自灭并造成随机固定伤害,低体力分支保留对手1点体力并附加状态
|
||||
type Effect755 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect755) OnSkill() bool {
|
||||
if len(e.Args()) < 6 {
|
||||
return true
|
||||
}
|
||||
|
||||
ourHP := e.Ctx().Our.CurrentPet.GetHP()
|
||||
oppHP := e.Ctx().Opp.CurrentPet.GetHP()
|
||||
if ourHP.Cmp(oppHP) > 0 {
|
||||
e.Ctx().Our.CurrentPet.Info.Hp = 1
|
||||
damage := randomInRange(int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: alpacadecimal.NewFromInt(int64(damage)),
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.CurrentPet.Info.Hp = 0
|
||||
damage := alpacadecimal.NewFromInt(int64(randomInRange(int(e.Args()[2].IntPart()), int(e.Args()[3].IntPart()))))
|
||||
cap := oppHP.Sub(oneDecimal)
|
||||
if cap.Cmp(alpacadecimal.Zero) < 0 {
|
||||
cap = alpacadecimal.Zero
|
||||
}
|
||||
damage = alpacadecimal.Min(damage, cap)
|
||||
if damage.Cmp(alpacadecimal.Zero) > 0 {
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: damage,
|
||||
})
|
||||
}
|
||||
|
||||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[4].IntPart()))
|
||||
if statusEffect != nil {
|
||||
if e.Args()[5].IntPart() != 0 {
|
||||
statusEffect.SetArgs(e.Ctx().Our, int(e.Args()[5].IntPart()))
|
||||
}
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 756: 命中后{0}%令对手{1}
|
||||
type Effect756 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect756) OnSkill() bool {
|
||||
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 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 757: 当次攻击击败指定状态的对手则对手下只出场精灵{1}%概率{2}
|
||||
type Effect757 struct {
|
||||
node.EffectNode
|
||||
pending bool
|
||||
}
|
||||
|
||||
func (e *Effect757) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.SetArgs(t, a...)
|
||||
e.Duration(-1)
|
||||
}
|
||||
|
||||
func (e *Effect757) Skill_Use() bool {
|
||||
if len(e.Args()) < 3 || e.Ctx().Opp.CurrentPet.Info.Hp > 0 || !e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) {
|
||||
e.Alive(false)
|
||||
return true
|
||||
}
|
||||
|
||||
e.pending = true
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect757) SwitchIn(in *input.Input) bool {
|
||||
if !e.pending || in != e.Ctx().Opp {
|
||||
return true
|
||||
}
|
||||
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
|
||||
if success {
|
||||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
|
||||
if statusEffect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||||
}
|
||||
}
|
||||
|
||||
e.pending = false
|
||||
e.Alive(false)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 758: 使用时若有一方处于{0}状态,则必定威力翻倍
|
||||
type Effect758 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect758) SkillHit() bool {
|
||||
if len(e.Args()) == 0 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
statusID := info.EnumPetStatus(e.Args()[0].IntPart())
|
||||
if !e.Ctx().Our.StatEffect_Exist(statusID) && !e.Ctx().Opp.StatEffect_Exist(statusID) {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().SkillEntity.XML.Power *= 2
|
||||
return true
|
||||
}
|
||||
|
||||
func randomInRange(minValue, maxValue int) int {
|
||||
if maxValue < minValue {
|
||||
maxValue = minValue
|
||||
}
|
||||
if maxValue == minValue {
|
||||
return minValue
|
||||
}
|
||||
return minValue + grand.Intn(maxValue-minValue+1)
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 754, &Effect754{})
|
||||
input.InitEffect(input.EffectType.Skill, 755, &Effect755{})
|
||||
input.InitEffect(input.EffectType.Skill, 756, &Effect756{})
|
||||
input.InitEffect(input.EffectType.Skill, 757, &Effect757{})
|
||||
input.InitEffect(input.EffectType.Skill, 758, &Effect758{})
|
||||
}
|
||||
161
logic/service/fight/effect/759_763.go
Normal file
161
logic/service/fight/effect/759_763.go
Normal file
@@ -0,0 +1,161 @@
|
||||
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 759: 消除对手能力上升状态,消除成功则{0}回合内对手每回合{1}{2}
|
||||
type Effect759 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect759) Skill_Use() bool {
|
||||
if len(e.Args()) < 3 {
|
||||
return true
|
||||
}
|
||||
|
||||
cleared := false
|
||||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||||
if v <= 0 {
|
||||
continue
|
||||
}
|
||||
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
|
||||
cleared = true
|
||||
}
|
||||
}
|
||||
if !cleared {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 759, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect759Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect759Sub) TurnEnd() {
|
||||
if len(e.Args()) < 3 {
|
||||
e.EffectNode.TurnEnd()
|
||||
return
|
||||
}
|
||||
|
||||
propID := int8(e.Args()[1].IntPart())
|
||||
if propID >= 0 && int(propID) < len(e.Ctx().Our.Prop) {
|
||||
e.Ctx().Our.SetProp(e.Ctx().Opp, propID, int8(e.Args()[2].IntPart()))
|
||||
}
|
||||
e.EffectNode.TurnEnd()
|
||||
}
|
||||
|
||||
// Effect 760: 攻击时造成的伤害不会出现微弱(克制关系为微弱时都变成普通)
|
||||
type Effect760 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect760) Damage_Mul(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
typeRate := float64(e.Ctx().Our.AttackValue.Offensive)
|
||||
if typeRate <= 0 || typeRate >= 1 {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = zone.Damage.Div(alpacadecimal.NewFromFloat(typeRate))
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 761: {0}回合内对手恢复体力时恢复效果减少{1}%
|
||||
type Effect761 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect761) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 761, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect761Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect761Sub) Heal_Pre(ac action.BattleActionI, value *int) bool {
|
||||
if len(e.Args()) < 2 || value == nil || *value <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
reduced := alpacadecimal.NewFromInt(int64(*value)).Mul(hundred.Sub(e.Args()[1])).Div(hundred)
|
||||
*value = int(reduced.IntPart())
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 762: {0}回合内每回合恢复自身已损失体力的{1}%
|
||||
type Effect762 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect762) TurnEnd() {
|
||||
if len(e.Args()) < 2 {
|
||||
e.EffectNode.TurnEnd()
|
||||
return
|
||||
}
|
||||
|
||||
missing := e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP())
|
||||
if missing.Cmp(alpacadecimal.Zero) > 0 {
|
||||
heal := missing.Mul(e.Args()[1]).Div(hundred)
|
||||
if heal.Cmp(alpacadecimal.Zero) > 0 {
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, heal)
|
||||
}
|
||||
}
|
||||
e.EffectNode.TurnEnd()
|
||||
}
|
||||
|
||||
// Effect 763: 自身不处于能力提升状态时则{0}
|
||||
type Effect763 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect763) Skill_Use() bool {
|
||||
if e.Ctx().Our.HasPropADD() {
|
||||
return true
|
||||
}
|
||||
|
||||
for i, arg := range e.Args() {
|
||||
if i >= len(e.Ctx().Our.Prop) {
|
||||
break
|
||||
}
|
||||
level := int8(arg.IntPart())
|
||||
if level == 0 {
|
||||
continue
|
||||
}
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), level)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 759, &Effect759{})
|
||||
input.InitEffect(input.EffectType.Sub, 759, &Effect759Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 760, &Effect760{})
|
||||
input.InitEffect(input.EffectType.Skill, 761, &Effect761{})
|
||||
input.InitEffect(input.EffectType.Sub, 761, &Effect761Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 762, &Effect762{})
|
||||
input.InitEffect(input.EffectType.Skill, 763, &Effect763{})
|
||||
}
|
||||
@@ -416,6 +416,8 @@ var effectInfoByID = map[int]string{
|
||||
675: "下{0}回合致命一击对自身miss",
|
||||
676: "下{0}回合每回合使用攻击技能附加自身防御、特防值总和{1}%的百分比伤害",
|
||||
677: "{0}回合内每回合使用技能吸取对手能力提升状态",
|
||||
678: "当回合未击败对手则下{0}回合每回合{1}+{2}",
|
||||
679: "{0}回合内对手无法通过自身技能恢复体力",
|
||||
680: "先出手时{0}%使对手{1}{2}回合",
|
||||
681: "下{0}回合自身攻击技能必定致命、必定命中",
|
||||
682: "受到的伤害超过{0},自身{1}",
|
||||
@@ -426,11 +428,39 @@ var effectInfoByID = map[int]string{
|
||||
687: "若对手{0},则对对方造成伤害的{1}%恢复自身体力",
|
||||
688: "{0}回合内抵挡受到的攻击",
|
||||
689: "若造成的伤害高于{0},则恢复自身1/{1}最大体力",
|
||||
691: "命中后{0}%秒杀对手",
|
||||
692: "{0}回合内免疫受到的致命一击伤害并直接扣除对手等量体力",
|
||||
693: "下{0}回合造成的攻击伤害额外提升{1}%",
|
||||
694: "下{0}回合攻击必定先出手",
|
||||
695: "{0}回合内{1}%令对手使用的属性技能无效",
|
||||
696: "暴击率提升{0}%,每次使用额外提升{1}%,最高概率{2}%",
|
||||
697: "无视伤害限制效果",
|
||||
698: "当回合击败对手时,对方下只精灵出战时{0}%{1}",
|
||||
699: "无视攻击免疫效果",
|
||||
700: "先出手时降低对手所有PP{0}点",
|
||||
701: "若对手本回合恢复体力,则下{0}回合自身所有攻击致命一击",
|
||||
702: "下{0}回合若打出致命一击则必定恢复全部体力",
|
||||
703: "{0}回合内若对手使用属性技能降低对手最大体力的1/{1}",
|
||||
704: "恢复{0}点体力,若当前体力低于{1}则直接回满",
|
||||
705: "与对手互换当前体力",
|
||||
706: "将自身的能力下降状态{0}倍返还给对手",
|
||||
707: "{0}回合内每回合使用技能恢复自身最大体力的1/{1},恢复体力时若自身体力低于最大体力的1/{2}则恢复效果翻倍",
|
||||
708: "恢复自身{0}点体力,自身体力少于1/{1}时恢复效果翻倍",
|
||||
704: "恢复{0}点体力,若当前体力低于{1}则直接回满",
|
||||
705: "与对手互换当前体力",
|
||||
706: "将自身的能力下降状态{0}倍返还给对手",
|
||||
707: "{0}回合内每回合使用技能恢复自身最大体力的1/{1},恢复体力时若自身体力低于最大体力的1/{2}则恢复效果翻倍",
|
||||
708: "恢复自身{0}点体力,自身体力少于1/{1}时恢复效果翻倍",
|
||||
709: "击败对手时若自身处于能力提升状态,则将所处的能力提升状态翻倍",
|
||||
710: "解除自身能力下降状态,若解除成功则{0}回合内免疫能力下降状态",
|
||||
711: "下{0}回合若自身能力提升状态被消除则必定致命一击",
|
||||
712: "{0}回合内将对手的{1}能力降为0点",
|
||||
713: "附加自身能力提升等级总和X{0}的固定伤害",
|
||||
714: "使用技能时若对手处于能力提升状态,则先制+{0},同时消除对手能力提升状态",
|
||||
715: "若下回合受到攻击,则对手随机{0}项能力值-{1}",
|
||||
716: "{0}回合内对手使用攻击技能,则使对手随机{1}个技能的PP值归零",
|
||||
717: "{0}回合内每回合使用技能吸取对手最大体力的1/{1},恢复体力时若自身体力低于最大体力的1/{2}则恢复效果翻倍",
|
||||
718: "{0}回合内对手使用属性技能,则自身下{1}回合必定暴击",
|
||||
719: "未击败对手则{0}%令对手{1}",
|
||||
720: "若先出手则当回合闪避对手的攻击技能",
|
||||
721: "后出手时使对手下{0}回合攻击技能MISS",
|
||||
@@ -446,6 +476,46 @@ var effectInfoByID = map[int]string{
|
||||
731: "本回合打出致命一击则下{0}回合其它攻击技能必定致命一击",
|
||||
732: "本回合若没有打出致命一击则{0}",
|
||||
733: "反转自身能力下降状态,反转成功则对手{0}",
|
||||
734: "若对手不处于能力提升或下降状态时则恢复{0}点体力",
|
||||
735: "若对手处于能力提升状态则下{0}回合先制+{1}",
|
||||
736: "消除对手能力提升状态,消除成功则{0}回合内令对手使用的属性技能无效",
|
||||
737: "{0}%使对手{1},若没有触发,则回合结束时减少对手1/{2}最大体力",
|
||||
738: "{0}回合内若对手使用属性技能,则使用属性技能后的下{1}回合攻击技能无法造成伤害且命中效果失效",
|
||||
739: "当回合未击败对手则有{0}%将对手所有技能PP值降为0",
|
||||
740: "{0}回合内每回合自身的能力下降状态都会反馈到对手身上",
|
||||
741: "{0}回合内免疫大于{1}的攻击伤害",
|
||||
742: "{0}回合内若对手造成的伤害低于{1},则对手{2}",
|
||||
743: "反转对手能力提升,反转成功下{0}回合先制+{1}",
|
||||
744: "攻击时若自身体力大于对手体力,则附加{0}点固定伤害",
|
||||
745: "使对手{0},对手处于异常状态时弱化效果翻倍",
|
||||
746: "{0}回合内若对手恢复体力则自身也恢复等量体力的{1}/5倍",
|
||||
747: "自身处于能力下降时先制+1",
|
||||
748: "若打出的伤害在{0}至{1}之间则对手{2}",
|
||||
749: "{0}%令对手全属性-{1}",
|
||||
750: "先出手时无视伤害限制效果",
|
||||
751: "附加对手当前体力{0}%的伤害",
|
||||
752: "若对手处于异常状态则回合结束时减少对手1/{0}最大体力",
|
||||
753: "消耗自身全部体力,使对手{0}回合内使用属性技能失效(延续到对手所有精灵)",
|
||||
754: "消耗自身全部体力,使下只出场精灵前{0}回合必定先手必定暴击必定命中",
|
||||
755: "若体力大于对手,则消耗自身体力至残留1点体力给对手造成{0}至{1}点伤害;若体力小于对手,则消耗自身全部体力给对手造成{2}至{3}点伤害,若对手受到致命伤害时残留1点体力,并使对手{4}{5}回合",
|
||||
756: "命中后{0}%令对手{1}",
|
||||
757: "当次攻击击败{0}的对手则对手下只出场精灵{1}%概率{2}",
|
||||
758: "使用时若有一方处于{0}状态,则必定威力翻倍",
|
||||
759: "消除对手能力上升状态,消除成功则{0}回合内对手每回合{1}{2}",
|
||||
760: "攻击时造成的伤害不会出现微弱(克制关系为微弱时都变成普通)",
|
||||
761: "{0}回合内对手恢复体力时恢复效果减少{1}%",
|
||||
762: "{0}回合内每回合恢复自身已损失体力的{1}%",
|
||||
763: "自身不处于能力提升状态时则{0}",
|
||||
734: "若对手不处于能力提升或下降状态时则恢复{0}点体力",
|
||||
735: "若对手处于能力提升状态则下{0}回合先制+{1}",
|
||||
736: "消除对手能力提升状态,消除成功则{0}回合内令对手使用的属性技能无效",
|
||||
737: "{0}%使对手{1},若没有触发,则回合结束时减少对手1/{2}最大体力",
|
||||
738: "{0}回合内若对手使用属性技能,则使用属性技能后的下{1}回合攻击技能无法造成伤害且命中效果失效",
|
||||
739: "当回合未击败对手则有{0}%将对手所有技能PP值降为0",
|
||||
740: "{0}回合内每回合自身的能力下降状态都会反馈到对手身上",
|
||||
741: "{0}回合内免疫大于{1}的攻击伤害",
|
||||
742: "{0}回合内若对手造成的伤害低于{1},则对手{2}",
|
||||
743: "反转对手能力提升,反转成功下{0}回合先制+{1}",
|
||||
841: "使对手和自身同时降低1/{0}最大体力",
|
||||
842: "若自身处于能力提升状态则造成的攻击伤害额外提升{0}%",
|
||||
843: "下{0}回合令自身所有技能先制+{1}",
|
||||
|
||||
Reference in New Issue
Block a user