diff --git a/Adventures in Lestoria/Adventures in Lestoria.tiled-project b/Adventures in Lestoria/Adventures in Lestoria.tiled-project index 5f23812a..f4460e74 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.tiled-project +++ b/Adventures in Lestoria/Adventures in Lestoria.tiled-project @@ -295,6 +295,36 @@ "type": "string", "value": "None" }, + { + "name": "Dev Completion Time - Ranger (s)", + "type": "float", + "value": 0 + }, + { + "name": "Dev Completion Time - Thief (s)", + "type": "float", + "value": 0 + }, + { + "name": "Dev Completion Time - Trapper (s)", + "type": "float", + "value": 0 + }, + { + "name": "Dev Completion Time - Warrior (s)", + "type": "float", + "value": 0 + }, + { + "name": "Dev Completion Time - Witch (s)", + "type": "float", + "value": 0 + }, + { + "name": "Dev Completion Time - Wizard (s)", + "type": "float", + "value": 0 + }, { "name": "Level Type", "propertyType": "LevelType", @@ -618,6 +648,20 @@ "tileset" ] }, + { + "color": "#fff7ff5d", + "drawFill": true, + "id": 40, + "members": [ + ], + "name": "TrialClock", + "type": "class", + "useAs": [ + "property", + "object", + "project" + ] + }, { "color": "#ffa40aa4", "drawFill": true, diff --git a/Adventures in Lestoria/Class.h b/Adventures in Lestoria/Class.h index 39f059aa..680ee6e1 100644 --- a/Adventures in Lestoria/Class.h +++ b/Adventures in Lestoria/Class.h @@ -36,12 +36,15 @@ All rights reserved. */ #pragma endregion #pragma once -#include "Ability.h" -#include "Animation.h" +#include +#include +#include "DEFINES.h" +#include "olcUTIL_DataFile.h" #undef GetClassInfo -//Classes have bit-wise operator capabilities. +INCLUDE_DATA + enum Class{ ANY=0, WARRIOR=1, @@ -49,5 +52,15 @@ enum Class{ RANGER=4, TRAPPER=8, WIZARD=16, - WITCH=32 + WITCH=32, +}; + +namespace classutils{//Classes have bit-wise operator capabilities. + static inline Class StringToClass(std::string className){ + const std::vector&classList=DATA["class_list"].GetValues(); + auto it=std::find(classList.begin(),classList.end(),className); + if(it==classList.end())ERR(std::format("WARNING! Class {} does not exist!",className)); + int element=int(std::distance(classList.begin(),it)); + return Class(1<&classList=DATA["class_list"].GetValues(); - auto it=std::find(classList.begin(),classList.end(),className); - if(it==classList.end())ERR(std::format("WARNING! Class {} does not exist!",className)); - int element=int(std::distance(classList.begin(),it)); - return Class(1<npcs; std::string mapType=""; std::string bgmSongName=""; + std::unordered_mapdevCompletionTrialTime; BackdropName backdrop=""; std::setspawns; std::map SpawnerData; //Spawn groups have IDs, mobs associate which spawner they are tied to via this ID. @@ -138,6 +141,7 @@ public: const std::vector&GetStageLoot()const; const std::vector&GetLayers()const; const std::vector&GetEnvironmentalAudio()const; + const float GetDevCompletionTime(Class cl)const; const MapName&GetMapName()const; const std::string_view GetMapDisplayName()const; std::string FormatLayerData(std::ostream& os, std::vectortiles); @@ -464,6 +468,13 @@ class TMXParser{ parsedMapInfo.bgmSongName=newTag.data["value"]; } } else + if (newTag.tag=="property"&&newTag.data["name"].starts_with("Dev Completion Time")) { + if(newTag.data.count("value")){ //None is a default value that we ignore. + size_t classStartPos="Dev Completion Time - "s.length(); + std::string className=newTag.data["name"].substr(classStartPos,newTag.data["name"].find(' ',classStartPos)-classStartPos); + parsedMapInfo.devCompletionTrialTime[classutils::StringToClass(className)]=newTag.GetFloat("value"); + } + } else if (newTag.tag=="property"&&newTag.data["name"]=="Backdrop") { if(newTag.data["value"]!="None"){ //None is a default value that we ignore. parsedMapInfo.backdrop=newTag.data["value"]; diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index 2be30110..e124527c 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -1,3 +1,15 @@ +Time Trial Idea + +Upon completing a stage for the first time, the player is shown the completion time and a record time. + On first clears, the player will always obtain a new record. Make it apparent to the player they obtained a new record. + +The overworld map will show a new section that says "Completion Time" for any previous completed stages. +Upon the second time entering a stage, the game will spawn a timer that the player can run into to begin a time trial-like mode. + During the Time Trial mode the player can defeat monsters to freeze the timer by 1 second per mob killed. + +Upon completion of a stage in time trial mode if the player beat their previous time (which they likely will) the record will update. + For each class and stage combination there will be a "dev time" + ============================================ Make another actions config file for the main build (The app # is different) \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 9d9f12dc..bce0000b 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_PATCH 0 -#define VERSION_BUILD 8476 +#define VERSION_BUILD 8492 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx b/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx index 6ba387e0..4d4f76f9 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx @@ -1,8 +1,11 @@ - + + + + @@ -2009,5 +2012,6 @@ + diff --git a/Adventures in Lestoria/assets/Campaigns/1_4.tmx b/Adventures in Lestoria/assets/Campaigns/1_4.tmx index af8b37a3..5282a81f 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_4.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_4.tmx @@ -1,5 +1,5 @@ - + @@ -845,5 +845,6 @@ + diff --git a/Adventures in Lestoria/assets/Campaigns/1_5.tmx b/Adventures in Lestoria/assets/Campaigns/1_5.tmx index ce11fa55..0302e55a 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_5.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_5.tmx @@ -1,5 +1,5 @@ - + @@ -1551,6 +1551,7 @@ + diff --git a/Adventures in Lestoria/assets/Campaigns/1_6.tmx b/Adventures in Lestoria/assets/Campaigns/1_6.tmx index fbacfa68..7f60a95c 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_6.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_6.tmx @@ -1,5 +1,5 @@ - + @@ -1154,5 +1154,6 @@ + diff --git a/Adventures in Lestoria/assets/Campaigns/1_7.tmx b/Adventures in Lestoria/assets/Campaigns/1_7.tmx index e7612f63..d4ff3cde 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_7.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_7.tmx @@ -1,5 +1,5 @@ - + @@ -1118,6 +1118,7 @@ + diff --git a/Adventures in Lestoria/assets/Campaigns/1_8.tmx b/Adventures in Lestoria/assets/Campaigns/1_8.tmx index 162e3fb9..5fc6e73a 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_8.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_8.tmx @@ -1,5 +1,5 @@ - + @@ -893,5 +893,6 @@ + diff --git a/Adventures in Lestoria/assets/Campaigns/1_B1.tmx b/Adventures in Lestoria/assets/Campaigns/1_B1.tmx index 323641bd..fee0cfbf 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_B1.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_B1.tmx @@ -1,5 +1,5 @@ - + @@ -796,5 +796,6 @@ + diff --git a/Adventures in Lestoria/assets/Campaigns/Boss_1_v2.tmx b/Adventures in Lestoria/assets/Campaigns/Boss_1_v2.tmx index f4c4551b..22501419 100644 --- a/Adventures in Lestoria/assets/Campaigns/Boss_1_v2.tmx +++ b/Adventures in Lestoria/assets/Campaigns/Boss_1_v2.tmx @@ -1,5 +1,5 @@ - + diff --git a/Adventures in Lestoria/assets/config/items/ItemDatabase.txt b/Adventures in Lestoria/assets/config/items/ItemDatabase.txt index 3407ef7d..600b1570 100644 --- a/Adventures in Lestoria/assets/config/items/ItemDatabase.txt +++ b/Adventures in Lestoria/assets/config/items/ItemDatabase.txt @@ -192,4 +192,9 @@ ItemDatabase ItemCategory = Materials SellValue = 180 } + Time Medal + { + Description = A medal provided to top athletes in Lestoria commemorating a huge victory. + ItemCategory = Materials + } } diff --git a/Adventures in Lestoria/assets/gamepack.pak b/Adventures in Lestoria/assets/gamepack.pak index 79f199fc..32c4edd2 100644 Binary files a/Adventures in Lestoria/assets/gamepack.pak and b/Adventures in Lestoria/assets/gamepack.pak differ diff --git a/Adventures in Lestoria/assets/items/Time Medal.png b/Adventures in Lestoria/assets/items/Time Medal.png new file mode 100644 index 00000000..d66ccdbc Binary files /dev/null and b/Adventures in Lestoria/assets/items/Time Medal.png differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 0326ce79..13d185c7 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ