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

Move spell cost calculation up slightly to account for spell cost ternaries #69760

Merged
merged 3 commits into from
Nov 26, 2023

Conversation

Standing-Storm
Copy link
Contributor

@Standing-Storm Standing-Storm commented Nov 26, 2023

Summary

Infrastructure "Move spell cost calculation up slightly to account for spell cost ternaries"

Purpose of change

Ternaries in spell costs were working the opposite of the way the interface indicated they should work.

Describe the solution

Based on suggestion from andrei8l, move the spell cost deduction to before spell effects are applied.

Fixes #69751

Describe alternatives you've considered

Testing

Cast Karma Arms--it now costs 200 to apply and 0 to remove.
Cast Speak Through the Aether (cost 450 mana), spell cost properly deducted.
Cast Taze (cost 30 bionic power), spell cost properly deducted.
Channel Fountain of Flames (cost : of Stamina bar), power cost properly deducted.
Cast Spear of Brambles (cost 450 mana, components required), spell cost properly deducted, components consumed.
Cast Debug HP Spell (Cost | of HP bar), spell cost properly deducted.

All spells produced the appropriate effects (except for Debug HP spell, I got an error about a missing effect, but the cost worked)

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Nov 26, 2023
src/activity_handlers.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Nov 26, 2023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 26, 2023
@Maleclypse Maleclypse merged commit dfb8658 into CleverRaven:master Nov 26, 2023
26 checks passed
@Standing-Storm Standing-Storm deleted the move-spell-cost branch November 29, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ternaries in spell costs work the opposite of the way the game shows that they should
2 participants