|
|
@ -201,6 +201,7 @@ bool Crawler::OnUserCreate(){ |
|
|
|
Inventory::AddItem("Bone Pants"); |
|
|
|
Inventory::AddItem("Bone Pants"); |
|
|
|
Inventory::AddItem("Bone Gloves"); |
|
|
|
Inventory::AddItem("Bone Gloves"); |
|
|
|
Inventory::AddItem("Elixir of Bear Strength",3); |
|
|
|
Inventory::AddItem("Elixir of Bear Strength",3); |
|
|
|
|
|
|
|
Inventory::AddItem("Leather Helmet"); |
|
|
|
|
|
|
|
|
|
|
|
LoadLevel(LEVEL_NAMES["starting_map"_S]); |
|
|
|
LoadLevel(LEVEL_NAMES["starting_map"_S]); |
|
|
|
ChangePlayerClass(WARRIOR); |
|
|
|
ChangePlayerClass(WARRIOR); |
|
|
@ -1518,8 +1519,12 @@ void Crawler::LoadLevel(MapName map){ |
|
|
|
totalBossEncounterMobs=0; |
|
|
|
totalBossEncounterMobs=0; |
|
|
|
Inventory::Clear("Monster Loot"); |
|
|
|
Inventory::Clear("Monster Loot"); |
|
|
|
Inventory::Clear("Stage Loot"); |
|
|
|
Inventory::Clear("Stage Loot"); |
|
|
|
|
|
|
|
std::cout<<GetPlayer()->hp<<std::endl; |
|
|
|
|
|
|
|
GetPlayer()->hp=GetPlayer()->GetStat("Health"); |
|
|
|
|
|
|
|
GetPlayer()->mana=GetPlayer()->GetMaxMana(); |
|
|
|
GetPlayer()->SetState(State::NORMAL); |
|
|
|
GetPlayer()->SetState(State::NORMAL); |
|
|
|
GetPlayer()->GetCastInfo()={}; |
|
|
|
GetPlayer()->GetCastInfo()={}; |
|
|
|
|
|
|
|
std::cout<<GetPlayer()->hp<<std::endl; |
|
|
|
|
|
|
|
|
|
|
|
#pragma region Monster Spawn Data Setup |
|
|
|
#pragma region Monster Spawn Data Setup |
|
|
|
for(auto&[key,value]:MAP_DATA[map].SpawnerData){ |
|
|
|
for(auto&[key,value]:MAP_DATA[map].SpawnerData){ |
|
|
@ -1835,6 +1840,7 @@ void Crawler::ChangePlayerClass(Class cl){ |
|
|
|
Ability itemAbility3=player->useItem3; |
|
|
|
Ability itemAbility3=player->useItem3; |
|
|
|
uint32_t oldMoney=player->money; |
|
|
|
uint32_t oldMoney=player->money; |
|
|
|
std::set<MenuComponent*>moneyListeners=Player::moneyListeners; |
|
|
|
std::set<MenuComponent*>moneyListeners=Player::moneyListeners; |
|
|
|
|
|
|
|
EntityStats previousStats=player->stats; |
|
|
|
switch(cl){ |
|
|
|
switch(cl){ |
|
|
|
case WARRIOR:{ |
|
|
|
case WARRIOR:{ |
|
|
|
player.reset(NEW Warrior(player.get())); |
|
|
|
player.reset(NEW Warrior(player.get())); |
|
|
@ -1855,6 +1861,7 @@ void Crawler::ChangePlayerClass(Class cl){ |
|
|
|
player.reset(NEW Witch(player.get())); |
|
|
|
player.reset(NEW Witch(player.get())); |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
player->stats=previousStats; |
|
|
|
player->SetBaseStat("Health",DATA.GetProperty(player->GetClassName()+".BaseHealth").GetInt()); |
|
|
|
player->SetBaseStat("Health",DATA.GetProperty(player->GetClassName()+".BaseHealth").GetInt()); |
|
|
|
player->hp=player->GetBaseStat("Health"); |
|
|
|
player->hp=player->GetBaseStat("Health"); |
|
|
|
player->SetBaseStat("Attack",DATA.GetProperty(player->GetClassName()+".BaseAtk").GetInt()); |
|
|
|
player->SetBaseStat("Attack",DATA.GetProperty(player->GetClassName()+".BaseAtk").GetInt()); |
|
|
@ -2000,6 +2007,9 @@ float operator ""_FRange(const char*key,std::size_t len){ |
|
|
|
Crawler::OutputDebugInfo(key,len); |
|
|
|
Crawler::OutputDebugInfo(key,len); |
|
|
|
return float(util::random(float(DATA.GetProperty(std::string(key,len)).GetReal(1)-DATA.GetProperty(std::string(key,len)).GetReal(0)))+DATA.GetProperty(std::string(key,len)).GetReal(0)); |
|
|
|
return float(util::random(float(DATA.GetProperty(std::string(key,len)).GetReal(1)-DATA.GetProperty(std::string(key,len)).GetReal(0)))+DATA.GetProperty(std::string(key,len)).GetReal(0)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
float operator ""_Pct(long double pct){ |
|
|
|
|
|
|
|
return pct/100; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double operator ""_D(const char*key,std::size_t len){ |
|
|
|
double operator ""_D(const char*key,std::size_t len){ |
|
|
|
Crawler::OutputDebugInfo(key,len); |
|
|
|
Crawler::OutputDebugInfo(key,len); |
|
|
|