Upstream Merge branch 'demo'

This commit is contained in:
Nic0Nic0Nii 2024-04-02 13:20:06 +00:00
commit 5abd80932e
39 changed files with 280 additions and 159 deletions

3
.gitignore vendored
View File

@ -397,10 +397,7 @@ build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c
build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp
test.cpp
/Adventures in Lestoria/Adventures in Lestoria
/Adventures in Lestoria/packkey.cpp
/x64/Release/Adventures in Lestoria.zip
/x64/Release/Adventures in Lestoria_web.zip
/x64/Release/AdventuresInLestoria_web.zip
Adventures in Lestoria/packkey.cpp
Adventures in Lestoria/packkey.cpp
packkey.cpp

View File

@ -35,7 +35,7 @@ var Module = {
})(),
};
</script>
<script async type="text/javascript" src="Adventures in Lestoria.js"></script>
<script async type="text/javascript" src="AdventuresInLestoria.js"></script>
<script type="text/javascript">
Module.canvas.addEventListener("resize", (e) => {

View File

@ -361,27 +361,7 @@ bool AiL::OnUserCreate(){
}
bool AiL::OnUserUpdate(float fElapsedTime){
levelTime+=fElapsedTime;
SteamAPI_RunCallbacks();
STEAMINPUT(
ActivateActionSetForAllControllers(Input::ingameControlsHandle);
Input::UpdateSteamInput();
)
if(GetMousePos()!=lastMousePos){
lastMouseMovement=0.f;
lastMousePos=GetMousePos();
}else lastMouseMovement+=fElapsedTime;
if(Audio::Engine().IsPlaying(GetPlayer()->cooldownSoundInstance)){
Audio::Engine().SetVolume(GetPlayer()->cooldownSoundInstance,Audio::GetCalculatedSFXVolume("Audio.Casting Sound Volume"_F/100.f));
}
if(!GamePaused()){
GameState::STATE->OnUserUpdate(this);
}else{
ClearTimedOutGarbage();
}
GlobalGameUpdates();
LoadingScreen::Update();
InputListener::Update();
Tutorial::Update();
@ -402,6 +382,7 @@ bool AiL::OnUserUpdate(float fElapsedTime){
}
}
#endif
if(QuitRequested())EndGame();
return !gameEnd;
}
@ -454,6 +435,7 @@ void AiL::HandleUserInput(float fElapsedTime){
Menu::OpenMenu(MenuType::PAUSE);
}
float animationSpd=0.f;
player->movementVelocity={};
if(player->GetVelocity().mag()<"Player.Move Allowed Velocity Lower Limit"_F&&player->CanMove()){
auto GetPlayerStaircaseDirection=[&](){
for(LayerTag&layer:MAP_DATA[GetCurrentLevel()].LayerData){
@ -480,16 +462,15 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt;
}else animationSpd=1.f;
player->SetX(player->GetX()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.x=moveAmt*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.x+=moveAmt*fElapsedTime*player->GetMoveSpdMult();
if(staircaseDirection=="RIGHT"){
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.y+=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
} else
if(staircaseDirection=="LEFT"){
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.y+="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
}
player->SetFacingDirection(RIGHT);
newAimingAngle+=vf2d{1,0};
@ -508,14 +489,14 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt;
}else animationSpd=1.f;
player->SetX(player->GetX()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.x=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.x+=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
if(staircaseDirection=="RIGHT"){
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.y+="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
} else
if(staircaseDirection=="LEFT"){
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.y+=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
}
newAimingAngle-=vf2d{1,0};
@ -535,7 +516,7 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt;
}else animationSpd=1.f;
player->SetY(player->GetY()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.y=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.y+=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
newAimingAngle-=vf2d{0,1};
@ -554,7 +535,7 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt;
}else animationSpd=1.f;
player->SetY(player->GetY()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.y=moveAmt*fElapsedTime*player->GetMoveSpdMult();
player->movementVelocity.y+=moveAmt*fElapsedTime*player->GetMoveSpdMult();
newAimingAngle+=vf2d{0,1};
@ -566,25 +547,52 @@ void AiL::HandleUserInput(float fElapsedTime){
}
}
if(heldDownMovementKey){
if(abs(player->movementVelocity.x)>abs(player->movementVelocity.y)){ //Greater Horizontal movement.
if(player->movementVelocity.x!=0.f){
player->SetFacingDirection(player->movementVelocity.x>0?RIGHT:LEFT);
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
player->UpdateWalkingAnimation(player->GetFacingDirection(),animationSpd);
if(player->movementVelocity.x!=0.f||player->movementVelocity.y!=0.f){
if(abs(player->movementVelocity.x)>abs(player->movementVelocity.y)){ //Greater Horizontal movement.
if(player->movementVelocity.x!=0.f){
player->SetFacingDirection(player->movementVelocity.x>0?RIGHT:LEFT);
player->SetLastReleasedMovementKey(player->GetFacingDirection());
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
player->UpdateWalkingAnimation(player->GetFacingDirection(),animationSpd);
}
}
}else{ //Greater Vertical movement.
if(player->movementVelocity.y!=0.f){
player->SetFacingDirection(player->movementVelocity.y>0?DOWN:UP);
player->SetLastReleasedMovementKey(player->GetFacingDirection());
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
player->UpdateWalkingAnimation(player->GetFacingDirection(),animationSpd);
}
}
}
}else{ //Greater Vertical movement.
if(player->movementVelocity.y!=0.f){
player->SetFacingDirection(player->movementVelocity.y>0?DOWN:UP);
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
player->UpdateWalkingAnimation(player->GetFacingDirection(),animationSpd);
#pragma region Footstep code
player->footstepTimer+=GetElapsedTime()*animationSpd;
if(player->footstepTimer>"Player.Footstep Timer"_F){
player->footstepTimer-="Player.Footstep Timer"_F;
bool inWater=true;
for(const LayerTag&layer:GetCurrentMap().LayerData){
int tileID=layer.tiles[player->GetY()/24][player->GetX()/24]-1;
if(tileID!=-1&&!IsReflectiveTile(GetTileSheet(GetCurrentLevel(),tileID),tileID)){
inWater=false;
break;
}
}
if(inWater){
SoundEffect::PlaySFX("Footstep - Wet",SoundEffect::CENTERED);
}else{
SoundEffect::PlaySFX("Footstep",SoundEffect::CENTERED);
}
}
#pragma endregion
}else{ //This means we are holding down movement keys but we aren't actually moving anywhere, so don't.
setIdleAnimation=true;
}
}
if(UpReleased()){
player->SetLastReleasedMovementKey(UP);
player->movementVelocity.y=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(RightHeld()){
player->UpdateWalkingAnimation(RIGHT);
@ -599,7 +607,6 @@ void AiL::HandleUserInput(float fElapsedTime){
}
if(RightReleased()){
player->SetLastReleasedMovementKey(RIGHT);
player->movementVelocity.x=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(UpHeld()){
player->UpdateWalkingAnimation(UP);
@ -614,7 +621,6 @@ void AiL::HandleUserInput(float fElapsedTime){
}
if(LeftReleased()){
player->SetLastReleasedMovementKey(LEFT);
player->movementVelocity.x=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(RightHeld()){
player->UpdateWalkingAnimation(RIGHT);
@ -629,7 +635,6 @@ void AiL::HandleUserInput(float fElapsedTime){
}
if(DownReleased()){
player->SetLastReleasedMovementKey(DOWN);
player->movementVelocity.y=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(RightHeld()){
player->UpdateWalkingAnimation(RIGHT);
@ -647,29 +652,6 @@ void AiL::HandleUserInput(float fElapsedTime){
setIdleAnimation=false;
}
if(heldDownMovementKey){
player->footstepTimer+=GetElapsedTime()*animationSpd;
if(player->footstepTimer>"Player.Footstep Timer"_F){
player->footstepTimer-="Player.Footstep Timer"_F;
bool inWater=true;
for(const LayerTag&layer:GetCurrentMap().LayerData){
int tileID=layer.tiles[player->GetY()/24][player->GetX()/24]-1;
if(tileID!=-1&&!IsReflectiveTile(GetTileSheet(GetCurrentLevel(),tileID),tileID)){
inWater=false;
break;
}
}
if(inWater){
SoundEffect::PlaySFX("Footstep - Wet",SoundEffect::CENTERED);
}else{
SoundEffect::PlaySFX("Footstep",SoundEffect::CENTERED);
}
}
}
if(setIdleAnimation){
switch(player->GetLastReleasedMovementKey()){
case UP:{
@ -1657,20 +1639,6 @@ void AiL::RenderWorld(float fElapsedTime){
for(std::vector<std::shared_ptr<DamageNumber>>::iterator it=DAMAGENUMBER_LIST.begin();it!=DAMAGENUMBER_LIST.end();++it){
DamageNumber*dn=(*it).get();
if(dn->pauseTime>0){
dn->pauseTime-=fElapsedTime;
} else{
dn->lifeTime+=fElapsedTime;
if(dn->lifeTime<=1){
if(dn->lifeTime<DamageNumber::MOVE_UP_TIME){
if(dn->invertedDirection){
dn->pos.y+=dn->riseSpd*fElapsedTime;
}else{
dn->pos.y-=dn->riseSpd*fElapsedTime;
}
}
}
}
#define NumberScalesWithDamage true
#define NormalNumber false
@ -1850,6 +1818,11 @@ void AiL::RenderHud(){
DrawShadowStringDecal({0,12},"Button Hold Time: "+std::to_string(Menu::menus[INVENTORY_CONSUMABLES]->buttonHoldTime));
}
#endif
Pixel vignetteOverlayColor="Interface.Vignette Color"_Pixel;
const float vignetteTotalDisplayTime="Interface.Vignette Appearance Time"_F+"Interface.Vignette Fadeout Time"_F;
if(vignetteDisplayTime<"Interface.Vignette Fadeout Time"_F)vignetteOverlayColor.a=util::lerp(0,255,vignetteDisplayTime/"Interface.Vignette Fadeout Time"_F);
DrawDecal({0,0},GFX["vignette.png"].Decal(),{1.f,1.f},vignetteOverlayColor);
}
void AiL::RenderCooldowns(){
@ -2467,7 +2440,7 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){
return true;
});
#pragma endregion
if(changeMusic==PLAY_LEVEL_MUSIC){
#pragma region Audio Preparation (Loading Phase 10)
LoadingScreen::AddPhase([&](){
@ -2483,7 +2456,6 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){
//Until the audio has stopped (by waiting for a set amount of time), we will respect the audio engine's wishes and not proceed.
LoadingScreen::DeferLoad([&](){return audioEngine.playBGMWaitTime==0.f;}); //This is the wait time for the audio engine to finish.
#pragma region Audio Channel Loading (Count based on Audio::GetPrepareBGMLoopIterations)
for(int i=0;i<Audio::GetPrepareBGMLoopIterations(MAP_DATA[GetCurrentLevel()].bgmSongName);i++){
LoadingScreen::AddPhase([&](){
@ -2502,15 +2474,15 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){
Audio::UpdateBGMVolume();
return true;
});
LoadingScreen::AddPhase([&](){
STEAMUSERSTATS(
SteamUserStats()->StoreStats();
)
ClearGarbage();
return true;
});
}
LoadingScreen::AddPhase([&](){
STEAMUSERSTATS(
SteamUserStats()->StoreStats();
)
ClearGarbage();
return true;
});
}
bool AiL::IsUpperForegroundTile(int tileID){
@ -2926,27 +2898,32 @@ bool AiL::IsReflectiveTile(TilesheetData tileSheet,int tileID){
}
bool AiL::OnUserDestroy(){
#ifndef __EMSCRIPTEN__
SteamAPI_Shutdown();
#endif
GFX.Reset();
for(auto&[key,value]:MAP_DATA){
if(MAP_DATA[key].optimizedTile!=nullptr){
delete MAP_DATA[key].optimizedTile;
gameEnd=true;
if(!savingFile){
#ifndef __EMSCRIPTEN__
SteamAPI_Shutdown();
#endif
GFX.Reset();
for(auto&[key,value]:MAP_DATA){
if(MAP_DATA[key].optimizedTile!=nullptr){
delete MAP_DATA[key].optimizedTile;
}
}
for(auto&[key,value]:MAP_TILESETS){
delete value.tileset;
}
for(auto&[key,value]:GameState::states){
delete value;
}
Menu::CleanupAllMenus();
for(auto&[key,value]:MonsterData::imgs){
delete value;
}
BACKDROP_DATA.clear();
return true;
}else{
return false; //Something is preventing us from quitting. We wait patiently...
}
for(auto&[key,value]:MAP_TILESETS){
delete value.tileset;
}
for(auto&[key,value]:GameState::states){
delete value;
}
Menu::CleanupAllMenus();
for(auto&[key,value]:MonsterData::imgs){
delete value;
}
BACKDROP_DATA.clear();
return true;
}
void AiL::InitializeLevels(){
@ -3937,4 +3914,73 @@ void AiL::ActivateActionSetForAllControllers(InputActionSetHandle_t actionSetHan
const float AiL::GetEncounterDuration()const{
return encounterDuration;
}
void AiL::ShowDamageVignetteOverlay(){
vignetteDisplayTime="Interface.Vignette Appearance Time"_F+"Interface.Vignette Fadeout Time"_F;
}
void AiL::GlobalGameUpdates(){
levelTime+=GetElapsedTime();
SteamAPI_RunCallbacks();
STEAMINPUT(
ActivateActionSetForAllControllers(Input::ingameControlsHandle);
Input::UpdateSteamInput();
)
#pragma region Damage Numbers update
for(std::vector<std::shared_ptr<DamageNumber>>::iterator it=DAMAGENUMBER_LIST.begin();it!=DAMAGENUMBER_LIST.end();++it){
DamageNumber*dn=(*it).get();
if(dn->pauseTime>0){
dn->pauseTime-=GetElapsedTime();
} else{
dn->lifeTime+=GetElapsedTime();
if(dn->lifeTime<=1){
if(dn->lifeTime<DamageNumber::MOVE_UP_TIME){
if(dn->invertedDirection){
dn->pos.y+=dn->riseSpd*GetElapsedTime();
}else{
dn->pos.y-=dn->riseSpd*GetElapsedTime();
}
}
}
}
}
#pragma endregion
if(GetMousePos()!=lastMousePos){
lastMouseMovement=0.f;
lastMousePos=GetMousePos();
}else lastMouseMovement+=GetElapsedTime();
vignetteDisplayTime=std::max(0.f,vignetteDisplayTime-GetElapsedTime());
if(Audio::Engine().IsPlaying(GetPlayer()->cooldownSoundInstance)){
Audio::Engine().SetVolume(GetPlayer()->cooldownSoundInstance,Audio::GetCalculatedSFXVolume("Audio.Casting Sound Volume"_F/100.f));
}
if(!GamePaused()){
GameState::STATE->OnUserUpdate(this);
}else{
ClearTimedOutGarbage();
}
}
const bool AiL::QuitRequested()const{
return gameEnd;
}
void AiL::SetQuitAllowed(bool quittingAllowed){
savingFile=!quittingAllowed;
}
const bool AiL::PreviousStageCompleted()const{
return prevStageCompleted;
}
void AiL::SetCompletedStageFlag(){
prevStageCompleted=true;
}
void AiL::ResetCompletedStageFlag(){
prevStageCompleted=false;
}

View File

@ -182,6 +182,9 @@ private:
float saveGameDisplayTime=0.f;
float loadingWaitTime=0.f;
bool displayHud=true;
float vignetteDisplayTime=0.f;
bool savingFile=false;
bool prevStageCompleted=false;
void ValidateGameStatus();
void _PrepareLevel(MapName map,MusicChange changeMusic);
@ -319,6 +322,13 @@ public:
void UpdateMonsters();
void ActivateActionSetForAllControllers(InputActionSetHandle_t actionSetHandle);
const float GetEncounterDuration()const;
void ShowDamageVignetteOverlay();
void GlobalGameUpdates();
const bool QuitRequested()const;
void SetQuitAllowed(bool quittingAllowed); //Locks the game from quitting during sensitive operations such as file saving/loading.
const bool PreviousStageCompleted()const;
void SetCompletedStageFlag();
void ResetCompletedStageFlag();
struct TileGroupData{
vi2d tilePos;

View File

@ -121,11 +121,11 @@ void Menu::InitializeConsumableCraftingWindow(){
#pragma region Inventory Description
float inventoryDescriptionWidth=consumableCraftingWindow->pos.x+consumableCraftingWindow->size.x-26-224;
consumableCraftingWindow->ADD("Item Description Outline",MenuLabel)(geom2d::rect<float>{{224,28},{inventoryDescriptionWidth,consumableCraftingWindow->size.y-44}},"",1,ComponentAttr::LEFT_ALIGN|ComponentAttr::OUTLINE|ComponentAttr::BACKGROUND)END;
auto itemIconButton=consumableCraftingWindow->ADD("Item Icon",MenuItemItemButton)(geom2d::rect<float>{{226+inventoryDescriptionWidth/2-24,30},{48,48}},Item::BLANK,DO_NOTHING,"","",IconButtonAttr::NOT_SELECTABLE)END;
auto itemIconButton=consumableCraftingWindow->ADD("Item Icon",MenuItemItemButton)(geom2d::rect<float>{{226+inventoryDescriptionWidth/2-18,30},{36,36}},Item::BLANK,DO_NOTHING,"","",IconButtonAttr::NOT_SELECTABLE)END;
itemIconButton->SetShowQuantity(false);
itemIconButton->SetIconScale({2.f,2.f});
consumableCraftingWindow->ADD("Item Name Label",MenuLabel)(geom2d::rect<float>{{226,84},{inventoryDescriptionWidth-6,12}},"",0.75f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
consumableCraftingWindow->ADD("Item Description Label",MenuLabel)(geom2d::rect<float>{{226,94},{inventoryDescriptionWidth-6,consumableCraftingWindow->size.y-44-66}},"",0.5f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
itemIconButton->SetIconScale({1.5f,1.5f});
consumableCraftingWindow->ADD("Item Name Label",MenuLabel)(geom2d::rect<float>{{226,72},{inventoryDescriptionWidth-6,12}},"",0.75f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
consumableCraftingWindow->ADD("Item Description Label",MenuLabel)(geom2d::rect<float>{{226,82},{inventoryDescriptionWidth-6,consumableCraftingWindow->size.y-44-66}},"",0.5f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
#pragma endregion
#pragma region Money Display

View File

@ -138,10 +138,11 @@ void Menu::InitializeInventoryWindow(){
#pragma region Inventory Description
float inventoryDescriptionWidth=inventoryWindow->pos.x+inventoryWindow->size.x-26-224;
inventoryWindow->ADD("Item Description Outline",MenuLabel)(geom2d::rect<float>{{224,28},{inventoryDescriptionWidth,inventoryWindow->size.y-44}},"",1,LEFT_ALIGN|OUTLINE|BACKGROUND)END;
inventoryWindow->ADD("Item Icon",MenuItemItemButton)(geom2d::rect<float>{{226+inventoryDescriptionWidth/2-24,30},{48,48}},Item::BLANK,DO_NOTHING,"Item Name Label","Item Description Label",IconButtonAttr::NOT_SELECTABLE)END
->SetIconScale({2.f,2.f});
inventoryWindow->ADD("Item Name Label",MenuLabel)(geom2d::rect<float>{{226,84},{inventoryDescriptionWidth-6,12}},"",0.75f,LEFT_ALIGN|SHADOW)END;
inventoryWindow->ADD("Item Description Label",MenuLabel)(geom2d::rect<float>{{226,94},{inventoryDescriptionWidth-6,inventoryWindow->size.y-44-66}},"",0.5f,LEFT_ALIGN|SHADOW)END;
auto itemIcon=inventoryWindow->ADD("Item Icon",MenuItemItemButton)(geom2d::rect<float>{{226+inventoryDescriptionWidth/2-18,30},{36,36}},Item::BLANK,DO_NOTHING,"Item Name Label","Item Description Label",IconButtonAttr::NOT_SELECTABLE)END;
itemIcon->SetIconScale({1.5f,1.5f});
itemIcon->SetCompactDescriptions(false);
inventoryWindow->ADD("Item Name Label",MenuLabel)(geom2d::rect<float>{{226,72},{inventoryDescriptionWidth-6,12}},"",0.75f,LEFT_ALIGN|SHADOW)END;
inventoryWindow->ADD("Item Description Label",MenuLabel)(geom2d::rect<float>{{226,82},{inventoryDescriptionWidth-6,inventoryWindow->size.y-44-66}},"",0.5f,LEFT_ALIGN|SHADOW)END;
#pragma endregion
#pragma region Money Display

View File

@ -490,7 +490,8 @@ std::vector<std::weak_ptr<Item>>Inventory::GetItem(IT it){
uint32_t Inventory::GetItemCount(IT it){
if(!_inventory.count(it)){
return 0;
}else{
}else
{
auto inventory=_inventory.equal_range(it);
return std::accumulate(inventory.first,inventory.second,0,[](int val,std::pair<IT,std::shared_ptr<Item>>it){return val+(*it.second).Amt();});
}

View File

@ -198,9 +198,11 @@ void Menu::InitializeMerchantWindow(){
return true;
}
if(item.lock()->GetItem().lock()->CanBeSold()){
int inventoryQty=item.lock()->GetItem().lock()->IsEquippable()?1:Inventory::GetItemCount(item.lock()->GetItem().lock()->ActualName());
Component<ItemMenuLabel>(SELL_ITEM,"Item Sell Header")->SetItem(item.lock()->GetItem());
Component<MenuLabel>(SELL_ITEM,"Price per item Amount Label")->SetLabel(std::to_string(item.lock()->GetItem().lock()->SellValue()));
Component<MenuLabel>(SELL_ITEM,"Amount to sell Amount Label")->SetLabel(std::format("{}/{}",1,Inventory::GetItemCount(item.lock()->GetItem().lock()->ActualName())));
Component<MenuLabel>(SELL_ITEM,"Amount to sell Amount Label")->SetLabel(std::format("{}/{}",1,inventoryQty));
Component<MenuLabel>(SELL_ITEM,"Total Price Amount Label")->SetLabel(std::to_string(item.lock()->GetItem().lock()->SellValue()));
Merchant&merchant=Merchant::GetCurrentTravelingMerchant();
bool canPurchase=merchant.CanSellItem(item.lock()->GetItem(),1);
@ -213,7 +215,6 @@ void Menu::InitializeMerchantWindow(){
Component<MenuComponent>(SELL_ITEM,"Decrease sell amount Button")->SetGrayedOut(true);
int qty=1;
int inventoryQty=Inventory::GetItemCount(item.lock()->GetItem().lock()->ActualName());
if(qty>=inventoryQty){
Component<MenuComponent>(SELL_ITEM,"Increase sell amount Button")->SetGrayedOut(true);
}else{
@ -256,10 +257,11 @@ void Menu::InitializeMerchantWindow(){
#pragma region Inventory Description
float inventoryDescriptionWidth=merchantWindow->pos.x+merchantWindow->size.x-26-224;
merchantWindow->ADD("Item Description Outline",MenuLabel)(geom2d::rect<float>{{224,28},{inventoryDescriptionWidth,merchantWindow->size.y-44}},"",1,ComponentAttr::LEFT_ALIGN|ComponentAttr::OUTLINE|ComponentAttr::BACKGROUND)END;
merchantWindow->ADD("Item Icon",MenuItemItemButton)(geom2d::rect<float>{{226+inventoryDescriptionWidth/2-24,30},{48,48}},Item::BLANK,DO_NOTHING,"Item Name Label","Item Description Label",IconButtonAttr::NOT_SELECTABLE)END
->SetIconScale({2.f,2.f});
merchantWindow->ADD("Item Name Label",MenuLabel)(geom2d::rect<float>{{226,84},{inventoryDescriptionWidth-6,12}},"",0.75f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
merchantWindow->ADD("Item Description Label",MenuLabel)(geom2d::rect<float>{{226,94},{inventoryDescriptionWidth-6,merchantWindow->size.y-44-66}},"",0.5f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
auto itemIcon=merchantWindow->ADD("Item Icon",MenuItemItemButton)(geom2d::rect<float>{{226+inventoryDescriptionWidth/2-18,30},{36,36}},Item::BLANK,DO_NOTHING,"Item Name Label","Item Description Label",IconButtonAttr::NOT_SELECTABLE)END;
itemIcon->SetIconScale({1.5f,1.5f});
itemIcon->SetCompactDescriptions(false);
merchantWindow->ADD("Item Name Label",MenuLabel)(geom2d::rect<float>{{226,72},{inventoryDescriptionWidth-6,12}},"",0.75f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
merchantWindow->ADD("Item Description Label",MenuLabel)(geom2d::rect<float>{{226,82},{inventoryDescriptionWidth-6,merchantWindow->size.y-44-66}},"",0.5f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
#pragma endregion
#pragma region Money Display

View File

@ -165,7 +165,7 @@ bool Monster::_SetX(float x,const bool monsterInvoked){
}
#pragma endregion
#pragma region lambdas
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||!geom2d::overlaps(newPos,collision);};
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||(!isBoss&&!geom2d::overlaps(newPos,collision));};
#pragma endregion
collision.pos+=tilePos;
if(NoEnemyCollisionWithTile()){
@ -204,7 +204,7 @@ bool Monster::_SetY(float y,const bool monsterInvoked){
}
#pragma endregion
#pragma region lambdas
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||!geom2d::overlaps(newPos,collision);};
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||(!isBoss&&!geom2d::overlaps(newPos,collision));};
#pragma endregion
collision.pos+=tilePos;
if(NoEnemyCollisionWithTile()){

View File

@ -74,7 +74,7 @@ void Menu::InitializePauseWindow(){
Component<MenuLabel>(LEVEL_COMPLETE,"Stage Complete Label")->SetLabel("Stage Summary");
Component<MenuComponent>(LEVEL_COMPLETE,"Level Details Outline")->SetLabel("");
if(game->GetCurrentMapName()=="HUB")Unlock::UnlockCurrentMap(); //Special unlock for the hub area when leaving.
if(game->GetCurrentMapName()=="HUB"&&game->PreviousStageCompleted())Unlock::UnlockCurrentMap(); //Special unlock for the hub area when leaving.
if(Unlock::IsUnlocked("STORY_1_1")){
Component<MenuComponent>(LEVEL_COMPLETE,"Next Button")->Enable();

View File

@ -745,6 +745,9 @@ bool Player::Hurt(int damage,bool onUpperLevel,float z){
SoundEffect::PlaySFX("Player Hit",SoundEffect::CENTERED);
}
if(Menu::IsMenuOpen()&&mod_dmg>0)Menu::CloseAllMenus();
if(mod_dmg>0)game->ShowDamageVignetteOverlay();
hp=std::max(0,hp-int(mod_dmg));
if(hp==0&&GameState::STATE!=GameState::states[States::DEATH])GameState::ChangeState(States::DEATH);
@ -1062,6 +1065,7 @@ void Player::CheckEndZoneCollision(){
endZoneStandTime+=game->GetElapsedTime();
if(endZoneStandTime>="Player.End Zone Wait Time"_F){
Component<MenuLabel>(LEVEL_COMPLETE,"Stage Complete Label")->SetLabel("Stage Completed");
game->SetCompletedStageFlag();
Component<MenuComponent>(LEVEL_COMPLETE,"Level Details Outline")->SetLabel("Complete Bonus\n +10% XP");
if(Unlock::IsUnlocked("STORY_1_1")){
Component<MenuComponent>(LEVEL_COMPLETE,"Next Button")->Enable();

View File

@ -82,6 +82,8 @@ const size_t SaveFile::GetOnlineSaveFileCount(){
const void SaveFile::SaveGame(){
game->saveGameDisplayTime=6.f;
game->SetQuitAllowed(false);
std::filesystem::create_directories("save_file_path"_S);
utils::datafile saveFile;
@ -222,6 +224,7 @@ const void SaveFile::SaveGame(){
}else{
LOG("WARNING! Could not save metadata to server!");
}
game->SetQuitAllowed(true);
};
Server_SaveMetadataFile(RetryResponse);
}else{
@ -271,38 +274,54 @@ const void SaveFile::SaveGame(){
std::string systemContents=systemFileContents.str();
emscripten_idb_async_store("/assets",("save_file_path"_S+"system.conf").c_str(),systemContents.data(),systemContents.length(),0,[](void*arg){
LOG("Successfully saved system file!");
game->SetQuitAllowed(true);
},[](void*arg){
LOG("Failed to save system file!");
game->SetQuitAllowed(true);
});
systemfile.close();
#else
game->SetQuitAllowed(true);
#endif
}
#define HASH_VERIFICATION_REQUIRED true
void SaveFile::LoadFile(){
utils::datafile loadFile;
std::string loadFilename="save_file_path"_S+std::format("save.{:04}",saveFileID);
if(std::filesystem::exists(loadFilename)){
utils::datafile::Read(loadFile,"save_file_path"_S+std::format("save.{:04}",saveFileID));
if(!loadFile.HasProperty("Hash")){
LOG(std::format("WARNING! Filehash for file {} does not exist!","save_file_path"_S+std::format("save.{:04}",saveFileID)));
return;
}
if(loadFile.HasProperty("Hash")){
std::string expectedFileHash=loadFile["Hash"].GetString();
loadFile["Hash"].SetString("");
utils::datafile::Write(loadFile,"save_file_path"_S+std::format("save.{:04}",saveFileID));
std::string fileHash=util::GetHash("save_file_path"_S+std::format("save.{:04}",saveFileID));
if(expectedFileHash!=fileHash){
LOG(std::format("WARNING! Filehash for file {} was not identified as proper! Will not load this file!","save_file_path"_S+std::format("save.{:04}",saveFileID)));
if(HASH_VERIFICATION_REQUIRED){
if(!loadFile.HasProperty("Hash")){
LOG(std::format("WARNING! Filehash for file {} does not exist!","save_file_path"_S+std::format("save.{:04}",saveFileID)));
return;
}
if(loadFile.HasProperty("Hash")){
std::string expectedFileHash=loadFile["Hash"].GetString();
loadFile["Hash"].SetString("");
utils::datafile::Write(loadFile,"save_file_path"_S+std::format("save.{:04}",saveFileID));
auto trim = [](std::string& s)
{
s.erase(0, s.find_first_not_of(" \t\n\r\f\v"));
s.erase(s.find_last_not_of(" \t\n\r\f\v") + 1);
};
loadFile["Hash"].SetString(expectedFileHash); //Now write the hash back into the file since we tampered with it.
utils::datafile::Write(loadFile,"save_file_path"_S+std::format("save.{:04}",saveFileID));
std::string fileHash=util::GetHash("save_file_path"_S+std::format("save.{:04}",saveFileID));
trim(fileHash); //It's possible the expected file hash has a space at the end/beginning that gets stripped out. We want to trim and match that string.
if(expectedFileHash!=fileHash){
LOG(std::format("WARNING! Filehash for file {} was not identified as proper! Will not load this file!","save_file_path"_S+std::format("save.{:04}",saveFileID)));
return;
}
loadFile["Hash"].SetString(expectedFileHash); //Now write the hash back into the file since we tampered with it.
utils::datafile::Write(loadFile,"save_file_path"_S+std::format("save.{:04}",saveFileID));
}
}
game->ResetGame();
for(auto&[key,data]:loadFile["Items"].GetOrderedKeys()){
@ -398,6 +417,8 @@ void SaveFile::LoadFile(){
const void SaveFile::LoadGame(){
std::filesystem::create_directories("save_file_path"_S);
game->SetQuitAllowed(false);
#ifdef __EMSCRIPTEN__
if(onlineMode){
@ -410,6 +431,7 @@ const void SaveFile::LoadGame(){
}else{
LOG("WARNING! Could not load save file!");
}
game->SetQuitAllowed(true);
});
}else{
emscripten_idb_async_load("/assets",("save_file_path"_S+std::format("save.{:04}",saveFileID)).c_str(),0,[](void*arg,void*data,int length){
@ -422,12 +444,15 @@ const void SaveFile::LoadGame(){
}
file.close();
LoadFile();
game->SetQuitAllowed(true);
},[](void*arg){
LOG("Failed to load Save File "<<saveFileID<<"!");
game->SetQuitAllowed(true);
});
}
#else
LoadFile();
game->SetQuitAllowed(true);
#endif
}

View File

@ -349,10 +349,10 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
}
if(m.I(A::PHASE_REPEAT_COUNT)>=5){
m.I(A::PHASE_REPEAT_COUNT)=0;
float jumpAngle=util::angleTo(m.GetPos(),game->GetCurrentMapData().MapSize*game->GetCurrentMapData().tilewidth/2); //We jump towards the center to keep the player from constantly dealing with a stuck boss.
float jumpAngle=util::angleTo(m.GetPos(),game->GetCurrentMapData().MapSize/2*game->GetCurrentMapData().tilewidth); //We jump towards the center to keep the player from constantly dealing with a stuck boss.
float jumpDistance=ConfigFloat("Phase4.JumpDistance")/100*game->GetCurrentMapData().tilewidth;
float jumpSpd=jumpDistance/ConfigFloat("Phase4.JumpDuration");
float lockedInTargetTime=jumpDistance/ConfigFloat("Phase4.JumpLockinTargetTime");
float lockedInTargetTime=ConfigFloat("Phase4.JumpLockinTargetTime");
StartJump(ConfigFloat("Phase4.JumpDuration"),m.GetPos()+vf2d{cos(jumpAngle)*jumpDistance,sin(jumpAngle)*jumpDistance},0,jumpSpd,lockedInTargetTime);
}else
if(m.I(A::PATTERN_REPEAT_COUNT)<5&&m.F(A::SHOOT_TIMER)==0){

View File

@ -61,6 +61,8 @@ void State_OverworldMap::OnStateChange(GameState*prevState){
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(false);
SaveFile::SaveGame();
game->ResetCompletedStageFlag();
if(Unlock::IsUnlocked("STORY_1_3")){
game->SetChapter(2);
}

View File

@ -12,7 +12,19 @@ Upon completion of a stage in time trial mode if the player beat their previous
Settings menu doesn't scroll back up properly while the scrollbar does?
Merchant descriptions have no newlines.
Amount to sell shows total of that accessory you have instead of 1/1.
Bosses can get stuck outside the arena?
Traveling merchants of different colors/looks.
Steel Weapons appear in the demo for Chapter 2.
Update display counters on the overworld map.
Pressing movement keys that negate each other shouldn't cause a walking animation to occur.
============================================
Consider a "killed by player" / "marked by player" flag for monsters to determine if a player gets credit for a monster kill (for achievements)
Make another actions config file for the main build (The app # is different)
Make another actions config file for the main build (The app # is different)
Review other games and see what the screen does when the player takes damage. Vignette effect
Look at green slime remains count for crafting.
Textured ground tiles

View File

@ -37,9 +37,9 @@ All rights reserved.
#pragma endregion
#pragma once
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_MINOR 1
#define VERSION_PATCH 0
#define VERSION_BUILD 8601
#define VERSION_BUILD 8666
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -104,7 +104,7 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,1048,4821,4822,4823,4824,4825,4826,4827,4828,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,1048,4861,4862,4863,4864,4865,4866,4867,4868,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,1048,4901,4902,4903,4904,4905,4906,4907,4908,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,995,1046,1046,1046,1046,1046,1046,1046,1046,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,995,79,79,79,79,79,79,79,79,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1462,1462,1462,1462,1462,1462,1462,1462,1046,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,

View File

@ -603,7 +603,6 @@
</object>
<object id="8" name="Camp" type="StagePlate" x="416" y="416" width="20" height="24">
<properties>
<property name="Connection 1 - North" type="object" value="20"/>
<property name="Map" propertytype="Level" value="HUB"/>
<property name="Type" propertytype="StageType" value="HUB"/>
<property name="Unlock Condition" propertytype="Level" value="STORY_1_1"/>

View File

@ -21,6 +21,15 @@ Interface
# The text color of input keys.
InputButtonTextCol = 175,199,191,255
# Vignette Appearance Wait Duration
Vignette Appearance Time = 0.4s
# Vignette Fade out Duration
Vignette Fadeout Time = 0.2s
# Damage Vignette Overlay Color
Vignette Color = 218, 44, 143, 255
# The original health display color.
HUD Health Display Color = 255,255,255,255

View File

@ -84,6 +84,7 @@ Images
GFX_Unlock = unlock.png
GFX_SwordSlash = swordslash.png
GFX_CustomFont = font.png
GFX_Vignette = vignette.png
# Ability Icons
GFX_Warrior_BattleCry_Icon = Ability Icons/battlecry.png

View File

@ -102,7 +102,7 @@ ItemDatabase
Bandages
{
ItemScript = RestoreDuringCast
Description = Restores 30% health points over 6 seconds. The effect can be interrupted.
Description = Restores 30% health points casting for 6 seconds. The effect can be interrupted.
HP % Restore = 5%,0.9,6
Cast Time = 6.0
Cooldown Time = 5.0

View File

@ -406,7 +406,7 @@ Equipment
Crafting
{
# When this crafting recipe is available.
AvailableChapter = 2
AvailableChapter = 6
Item[0] = Slimy Bun,1
Gold = 500
@ -519,7 +519,7 @@ Equipment
Crafting
{
# When this crafting recipe is available.
AvailableChapter = 2
AvailableChapter = 6
Item[0] = Slimy Bun,1
Gold = 500
@ -632,7 +632,7 @@ Equipment
Crafting
{
# When this crafting recipe is available.
AvailableChapter = 2
AvailableChapter = 6
Item[0] = Slimy Bun,1
Gold = 500

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -4951,6 +4951,7 @@ namespace olc
if(requestClear||garbageCollector.size()>5000){
std::for_each(garbageCollector.begin(),garbageCollector.end(),[&](auto&key){
delete key.second.decal->sprite;
delete key.second.decal;
});
garbageCollector.clear();

View File

@ -176,6 +176,7 @@ std::string util::GetHash(std::string fileName){
}
hashIndex++;
}
file.close();
return hash;
}
#pragma endregion

View File

@ -1 +1,2 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 .;make -j 8

View File

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
rm -R bin
mkdir bin
mkdir bin/assets

View File

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
rm -R release
mkdir release
mkdir release/assets

View File

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear
rm -R bin
mkdir bin

View File

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear
mkdir bin

View File

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear
rm -R bin
mkdir bin

View File

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear
source ./emsdk/emsdk_env.sh
emcmake cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 .

View File

@ -1 +1,2 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
emrun bin/index.html

View File

@ -1,3 +1,4 @@
cp AdventuresInLestoria/play.html ./bin
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cp "Adventures in Lestoria/play.html" ./bin
source ./emsdk/emsdk_env.sh
emrun --no_browser bin/play.html

View File

@ -1 +1,2 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cmake -DCMAKE_BUILD_TYPE=Release .;make -j 8