-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #860 from wowsims/p4/general
Add Magmadar's Call and Spirit ofEskhandar set bonuses
- Loading branch information
Showing
17 changed files
with
356 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package guardians | ||
|
||
import ( | ||
"slices" | ||
|
||
"github.com/wowsims/sod/sim/core" | ||
"github.com/wowsims/sod/sim/core/stats" | ||
) | ||
|
||
// https://www.wowhead.com/classic/item-set=1779/core-hounds-call | ||
// https://www.wowhead.com/classic/spell=461267/core-hounds-call | ||
// https://www.wowhead.com/classic/npc=229001/core-hound | ||
|
||
type CoreHound struct { | ||
core.Pet | ||
} | ||
|
||
func NewCoreHound(character *core.Character) *CoreHound { | ||
coreHound := &CoreHound{ | ||
Pet: core.NewPet("Core Hound", character, stats.Stats{}, coreHoundStatInheritance(), false, true), | ||
} | ||
// TODO: Verify | ||
coreHound.Level = 60 | ||
|
||
coreHound.EnableAutoAttacks(coreHound, core.AutoAttackOptions{ | ||
// TODO: Need Core Hound data | ||
MainHand: core.Weapon{ | ||
BaseDamageMin: 1, | ||
BaseDamageMax: 1, | ||
SwingSpeed: 2.0, | ||
SpellSchool: core.SpellSchoolPhysical, | ||
}, | ||
AutoSwingMelee: true, | ||
}) | ||
|
||
return coreHound | ||
} | ||
|
||
func coreHoundStatInheritance() core.PetStatInheritance { | ||
return func(ownerStats stats.Stats) stats.Stats { | ||
// TODO: Needs more verification | ||
return stats.Stats{} | ||
} | ||
} | ||
|
||
func (hound *CoreHound) Initialize() { | ||
} | ||
|
||
func (hound *CoreHound) ExecuteCustomRotation(sim *core.Simulation) { | ||
// Run the cast check only on swings or cast completes | ||
if hound.AutoAttacks.NextAttackAt() != sim.CurrentTime+hound.AutoAttacks.MainhandSwingSpeed() && hound.AutoAttacks.NextAnyAttackAt()-1 > sim.CurrentTime { | ||
hound.WaitUntil(sim, hound.AutoAttacks.NextAttackAt()-1) | ||
return | ||
} | ||
|
||
hound.WaitUntil(sim, hound.AutoAttacks.NextAttackAt()-1) | ||
} | ||
|
||
func (hound *CoreHound) Reset(sim *core.Simulation) { | ||
hound.Disable(sim) | ||
} | ||
|
||
func (hound *CoreHound) OnPetDisable(sim *core.Simulation) { | ||
} | ||
|
||
func (hound *CoreHound) GetPet() *core.Pet { | ||
return &hound.Pet | ||
} | ||
|
||
func constructCoreHound(character *core.Character) { | ||
// Can't use the set bonus itself because of an import cycle | ||
hasSetBonus := slices.ContainsFunc(character.GetActiveSetBonuses(), func(bonus core.ActiveSetBonus) bool { | ||
return bonus.Name == "Core Hound's Call" && bonus.NumPieces >= 2 | ||
}) | ||
|
||
if hasSetBonus { | ||
character.AddPet(NewCoreHound(character)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package guardians | ||
|
||
import ( | ||
"slices" | ||
|
||
"github.com/wowsims/sod/sim/core" | ||
"github.com/wowsims/sod/sim/core/stats" | ||
) | ||
|
||
// https://www.wowhead.com/classic/item-set=1781/spirit-of-eskhandar | ||
// https://www.wowhead.com/classic/spell=461990/call-of-eskhandar | ||
// https://www.wowhead.com/classic/npc=14306/eskhandar | ||
|
||
type Eskhandar struct { | ||
core.Pet | ||
} | ||
|
||
func NewEskhandar(character *core.Character) *Eskhandar { | ||
eskhandar := &Eskhandar{ | ||
Pet: core.NewPet("Eskhandar", character, stats.Stats{}, eskhandarStatInheritance(), false, true), | ||
} | ||
|
||
// TODO: Verify | ||
eskhandar.Level = 60 | ||
|
||
eskhandar.EnableAutoAttacks(eskhandar, core.AutoAttackOptions{ | ||
// TODO: Need Core Hound data | ||
MainHand: core.Weapon{ | ||
BaseDamageMin: 1, | ||
BaseDamageMax: 1, | ||
SwingSpeed: 2.0, | ||
SpellSchool: core.SpellSchoolPhysical, | ||
}, | ||
AutoSwingMelee: true, | ||
}) | ||
|
||
return eskhandar | ||
} | ||
|
||
func eskhandarStatInheritance() core.PetStatInheritance { | ||
return func(ownerStats stats.Stats) stats.Stats { | ||
// TODO: Needs more verification | ||
return stats.Stats{} | ||
} | ||
} | ||
|
||
func (eskhandar *Eskhandar) Initialize() { | ||
} | ||
|
||
func (eskhandar *Eskhandar) ExecuteCustomRotation(sim *core.Simulation) { | ||
// Run the cast check only on swings or cast completes | ||
if eskhandar.AutoAttacks.NextAttackAt() != sim.CurrentTime+eskhandar.AutoAttacks.MainhandSwingSpeed() && eskhandar.AutoAttacks.NextAnyAttackAt()-1 > sim.CurrentTime { | ||
eskhandar.WaitUntil(sim, eskhandar.AutoAttacks.NextAttackAt()-1) | ||
return | ||
} | ||
|
||
eskhandar.WaitUntil(sim, eskhandar.AutoAttacks.NextAttackAt()-1) | ||
} | ||
|
||
func (eskhandar *Eskhandar) Reset(sim *core.Simulation) { | ||
eskhandar.Disable(sim) | ||
} | ||
|
||
func (eskhandar *Eskhandar) OnPetDisable(sim *core.Simulation) { | ||
} | ||
|
||
func (eskhandar *Eskhandar) GetPet() *core.Pet { | ||
return &eskhandar.Pet | ||
} | ||
|
||
func constructEskhandar(character *core.Character) { | ||
// Can't use the set bonus itself because of an import cycle | ||
hasSetBonus := slices.ContainsFunc(character.GetActiveSetBonuses(), func(bonus core.ActiveSetBonus) bool { | ||
return bonus.Name == "Spirit of Eskhandar" && bonus.NumPieces == 4 | ||
}) | ||
|
||
if hasSetBonus { | ||
character.AddPet(NewEskhandar(character)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package guardians | ||
|
||
import "github.com/wowsims/sod/sim/core" | ||
|
||
func ConstructGuardians(character *core.Character) { | ||
constructEmeralDragonWhelps(character) | ||
constructEskhandar(character) | ||
constructCoreHound(character) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.