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

Commits on Feb 2, 2021

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

    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)
    johnnylam88 committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    1224c6e View commit details
    Browse the repository at this point in the history