feat: 支持多精灵战斗位操作

This commit is contained in:
xinian
2026-04-04 04:28:04 +08:00
committed by cnb
parent 603c1b5ad3
commit 6439995434
404 changed files with 2567 additions and 1672 deletions

View File

@@ -1,36 +0,0 @@
# Task 194: Effects 1583-1587
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1583
- `argsNum`: `1`
- `info`: `后出手时附加当前战斗回合数×{0}的固定伤害`
### Effect 1584
- `argsNum`: `1`
- `info`: `出手时若自身未满体力则下回合自身受到的攻击伤害减少{0}%`
### Effect 1585
- `argsNum`: `2`
- `info`: `{0}回合内若对手使用攻击技能则自身下{1}回合必定暴击`
### Effect 1586
- `argsNum`: `4`
- `info`: `{0}%令对手{1},若对手已处于{2}状态则将此状态刷新至{3}回合`
- `param`: `1,1,1|1,2,2`
### Effect 1587
- `argsNum`: `1`
- `info`: `当回合击败对手则下回合自身攻击先制+{0}`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 195: Effects 1588-1592
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1588
- `argsNum`: `1`
- `info`: `自身体力低于对手则为自身附加{0}点护盾且附加等量的固定伤害`
### Effect 1589
- `argsNum`: `1`
- `info`: `若对手处于异常状态则令对手随机{0}项技能PP值归零`
### Effect 1590
- `argsNum`: `0`
- `info`: `自身体力低于对手时100%的概率打出致命一击`
### Effect 1591
- `argsNum`: `2`
- `info`: `{0}%秒杀对手,未触发则自身全属性+{1}`
### Effect 1592
- `argsNum`: `1`
- `info`: `风之力量觉醒,使自身下{0}次攻击获得蚀骨之风效果`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 196: Effects 1593-1597
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1593
- `argsNum`: `3`
- `info`: `1回合做{0}-{1}次攻击,自身体力低于对手时连击上限为{2}`
### Effect 1594
- `argsNum`: `5`
- `info`: `{0}回合内受到攻击则{1}%使自身全属性+{2},未触发则{3}%使对手全属性-{4}`
### Effect 1595
- `argsNum`: `0`
- `info`: `若对手为咸咸粽则100%打出致命一击`
### Effect 1596
- `argsNum`: `0`
- `info`: `若对手为甜甜粽则100%打出致命一击`
### Effect 1597
- `argsNum`: `0`
- `info`: `命中后50%令对手睡眠,若对手为咸咸粽则概率翻倍`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,37 +0,0 @@
# Task 197: Effects 1598-1602
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1598
- `argsNum`: `0`
- `info`: `命中后50%令对手害怕,若对手为甜甜粽则概率翻倍`
### Effect 1599
- `argsNum`: `5`
- `info`: `{0}回合内受到攻击则{1}%令对手{2},未触发则{3}%令对手{4}`
- `param`: `1,2,2|1,4,4`
### Effect 1600
- `argsNum`: `6`
- `info`: `命中后{0}%令对手{1},未触发则自身下{2}回合攻击必定致命一击,触发后{3}回合内对手主动切换精灵则登场精灵{4}%进入{5}状态`
- `param`: `1,1,1|1,5,5`
### Effect 1601
- `argsNum`: `1`
- `info`: `命中后附加自身最大体力{0}%的百分比伤害,若打出的攻击伤害为奇数则额外恢复等量体力值`
### Effect 1602
- `argsNum`: `3`
- `info`: `{0}回合内每回合使用技能恢复自身最大体力的1/{1},恢复体力时若自身为满体力则恢复己方所有不在场精灵{2}点体力`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 198: Effects 1603-1608
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1603
- `argsNum`: `2`
- `info`: `{0}%降低对手所有PP值{1}点`
### Effect 1604
- `argsNum`: `2`
- `info`: `{0}%恢复自身所有PP值{1}点`
### Effect 1606
- `argsNum`: `1`
- `info`: `反转自身能力下降状态反转成功则吸取对手最大体力的1/{0}`
### Effect 1607
- `argsNum`: `1`
- `info`: `当回合未击败对手则附加自身最大体力1/{0}的百分比伤害`
### Effect 1608
- `argsNum`: `0`
- `info`: `召唤自己的伙伴进行5-10次攻击布布鸟发起时可额外令自身下回合所有技能先制+3`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -141,13 +141,21 @@ func (f *FightC) Over(c common.PlayerI, res model.EnumBattleOverReason) {
// 切换精灵 主动和被驱逐
func (f *FightC) ChangePet(c common.PlayerI, id uint32) {
f.ChangePetAt(c, id, 0)
}
func (f *FightC) ChangePetAt(c common.PlayerI, id uint32, actorIndex int) {
if f.closefight {
return
}
ii, _ := f.GetInputByPlayer(c, false).GetPet(id)
self := f.getInputByUserID(c.GetInfo().UserID, actorIndex, false)
if self == nil {
return
}
ii, _ := self.GetPet(id)
if ii == nil {
//无法切换不允许切换的精灵
return
@@ -157,12 +165,17 @@ func (f *FightC) ChangePet(c common.PlayerI, id uint32) {
BaseAction: action.NewBaseAction(c.GetInfo().UserID),
Cid: id,
}
ret.ActorIndex = actorIndex
f.submitAction(ret)
}
// 玩家使用技能
func (f *FightC) UseSkill(c common.PlayerI, id uint32) {
f.UseSkillAt(c, id, 0, 0)
}
func (f *FightC) UseSkillAt(c common.PlayerI, id uint32, actorIndex, targetIndex int) {
if f.closefight {
return
@@ -170,19 +183,26 @@ func (f *FightC) UseSkill(c common.PlayerI, id uint32) {
ret := &action.SelectSkillAction{
BaseAction: action.NewBaseAction(c.GetInfo().UserID),
}
ret.ActorIndex = actorIndex
ret.TargetIndex = targetIndex
if f.GetInputByPlayer(c, false).CurrentPet == nil {
self := f.getInputByUserID(c.GetInfo().UserID, actorIndex, false)
if self == nil {
return
}
if f.GetInputByPlayer(c, false).CurrentPet.Info.Hp <= 0 {
currentPet := self.PrimaryCurrentPet()
if currentPet == nil {
return
}
// t, ok := f.GetInputByPlayer(c, false).CurrentPet.Skills[id]
if currentPet.Info.Hp <= 0 {
return
}
// t, ok := f.GetInputByPlayer(c, false).CurrentPet[0].Skills[id]
// if ok {
// ret.SkillEntity = t
// }
for _, v := range f.GetInputByPlayer(c, false).CurrentPet.Skills {
for _, v := range currentPet.Skills {
if v.XML.ID == int(id) {
ret.SkillEntity = v
@@ -204,6 +224,10 @@ func (f *FightC) Capture(c common.PlayerI, id uint32) {
}
func (f *FightC) UseItem(c common.PlayerI, cacthid, itemid uint32) {
f.UseItemAt(c, cacthid, itemid, 0, 0)
}
func (f *FightC) UseItemAt(c common.PlayerI, cacthid, itemid uint32, actorIndex, targetIndex int) {
if f.closefight {
return
@@ -212,7 +236,10 @@ func (f *FightC) UseItem(c common.PlayerI, cacthid, itemid uint32) {
go f.UseSkill(c, 0)
return
}
f.submitAction(&action.UseItemAction{BaseAction: action.NewBaseAction(c.GetInfo().UserID), ItemID: itemid, CacthTime: cacthid})
actionInfo := &action.UseItemAction{BaseAction: action.NewBaseAction(c.GetInfo().UserID), ItemID: itemid, CacthTime: cacthid}
actionInfo.ActorIndex = actorIndex
actionInfo.TargetIndex = targetIndex
f.submitAction(actionInfo)
}
// ReadyFight 处理玩家战斗准备逻辑,当满足条件时启动战斗循环

View File

@@ -24,6 +24,8 @@ var PlayerOperations = enum.New[struct {
// BattleActionI 战斗动作接口
type BattleActionI interface {
GetPlayerID() uint32
GetActorIndex() int
GetTargetIndex() int
GetRound() uint32
SetRound(uint32)
Priority() int // 优先级
@@ -43,8 +45,10 @@ func (*SelectSkillAction) Priority() int {
}
type BaseAction struct {
PlayerID uint32 // 玩家ID
Round uint32 // 所属回合
PlayerID uint32 // 玩家ID
ActorIndex int // 当前由该玩家操作的我方战斗位下标默认0
TargetIndex int // 当前动作选中的敌方战斗位下标默认0
Round uint32 // 所属回合
}
func NewBaseAction(t uint32) BaseAction {
@@ -56,7 +60,15 @@ func NewBaseAction(t uint32) BaseAction {
func (a *BaseAction) GetPlayerID() uint32 {
return a.PlayerID
// fmt.Printf("玩家[%d]主动切换宠物:从%s切换到%s原因%s\n",
// // a.PlayerID, a.CurrentPet.Name, a.TargetPet.Name, a.SwitchReason)
// // a.PlayerID, a.CurrentPet[0].Name, a.TargetPet.Name, a.SwitchReason)
}
func (a *BaseAction) GetActorIndex() int {
return a.ActorIndex
}
func (a *BaseAction) GetTargetIndex() int {
return a.TargetIndex
}
func (a *BaseAction) GetRound() uint32 {

View File

@@ -24,10 +24,10 @@ func (e *NewSel0) IsOwner() bool {
if e.Ctx().Our == nil {
return false
}
if e.Ctx().Our.CurrentPet == nil {
if e.Ctx().Our.CurrentPet[0] == nil {
return false
}
return e.ID().GetCatchTime() == e.Ctx().Our.CurrentPet.Info.CatchTime
return e.ID().GetCatchTime() == e.Ctx().Our.CurrentPet[0].Info.CatchTime
}
// 免疫"能力(battle_lv)下降"

View File

@@ -11,8 +11,9 @@ type NewSel10 struct {
NewSel0
can bool
}
func (e *NewSel10) SwitchOut(in *input.Input) bool {
e.can=false
e.can = false
return true
}
func (e *NewSel10) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
@@ -24,7 +25,7 @@ func (e *NewSel10) TurnStart(fattack *action.SelectSkillAction, sattack *action.
}
func (e *NewSel10) OnSkill() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -13,7 +13,7 @@ type NewSel11 struct {
func (e *NewSel11) Skill_Use_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -14,8 +14,8 @@ type NewSel112 struct {
func (e *NewSel112) DamageDivEx(t *info.DamageZone) bool {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet.Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet[0].Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 2. 技能为空或非物理攻击,不触发

View File

@@ -15,7 +15,7 @@ type NewSel113 struct {
func (e *NewSel113) DamageLockEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if t.Type != info.DamageType.Red {

View File

@@ -13,7 +13,7 @@ type NewSel114 struct {
func (e *NewSel114) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
// TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;a1: n的核心逻辑
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}

View File

@@ -12,7 +12,7 @@ type NewSel116 struct {
}
func (e *NewSel116) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -14,8 +14,8 @@ type NewSel12 struct {
func (e *NewSel12) DamageDivEx(t *info.DamageZone) bool {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet.Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet[0].Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 2. 技能为空或非物理攻击,不触发

View File

@@ -13,12 +13,12 @@ type NewSel126 struct {
}
func (e *NewSel126) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
p := e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())]
e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())] += uint32(e.Args()[1].Div(alpacadecimal.NewFromInt(100).Mul(alpacadecimal.NewFromInt(int64(p)))).IntPart())
p := e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())]
e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())] += uint32(e.Args()[1].Div(alpacadecimal.NewFromInt(100).Mul(alpacadecimal.NewFromInt(int64(p)))).IntPart())
}
func (e *NewSel126) TurnEnd() {
p := e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())]
e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())] -= uint32(e.Args()[1].Div(alpacadecimal.NewFromInt(100).Mul(alpacadecimal.NewFromInt(int64(p)))).IntPart())
p := e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())]
e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())] -= uint32(e.Args()[1].Div(alpacadecimal.NewFromInt(100).Mul(alpacadecimal.NewFromInt(int64(p)))).IntPart())
}
func init() {
input.InitEffect(input.EffectType.NewSel, 126, &NewSel126{})

View File

@@ -12,7 +12,7 @@ type NewSel13 struct {
}
func (e *NewSel13) HookAction() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
r := e.Ctx().Our.FightC.GetOverInfo()

View File

@@ -15,7 +15,7 @@ type NewSel14 struct {
func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
// TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;a1: n的核心逻辑
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime || !e.ISNaturalEnemy() {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime || !e.ISNaturalEnemy() {
return
}

View File

@@ -12,18 +12,18 @@ type NewSel144 struct {
}
func (e *NewSel144) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().Our.CurrentPet.Info.Hp == 0 {
if e.Ctx().Our.CurrentPet[0].Info.Hp == 0 {
if e.count >= int(e.Args()[0].IntPart()) {
return true
}
e.count++
e.Ctx().Our.CurrentPet.Info.Hp = e.Ctx().Our.CurrentPet.Info.MaxHp
e.Ctx().Our.CurrentPet[0].Info.Hp = e.Ctx().Our.CurrentPet[0].Info.MaxHp
e.Ctx().Our.HealPP(-1)
for i := 0; i < 6; i++ {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 6)

View File

@@ -15,7 +15,7 @@ type NewSel148 struct {
func (e *NewSel148) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -19,12 +19,12 @@ type NewSel15 struct {
func (e *NewSel15) Damage_Mul(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
evs := gconv.Uint32s(strings.Split(xmlres.PetMAP[int(e.Ctx().Our.CurrentPet.ID)].NaturalEnemy, " "))
evs := gconv.Uint32s(strings.Split(xmlres.PetMAP[int(e.Ctx().Our.CurrentPet[0].ID)].NaturalEnemy, " "))
_, ok := lo.Find(evs, func(t uint32) bool {
return t == uint32(e.Ctx().Opp.CurrentPet.ID)
return t == uint32(e.Ctx().Opp.CurrentPet[0].ID)
})
if !ok {
return true

View File

@@ -16,23 +16,23 @@ type NewSel16 struct {
func (e *NewSel16) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet.Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet[0].Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
maxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
if e.curhp.IntPart() == 0 {
e.curhp = maxHP
}
//如果当前被扣除的血量少于当前血,说明我方回血
if e.curhp.Cmp(e.Ctx().Our.CurrentPet.GetHP()) == -1 {
e.curhp = e.Ctx().Our.CurrentPet.GetHP()
if e.curhp.Cmp(e.Ctx().Our.CurrentPet[0].GetHP()) == -1 {
e.curhp = e.Ctx().Our.CurrentPet[0].GetHP()
return
}
if e.curhp.Sub(e.Ctx().Our.CurrentPet.GetHP()).Cmp(maxHP.Div(alpacadecimal.NewFromInt(8))) == 1 {
e.curhp = e.Ctx().Our.CurrentPet.GetHP()
if e.curhp.Sub(e.Ctx().Our.CurrentPet[0].GetHP()).Cmp(maxHP.Div(alpacadecimal.NewFromInt(8))) == 1 {
e.curhp = e.Ctx().Our.CurrentPet[0].GetHP()
e.Ctx().Our.SetProp(e.Ctx().Our, int8(e.Args()[0].IntPart()), 1)
}

View File

@@ -13,7 +13,7 @@ type NewSel17 struct {
}
func (e *NewSel17) ActionStart(a, b *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
//fmt.Println(e.Ctx().SkillEntity)
@@ -24,7 +24,7 @@ func (e *NewSel17) ActionStart(a, b *action.SelectSkillAction) bool {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Args()[0]) == -1 {
if e.Ctx().Our.CurrentPet[0].GetHP().Cmp(e.Args()[0]) == -1 {
e.Ctx().SkillEntity.XML.CritRate = 16
}

View File

@@ -13,7 +13,7 @@ type NewSel18 struct {
}
func (e *NewSel18) ActionStart(a, b *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
//fmt.Println(e.Ctx().SkillEntity)

View File

@@ -11,7 +11,7 @@ type NewSel183 struct {
func (e *NewSel183) Skill_Use() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -19,7 +19,7 @@ func (e *NewSel183) Skill_Use() bool {
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) > 0 {
//这里不是通过技能回血的
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet.GetMaxHP())
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet[0].GetMaxHP())
}
return true

View File

@@ -13,7 +13,7 @@ type NewSel184 struct {
}
func (e *NewSel184) DamageDivEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -14,7 +14,7 @@ type NewSel19 struct {
func (e *NewSel19) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -17,7 +17,7 @@ type NewSel20 struct {
func (e *NewSel20) DamageLockEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -16,7 +16,7 @@ type NewSel21 struct {
func (e *NewSel21) DamageLockEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {
@@ -29,7 +29,7 @@ func (e *NewSel21) DamageLockEx(t *info.DamageZone) bool {
return sid == e.Ctx().SkillEntity.XML.ID
})
if !ok {
t.Damage = alpacadecimal.Min(t.Damage, e.Ctx().Opp.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1)))
t.Damage = alpacadecimal.Min(t.Damage, e.Ctx().Opp.CurrentPet[0].GetHP().Sub(alpacadecimal.NewFromInt(1)))
}
return true

View File

@@ -13,7 +13,7 @@ type NewSel22 struct {
func (e *NewSel22) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if t.Type != info.DamageType.Red {

View File

@@ -13,11 +13,11 @@ type NewSel223 struct {
}
func (e *NewSel223) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if int(e.Ctx().Opp.CurrentPet.Type) == int(e.Args()[0].IntPart()) {
if int(e.Ctx().Opp.CurrentPet[0].Type) == int(e.Args()[0].IntPart()) {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed,
Damage: alpacadecimal.NewFromInt(int64(e.Ctx().Opp.GetPetInfo().Info.MaxHp))})

View File

@@ -15,7 +15,7 @@ type NewSel224 struct {
}
func (e *NewSel224) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 技能为空时不处理
@@ -34,7 +34,7 @@ func (e *NewSel224) Skill_Use() bool {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: e.Ctx().Opp.CurrentPet.GetHP().Div(alpacadecimal.NewFromInt(3)),
Damage: e.Ctx().Opp.CurrentPet[0].GetHP().Div(alpacadecimal.NewFromInt(3)),
})
return true

View File

@@ -16,7 +16,7 @@ type NewSel23 struct {
func (e *NewSel23) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -35,7 +35,7 @@ func (e *NewSel23) ComparePre(fattack *action.SelectSkillAction, sattack *action
}
//full32 := int(e.Args()[0])<<16 | int(e.Args()[1])
if int(e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Args()[0])) == -1 {
if int(e.Ctx().Our.CurrentPet[0].GetHP().Cmp(e.Args()[0])) == -1 {
sattack.SkillEntity.XML.Priority = math.MaxInt
}
@@ -48,7 +48,7 @@ func (e *NewSel23) DamageFloor(t *info.DamageZone) bool {
}
if int(e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Args()[0])) == -1 {
if int(e.Ctx().Our.CurrentPet[0].GetHP().Cmp(e.Args()[0])) == -1 {
// e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{

View File

@@ -14,7 +14,7 @@ type NewSel24 struct {
}
func (e *NewSel24) SkillHit_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 技能为空时不处理

View File

@@ -13,10 +13,10 @@ type NewSel25 struct {
}
func (e *NewSel25) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().Our.CurrentPet.Info.Hp == 0 {
if e.Ctx().Our.CurrentPet[0].Info.Hp == 0 {
e.Ctx().Our.Heal(e.Ctx().Our, nil, alpacadecimal.NewFromInt(1))

View File

@@ -11,10 +11,10 @@ type NewSel26 struct {
}
func (e *NewSel26) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())] += uint32(e.Args()[1].IntPart())
e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())] += uint32(e.Args()[1].IntPart())
}
func (e *NewSel26) TurnEnd() {
e.Ctx().Our.CurrentPet.Info.Prop[int(e.Args()[0].IntPart())] -= uint32(e.Args()[1].IntPart())
e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())] -= uint32(e.Args()[1].IntPart())
}
func init() {
input.InitEffect(input.EffectType.NewSel, 26, &NewSel26{})

View File

@@ -17,7 +17,7 @@ type NewSel27 struct {
func (e *NewSel27) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -14,7 +14,7 @@ type NewSel28 struct {
}
func (e *NewSel28) DamageAdd(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -11,7 +11,7 @@ type NewSel283 struct {
func (e *NewSel283) Skill_Use() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -13,7 +13,7 @@ type NewSel284 struct {
}
func (e *NewSel284) DamageDivEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -15,7 +15,7 @@ type NewSel29 struct {
}
func (e *NewSel29) ActionStart(a, b *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
//fmt.Println(e.Ctx().SkillEntity)

View File

@@ -15,7 +15,7 @@ type NewSel3 struct {
func (e *NewSel3) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -11,7 +11,7 @@ type NewSel31 struct {
}
func (e *NewSel31) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 3. 概率判定Args()[1]为触发概率)
@@ -20,9 +20,9 @@ func (e *NewSel31) Action_end_ex() bool {
return true
}
if e.Ctx().Our.CurrentPet.Info.Hp == 0 {
if e.Ctx().Our.CurrentPet[0].Info.Hp == 0 {
e.Ctx().Our.CurrentPet.Info.Hp = uint32(e.Args()[1].IntPart())
e.Ctx().Our.CurrentPet[0].Info.Hp = uint32(e.Args()[1].IntPart())
}

View File

@@ -14,7 +14,7 @@ type NewSel32 struct {
}
func (e *NewSel32) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {
@@ -37,7 +37,7 @@ func (e *NewSel32) Skill_Use() bool {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Opp.CurrentPet.GetHP(),
Damage: e.Ctx().Opp.CurrentPet[0].GetHP(),
})
return true
}

View File

@@ -13,10 +13,10 @@ type NewSel323 struct {
}
func (e *NewSel323) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
r := e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP()).Div(alpacadecimal.NewFromInt(100))
r := e.Ctx().Our.CurrentPet[0].GetMaxHP().Sub(e.Ctx().Our.CurrentPet[0].GetHP()).Div(alpacadecimal.NewFromInt(100))
dug := r.Mul(e.Args()[1])
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed,
Damage: dug})

View File

@@ -11,13 +11,13 @@ type NewSel33 struct {
}
func (e *NewSel33) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 3. 概率判定Args()[1]为触发概率)
cmp := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(cmp) == -1 {
cmp := e.Ctx().Our.CurrentPet[0].GetMaxHP().Div(e.Args()[0])
if e.Ctx().Our.CurrentPet[0].GetHP().Cmp(cmp) == -1 {
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true

View File

@@ -12,7 +12,7 @@ type NewSel34 struct {
}
func (e *NewSel34) DamageDivEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 2. 技能为空或非物理攻击,不触发

View File

@@ -13,8 +13,8 @@ type NewSel35 struct {
func (e *NewSel35) DamageDivEx(t *info.DamageZone) bool {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet.Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet[0].Info.CatchTime)
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 2. 技能为空或非物理攻击,不触发

View File

@@ -32,7 +32,7 @@ func (e *NewSel36) DamageDivEx(t *info.DamageZone) bool {
e.Ctx().Our.AttackValue.State = uint32(e.Args()[e.index].IntPart())
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -11,7 +11,7 @@ type NewSel37 struct {
}
func (e *NewSel37) DamageLockEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -21,7 +21,7 @@ func (e *NewSel37) DamageLockEx(t *info.DamageZone) bool {
if t.Damage.IntPart() > int64(e.Args()[0].IntPart()) {
e.Ctx().Opp.CurrentPet.Info.Hp = 0
e.Ctx().Opp.CurrentPet[0].Info.Hp = 0
}

View File

@@ -15,7 +15,7 @@ type NewSel38 struct {
func (e *NewSel39) DamageAdd(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -13,7 +13,7 @@ type NewSel39 struct {
}
func (e *NewSel39) Damage_Mul(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -28,7 +28,7 @@ func (e *NewSel39) Damage_Mul(t *info.DamageZone) bool {
func (e *NewSel39) Skill_Use_ex() bool {
//fmt.Println("NewSel39", t.Damage.IntPart())
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().Opp.SumDamage.IntPart() == 0 {

View File

@@ -14,7 +14,7 @@ type NewSel4 struct {
func (e *NewSel4) Skill_Use_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -22,7 +22,7 @@ func (e *NewSel4) Skill_Use_ex() bool {
return true
}
if e.Ctx().SkillEntity.XML.Type == e.Ctx().Our.CurrentPet.Type {
if e.Ctx().SkillEntity.XML.Type == e.Ctx().Our.CurrentPet[0].Type {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Opp.SumDamage)

View File

@@ -15,7 +15,7 @@ type NewSel40 struct {
}
func (e *NewSel40) DamageDivEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -30,7 +30,7 @@ func (e *NewSel40) DamageDivEx(t *info.DamageZone) bool {
func (e *NewSel40) Skill_Use_ex() bool {
//fmt.Println("NewSel39", t.Damage.IntPart())
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel402 struct {
func (e *NewSel402) DamageAdd(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -15,7 +15,7 @@ type NewSel403 struct {
func (e *NewSel403) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.remainingTurns > 0 {

View File

@@ -14,7 +14,7 @@ type NewSel404 struct {
func (e *NewSel404) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel405 struct {
func (e *NewSel405) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -14,7 +14,7 @@ type NewSel406 struct {
func (e *NewSel406) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -14,7 +14,7 @@ type NewSel407 struct {
func (e *NewSel407) DamageAdd(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel409 struct {
func (e *NewSel409) Skill_Use_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -11,7 +11,7 @@ type NewSel41 struct {
}
func (e *NewSel41) Skill_Use_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -13,7 +13,7 @@ type NewSel42 struct {
func (e *NewSel42) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,18 +12,18 @@ type NewSel44 struct {
}
func (e *NewSel44) Action_end_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().Our.CurrentPet.Info.Hp == 0 {
if e.Ctx().Our.CurrentPet[0].Info.Hp == 0 {
if e.count >= int(e.Args()[0].IntPart()) {
return true
}
e.count++
e.Ctx().Our.CurrentPet.Info.Hp = e.Ctx().Our.CurrentPet.Info.MaxHp
e.Ctx().Our.CurrentPet[0].Info.Hp = e.Ctx().Our.CurrentPet[0].Info.MaxHp
e.Ctx().Our.HealPP(-1)
}

View File

@@ -13,7 +13,7 @@ type NewSel45 struct {
}
func (e *NewSel45) ActionStart(a, b *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
//fmt.Println(e.Ctx().SkillEntity)

View File

@@ -17,7 +17,7 @@ type NewSel46 struct {
func (e *NewSel46) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -27,10 +27,10 @@ func (e *NewSel46) Action_end_ex() bool {
// 检查是否在5回合内
if r.Round-e.lastRecoveryRound <= 5 {
// 检查体力是否被降到0
if e.Ctx().Our.CurrentPet.Info.Hp <= 0 {
if e.Ctx().Our.CurrentPet[0].Info.Hp <= 0 {
// 体力降到0保留1点体力恢复满
e.Ctx().Our.Heal(e.Ctx().Our, nil, alpacadecimal.NewFromInt(1))
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet.GetMaxHP().Sub(alpacadecimal.NewFromInt(1)))
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet[0].GetMaxHP().Sub(alpacadecimal.NewFromInt(1)))
// 更新恢复后的回合数
e.lastRecoveryRound = r.Round

View File

@@ -14,7 +14,7 @@ type NewSel48 struct {
func (e *NewSel48) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -20,7 +20,7 @@ type NewSel49 struct {
func (e *NewSel49) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -42,7 +42,7 @@ func (e *NewSel49) Action_end_ex() bool {
func (e *NewSel49) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -16,7 +16,7 @@ type NewSel50 struct {
func (e *NewSel50) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,13 +12,13 @@ type NewSel501 struct {
func (e *NewSel501) SwitchOut(in *input.Input) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// TODO: 检查是否有队友还活着
// 如果有队友活着恢复自身HP和PP
// e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet.GetMaxHP())
// e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet[0].GetMaxHP())
// TODO: 恢复PP值的方法
return true

View File

@@ -13,7 +13,7 @@ type NewSel502 struct {
// TODO: 需要找到精灵死亡时的回调接口
func (e *NewSel502) SwitchOut(in *input.Input) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -13,7 +13,7 @@ type NewSel503 struct {
func (e *NewSel503) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}

View File

@@ -13,14 +13,14 @@ func (e *NewSel51) Action_end_ex() bool {
if !e.IsOwner() {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().IntPart() == 0 {
if e.Ctx().Our.CurrentPet[0].GetHP().IntPart() == 0 {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Args()[0]) >= 0 {
if e.Ctx().Our.CurrentPet[0].GetHP().Cmp(e.Args()[0]) >= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet.GetMaxHP())
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet[0].GetMaxHP())
e.Ctx().Our.HealPP(-1)
return true
}

View File

@@ -14,7 +14,7 @@ type NewSel52 struct {
func (e *NewSel52) DamageDivEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -14,19 +14,19 @@ type NewSel53 struct {
func (e *NewSel53) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}
// 计算恢复的HP量
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
maxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
healAmount := maxHP.Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
// 恢复我方HP
e.Ctx().Our.Heal(e.Ctx().Our, nil, healAmount)
// 恢复敌方HP
oppMaxHP := e.Ctx().Opp.CurrentPet.GetMaxHP()
oppMaxHP := e.Ctx().Opp.CurrentPet[0].GetMaxHP()
oppHealAmount := oppMaxHP.Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
e.Ctx().Opp.Heal(e.Ctx().Opp, nil, oppHealAmount)
}

View File

@@ -12,7 +12,7 @@ type NewSel54 struct {
func (e *NewSel54) Skill_Use_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel55 struct {
func (e *NewSel55) DamageAdd(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel56 struct {
func (e *NewSel56) TurnEnd() {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}
@@ -22,7 +22,7 @@ func (e *NewSel56) TurnEnd() {
// 秒杀对方将其体力降为0
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Opp.CurrentPet.GetHP(),
Damage: e.Ctx().Opp.CurrentPet[0].GetHP(),
})
}
}

View File

@@ -12,7 +12,7 @@ type NewSel57 struct {
func (e *NewSel57) DamageAdd(*info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -19,8 +19,8 @@ func (e *NewSel58) TurnStart(fattack *action.SelectSkillAction, sattack *action.
return
}
currentHP := e.Ctx().Our.CurrentPet.GetHP()
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
currentHP := e.Ctx().Our.CurrentPet[0].GetHP()
maxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
if maxHP.IntPart() == 0 {
return
}

View File

@@ -18,7 +18,7 @@ type NewSel59 struct {
// TODO: 需要了解魔王的附身触发条件
func (e *NewSel59) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -31,7 +31,7 @@ func (e *NewSel59) Action_end_ex() bool {
func (e *NewSel59) DamageSubEx(t *info.DamageZone) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
@@ -50,7 +50,7 @@ func (e *NewSel59) DamageSubEx(t *info.DamageZone) bool {
func (e *NewSel59) TurnEnd() {
// 魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}

View File

@@ -13,7 +13,7 @@ type NewSel6 struct {
func (e *NewSel6) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -14,7 +14,7 @@ type NewSel60 struct {
}
func (e *NewSel60) DamageSubEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -14,7 +14,7 @@ type NewSel61 struct {
}
func (e *NewSel61) DamageDivEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -14,7 +14,7 @@ type NewSel62 struct {
}
func (e *NewSel62) DamageAdd(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -12,7 +12,7 @@ type NewSel63 struct {
}
func (e *NewSel63) DamageAdd(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -14,7 +14,7 @@ type NewSel64 struct {
}
func (e *NewSel64) DamageLockEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
// 技能为空时不处理

View File

@@ -12,7 +12,7 @@ type NewSel66 struct {
}
func (e *NewSel66) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -12,7 +12,7 @@ type NewSel67 struct {
}
func (e *NewSel67) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -13,7 +13,7 @@ type NewSel69 struct {
}
func (e *NewSel69) DamageAdd(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {
@@ -21,7 +21,7 @@ func (e *NewSel69) DamageAdd(t *info.DamageZone) bool {
}
// 检查对手性别
if e.Ctx().Opp.CurrentPet.Info.Gender != int(e.Args()[0].IntPart()) {
if e.Ctx().Opp.CurrentPet[0].Info.Gender != int(e.Args()[0].IntPart()) {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel699 struct {
}
func (e *NewSel699) Skill_Use_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -14,7 +14,7 @@ type NewSel700 struct {
}
func (e *NewSel700) Skill_Use() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -11,7 +11,7 @@ type NewSel71 struct {
}
func (e *NewSel71) Skill_Use_ex() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel72 struct {
func (e *NewSel72) Skill_Use() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -14,7 +14,7 @@ type NewSel73 struct {
func (e *NewSel73) Skill_Use() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}

View File

@@ -12,7 +12,7 @@ type NewSel74 struct {
func (e *NewSel74) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -12,17 +12,17 @@ type NewSel75 struct {
}
func (e *NewSel75) TurnEnd() {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}
// 敌方恢复m%HP
oppMaxHP := e.Ctx().Opp.CurrentPet.GetMaxHP()
oppMaxHP := e.Ctx().Opp.CurrentPet[0].GetMaxHP()
oppHealAmount := oppMaxHP.Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
e.Ctx().Opp.Heal(e.Ctx().Opp, nil, oppHealAmount)
// 我方恢复n%HP
ourMaxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
ourMaxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
ourHealAmount := ourMaxHP.Mul(e.Args()[1]).Div(alpacadecimal.NewFromInt(100))
e.Ctx().Our.Heal(e.Ctx().Our, nil, ourHealAmount)
}

View File

@@ -13,7 +13,7 @@ type NewSel76 struct {
}
func (e *NewSel76) Damage_SUB(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

View File

@@ -12,7 +12,7 @@ type NewSel77 struct {
}
func (e *NewSel77) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return
}

View File

@@ -12,7 +12,7 @@ type NewSel78 struct {
func (e *NewSel78) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {

Some files were not shown because too many files have changed in this diff Show More