diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj b/Adventures in Lestoria/Adventures in Lestoria.vcxproj
index b183d718..0edd3d04 100644
--- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj
+++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj
@@ -378,6 +378,10 @@
+
+
+
+
diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
index ea6fb188..73f186aa 100644
--- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
+++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
@@ -432,6 +432,9 @@
Header Files
+
+ Header Files
+
diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp
index 286dac42..ac959ea2 100644
--- a/Adventures in Lestoria/AdventuresInLestoria.cpp
+++ b/Adventures in Lestoria/AdventuresInLestoria.cpp
@@ -1617,6 +1617,14 @@ void AiL::InitializeLevel(std::string mapFile,MapName map){
size_t slashMarker = mapFile.find_last_of('/');
std::string baseDir=mapFile.substr(0,slashMarker+1);
MAP_DATA[map]=level.GetData();
+
+ for(auto&[key,size]:DATA["Levels"][map]){
+ if(key.starts_with("Loot")){
+ datafile data=DATA["Levels"][map][key];
+ MAP_DATA[map].stageLoot.push_back(ItemMapData(data.GetString(0U),data.GetInt(1U),data.GetInt(2U)));
+ }
+ }
+
for(XMLTag&tag:MAP_DATA[map].TilesetData){
size_t slashMarkerSourceDir = tag.data["source"].find_last_of('/');
std::string baseSourceDir=tag.data["source"].substr(slashMarkerSourceDir+1);
@@ -2303,7 +2311,7 @@ bool AiL::OnUserDestroy(){
void AiL::InitializeLevels(){
for(auto&[key,size]:DATA["Levels"]){
- InitializeLevel("map_path"_S+operator""_S(("Levels."+key).c_str(),("Levels."+key).size()),key);
+ InitializeLevel("map_path"_S+DATA["Levels"][key]["Map File"].GetString(),key);
}
for(ConnectionPoint&cp:State_OverworldMap::connections){
diff --git a/Adventures in Lestoria/ItemMapData.h b/Adventures in Lestoria/ItemMapData.h
new file mode 100644
index 00000000..21129e07
--- /dev/null
+++ b/Adventures in Lestoria/ItemMapData.h
@@ -0,0 +1,47 @@
+#pragma region License
+/*
+License (OLC-3)
+~~~~~~~~~~~~~~~
+
+Copyright 2024 Joshua Sigona
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions or derivations of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. Redistributions or derivative works in binary form must reproduce the above
+copyright notice. This list of conditions and the following disclaimer must be
+reproduced in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors may
+be used to endorse or promote products derived from this software without specific
+prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Portions of this software are copyright © 2023 The FreeType
+Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
+All rights reserved.
+*/
+#pragma endregion
+#pragma once
+#include "Item.h"
+
+struct ItemMapData{
+ IT item;
+ uint8_t amt;
+ int chance;
+ inline ItemMapData(IT item,uint8_t amt,int chance)
+ :item(item),amt(amt),chance(chance){}
+};
\ No newline at end of file
diff --git a/Adventures in Lestoria/State_LevelComplete.cpp b/Adventures in Lestoria/State_LevelComplete.cpp
index b28ea1de..57fc3c92 100644
--- a/Adventures in Lestoria/State_LevelComplete.cpp
+++ b/Adventures in Lestoria/State_LevelComplete.cpp
@@ -51,6 +51,13 @@ void State_LevelComplete::OnStateChange(GameState*prevState){
}
Component(MenuType::LEVEL_COMPLETE,"Level EXP Gain Outline")->SetLabel(std::format("+{} Exp",game->GetPlayer()->GetAccumulatedXP()));
game->GetPlayer()->AddXP(game->GetPlayer()->GetAccumulatedXP());
+ for(const ItemMapData&data:game->GetCurrentMap().stageLoot){
+ for(uint8_t rolls=0;rollsGetPlayer()->SetState(State::NORMAL);
Menu::OpenMenu(LEVEL_COMPLETE);
};
diff --git a/Adventures in Lestoria/State_OverworldMap.cpp b/Adventures in Lestoria/State_OverworldMap.cpp
index 7e637ffb..7287ba61 100644
--- a/Adventures in Lestoria/State_OverworldMap.cpp
+++ b/Adventures in Lestoria/State_OverworldMap.cpp
@@ -254,8 +254,8 @@ ConnectionPoint&State_OverworldMap::GetCurrentConnectionPoint(){
void State_OverworldMap::StartLevel(){
game->UpdateDiscordStatus(State_OverworldMap::GetCurrentConnectionPoint().name,game->GetPlayer()->GetClassName());
- State_OverworldMap::GetCurrentConnectionPoint().SetVisited();
SaveFile::SaveGame();
+ State_OverworldMap::GetCurrentConnectionPoint().SetVisited();
if(State_OverworldMap::GetCurrentConnectionPoint().map.starts_with("STORY")){
VisualNovel::LoadVisualNovel(State_OverworldMap::GetCurrentConnectionPoint().map);
}else{
diff --git a/Adventures in Lestoria/TMXParser.h b/Adventures in Lestoria/TMXParser.h
index dd1d2465..1ce12ab7 100644
--- a/Adventures in Lestoria/TMXParser.h
+++ b/Adventures in Lestoria/TMXParser.h
@@ -43,6 +43,7 @@ All rights reserved.
#include "EnvironmentalAudio.h"
#include "DEFINES.h"
#include "safemap.h"
+#include "ItemMapData.h"
using MapName=std::string;
using namespace olc;
@@ -100,6 +101,7 @@ struct Map{
std::vector TilesetData;
std::vector LayerData;
std::vectorenvironmentalAudioData;
+ std::vectorstageLoot;
std::string mapType="";
std::string bgmSongName="";
BackdropName backdrop="";
diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt
index 44ab0176..16be40be 100644
--- a/Adventures in Lestoria/TODO.txt
+++ b/Adventures in Lestoria/TODO.txt
@@ -10,13 +10,13 @@ Settings Menu
remove that bind from the list. Up to two keys may be binded per action.
-We have to save keybinds to the save file.
-- Fix Stage Completed screen, item displays can hit the scrollbar.
-
- Stage Loot Config
- Initial Crafting of Gear.
- XP Bar
+- Fix reflections for rotated monsters.
+
January 31st
============
Make new unlocked nodes more obvious, made neighboring nodes more obvious
@@ -32,6 +32,8 @@ Story proofreading/correcting/storyboarding
- Lock up unimplemented classes.
- Don't enable all stage plates normally.
+- Add Death screen (Zoom in on fatal blow, slow time down... Display some game over text... Allow retry or return to world map.)
+
- Auto targeting for controller / keyboard.
A "Debug" version of the game that simply outputs all std::cout to a file as well (debug.log).
diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h
index 206a81de..82c36d96 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 3
#define VERSION_PATCH 0
-#define VERSION_BUILD 6234
+#define VERSION_BUILD 6237
#define stringify(a) stringify_(a)
#define stringify_(a) #a
diff --git a/Adventures in Lestoria/assets/config/levels.txt b/Adventures in Lestoria/assets/config/levels.txt
index 4f028ec8..385db49e 100644
--- a/Adventures in Lestoria/assets/config/levels.txt
+++ b/Adventures in Lestoria/assets/config/levels.txt
@@ -2,16 +2,64 @@ map_path = assets/Campaigns/
Levels
{
- WORLD_MAP = World_Map.tmx
+ WORLD_MAP
+ {
+ Map File = World_Map.tmx
+ }
- CAMPAIGN_1_1 = 1_1_v2.tmx
- BOSS_1 = Boss_1_v2.tmx
+ CAMPAIGN_1_1
+ {
+ Map File = 1_1_v2.tmx
- CAMPAIGN_1_2 = 1_2.tmx
- CAMPAIGN_1_3 = 1_3.tmx
- CAMPAIGN_1_4 = 1_4.tmx
- CAMPAIGN_1_5 = 1_5.tmx
- CAMPAIGN_1_6 = 1_6.tmx
- CAMPAIGN_1_7 = 1_7.tmx
- CAMPAIGN_1_8 = 1_8.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ Loot[0] = Berries, 5, 100%
+ Loot[1] = Minor Mana Potion, 1, 100%
+ }
+ BOSS_1
+ {
+ Map File = Boss_1_v2.tmx
+ }
+
+ CAMPAIGN_1_2
+ {
+ Map File = 1_2.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ # Loot[0] = Berries, 5, 100%
+ }
+ CAMPAIGN_1_3
+ {
+ Map File = 1_3.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ # Loot[0] = Berries, 5, 100%
+ }
+ CAMPAIGN_1_4
+ {
+ Map File = 1_4.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ # Loot[0] = Berries, 5, 100%
+ }
+ CAMPAIGN_1_5
+ {
+ Map File = 1_5.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ # Loot[0] = Berries, 5, 100%
+ }
+ CAMPAIGN_1_6
+ {
+ Map File = 1_6.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ # Loot[0] = Berries, 5, 100%
+ }
+ CAMPAIGN_1_7
+ {
+ Map File = 1_7.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ # Loot[0] = Berries, 5, 100%
+ }
+ CAMPAIGN_1_8
+ {
+ Map File = 1_8.tmx
+ # Specify item and number of items. Optionally specify a % drop chance per item.
+ # Loot[0] = Berries, 5, 100%
+ }
}
\ No newline at end of file