-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(power): fix semantics of {max,set,refund}_XXX in SpellInfo() (#835)
When `set_<powerType>` is given in SpellInfo(), use that as the value to which the power should be set after the spell is successfully cast. Ensure that the cost of the spell given by `<powerType>` is met even if `set_<powerType>` is given. If `max_<powerType>` is given in SpellInfo(), use that as the max cost of the spell. Use `getProperty()` instead of directly accessing the value so that any spell requirements are handled at runtime. Note that power cost from `set_<powerType>` has precedence over the cost from `max_<powerType>`. Lastly, always evaluate `refund_<powerType>` to determine the amount of power refunded after the spell is successfully cast. With this change, a combo-point finisher spell can be defined in two different ways: SpellInfo(finisher combopoints=1 set_combopoints=0) or SpellInfo(finisher combopoints=1 max_combopoints=5)
- Loading branch information
1 parent
2ea9e4e
commit eaf9cf2
Showing
1 changed file
with
37 additions
and
31 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