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:
@@ -203,14 +203,14 @@ type BossJsonEid805 struct {
|
||||
}
|
||||
|
||||
func (e *BossJsonEid805) revive() bool {
|
||||
if !e.ownerActive() || e.used || e.Ctx().Our.CurrentPet[0].Info.Hp != 0 {
|
||||
if !e.ownerActive() || e.used || e.Ctx().Our.CurPet[0].Info.Hp != 0 {
|
||||
return true
|
||||
}
|
||||
e.used = true
|
||||
if !grand.Meet(bossJsonFirstPositiveArg(e.Args(), 0), 100) {
|
||||
return true
|
||||
}
|
||||
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)
|
||||
return true
|
||||
}
|
||||
@@ -257,11 +257,11 @@ type BossJsonEid377 struct {
|
||||
}
|
||||
|
||||
func (e *BossJsonEid377) Fight_Start() bool {
|
||||
if !e.ownerActive() || e.used || e.Ctx().Our.CurrentPet[0] == nil || e.Ctx().Opp.CurrentPet[0] == nil {
|
||||
if !e.ownerActive() || e.used || e.Ctx().Our.CurPet[0] == nil || e.Ctx().Opp.CurPet[0] == nil {
|
||||
return true
|
||||
}
|
||||
e.used = true
|
||||
e.Ctx().Our.CurrentPet[0].Type, e.Ctx().Opp.CurrentPet[0].Type = e.Ctx().Opp.CurrentPet[0].Type, e.Ctx().Our.CurrentPet[0].Type
|
||||
e.Ctx().Our.CurPet[0].Type, e.Ctx().Opp.CurPet[0].Type = e.Ctx().Opp.CurPet[0].Type, e.Ctx().Our.CurPet[0].Type
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ func (e *BossJsonEid261) TurnStart(fattack, sattack *action.SelectSkillAction) {
|
||||
if num <= 0 || den <= 0 {
|
||||
return
|
||||
}
|
||||
heal := e.Ctx().Our.CurrentPet[0].GetMaxHP().Mul(alpacadecimal.NewFromInt(int64(num))).Div(alpacadecimal.NewFromInt(int64(den)))
|
||||
heal := e.Ctx().Our.CurPet[0].GetMaxHP().Mul(alpacadecimal.NewFromInt(int64(num))).Div(alpacadecimal.NewFromInt(int64(den)))
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, nil, heal)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user