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

SA feature Add: refund all equipment costs #251

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mweston6288
Copy link

Refunds all dust and shards spent to upgrade equipment in exchange for resetting progress in the Spire Assault.

Since newer gear makes older gear obsolete, this will let people reinvest dust and shards spent on equipment no longer used that would otherwise go to waste. In exchange, The Spire Assault is reset to level 1 and players have to work their way back up. One-time and repeated bonuses, equipment unlocks, and ring upgrades are not affected.

The refund option is in the misc. tab. It's currently in the same box as the undo option. Feel free to put it in a separate box.

Things tested:

  • Things unlocked at SA 51 still appear when game is reset
  • If an equipment setup includes an enemy level, and the enemy level is greater than your current max, equipment changes but enemy level does not
  • SA highest level shows highest level ever reached rather than current max level
  • New information gets added to the save file and gets added back in when loading

For testing purposes, a function called autoBattle.calculateRefund() is called at the end of autoBattle.load().
It would be best to call this function as part of the update instead.
The function is needed the first time this feature is implemented but can be deprecated afterward.

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.

1 participant