Flat resource cost reduction based on criteria
Hemario opened this issue ยท 4 comments
For instance: DK-Blood - Death strike runicpower cost can be reduced in 2 ways:
- Having talent Ossuary selected and be above 5 charges of Bone Shield. In practice a self-buff is applied: http://www.wowhead.com/spell=219788/ossuary
- T18 4 piece set reduces the cost of death strike by 5 runic power
Tried something but not quite successfull
SpellInfo(death_strike runicpower=40 itemset=T18 itemcount=4 specialization=blood) SpellRequire(death_strike runicpower -5=buff,ossuary_buff)
You have to put final cost in SpellRequire (e.g. SpellRequire(death_strike runicpower 35=buff,ossuary_buff) Maybe a future change would allow this kind of thing.
I tried something along those lines as well.
There is an issue with that as well as you would need to provide 3 different combinations:
- only T18 4pc
- only ossuary_buff
- T18 4pc + ossuary_buff
I tried accomplishing this by doing
SpellInfo(death_strike runicpower=40 itemset=T18 itemcount=4 specialization=blood) SpellRequire(death_strike runicpower 40=buff,ossuary_buff specialization=blood) SpellRequire(death_strike runicpower 35=buff,ossuary_buff itemset=T18 itemcount=4 specialization=blood)
However, this seems to take preference to the second line and never trigger the third. There is also not a way to say "not itemset=T18 itemcount=4" or "itemset=T18 itemcount<4".
We could just implement the ossuary_buff SpellRequire and not care about T18 (for now). T18 will not be worn again at L110, except for twinks (very unlikely) or timewalking.
What exactly is the difference between SpellInfo and SpellRequire? At least in terms of power, both options pull from the same function (PowerCost
).
Also after rummaging around PowerCost try this instead:
SpellInfo(death_strike runicpower=40 itemset=T18 itemcount=4 specialization=blood)
SpellInfo(death_strike runicpower=45 specialization=blood)
SpellInfo(death_strike buff_runicpower=ossuary_buff buff_runicpower_amount=-5 specialization=blood)
We just need to do like you can with cooldown and have an add property. so then instead of the above, it'd simply be.
SpellInfo(death_strike runicpower=45 specialization=blood)
SpellInfo(death_strike addrunicpower=-5 itemset=T18 itemcount=4 specialization=blood)
SpellInfo(death_strike buff_runicpower=ossuary_buff buff_runicpower_amount=-5 specialization=blood)
Honestly, I think some consistency should be done with all the SpellInfo/SpellRequire properties to allow a full range of things to be done with them:
<property>
(powerType, cooldown, etc.)
add<property>
(adds the value to the property)
add<property>_pct
(increases or decreases the value of the property by the given percent)
Probably others I'm forgetting but I have to go.
EDIT: Apparaently <>
are special characters.