refactor: 重构 CurrentPet 为 CurPet
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -190,14 +190,14 @@ func (f *FightC) UseSkillAt(c common.PlayerI, id uint32, actorIndex, targetIndex
|
||||
if self == nil {
|
||||
return
|
||||
}
|
||||
currentPet := self.PrimaryCurrentPet()
|
||||
currentPet := self.PrimaryCurPet()
|
||||
if currentPet == nil {
|
||||
return
|
||||
}
|
||||
if currentPet.Info.Hp <= 0 {
|
||||
return
|
||||
}
|
||||
// t, ok := f.GetInputByPlayer(c, false).CurrentPet[0].Skills[id]
|
||||
// t, ok := f.GetInputByPlayer(c, false).CurPet[0].Skills[id]
|
||||
// if ok {
|
||||
// ret.SkillEntity = t
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ func NewBaseAction(t uint32) BaseAction {
|
||||
func (a *BaseAction) GetPlayerID() uint32 {
|
||||
return a.PlayerID
|
||||
// fmt.Printf("玩家[%d]主动切换宠物:从%s切换到%s(原因:%s)\n",
|
||||
// // a.PlayerID, a.CurrentPet[0].Name, a.TargetPet.Name, a.SwitchReason)
|
||||
// // a.PlayerID, a.CurPet[0].Name, a.TargetPet.Name, a.SwitchReason)
|
||||
}
|
||||
|
||||
func (a *BaseAction) GetActorIndex() int {
|
||||
@@ -85,7 +85,7 @@ type ActiveSwitchAction struct {
|
||||
Cid uint32
|
||||
|
||||
Reason info.ChangePetInfo
|
||||
// CurrentPet BattlePetEntity // 当前在场宠物
|
||||
// CurPet BattlePetEntity // 当前在场宠物
|
||||
// TargetPet BattlePetEntity // 要切换上场的宠物
|
||||
// SwitchReason string // 切换原因
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ func (e *NewSel0) IsOwner() bool {
|
||||
if e.Ctx().Our == nil {
|
||||
return false
|
||||
}
|
||||
if e.Ctx().Our.CurrentPet[0] == nil {
|
||||
if e.Ctx().Our.CurPet[0] == nil {
|
||||
return false
|
||||
}
|
||||
return e.ID().GetCatchTime() == e.Ctx().Our.CurrentPet[0].Info.CatchTime
|
||||
return e.ID().GetCatchTime() == e.Ctx().Our.CurPet[0].Info.CatchTime
|
||||
}
|
||||
|
||||
// 免疫"能力(battle_lv)下降"
|
||||
|
||||
@@ -25,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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel11 struct {
|
||||
|
||||
func (e *NewSel11) Skill_Use_ex() bool {
|
||||
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ type NewSel112 struct {
|
||||
|
||||
func (e *NewSel112) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurPet[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
// 2. 技能为空或非物理攻击,不触发
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel113 struct {
|
||||
|
||||
func (e *NewSel113) DamageLockEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if t.Type != info.DamageType.Red {
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel116 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel116) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ type NewSel12 struct {
|
||||
|
||||
func (e *NewSel12) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurPet[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
// 2. 技能为空或非物理攻击,不触发
|
||||
|
||||
@@ -13,12 +13,12 @@ type NewSel126 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel126) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||
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())
|
||||
p := e.Ctx().Our.CurPet[0].Info.Prop[int(e.Args()[0].IntPart())]
|
||||
e.Ctx().Our.CurPet[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[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())
|
||||
p := e.Ctx().Our.CurPet[0].Info.Prop[int(e.Args()[0].IntPart())]
|
||||
e.Ctx().Our.CurPet[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{})
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel13 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel13) HookAction() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
r := e.Ctx().Our.FightC.GetOverInfo()
|
||||
|
||||
@@ -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[0].Info.CatchTime || !e.ISNaturalEnemy() {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime || !e.ISNaturalEnemy() {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -12,18 +12,18 @@ type NewSel144 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel144) Action_end_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
if e.Ctx().Our.CurrentPet[0].Info.Hp == 0 {
|
||||
if e.Ctx().Our.CurPet[0].Info.Hp == 0 {
|
||||
if e.count >= int(e.Args()[0].IntPart()) {
|
||||
return true
|
||||
}
|
||||
|
||||
e.count++
|
||||
|
||||
e.Ctx().Our.CurrentPet[0].Info.Hp = e.Ctx().Our.CurrentPet[0].Info.MaxHp
|
||||
e.Ctx().Our.CurPet[0].Info.Hp = e.Ctx().Our.CurPet[0].Info.MaxHp
|
||||
e.Ctx().Our.HealPP(-1)
|
||||
for i := 0; i < 6; i++ {
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 6)
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel148 struct {
|
||||
|
||||
func (e *NewSel148) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ type NewSel15 struct {
|
||||
|
||||
func (e *NewSel15) Damage_Mul(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
evs := gconv.Uint32s(strings.Split(xmlres.PetMAP[int(e.Ctx().Our.CurrentPet[0].ID)].NaturalEnemy, " "))
|
||||
evs := gconv.Uint32s(strings.Split(xmlres.PetMAP[int(e.Ctx().Our.CurPet[0].ID)].NaturalEnemy, " "))
|
||||
_, ok := lo.Find(evs, func(t uint32) bool {
|
||||
return t == uint32(e.Ctx().Opp.CurrentPet[0].ID)
|
||||
return t == uint32(e.Ctx().Opp.CurPet[0].ID)
|
||||
})
|
||||
if !ok {
|
||||
return true
|
||||
|
||||
@@ -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[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurPet[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
maxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
|
||||
maxHP := e.Ctx().Our.CurPet[0].GetMaxHP()
|
||||
if e.curhp.IntPart() == 0 {
|
||||
e.curhp = maxHP
|
||||
|
||||
}
|
||||
|
||||
//如果当前被扣除的血量少于当前血,说明我方回血
|
||||
if e.curhp.Cmp(e.Ctx().Our.CurrentPet[0].GetHP()) == -1 {
|
||||
e.curhp = e.Ctx().Our.CurrentPet[0].GetHP()
|
||||
if e.curhp.Cmp(e.Ctx().Our.CurPet[0].GetHP()) == -1 {
|
||||
e.curhp = e.Ctx().Our.CurPet[0].GetHP()
|
||||
return
|
||||
}
|
||||
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()
|
||||
if e.curhp.Sub(e.Ctx().Our.CurPet[0].GetHP()).Cmp(maxHP.Div(alpacadecimal.NewFromInt(8))) == 1 {
|
||||
e.curhp = e.Ctx().Our.CurPet[0].GetHP()
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(e.Args()[0].IntPart()), 1)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel17 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel17) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].GetHP().Cmp(e.Args()[0]) == -1 {
|
||||
if e.Ctx().Our.CurPet[0].GetHP().Cmp(e.Args()[0]) == -1 {
|
||||
e.Ctx().SkillEntity.XML.CritRate = 16
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel18 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel18) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
//fmt.Println(e.Ctx().SkillEntity)
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel183 struct {
|
||||
|
||||
func (e *NewSel183) Skill_Use() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].GetMaxHP())
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurPet[0].GetMaxHP())
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel184 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel184) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ type NewSel20 struct {
|
||||
|
||||
func (e *NewSel20) DamageLockEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -16,7 +16,7 @@ type NewSel21 struct {
|
||||
|
||||
func (e *NewSel21) DamageLockEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].GetHP().Sub(alpacadecimal.NewFromInt(1)))
|
||||
t.Damage = alpacadecimal.Min(t.Damage, e.Ctx().Opp.CurPet[0].GetHP().Sub(alpacadecimal.NewFromInt(1)))
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel22 struct {
|
||||
|
||||
func (e *NewSel22) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if t.Type != info.DamageType.Red {
|
||||
|
||||
@@ -13,11 +13,11 @@ type NewSel223 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel223) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
if int(e.Ctx().Opp.CurrentPet[0].Type) == int(e.Args()[0].IntPart()) {
|
||||
if int(e.Ctx().Opp.CurPet[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))})
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel224 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel224) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].GetHP().Div(alpacadecimal.NewFromInt(3)),
|
||||
Damage: e.Ctx().Opp.CurPet[0].GetHP().Div(alpacadecimal.NewFromInt(3)),
|
||||
})
|
||||
|
||||
return true
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].GetHP().Cmp(e.Args()[0])) == -1 {
|
||||
if int(e.Ctx().Our.CurPet[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[0].GetHP().Cmp(e.Args()[0])) == -1 {
|
||||
if int(e.Ctx().Our.CurPet[0].GetHP().Cmp(e.Args()[0])) == -1 {
|
||||
|
||||
// e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel24 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel24) SkillHit_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
// 技能为空时不处理
|
||||
|
||||
@@ -13,10 +13,10 @@ type NewSel25 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel25) Action_end_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().Our.CurrentPet[0].Info.Hp == 0 {
|
||||
if e.Ctx().Our.CurPet[0].Info.Hp == 0 {
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, alpacadecimal.NewFromInt(1))
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ type NewSel26 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel26) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||
e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())] += uint32(e.Args()[1].IntPart())
|
||||
e.Ctx().Our.CurPet[0].Info.Prop[int(e.Args()[0].IntPart())] += uint32(e.Args()[1].IntPart())
|
||||
}
|
||||
func (e *NewSel26) TurnEnd() {
|
||||
e.Ctx().Our.CurrentPet[0].Info.Prop[int(e.Args()[0].IntPart())] -= uint32(e.Args()[1].IntPart())
|
||||
e.Ctx().Our.CurPet[0].Info.Prop[int(e.Args()[0].IntPart())] -= uint32(e.Args()[1].IntPart())
|
||||
}
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.NewSel, 26, &NewSel26{})
|
||||
|
||||
@@ -17,7 +17,7 @@ type NewSel27 struct {
|
||||
|
||||
func (e *NewSel27) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel28 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel28) DamageAdd(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel283 struct {
|
||||
|
||||
func (e *NewSel283) Skill_Use() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel284 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel284) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel29 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel29) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
//fmt.Println(e.Ctx().SkillEntity)
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel3 struct {
|
||||
|
||||
func (e *NewSel3) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel31 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel31) Action_end_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.Hp == 0 {
|
||||
if e.Ctx().Our.CurPet[0].Info.Hp == 0 {
|
||||
|
||||
e.Ctx().Our.CurrentPet[0].Info.Hp = uint32(e.Args()[1].IntPart())
|
||||
e.Ctx().Our.CurPet[0].Info.Hp = uint32(e.Args()[1].IntPart())
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel32 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel32) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].GetHP(),
|
||||
Damage: e.Ctx().Opp.CurPet[0].GetHP(),
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ type NewSel323 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel323) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
r := e.Ctx().Our.CurrentPet[0].GetMaxHP().Sub(e.Ctx().Our.CurrentPet[0].GetHP()).Div(alpacadecimal.NewFromInt(100))
|
||||
r := e.Ctx().Our.CurPet[0].GetMaxHP().Sub(e.Ctx().Our.CurPet[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})
|
||||
|
||||
@@ -11,13 +11,13 @@ type NewSel33 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel33) Action_end_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
// 3. 概率判定(Args()[1]为触发概率)
|
||||
|
||||
cmp := e.Ctx().Our.CurrentPet[0].GetMaxHP().Div(e.Args()[0])
|
||||
if e.Ctx().Our.CurrentPet[0].GetHP().Cmp(cmp) == -1 {
|
||||
cmp := e.Ctx().Our.CurPet[0].GetMaxHP().Div(e.Args()[0])
|
||||
if e.Ctx().Our.CurPet[0].GetHP().Cmp(cmp) == -1 {
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
|
||||
if !success {
|
||||
return true
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel34 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel34) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
// 2. 技能为空或非物理攻击,不触发
|
||||
|
||||
@@ -13,8 +13,8 @@ type NewSel35 struct {
|
||||
|
||||
func (e *NewSel35) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurPet[0].Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
// 2. 技能为空或非物理攻击,不触发
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel37 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel37) DamageLockEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.Hp = 0
|
||||
e.Ctx().Opp.CurPet[0].Info.Hp = 0
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel38 struct {
|
||||
|
||||
func (e *NewSel39) DamageAdd(t *info.DamageZone) bool {
|
||||
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel39 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel39) Damage_Mul(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().Opp.SumDamage.IntPart() == 0 {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel4 struct {
|
||||
func (e *NewSel4) Skill_Use_ex() bool {
|
||||
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Type {
|
||||
if e.Ctx().SkillEntity.XML.Type == e.Ctx().Our.CurPet[0].Type {
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Opp.SumDamage)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel40 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel40) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel402 struct {
|
||||
|
||||
func (e *NewSel402) DamageAdd(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel403 struct {
|
||||
|
||||
func (e *NewSel403) Action_end_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.remainingTurns > 0 {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel404 struct {
|
||||
|
||||
func (e *NewSel404) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel406 struct {
|
||||
|
||||
func (e *NewSel406) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel407 struct {
|
||||
|
||||
func (e *NewSel407) DamageAdd(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel409 struct {
|
||||
|
||||
func (e *NewSel409) Skill_Use_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel41 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel41) Skill_Use_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,18 +12,18 @@ type NewSel44 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel44) Action_end_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
if e.Ctx().Our.CurrentPet[0].Info.Hp == 0 {
|
||||
if e.Ctx().Our.CurPet[0].Info.Hp == 0 {
|
||||
if e.count >= int(e.Args()[0].IntPart()) {
|
||||
return true
|
||||
}
|
||||
|
||||
e.count++
|
||||
|
||||
e.Ctx().Our.CurrentPet[0].Info.Hp = e.Ctx().Our.CurrentPet[0].Info.MaxHp
|
||||
e.Ctx().Our.CurPet[0].Info.Hp = e.Ctx().Our.CurPet[0].Info.MaxHp
|
||||
e.Ctx().Our.HealPP(-1)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel45 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel45) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
//fmt.Println(e.Ctx().SkillEntity)
|
||||
|
||||
@@ -17,7 +17,7 @@ type NewSel46 struct {
|
||||
|
||||
func (e *NewSel46) Action_end_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.Hp <= 0 {
|
||||
if e.Ctx().Our.CurPet[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[0].GetMaxHP().Sub(alpacadecimal.NewFromInt(1)))
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurPet[0].GetMaxHP().Sub(alpacadecimal.NewFromInt(1)))
|
||||
|
||||
// 更新恢复后的回合数
|
||||
e.lastRecoveryRound = r.Round
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel48 struct {
|
||||
|
||||
func (e *NewSel48) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ type NewSel49 struct {
|
||||
|
||||
func (e *NewSel49) Action_end_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ type NewSel501 struct {
|
||||
|
||||
func (e *NewSel501) SwitchOut(in *input.Input) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
// TODO: 检查是否有队友还活着
|
||||
// 如果有队友活着,恢复自身HP和PP
|
||||
// e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet[0].GetMaxHP())
|
||||
// e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurPet[0].GetMaxHP())
|
||||
// TODO: 恢复PP值的方法
|
||||
|
||||
return true
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel502 struct {
|
||||
// TODO: 需要找到精灵死亡时的回调接口
|
||||
func (e *NewSel502) SwitchOut(in *input.Input) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ func (e *NewSel51) Action_end_ex() bool {
|
||||
if !e.IsOwner() {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().Our.CurrentPet[0].GetHP().IntPart() == 0 {
|
||||
if e.Ctx().Our.CurPet[0].GetHP().IntPart() == 0 {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().Our.CurrentPet[0].GetHP().Cmp(e.Args()[0]) >= 0 {
|
||||
if e.Ctx().Our.CurPet[0].GetHP().Cmp(e.Args()[0]) >= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet[0].GetMaxHP())
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurPet[0].GetMaxHP())
|
||||
e.Ctx().Our.HealPP(-1)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel52 struct {
|
||||
|
||||
func (e *NewSel52) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
// 计算恢复的HP量
|
||||
maxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
|
||||
maxHP := e.Ctx().Our.CurPet[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[0].GetMaxHP()
|
||||
oppMaxHP := e.Ctx().Opp.CurPet[0].GetMaxHP()
|
||||
oppHealAmount := oppMaxHP.Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
|
||||
e.Ctx().Opp.Heal(e.Ctx().Opp, nil, oppHealAmount)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel54 struct {
|
||||
|
||||
func (e *NewSel54) Skill_Use_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel55 struct {
|
||||
|
||||
func (e *NewSel55) DamageAdd(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel56 struct {
|
||||
|
||||
func (e *NewSel56) TurnEnd() {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].GetHP(),
|
||||
Damage: e.Ctx().Opp.CurPet[0].GetHP(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel57 struct {
|
||||
|
||||
func (e *NewSel57) DamageAdd(*info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ func (e *NewSel58) TurnStart(fattack *action.SelectSkillAction, sattack *action.
|
||||
return
|
||||
}
|
||||
|
||||
currentHP := e.Ctx().Our.CurrentPet[0].GetHP()
|
||||
maxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
|
||||
currentHP := e.Ctx().Our.CurPet[0].GetHP()
|
||||
maxHP := e.Ctx().Our.CurPet[0].GetMaxHP()
|
||||
if maxHP.IntPart() == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type NewSel59 struct {
|
||||
// TODO: 需要了解魔王的附身触发条件
|
||||
func (e *NewSel59) Action_end_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel6 struct {
|
||||
|
||||
func (e *NewSel6) Action_end_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel60 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel60) DamageSubEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel61 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel61) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel62 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel62) DamageAdd(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel63 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel63) DamageAdd(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel64 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel64) DamageLockEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
// 技能为空时不处理
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel66 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel66) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel67 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel67) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel69 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel69) DamageAdd(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[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[0].Info.Gender != int(e.Args()[0].IntPart()) {
|
||||
if e.Ctx().Opp.CurPet[0].Info.Gender != int(e.Args()[0].IntPart()) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel699 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel699) Skill_Use_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel700 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel700) Skill_Use() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel71 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel71) Skill_Use_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel72 struct {
|
||||
|
||||
func (e *NewSel72) Skill_Use() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel73 struct {
|
||||
|
||||
func (e *NewSel73) Skill_Use() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel74 struct {
|
||||
|
||||
func (e *NewSel74) Action_end_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -12,17 +12,17 @@ type NewSel75 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel75) TurnEnd() {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
// 敌方恢复m%HP
|
||||
oppMaxHP := e.Ctx().Opp.CurrentPet[0].GetMaxHP()
|
||||
oppMaxHP := e.Ctx().Opp.CurPet[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[0].GetMaxHP()
|
||||
ourMaxHP := e.Ctx().Our.CurPet[0].GetMaxHP()
|
||||
ourHealAmount := ourMaxHP.Mul(e.Args()[1]).Div(alpacadecimal.NewFromInt(100))
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, ourHealAmount)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel76 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel76) Damage_SUB(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -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[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel78 struct {
|
||||
|
||||
func (e *NewSel78) Action_end_ex() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel79 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel79) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func (e *NewSel79) DamageDivEx(t *info.DamageZone) bool {
|
||||
}
|
||||
|
||||
func (e *NewSel79) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel80 struct {
|
||||
|
||||
func (e *NewSel80) Skill_Use() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel81 struct {
|
||||
}
|
||||
|
||||
func (e *NewSel81) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ func (e *NewSel81) DamageDivEx(t *info.DamageZone) bool {
|
||||
}
|
||||
|
||||
// 计算当前体力百分比
|
||||
currentHP := e.Ctx().Our.CurrentPet[0].GetHP()
|
||||
maxHP := e.Ctx().Our.CurrentPet[0].GetMaxHP()
|
||||
currentHP := e.Ctx().Our.CurPet[0].GetHP()
|
||||
maxHP := e.Ctx().Our.CurPet[0].GetMaxHP()
|
||||
hpPercent := currentHP.Mul(alpacadecimal.NewFromInt(100)).Div(maxHP)
|
||||
|
||||
// 检查是否低于阈值
|
||||
@@ -42,7 +42,7 @@ func (e *NewSel81) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
func (e *NewSel81) TurnEnd() {
|
||||
// 魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel82 struct {
|
||||
|
||||
func (e *NewSel82) Miss() {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ func (e *NewSel82) Miss() {
|
||||
|
||||
func (e *NewSel82) TurnEnd() {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel83 struct {
|
||||
|
||||
func (e *NewSel83) Skill_Use() bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user