File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9696 View Amulet Upgrades
9797</ span >
9898
99- < span id ="currentVersion " style ="position:fixed;top:1px;right:5px;color:var(--text-muted) "> v2.0.1 </ span >
99+ < span id ="currentVersion " style ="position:fixed;top:1px;right:5px;color:var(--text-muted) "> v2.0.2 </ span >
100100
101101
102102< div id ="bonusDisplayShowButton " class ="button " onclick ="bonusMenuHideButton() "
Original file line number Diff line number Diff line change @@ -573,11 +573,12 @@ function createChangelogMenu() {
573573 return Raw . html `
574574 < div class ="menuTitle "> Changelog</ div >
575575 < div class ="menuSeparator "> </ div > < br >
576- v2.0.1 10/26 (current):< br >
576+ v2.0.2 10/26 (current):< br >
577577 < ul >
578578 < li > Fixed a bug that paused spells didn't count towards spell power</ li >
579579 < li > Fight the Lich's Forces button (under HATL) appears with HATL level and stays visible</ li >
580580 < li > Reworked the Fight The Lich's Forces menu to show the error with spell power, and a message to pause actions if needed with train with team</ li >
581+ < li > Refunded AC properly</ li >
581582 </ ul >
582583 v2.0 10/26:< br >
583584 < ul >
Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ function load() {
6161 loadActionFromSave ( actionObj , loadObj ) ;
6262 }
6363
64+ let refundAmount = 0 ;
6465 for ( let upgradeVar in toLoad . upgrades ) {
6566 let upgradeObj = data . upgrades [ upgradeVar ] ;
6667 let upgradeDataObj = upgradeData [ upgradeVar ] ;
6768 let loadObj = toLoad . upgrades [ upgradeVar ] ;
6869 if ( ! upgradeDataObj || upgradeDataObj . creationVersion > saveVersionFromLoad ) { //If removed or needs to refresh
6970 let refundAmount = calcTotalSpentOnUpgrade ( loadObj . initialCost , loadObj . costIncrease , loadObj . upgradesBought ) ;
7071 if ( refundAmount > 0 ) {
71- data . ancientCoin += refundAmount ;
7272 queuedLogMessages . push ( [ "Info: Refunded <b>" + refundAmount + "</b> AC for the upgrade: " + ( loadObj . title || decamelizeWithSpace ( upgradeVar ) ) , "info" ] )
7373 }
7474 // console.log("Skipped loading upgrade " + upgradeVar + " from save.");
@@ -91,6 +91,7 @@ function load() {
9191 data . planeTabSelected = toLoad . planeTabSelected ?? 0 ;
9292 data . totalMomentum = toLoad . totalMomentum ?? 0 ;
9393 data . ancientCoin = toLoad . ancientCoin ?? 0 ;
94+ data . ancientCoin += refundAmount ;
9495 data . useAmuletButtonShowing = ! ! toLoad . useAmuletButtonShowing ;
9596 data . secondsPerReset = toLoad . secondsPerReset ?? 0 ;
9697 data . currentJob = toLoad . currentJob ?? "helpScottWithChores" ;
You can’t perform that action at this time.
0 commit comments