Skip to content

Commit

Permalink
Merge pull request #2008 from wowsims/fix_injector_should
Browse files Browse the repository at this point in the history
Make potion check account for extra gain from alch stone / engi injector bonus
  • Loading branch information
lologarithm authored Dec 2, 2022
2 parents 57e5286 + a96d13c commit f3a03d8
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 153 deletions.
8 changes: 7 additions & 1 deletion sim/core/consumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,13 @@ func makePotionActivation(potionType proto.Potions, character *Character, potion
ShouldActivate: func(sim *Simulation, character *Character) bool {
// Only pop if we have less than the max mana provided by the potion minus 1mp5 tick.
totalRegen := character.ManaRegenPerSecondWhileCasting() * 5
return character.MaxMana()-(character.CurrentMana()+totalRegen) >= 4400
manaGain := 4400.0
if alchStoneEquipped && potionType == proto.Potions_RunicManaPotion {
manaGain *= 1.4
} else if hasEngi && potionType == proto.Potions_RunicManaInjector {
manaGain *= 1.25
}
return character.MaxMana()-(character.CurrentMana()+totalRegen) >= manaGain
},
Spell: character.RegisterSpell(SpellConfig{
ActionID: actionID,
Expand Down
Loading

0 comments on commit f3a03d8

Please sign in to comment.