Ovale Spell Priority

Ovale Spell Priority

6M Downloads

[9.0.23] Offgcd abilities proposed ignoring power cost

sirTribble opened this issue ยท 8 comments

commented

Describe the bug
Shield of righteous propose even when i don't have 3 holy power

To Reproduce
example script

Define(shield_of_the_righteous 53600)
SpellInfo(shield_of_the_righteous holypower=3 cd=1 gcd=0 offgcd=1)
Define(avenger_shield 31935)
SpellInfo(avenger_shield cd=15)

AddIcon
{
spell(shield_of_the_righteous)
spell(avenger_shield)
}

cast avenger shield. while avenger shield on CD Shield of righteous will be proposed even if under 3 HP

Expected behavior
Shield of righteous should be proposed only on 3 HP or more

Class, specialization and level

  • Class: Paladin
  • Specialization: any, example on prot
  • Level: 60
commented

It's the expected outcome. If there is nothing better to show, it will display the first available ability even if there isn't any power, but with the translucent icon.

commented

ok. in that case, there is some best action priority inconvenience, regarding offgcd spells with cost :)
There is updated example:
Define(shield_of_the_righteous 53600)
SpellInfo(shield_of_the_righteous holypower=3 cd=1 gcd=0 offgcd=1)
Define(avenger_shield 31935)
SpellInfo(avenger_shield cd=15)
Define(judgment 20271)
Define(consecration 26573)

AddIcon
{
#spell(shield_of_the_righteous)
spell(avenger_shield)
spell(judgment)
spell(consecration)
}

When all abilities on CD, Next Best action will show ability with the shortest remaining CD, so player can spam it to being queued.

if you uncomment spell(shield_of_the_righteous), then it will be shown as a next best action when everything on CD until CD is actually finished (or i get 3 HP). this crate small lag between usage of abilities but it is there unfortunately. hope you understand what i mean.

and i understand that i can always add Holypower() condition to negate this behavior but may be there is some tweaking for best action will be possible also.

commented

I think a different change might be better. The problem isn't that Shield of the Righteous has a spell cost. The problem is that the spell cost is a resource that has regeneration rate that is not positive (it's zero, or less than zero if out of combat). In that sense, Shield of the Righteous will never be ready no longer how much you wait, unless you start using Holy Power generators on your own.

commented

I think a different change might be better. The problem isn't that Shield of the Righteous has a spell cost. The problem is that the spell cost is a resource that has regeneration rate that is not positive (it's zero, or less than zero if out of combat). In that sense, Shield of the Righteous will never be ready no longer how much you wait, unless you start using Holy Power generators on your own.

You are absolutely right! did not thought about it like this

commented

In-game, GetPowerRegen() seems to return very miniscule numbers instead of zero for these resources that don't have any natural regeneration. I think if we just round these off to zero in Ovale, then the timespan module will just return empty sets when evaluated for when abilities that use these resources but the resources aren't yet available.

UPDATE: doing more testing in-game, GetPowerRegen() does sometimes return 0, correctly in the case of holy power. I'll pursue the change regarding spell costs that require builders to generate the resource.

commented

I have a working patch for this change, but it needs further testing on classes that use pool_resource before it's good to go.

commented

@sirTribble Is this fixed? Can it be closed?

commented

yep thx