diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index a2f80990..7dd94e65 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -78,6 +78,7 @@ All rights reserved. INCLUDE_EMITTER_LIST INCLUDE_ITEM_CATEGORIES INCLUDE_BACKDROP_DATA +INCLUDE_MONSTER_DATA bool _DEBUG_MAP_LOAD_INFO = false; //360x240 @@ -2321,6 +2322,43 @@ void AiL::InitializeLevels(){ backdrop.Load("backdrop_directory"_S+DATA["Backdrops"][key].GetString(),nullptr,false,false); } + if("display_spawn_report"_I){ + for(auto&[map,data]:MAP_DATA){ + std::mapmonsterCounts; + for(auto&[key,value]:MAP_DATA[map].SpawnerData){ + SpawnerTag&spawnData=MAP_DATA[map].SpawnerData[key]; + + vf2d spawnerRadius=vf2d{spawnData.ObjectData.GetFloat("width"),spawnData.ObjectData.GetFloat("height")}/2; + for(XMLTag&monster:spawnData.monsters){ + std::string monsterName=monster.GetString("value"); + monsterCounts[monsterName]++; + } + } + std::cout<<"Spawns Report for "<totalDrops; + std::cout<<"Monte Carlo Test: 1 million tries:"<Name()<<" x"<<(count/1000000l); + } + } + } + Test::RunMapTests(); }