Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(power): fix semantics of {max,set,refund}_XXX in SpellInfo() #835

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

johnnylam88
Copy link
Contributor

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)

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)
@Sidoine Sidoine merged commit eaf9cf2 into Sidoine:master Feb 4, 2021
@johnnylam88 johnnylam88 deleted the fix/spell-cost branch February 5, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants