Merge branch 'master' of http://sig.projectdivar.com/sigonasr2/AdventuresInLestoria
This commit is contained in:
commit
795c612f16
1
.gitignore
vendored
1
.gitignore
vendored
@ -425,3 +425,4 @@ desktop.ini
|
|||||||
/Adventures in Lestoria Tests/x64/Unit Testing
|
/Adventures in Lestoria Tests/x64/Unit Testing
|
||||||
/x64/Unit Testing
|
/x64/Unit Testing
|
||||||
/Adventures in Lestoria/assets/2.10
|
/Adventures in Lestoria/assets/2.10
|
||||||
|
/Adventures in Lestoria/assets/items/Bird_s Treasure.png
|
||||||
|
@ -218,7 +218,7 @@
|
|||||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
<AdditionalIncludeDirectories>C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\sigon\OneDrive\Documents\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\LabUser\Documents\include;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\sigon\OneDrive\Documents\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalOptions>/MP20 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/MP20 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<TreatSpecificWarningsAsErrors>4099;5030;4715;4172;4834</TreatSpecificWarningsAsErrors>
|
<TreatSpecificWarningsAsErrors>4099;5030;4715;4172;4834</TreatSpecificWarningsAsErrors>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
@ -226,7 +226,7 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>discord_game_sdk.dll.lib;freetype.lib;steam_api64.lib;$(CoreLibraryDependencies);%(AdditionalDependencies);</AdditionalDependencies>
|
<AdditionalDependencies>discord_game_sdk.dll.lib;freetype.lib;steam_api64.lib;$(CoreLibraryDependencies);%(AdditionalDependencies);</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
@ -622,6 +622,7 @@
|
|||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="State_Dialog.h" />
|
||||||
<ClInclude Include="State_GameHub.h">
|
<ClInclude Include="State_GameHub.h">
|
||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
@ -725,6 +726,7 @@
|
|||||||
<ClCompile Include="Ability.cpp" />
|
<ClCompile Include="Ability.cpp" />
|
||||||
<ClCompile Include="Animation.cpp" />
|
<ClCompile Include="Animation.cpp" />
|
||||||
<ClCompile Include="Arrow.cpp" />
|
<ClCompile Include="Arrow.cpp" />
|
||||||
|
<ClCompile Include="ArtificerWindow.cpp" />
|
||||||
<ClCompile Include="AttributableStat.cpp">
|
<ClCompile Include="AttributableStat.cpp">
|
||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
@ -1054,6 +1056,7 @@
|
|||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="State_Dialog.cpp" />
|
||||||
<ClCompile Include="State_GameHub.cpp">
|
<ClCompile Include="State_GameHub.cpp">
|
||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
@ -1167,6 +1170,11 @@
|
|||||||
<Text Include="assets\config\shops\Chapter 5 Merchants.txt" />
|
<Text Include="assets\config\shops\Chapter 5 Merchants.txt" />
|
||||||
<Text Include="assets\config\shops\Chapter 6 Merchants.txt" />
|
<Text Include="assets\config\shops\Chapter 6 Merchants.txt" />
|
||||||
<Text Include="assets\config\story\Chapter 1.txt" />
|
<Text Include="assets\config\story\Chapter 1.txt" />
|
||||||
|
<Text Include="assets\config\story\Chapter 2.txt" />
|
||||||
|
<Text Include="assets\config\story\Chapter 3.txt" />
|
||||||
|
<Text Include="assets\config\story\Chapter 4.txt" />
|
||||||
|
<Text Include="assets\config\story\Chapter 5.txt" />
|
||||||
|
<Text Include="assets\config\story\Chapter 6.txt" />
|
||||||
<Text Include="Chapter_1_2nd_Boss.txt" />
|
<Text Include="Chapter_1_2nd_Boss.txt" />
|
||||||
<Text Include="Chapter_1_Creatures_Part_2.txt" />
|
<Text Include="Chapter_1_Creatures_Part_2.txt" />
|
||||||
<Text Include="Chapter_2_Boss.txt" />
|
<Text Include="Chapter_2_Boss.txt" />
|
||||||
|
@ -669,6 +669,9 @@
|
|||||||
<ClInclude Include="HurtDamageInfo.h">
|
<ClInclude Include="HurtDamageInfo.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="State_Dialog.h">
|
||||||
|
<Filter>Header Files\State</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Player.cpp">
|
<ClCompile Include="Player.cpp">
|
||||||
@ -1154,8 +1157,11 @@
|
|||||||
<ClCompile Include="PoisonBottle.cpp">
|
<ClCompile Include="PoisonBottle.cpp">
|
||||||
<Filter>Source Files\Bullet Types</Filter>
|
<Filter>Source Files\Bullet Types</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Chapter 2.txt">
|
<ClCompile Include="State_Dialog.cpp">
|
||||||
<Filter>Configurations\Story</Filter>
|
<Filter>Source Files\Game States</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="ArtificerWindow.cpp">
|
||||||
|
<Filter>Source Files\Interface</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -1340,6 +1346,21 @@
|
|||||||
<Text Include="Crawler_Artificer.txt">
|
<Text Include="Crawler_Artificer.txt">
|
||||||
<Filter>Documentation\Mechanics</Filter>
|
<Filter>Documentation\Mechanics</Filter>
|
||||||
</Text>
|
</Text>
|
||||||
|
<Text Include="assets\config\story\Chapter 2.txt">
|
||||||
|
<Filter>Configurations\Story</Filter>
|
||||||
|
</Text>
|
||||||
|
<Text Include="assets\config\story\Chapter 3.txt">
|
||||||
|
<Filter>Configurations\Story</Filter>
|
||||||
|
</Text>
|
||||||
|
<Text Include="assets\config\story\Chapter 4.txt">
|
||||||
|
<Filter>Configurations\Story</Filter>
|
||||||
|
</Text>
|
||||||
|
<Text Include="assets\config\story\Chapter 5.txt">
|
||||||
|
<Filter>Configurations\Story</Filter>
|
||||||
|
</Text>
|
||||||
|
<Text Include="assets\config\story\Chapter 6.txt">
|
||||||
|
<Filter>Configurations\Story</Filter>
|
||||||
|
</Text>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="assets\heart.ico">
|
<Image Include="assets\heart.ico">
|
||||||
|
@ -437,7 +437,7 @@ bool AiL::DownPressed(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AiL::HandleUserInput(float fElapsedTime){
|
void AiL::HandleUserInput(float fElapsedTime){
|
||||||
if(!Menu::stack.empty())return; //A window being opened means there's no user input allowed.
|
if(!Menu::stack.empty()||GameState::STATE==GameState::states[States::DIALOG])return; //A window being opened means there's no user input allowed.
|
||||||
if(GetKey(SCROLL).bPressed)displayHud=!displayHud;
|
if(GetKey(SCROLL).bPressed)displayHud=!displayHud;
|
||||||
|
|
||||||
bool setIdleAnimation=true;
|
bool setIdleAnimation=true;
|
||||||
|
100
Adventures in Lestoria/ArtificerWindow.cpp
Normal file
100
Adventures in Lestoria/ArtificerWindow.cpp
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
#pragma region License
|
||||||
|
/*
|
||||||
|
License (OLC-3)
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
|
||||||
|
|
||||||
|
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 © 2024 The FreeType
|
||||||
|
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
|
||||||
|
All rights reserved.
|
||||||
|
*/
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
#include "Menu.h"
|
||||||
|
#include "MenuComponent.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
#include "AdventuresInLestoria.h"
|
||||||
|
#include "Unlock.h"
|
||||||
|
#include "MenuLabel.h"
|
||||||
|
#include "VisualNovel.h"
|
||||||
|
|
||||||
|
INCLUDE_game
|
||||||
|
|
||||||
|
void Menu::InitializeArtificerWindow(){
|
||||||
|
Menu*artificerWindow=CreateMenu(ARTIFICER,CENTERED,vi2d{144,144});
|
||||||
|
|
||||||
|
artificerWindow->ADD("Refine Button",MenuComponent)(geom2d::rect<float>{{0.f,4.f},{144.f,24.f}},"Refine",[](MenuFuncData data){
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
|
||||||
|
artificerWindow->ADD("Disassemble Button",MenuComponent)(geom2d::rect<float>{{0.f,32.f},{144.f,24.f}},"Disassemble",[](MenuFuncData data){
|
||||||
|
return true;
|
||||||
|
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
|
||||||
|
artificerWindow->ADD("Enchant Button",MenuComponent)(geom2d::rect<float>{{0.f,60.f},{144.f,24.f}},"Enchant",[](MenuFuncData data){
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
|
||||||
|
artificerWindow->ADD("Help Button",MenuComponent)(geom2d::rect<float>{{0.f,88.f},{144.f,24.f}},"Help",[](MenuFuncData data){
|
||||||
|
VisualNovel::LoadDialog("ARTIFICER_HELP",[](){Menu::OpenMenu(MenuType::ARTIFICER);});
|
||||||
|
return true;
|
||||||
|
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
|
||||||
|
artificerWindow->ADD("Leave Button",MenuComponent)(geom2d::rect<float>{{0.f,116.f},{144.f,24.f}},"Leave",[](MenuFuncData data){
|
||||||
|
Menu::CloseMenu();
|
||||||
|
return true;
|
||||||
|
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
|
||||||
|
|
||||||
|
artificerWindow->SetupKeyboardNavigation(
|
||||||
|
[](MenuType type,Data&returnData){ //On Open
|
||||||
|
returnData="Refine Button";
|
||||||
|
},
|
||||||
|
{ //Button Key
|
||||||
|
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
|
||||||
|
{game->KEY_BACK,{"Stay",[](MenuType type){
|
||||||
|
Menu::CloseMenu();
|
||||||
|
}}},
|
||||||
|
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
|
||||||
|
}
|
||||||
|
,{ //Button Navigation Rules
|
||||||
|
{"Refine Button",{
|
||||||
|
.up="Leave Button",
|
||||||
|
.down="Disassemble Button",}},
|
||||||
|
{"Disassemble Button",{
|
||||||
|
.up="Refine Button",
|
||||||
|
.down="Enchant Button",}},
|
||||||
|
{"Enchant Button",{
|
||||||
|
.up="Disassemble Button",
|
||||||
|
.down="Help Button",}},
|
||||||
|
{"Help Button",{
|
||||||
|
.up="Enchant Button",
|
||||||
|
.down="Leave Button",}},
|
||||||
|
{"Leave Button",{
|
||||||
|
.up="Help Button",
|
||||||
|
.down="Refine Button",}},
|
||||||
|
});
|
||||||
|
}
|
@ -108,22 +108,22 @@ void Buff::BuffTick(AiL*game,float fElapsedTime){
|
|||||||
}break;
|
}break;
|
||||||
case HP_PCT_RESTORATION:{
|
case HP_PCT_RESTORATION:{
|
||||||
if(OwnerIsPlayer())GetPlayer()->Heal(GetPlayer()->GetMaxHealth()*intensity/100.f);
|
if(OwnerIsPlayer())GetPlayer()->Heal(GetPlayer()->GetMaxHealth()*intensity/100.f);
|
||||||
else if(OwnerIsMonster())GetMonster()->Heal(GetMonster()->GetMaxHealth()*intensity/100.f);
|
else if(OwnerIsMonster()){if(MonsterIsValid())GetMonster()->Heal(GetMonster()->GetMaxHealth()*intensity/100.f);}
|
||||||
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
||||||
}break;
|
}break;
|
||||||
case MP_PCT_RESTORATION:{
|
case MP_PCT_RESTORATION:{
|
||||||
if(OwnerIsPlayer())GetPlayer()->RestoreMana(GetPlayer()->GetMaxMana()*intensity/100.f);
|
if(OwnerIsPlayer())GetPlayer()->RestoreMana(GetPlayer()->GetMaxMana()*intensity/100.f);
|
||||||
else if(OwnerIsMonster())ERR("WARNING! Monsters don't have mana, this functionality is not supported!")
|
else if(OwnerIsMonster()){ERR("WARNING! Monsters don't have mana, this functionality is not supported!")}
|
||||||
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
||||||
}break;
|
}break;
|
||||||
case HP_DAMAGE_OVER_TIME:{
|
case HP_DAMAGE_OVER_TIME:{
|
||||||
if(OwnerIsPlayer())GetPlayer()->Hurt(intensity,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT);
|
if(OwnerIsPlayer())GetPlayer()->Hurt(intensity,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT);
|
||||||
else if(OwnerIsMonster())GetMonster()->Hurt(intensity,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT);
|
else if(OwnerIsMonster()){if(MonsterIsValid())GetMonster()->Hurt(intensity,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT);}
|
||||||
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
||||||
}break;
|
}break;
|
||||||
case HP_PCT_DAMAGE_OVER_TIME:{
|
case HP_PCT_DAMAGE_OVER_TIME:{
|
||||||
if(OwnerIsPlayer())GetPlayer()->Hurt(GetPlayer()->GetMaxHealth()*intensity/100.f,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT);
|
if(OwnerIsPlayer())GetPlayer()->Hurt(GetPlayer()->GetMaxHealth()*intensity/100.f,GetPlayer()->OnUpperLevel(),GetPlayer()->GetZ(),HurtFlag::DOT);
|
||||||
else if(OwnerIsMonster())GetMonster()->Hurt(GetMonster()->GetMaxHealth()*intensity/100.f,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT);
|
else if(OwnerIsMonster()){if(MonsterIsValid())GetMonster()->Hurt(GetMonster()->GetMaxHealth()*intensity/100.f,GetMonster()->OnUpperLevel(),GetMonster()->GetZ(),HurtFlag::DOT);}
|
||||||
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
else ERR("WARNING! Buff Over Time attached Target is somehow not a Player nor a Monster Pointer! THIS SHOULD NOT BE HAPPENING!")
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
===ARTIFICER_INTRO===
|
|
||||||
{BACKGROUND commercial_assets/Forest Clearing Campsite_Day.png}
|
|
||||||
|
|
||||||
[Artificer]
|
|
||||||
Hello adventurer! Welcome to my artificing station! I have not met you yet, may I have the pleasure of knowing your name?
|
|
||||||
|
|
||||||
[You]
|
|
||||||
Hello, my name is [You].
|
|
||||||
|
|
||||||
[Artificer]
|
|
||||||
Excellent! Nice to meet you, [You]. At my station you have the ability to refine and fix up imperfect jewelry discovered while exploring!
|
|
||||||
|
|
||||||
Disassemble rings that are undesirable to you and retrieve fragments of them, then use the Refine station to empower your equipment further!
|
|
||||||
|
|
||||||
This should let you get some use out of all those extra rings you're carrying around, eh?
|
|
||||||
|
|
||||||
[You]
|
|
||||||
Great, I think I could make good use of this. Thank you.
|
|
||||||
|
|
||||||
===ARTIFICER_HELP===
|
|
||||||
[Artificer]
|
|
||||||
At this station you have the ability to refine and fix up imperfect jewelry discovered while exploring!
|
|
||||||
|
|
||||||
Disassemble rings that are undesirable to you and retrieve fragments of them, then use the Refine station to empower your equipment further!
|
|
||||||
|
|
||||||
You can make use of those extra rings you have been piling up!
|
|
@ -19,6 +19,12 @@ Artificer: Excelent! Nice to meet you, [YOU]. Here you have the ability to refin
|
|||||||
Artificer: Break down rings that are undesirable to you to retrieve fragments, then use the Refining station to empower your equipment further!
|
Artificer: Break down rings that are undesirable to you to retrieve fragments, then use the Refining station to empower your equipment further!
|
||||||
Artificer: This will let you get use out of all those extra rings you may be carrying around, eh?
|
Artificer: This will let you get use out of all those extra rings you may be carrying around, eh?
|
||||||
|
|
||||||
|
(Auto-generate fragment item types for each ring)
|
||||||
|
Confirmation dialog for disassembly
|
||||||
|
|
||||||
|
Refining: Popup a dialog showing current stats of selected ring, show possible upgraded stats as (+ ??)
|
||||||
|
Hit Refine button to consume fragment to upgrade some stat. Play an animation next to stat that was upgraded.
|
||||||
|
(Whichever is greater): Always go up by 20%/Always go up by 1
|
||||||
|
|
||||||
Artificer has 4 Dialog Options
|
Artificer has 4 Dialog Options
|
||||||
- Repair/Enhance/(Refine?) (Name may change in the future)
|
- Repair/Enhance/(Refine?) (Name may change in the future)
|
||||||
@ -28,7 +34,7 @@ Artificer has 4 Dialog Options
|
|||||||
- Leave
|
- Leave
|
||||||
|
|
||||||
|
|
||||||
(Whichever is greater): Always go up by 20%/Always go up by 1
|
|
||||||
|
|
||||||
Enhancing Gear
|
Enhancing Gear
|
||||||
- increases the stats of an item.
|
- increases the stats of an item.
|
||||||
|
@ -42,12 +42,15 @@ All rights reserved.
|
|||||||
#include "State_LevelComplete.h"
|
#include "State_LevelComplete.h"
|
||||||
#include "State_Story.h"
|
#include "State_Story.h"
|
||||||
#include "State_GameHub.h"
|
#include "State_GameHub.h"
|
||||||
#include "State_Death.h";
|
#include "State_Death.h"
|
||||||
|
#include "State_Dialog.h"
|
||||||
|
|
||||||
INCLUDE_game
|
INCLUDE_game
|
||||||
|
|
||||||
#define NEW_STATE(state,class) GameState::states[state]=NEW class();
|
#define NEW_STATE(state,class) GameState::states[state]=NEW class();
|
||||||
|
|
||||||
|
States::State GameState::currentState;
|
||||||
|
|
||||||
void GameState::Initialize(){
|
void GameState::Initialize(){
|
||||||
NEW_STATE(States::GAME_RUN,State_GameRun);
|
NEW_STATE(States::GAME_RUN,State_GameRun);
|
||||||
NEW_STATE(States::OVERWORLD_MAP,State_OverworldMap);
|
NEW_STATE(States::OVERWORLD_MAP,State_OverworldMap);
|
||||||
@ -56,10 +59,12 @@ void GameState::Initialize(){
|
|||||||
NEW_STATE(States::STORY,State_Story);
|
NEW_STATE(States::STORY,State_Story);
|
||||||
NEW_STATE(States::GAME_HUB,State_GameHub);
|
NEW_STATE(States::GAME_HUB,State_GameHub);
|
||||||
NEW_STATE(States::DEATH,State_Death);
|
NEW_STATE(States::DEATH,State_Death);
|
||||||
|
NEW_STATE(States::DIALOG,State_Dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState::_ChangeState(States::State newState){
|
void GameState::_ChangeState(States::State newState){
|
||||||
GameState*prevState=STATE;
|
GameState*prevState=STATE;
|
||||||
|
currentState=newState;
|
||||||
if(!states.count(newState)){
|
if(!states.count(newState)){
|
||||||
ERR("WARNING! State not defined for state "<<newState<<"!")
|
ERR("WARNING! State not defined for state "<<newState<<"!")
|
||||||
}
|
}
|
||||||
@ -86,3 +91,7 @@ void GameState::GetAnyMousePress(int32_t mouseButton){}
|
|||||||
void GameState::GetAnyMouseRelease(int32_t mouseButton){}
|
void GameState::GetAnyMouseRelease(int32_t mouseButton){}
|
||||||
|
|
||||||
void GameState::DrawOverlay(AiL*game){};
|
void GameState::DrawOverlay(AiL*game){};
|
||||||
|
|
||||||
|
States::State GameState::GetCurrentState(){
|
||||||
|
return currentState;
|
||||||
|
}
|
@ -51,6 +51,7 @@ namespace States{
|
|||||||
MAIN_MENU,
|
MAIN_MENU,
|
||||||
LEVEL_COMPLETE,
|
LEVEL_COMPLETE,
|
||||||
STORY,
|
STORY,
|
||||||
|
DIALOG,
|
||||||
KEYBIND,
|
KEYBIND,
|
||||||
DEATH,
|
DEATH,
|
||||||
};
|
};
|
||||||
@ -58,8 +59,10 @@ namespace States{
|
|||||||
|
|
||||||
class GameState{
|
class GameState{
|
||||||
friend class AiL;
|
friend class AiL;
|
||||||
|
friend class VisualNovel;
|
||||||
private:
|
private:
|
||||||
static void _ChangeState(States::State newState);
|
static void _ChangeState(States::State newState);
|
||||||
|
static States::State currentState;
|
||||||
public:
|
public:
|
||||||
inline static GameState*STATE=nullptr;
|
inline static GameState*STATE=nullptr;
|
||||||
inline static std::map<States::State,GameState*>states;
|
inline static std::map<States::State,GameState*>states;
|
||||||
@ -75,4 +78,5 @@ public:
|
|||||||
virtual void GetAnyMouseRelease(int32_t mouseButton);
|
virtual void GetAnyMouseRelease(int32_t mouseButton);
|
||||||
static void ChangeState(States::State newState,float fadeOutDuration=0,uint8_t mosaicEffect=1U);
|
static void ChangeState(States::State newState,float fadeOutDuration=0,uint8_t mosaicEffect=1U);
|
||||||
virtual void OnLevelLoad()=0;
|
virtual void OnLevelLoad()=0;
|
||||||
|
static States::State GetCurrentState();
|
||||||
};
|
};
|
@ -118,6 +118,7 @@ void Menu::InitializeMenus(){
|
|||||||
InitializePauseWindow();
|
InitializePauseWindow();
|
||||||
InitializeDeathWindow();
|
InitializeDeathWindow();
|
||||||
InitializeCreditsWindow();
|
InitializeCreditsWindow();
|
||||||
|
InitializeArtificerWindow();
|
||||||
|
|
||||||
for(MenuType type=MenuType(int(MenuType::ENUM_START)+1);type<MenuType::ENUM_END;type=MenuType(int(type+1))){
|
for(MenuType type=MenuType(int(MenuType::ENUM_START)+1);type<MenuType::ENUM_END;type=MenuType(int(type+1))){
|
||||||
if(menus.count(type)==0){
|
if(menus.count(type)==0){
|
||||||
@ -178,7 +179,6 @@ void Menu::MenuSelect(AiL*game){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Menu::Update(AiL*game){
|
void Menu::Update(AiL*game){
|
||||||
|
|
||||||
if(!draggingComponent){
|
if(!draggingComponent){
|
||||||
HoverMenuSelect(game);
|
HoverMenuSelect(game);
|
||||||
}
|
}
|
||||||
|
@ -112,6 +112,7 @@ class Menu:public IAttributable{
|
|||||||
static void InitializePauseWindow();
|
static void InitializePauseWindow();
|
||||||
static void InitializeDeathWindow();
|
static void InitializeDeathWindow();
|
||||||
static void InitializeCreditsWindow();
|
static void InitializeCreditsWindow();
|
||||||
|
static void InitializeArtificerWindow();
|
||||||
|
|
||||||
friend class AiL;
|
friend class AiL;
|
||||||
friend class ItemInfo;
|
friend class ItemInfo;
|
||||||
|
@ -69,6 +69,7 @@ enum MenuType{
|
|||||||
PAUSE, //100% Controller Compatibility
|
PAUSE, //100% Controller Compatibility
|
||||||
DEATH, //100% Controller Compatibility
|
DEATH, //100% Controller Compatibility
|
||||||
CREDITS, //100% Controller Compatibility
|
CREDITS, //100% Controller Compatibility
|
||||||
|
ARTIFICER, //100% Controller Compatibility
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
|
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -1329,7 +1329,7 @@ std::optional<std::weak_ptr<Monster>>Monster::GetNearestMonster(const vf2d point
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool Monster::InUndamageableState(const bool onUpperLevel,const float z)const{
|
const bool Monster::InUndamageableState(const bool onUpperLevel,const float z)const{
|
||||||
return Invulnerable()||!IsAlive()||onUpperLevel!=OnUpperLevel()||AttackAvoided(z);
|
return Invulnerable()||!IsAlive()||onUpperLevel!=OnUpperLevel()||AttackAvoided(z)||IsNPC();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Monster::AddBuff(BuffRestorationType type,BuffOverTimeType::BuffOverTimeType overTimeType,float duration,float intensity,float timeBetweenTicks){
|
void Monster::AddBuff(BuffRestorationType type,BuffOverTimeType::BuffOverTimeType overTimeType,float duration,float intensity,float timeBetweenTicks){
|
||||||
|
@ -45,6 +45,7 @@ All rights reserved.
|
|||||||
#include "RowInventoryScrollableWindowComponent.h"
|
#include "RowInventoryScrollableWindowComponent.h"
|
||||||
#include "InventoryCreator.h"
|
#include "InventoryCreator.h"
|
||||||
#include "Tutorial.h"
|
#include "Tutorial.h"
|
||||||
|
#include "VisualNovel.h"
|
||||||
|
|
||||||
using A=Attribute;
|
using A=Attribute;
|
||||||
|
|
||||||
@ -66,7 +67,7 @@ void Monster::STRATEGY::NPC(Monster&m,float fElapsedTime,std::string strategy){
|
|||||||
float distFromPlayer=geom2d::line<float>(m.GetPos(),game->GetPlayer()->GetPos()).length();
|
float distFromPlayer=geom2d::line<float>(m.GetPos(),game->GetPlayer()->GetPos()).length();
|
||||||
if(distFromPlayer<ConfigFloat("Interaction Distance")/100.f*24.f){
|
if(distFromPlayer<ConfigFloat("Interaction Distance")/100.f*24.f){
|
||||||
m.F(A::TARGET_TIMER)=std::min(m.F(A::TARGET_TIMER)+fElapsedTime,ConfigFloat("Interaction Display Ease in Timer"));
|
m.F(A::TARGET_TIMER)=std::min(m.F(A::TARGET_TIMER)+fElapsedTime,ConfigFloat("Interaction Display Ease in Timer"));
|
||||||
if(game->KEY_CONFIRM.Released()&&Menu::stack.size()==0){
|
if(GameState::STATE!=GameState::states[States::DIALOG]&&game->KEY_CONFIRM.Released()&&Menu::stack.size()==0){
|
||||||
if(m.npcData.function=="Blacksmith"){
|
if(m.npcData.function=="Blacksmith"){
|
||||||
Menu::OpenMenu(MenuType::BLACKSMITH);
|
Menu::OpenMenu(MenuType::BLACKSMITH);
|
||||||
//First reset all items displayed in the blacksmith's shop (showing only our equipment.)
|
//First reset all items displayed in the blacksmith's shop (showing only our equipment.)
|
||||||
@ -85,7 +86,12 @@ void Monster::STRATEGY::NPC(Monster&m,float fElapsedTime,std::string strategy){
|
|||||||
Menu::OpenMenu(MenuType::MERCHANT);
|
Menu::OpenMenu(MenuType::MERCHANT);
|
||||||
}else
|
}else
|
||||||
if(m.npcData.function=="Artificer"){
|
if(m.npcData.function=="Artificer"){
|
||||||
Menu::OpenMenu(MenuType::MERCHANT);
|
if(!Tutorial::TaskIsComplete(TutorialTaskName::ARTIFICER_INTRO)){
|
||||||
|
Tutorial::CompleteTask(TutorialTaskName::ARTIFICER_INTRO);
|
||||||
|
VisualNovel::LoadDialog("ARTIFICER_INTRO",[](){Menu::OpenMenu(MenuType::ARTIFICER);});
|
||||||
|
}else{
|
||||||
|
Menu::OpenMenu(MenuType::ARTIFICER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
55
Adventures in Lestoria/State_Dialog.cpp
Normal file
55
Adventures in Lestoria/State_Dialog.cpp
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#pragma region License
|
||||||
|
/*
|
||||||
|
License (OLC-3)
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
|
||||||
|
|
||||||
|
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 © 2024 The FreeType
|
||||||
|
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
|
||||||
|
All rights reserved.
|
||||||
|
*/
|
||||||
|
#pragma endregion
|
||||||
|
#include "State_Dialog.h"
|
||||||
|
#include "VisualNovel.h"
|
||||||
|
#include "Menu.h"
|
||||||
|
#include "AdventuresInLestoria.h"
|
||||||
|
|
||||||
|
void State_Dialog::OnStateChange(GameState*prevState){
|
||||||
|
if(Menu::IsMenuOpen())Menu::CloseAllMenus();
|
||||||
|
};
|
||||||
|
void State_Dialog::OnLevelLoad(){}
|
||||||
|
void State_Dialog::OnUserUpdate(AiL*game){
|
||||||
|
GameState::states[VisualNovel::novel.previousState]->OnUserUpdate(game);
|
||||||
|
VisualNovel::novel.Update();
|
||||||
|
game->ClearTimedOutGarbage();
|
||||||
|
};
|
||||||
|
void State_Dialog::Draw(AiL*game){
|
||||||
|
GameState::states[VisualNovel::novel.previousState]->Draw(game);
|
||||||
|
VisualNovel::novel.Draw(0U);
|
||||||
|
};
|
46
Adventures in Lestoria/State_Dialog.h
Normal file
46
Adventures in Lestoria/State_Dialog.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#pragma region License
|
||||||
|
/*
|
||||||
|
License (OLC-3)
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
|
||||||
|
|
||||||
|
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 © 2024 The FreeType
|
||||||
|
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
|
||||||
|
All rights reserved.
|
||||||
|
*/
|
||||||
|
#pragma endregion
|
||||||
|
#pragma once
|
||||||
|
#include "GameState.h"
|
||||||
|
|
||||||
|
class State_Dialog:public GameState {
|
||||||
|
virtual void OnStateChange(GameState*prevState)override final;
|
||||||
|
virtual void OnUserUpdate(AiL*game)override final;
|
||||||
|
virtual void Draw(AiL*game)override final;
|
||||||
|
virtual void OnLevelLoad()override final;
|
||||||
|
};
|
@ -51,6 +51,7 @@ void Tutorial::Initialize(){
|
|||||||
CREATETASK(TutorialTaskName::USE_RECOVERY_ITEMS,UseRecoveryItemsTask);
|
CREATETASK(TutorialTaskName::USE_RECOVERY_ITEMS,UseRecoveryItemsTask);
|
||||||
CREATETASK(TutorialTaskName::BLACKSMITH,BlacksmithTask);
|
CREATETASK(TutorialTaskName::BLACKSMITH,BlacksmithTask);
|
||||||
CREATETASK(TutorialTaskName::EQUIP_GEAR,EquipGearTask);
|
CREATETASK(TutorialTaskName::EQUIP_GEAR,EquipGearTask);
|
||||||
|
CREATETASK(TutorialTaskName::ARTIFICER_INTRO,ArtificerIntroductionTask);
|
||||||
currentTaskState=TutorialTaskName::SET_LOADOUT_ITEM;
|
currentTaskState=TutorialTaskName::SET_LOADOUT_ITEM;
|
||||||
ResetTasks();
|
ResetTasks();
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ enum class TutorialTaskName{
|
|||||||
USE_RECOVERY_ITEMS,
|
USE_RECOVERY_ITEMS,
|
||||||
BLACKSMITH,
|
BLACKSMITH,
|
||||||
EQUIP_GEAR,
|
EQUIP_GEAR,
|
||||||
|
ARTIFICER_INTRO,
|
||||||
NONE,
|
NONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -356,3 +357,13 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ArtificerIntroductionTask:public TutorialTask{
|
||||||
|
public:
|
||||||
|
inline ArtificerIntroductionTask():TutorialTask(){};
|
||||||
|
private:
|
||||||
|
virtual inline bool CompleteCondition()override final{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
virtual inline void OnComplete()override final{}
|
||||||
|
};
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 3
|
#define VERSION_PATCH 3
|
||||||
#define VERSION_BUILD 10399
|
#define VERSION_BUILD 10421
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
@ -184,14 +184,30 @@ void VisualNovel::Initialize(){
|
|||||||
|
|
||||||
storyLevelData.SetInitialized();
|
storyLevelData.SetInitialized();
|
||||||
};
|
};
|
||||||
|
void VisualNovel::Reset(){
|
||||||
|
activeText=U"";
|
||||||
|
leftCharacters.clear();
|
||||||
|
rightCharacters.clear();
|
||||||
|
backgroundFilename=novel.prevBackgroundFilename="";
|
||||||
|
commands.clear();
|
||||||
|
commandIndex=0;
|
||||||
|
}
|
||||||
|
void VisualNovel::LoadDialog(std::string dialogName,std::function<void()>dialogFinishedCallbackFunc){
|
||||||
|
novel.previousState=GameState::GetCurrentState();
|
||||||
|
novel.dialogFinishedCallbackFunc=dialogFinishedCallbackFunc;
|
||||||
|
novel.storyLevel=dialogName;
|
||||||
|
novel.Reset();
|
||||||
|
for(std::unique_ptr<Command>&command:storyLevelData.at(dialogName)){
|
||||||
|
novel.commands.push_back(command.get());
|
||||||
|
}
|
||||||
|
GameState::ChangeState(States::DIALOG);
|
||||||
|
novel.ExecuteNextCommand();
|
||||||
|
novel.prevTheme=Menu::GetCurrentTheme().GetThemeName();
|
||||||
|
Menu::themeSelection="Purple";
|
||||||
|
}
|
||||||
void VisualNovel::LoadVisualNovel(std::string storyLevelName){
|
void VisualNovel::LoadVisualNovel(std::string storyLevelName){
|
||||||
novel.storyLevel=storyLevelName;
|
novel.storyLevel=storyLevelName;
|
||||||
novel.activeText=U"";
|
novel.Reset();
|
||||||
novel.leftCharacters.clear();
|
|
||||||
novel.rightCharacters.clear();
|
|
||||||
novel.backgroundFilename=novel.prevBackgroundFilename="";
|
|
||||||
novel.commands.clear();
|
|
||||||
novel.commandIndex=0;
|
|
||||||
for(std::unique_ptr<Command>&command:storyLevelData.at(storyLevelName)){
|
for(std::unique_ptr<Command>&command:storyLevelData.at(storyLevelName)){
|
||||||
novel.commands.push_back(command.get());
|
novel.commands.push_back(command.get());
|
||||||
}
|
}
|
||||||
@ -203,7 +219,7 @@ void VisualNovel::LoadVisualNovel(std::string storyLevelName){
|
|||||||
}
|
}
|
||||||
void VisualNovel::Update(){
|
void VisualNovel::Update(){
|
||||||
Audio::SetBGMPitch(audioPitch);
|
Audio::SetBGMPitch(audioPitch);
|
||||||
if(transitionTime==0&&game->KEY_CONFIRM.Pressed()){
|
if(transitionTime==0&&game->KEY_CONFIRM.Released()){
|
||||||
activeText=U"";
|
activeText=U"";
|
||||||
novel.ExecuteNextCommand();
|
novel.ExecuteNextCommand();
|
||||||
}
|
}
|
||||||
@ -218,6 +234,13 @@ void VisualNovel::ExecuteNextCommand(){
|
|||||||
if(commandIndex<commands.size()){
|
if(commandIndex<commands.size()){
|
||||||
commandIndex++;
|
commandIndex++;
|
||||||
commands[size_t(commandIndex-1)]->Execute(novel);
|
commands[size_t(commandIndex-1)]->Execute(novel);
|
||||||
|
}else{
|
||||||
|
if(GameState::STATE==GameState::states[States::DIALOG]){
|
||||||
|
Reset();
|
||||||
|
Menu::themeSelection=novel.prevTheme;
|
||||||
|
GameState::STATE=GameState::states[novel.previousState];
|
||||||
|
GameState::currentState=novel.previousState;
|
||||||
|
dialogFinishedCallbackFunc();
|
||||||
}else{
|
}else{
|
||||||
if(game->GetCurrentMapName()=="NPCs.Greg.Camp Notification Unlock Condition"_S&&
|
if(game->GetCurrentMapName()=="NPCs.Greg.Camp Notification Unlock Condition"_S&&
|
||||||
!Unlock::IsUnlocked("NPCs.Greg.Camp Notification Unlock Condition"_S))State_OverworldMap::ConnectionPointFromString("HUB").value()->ResetVisitedFlag();
|
!Unlock::IsUnlocked("NPCs.Greg.Camp Notification Unlock Condition"_S))State_OverworldMap::ConnectionPointFromString("HUB").value()->ResetVisitedFlag();
|
||||||
@ -225,19 +248,20 @@ void VisualNovel::ExecuteNextCommand(){
|
|||||||
Menu::themeSelection=novel.prevTheme;
|
Menu::themeSelection=novel.prevTheme;
|
||||||
GameState::ChangeState(States::OVERWORLD_MAP,0.5f);
|
GameState::ChangeState(States::OVERWORLD_MAP,0.5f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void VisualNovel::Draw(){
|
void VisualNovel::Draw(const uint8_t backgroundAlpha){
|
||||||
if(backgroundFilename!=""){
|
if(backgroundFilename!=""){
|
||||||
float alpha=1;
|
float alpha=backgroundAlpha/255.f;
|
||||||
if(transitionTime>0){
|
if(transitionTime>0){
|
||||||
alpha=util::lerp(0,1,1-(transitionTime/maxTransitionTime));
|
alpha=alpha*util::lerp(0,1,1-(transitionTime/maxTransitionTime));
|
||||||
}
|
}
|
||||||
if(prevBackgroundFilename!=""){
|
if(prevBackgroundFilename!=""){
|
||||||
game->DrawDecal({0,-prevBackgroundScrollAmt},GFX["story_background_image_location"_S+prevBackgroundFilename].Decal());
|
game->DrawDecal({0,-prevBackgroundScrollAmt},GFX["story_background_image_location"_S+prevBackgroundFilename].Decal(),{1.f,1.f},{255,255,255,backgroundAlpha});
|
||||||
}
|
}
|
||||||
game->DrawDecal({0,-backgroundScrollAmt},GFX["story_background_image_location"_S+backgroundFilename].Decal(),{1,1},{255,255,255,uint8_t(255*alpha)});
|
game->DrawDecal({0,-backgroundScrollAmt},GFX["story_background_image_location"_S+backgroundFilename].Decal(),{1,1},{255,255,255,uint8_t(255*alpha)});
|
||||||
}else{
|
}else{
|
||||||
game->FillRectDecal({0,0},game->GetScreenSize());
|
game->FillRectDecal({0,0},game->GetScreenSize(),{255,255,255,backgroundAlpha});
|
||||||
}
|
}
|
||||||
for(int i=leftCharacters.size()-1;i>=0;i--){
|
for(int i=leftCharacters.size()-1;i>=0;i--){
|
||||||
//Start 72 from the bottom.
|
//Start 72 from the bottom.
|
||||||
|
@ -41,6 +41,7 @@ All rights reserved.
|
|||||||
#include "safemap.h"
|
#include "safemap.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
#include "olcPGEX_TTF.h"
|
#include "olcPGEX_TTF.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
|
||||||
class VisualNovel;
|
class VisualNovel;
|
||||||
|
|
||||||
@ -142,6 +143,7 @@ public:
|
|||||||
|
|
||||||
class VisualNovel{
|
class VisualNovel{
|
||||||
friend class State_Story;
|
friend class State_Story;
|
||||||
|
friend class State_Dialog;
|
||||||
friend class AiL;
|
friend class AiL;
|
||||||
friend class Command;
|
friend class Command;
|
||||||
friend class LocationCommand;
|
friend class LocationCommand;
|
||||||
@ -173,21 +175,25 @@ class VisualNovel{
|
|||||||
float prevBackgroundScrollAmt=0;
|
float prevBackgroundScrollAmt=0;
|
||||||
static constexpr float maxTextScrollTime=1.0f;
|
static constexpr float maxTextScrollTime=1.0f;
|
||||||
float audioPitch=1.f;
|
float audioPitch=1.f;
|
||||||
|
std::function<void()>dialogFinishedCallbackFunc{[](){}};
|
||||||
public:
|
public:
|
||||||
static Font font,narratorFont,locationFont;
|
static Font font,narratorFont,locationFont;
|
||||||
private:
|
private:
|
||||||
static std::set<std::string>graphicsToLoad;
|
static std::set<std::string>graphicsToLoad;
|
||||||
static safemap<std::string,std::vector<std::unique_ptr<Command>>>storyLevelData;
|
static safemap<std::string,std::vector<std::unique_ptr<Command>>>storyLevelData;
|
||||||
|
States::State previousState{};
|
||||||
|
|
||||||
static VisualNovel novel;
|
static VisualNovel novel;
|
||||||
VisualNovel();
|
VisualNovel();
|
||||||
|
void Reset();
|
||||||
public:
|
public:
|
||||||
VisualNovel(VisualNovel&)=delete;
|
VisualNovel(VisualNovel&)=delete;
|
||||||
VisualNovel(VisualNovel&&)=delete;
|
VisualNovel(VisualNovel&&)=delete;
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
|
static void LoadDialog(std::string dialogName,std::function<void()>dialogFinishedCallbackFunc=[](){});
|
||||||
static void LoadVisualNovel(std::string storyLevelName);
|
static void LoadVisualNovel(std::string storyLevelName);
|
||||||
void ExecuteNextCommand();
|
void ExecuteNextCommand();
|
||||||
void Update();
|
void Update();
|
||||||
void Draw();
|
void Draw(const uint8_t backgroundAlpha=255U);
|
||||||
std::string GetCharacterImage(std::u32string name);
|
std::string GetCharacterImage(std::u32string name);
|
||||||
};
|
};
|
@ -138,7 +138,7 @@ void Witch::InitializeClassAbilities(){
|
|||||||
curseTarget.value().lock()->ApplyDot(buffDuration,p->GetAttack()*buffDamageMult,buffTimeBetweenTicks,
|
curseTarget.value().lock()->ApplyDot(buffDuration,p->GetAttack()*buffDamageMult,buffTimeBetweenTicks,
|
||||||
[](std::weak_ptr<Monster>m,Buff&b){
|
[](std::weak_ptr<Monster>m,Buff&b){
|
||||||
expireCallbackFunc:
|
expireCallbackFunc:
|
||||||
m.lock()->Hurt(game->GetPlayer()->GetAttack()*"Witch.Ability 1.Final Tick Damage"_F,m.lock()->OnUpperLevel(),m.lock()->GetZ(),HurtFlag::DOT);
|
if(!m.expired())m.lock()->Hurt(game->GetPlayer()->GetAttack()*"Witch.Ability 1.Final Tick Damage"_F,m.lock()->OnUpperLevel(),m.lock()->GetZ(),HurtFlag::DOT);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
curseTarget.value().lock()->AddBuff(BuffType::GLOW_PURPLE,buffDuration,1.f);
|
curseTarget.value().lock()->AddBuff(BuffType::GLOW_PURPLE,buffDuration,1.f);
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
===ARTIFICER_INTRO===
|
||||||
|
{BACKGROUND commercial_assets/Forest Clearing Campsite_Day.png}
|
||||||
|
|
||||||
|
[Artificer]
|
||||||
|
Hello adventurer! Welcome to my artificing station! I have not met you yet, may I have the pleasure of knowing your name?
|
||||||
|
|
||||||
|
[You]
|
||||||
|
Hello, my name is [You].
|
||||||
|
|
||||||
|
[Artificer]
|
||||||
|
Excellent! Nice to meet you, [You]. At my station you have the ability to refine and fix up imperfect jewelry discovered while exploring!
|
||||||
|
|
||||||
|
Disassemble rings that are undesirable to you and retrieve fragments of them, then use the Refine station to empower your equipment further!
|
||||||
|
|
||||||
|
This should let you get some use out of all those extra rings you're carrying around, eh?
|
||||||
|
|
||||||
|
[You]
|
||||||
|
Great, I think I could make good use of this. Thank you.
|
||||||
|
|
||||||
|
===ARTIFICER_HELP===
|
||||||
|
[Artificer]
|
||||||
|
At this station you have the ability to refine and fix up imperfect jewelry discovered while exploring!
|
||||||
|
|
||||||
|
Disassemble rings that are undesirable to you and retrieve fragments of them, then use the Refine station to empower your equipment further!
|
||||||
|
|
||||||
|
You can make use of those extra rings you have been piling up!
|
@ -1,3 +1,3 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
std::string PACK_KEY="INSERT_PACK_KEY_HERE";
|
std::string PACK_KEY="129jvgndsaf7dsa8932hJj0g43j20jajglikvczmlkvcmzx/";
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user