From a26e13fbb628bff5ced4bfc04d533673f72d20a2 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 3 Mar 2024 23:02:10 -0600 Subject: [PATCH] Fix XP Gain tick rate (25% bar gain every 0.5 seconds). Release Build 7897. --- .../State_LevelComplete.cpp | 4 ++-- Adventures in Lestoria/TODO.txt | 4 +++- Adventures in Lestoria/Version.h | 2 +- x64/Release/Adventures in Lestoria.exe | Bin 3339776 -> 3339776 bytes 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Adventures in Lestoria/State_LevelComplete.cpp b/Adventures in Lestoria/State_LevelComplete.cpp index 21dcf1dc..f7ab6ae4 100644 --- a/Adventures in Lestoria/State_LevelComplete.cpp +++ b/Adventures in Lestoria/State_LevelComplete.cpp @@ -60,7 +60,7 @@ void State_LevelComplete::OnStateChange(GameState*prevState){ Component(MenuType::LEVEL_COMPLETE,"XP Bar")->ResetProgressBar(game->GetPlayer()->CurrentXP(),game->GetPlayer()->NextLevelXPRequired()); accumulatedXP=game->GetPlayer()->GetAccumulatedXP(); - gainRate=(game->GetPlayer()->NextLevelXPRequired()*0.5f)/60.f; + gainRate=(game->GetPlayer()->NextLevelXPRequired()*0.5f); float xpBonus=1.1f; //10% XP bonus for finishing a stage. if(Component(LEVEL_COMPLETE,"Stage Complete Label")->GetLabel()!="Stage Summary"){ //If the label says stage summary, we didn't actually complete the level. Don't reward any stage items to the player. @@ -106,7 +106,7 @@ void State_LevelComplete::OnUserUpdate(AiL*game){ if(accumulatedXP>0){ Audio::Engine().SetVolume(xpGainSound,Audio::GetCalculatedSFXVolume(0.6f)); if(lastXPGain<=0.f){ - int incrementAmt=gainRate*game->GetElapsedTime()+1; + int incrementAmt=gainRate*(1/60.f)+1; accumulatedXP=std::max(0,accumulatedXP-incrementAmt); auto progressBar=Component(MenuType::LEVEL_COMPLETE,"XP Bar"); progressBar->UpdateProgressBar(progressBar->GetCurrentProgress()+incrementAmt); diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index 6364f388..e6ba2321 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -34,4 +34,6 @@ Animations when using DPad lock up Reset tutorials when loading a new character When opening craft/buy/sell menu, default to the appropriate button. Pressing back on the Select button of the equip menu causes you to exit the menu. -Funny text colors with text color override on blacksmith menu \ No newline at end of file +Funny text colors with text color override on blacksmith menu + +Toggle for displaying error messages \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 5524d64a..9d4fca92 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 4 #define VERSION_PATCH 4 -#define VERSION_BUILD 7896 +#define VERSION_BUILD 7897 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index d5f0da7a78c19d1259c13f2cd03e5856a6d4cd99..c31684af9bce33f68a041cd0ae5bc8189d009cc0 100644 GIT binary patch delta 837 zcmY+=Ur1A76aet=&P})5w!4+fxxCJFE2rk>pGpeNV#<~5A0%27S*Xy94Ih@h=um0o z_1a$a>!Cyls+Yl#@J3Dd&_husT4IGsxwJm0OfrNOaXWWoK@UIf{mwb}eCHnD*XNWE zgv^v;tfALJ`7M-80aAbxs6Z-66D^dw=bhqhHjWG_UH<7sHP8SWYyw)K1A4#!12BTk zU<*hGCa@J`05ix07O+j6Ud&o}qdUkLYt8G7VYgzKMp$oFnzM`dY7i$J2@v~6RH_$h z0uR#=k|WjR@wXLB`t^3r!XBvMpOUjUS7d9er{w}(r&=*0l4JTJar})@2-Wis?!iND zUpz#ky8Z8&zT1gFEm}i|P5K zi1(3aJ*DcnPUHSCTVXw%t4@qsy7u3wf)ARKO1uR0?oHgMkxt zg&$x8cm71BvX}CDZvKi&TyLkD@uqORyfDc$8&)BvapMPbdM*C-#h+1WoiTdTI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