2026-03-07 23:54:01 +08:00
|
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"blazing/logic/service/fight/info"
|
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// 523 - 若当回合未击败对手,则自身1 1 1 1 1 1能力+1
|
|
|
|
|
|
type Effect523 struct {
|
|
|
|
|
|
node.EffectNode
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (e *Effect523) Action_end_ex() bool {
|
|
|
|
|
|
// 检查对手是否还活着
|
|
|
|
|
|
if e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
|
|
|
|
|
|
// 提升自身的全部能力等级
|
|
|
|
|
|
stats := []int{
|
|
|
|
|
|
int(info.PetStatus.AtkUp),
|
|
|
|
|
|
int(info.PetStatus.DefUp),
|
|
|
|
|
|
int(info.PetStatus.SpAtkUp),
|
|
|
|
|
|
int(info.PetStatus.SpDefUp),
|
|
|
|
|
|
int(info.PetStatus.SpeedUp),
|
|
|
|
|
|
int(info.PetStatus.AccuracyUp),
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for _, stat := range stats {
|
|
|
|
|
|
statEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, stat)
|
|
|
|
|
|
if statEffect != nil {
|
|
|
|
|
|
statEffect.SetArgs(e.Ctx().Our, 1) // 提升1级
|
|
|
|
|
|
e.Ctx().Our.AddEffect(e.Ctx().Our, statEffect)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 457 - 复制对手释放的技能(组队对战时无效)
|
|
|
|
|
|
type Effect457 struct {
|
|
|
|
|
|
node.EffectNode
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (e *Effect457) Skill_Use_ex() bool {
|
|
|
|
|
|
// 这里需要检查是否在组队对战中
|
|
|
|
|
|
if !e.Ctx().IsTeamBattle { // 不是组队对战
|
|
|
|
|
|
if e.Ctx().SkillEntity != nil {
|
|
|
|
|
|
// 复制对手释放的技能
|
|
|
|
|
|
e.Ctx().Our.CopySkill(e.Ctx().SkillEntity)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 197 - n回合内若被对方击败,则对手所有能力加强状态消失
|
|
|
|
|
|
type Effect197 struct {
|
|
|
|
|
|
node.EffectNode
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-08 20:07:59 +08:00
|
|
|
|
func (e *Effect197) Skill_Use() bool {
|
2026-03-07 23:54:01 +08:00
|
|
|
|
if e.Ctx().Our.CurrentPet.Info.Hp <= 0 { // 被击败
|
|
|
|
|
|
// 清除对手的所有能力加强状态
|
|
|
|
|
|
e.Ctx().Opp.RemoveAllPositiveBuffs()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (e *Effect197) SetArgs(t *input.Input, a ...int) {
|
|
|
|
|
|
e.EffectNode.SetArgs(t, a...)
|
|
|
|
|
|
e.EffectNode.Duration(a[0]) // 持续n回合
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 199 - 下次被击败后,下一个出场的精灵xx等级+k
|
|
|
|
|
|
type Effect199 struct {
|
|
|
|
|
|
node.EffectNode
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-08 20:07:59 +08:00
|
|
|
|
func (e *Effect199) Skill_Use() bool {
|
2026-03-07 23:54:01 +08:00
|
|
|
|
if e.Ctx().Our.CurrentPet.Info.Hp <= 0 { // 被击败
|
|
|
|
|
|
// 设置下一个出场精灵的增益效果
|
|
|
|
|
|
effectType := int(e.Args()[0].IntPart()) // xx类型
|
|
|
|
|
|
effectValue := int(e.Args()[1].IntPart()) // 等级+k
|
|
|
|
|
|
|
|
|
|
|
|
buffEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, effectType)
|
|
|
|
|
|
if buffEffect != nil {
|
|
|
|
|
|
buffEffect.SetArgs(e.Ctx().Our, effectValue)
|
|
|
|
|
|
e.Ctx().Our.SetNextPetBuff(buffEffect)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|