Compare commits
1 Commits
abilityToo
...
master
Author | SHA1 | Date | |
---|---|---|---|
a6002aed8a |
@ -661,6 +661,7 @@
|
|||||||
</SubType>
|
</SubType>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="State.h" />
|
<ClInclude Include="State.h" />
|
||||||
|
<ClInclude Include="State_Arena.h" />
|
||||||
<ClInclude Include="State_Death.h">
|
<ClInclude Include="State_Death.h">
|
||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
@ -1143,6 +1144,7 @@
|
|||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="State_Arena.cpp" />
|
||||||
<ClCompile Include="ThrownProjectile.cpp">
|
<ClCompile Include="ThrownProjectile.cpp">
|
||||||
<SubType>
|
<SubType>
|
||||||
</SubType>
|
</SubType>
|
||||||
|
@ -714,6 +714,9 @@
|
|||||||
<ClInclude Include="Entity.h">
|
<ClInclude Include="Entity.h">
|
||||||
<Filter>Header Files\Utils</Filter>
|
<Filter>Header Files\Utils</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="State_Arena.h">
|
||||||
|
<Filter>Header Files\State</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Player.cpp">
|
<ClCompile Include="Player.cpp">
|
||||||
@ -1316,6 +1319,9 @@
|
|||||||
<ClCompile Include="CollectedCoinEffect.cpp">
|
<ClCompile Include="CollectedCoinEffect.cpp">
|
||||||
<Filter>Source Files\Effects</Filter>
|
<Filter>Source Files\Effects</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="State_Arena.cpp">
|
||||||
|
<Filter>Source Files\Game States</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="cpp.hint" />
|
<None Include="cpp.hint" />
|
||||||
|
@ -44,6 +44,7 @@ All rights reserved.
|
|||||||
#include "State_GameHub.h"
|
#include "State_GameHub.h"
|
||||||
#include "State_Death.h"
|
#include "State_Death.h"
|
||||||
#include "State_Dialog.h"
|
#include "State_Dialog.h"
|
||||||
|
#include "State_Arena.h"
|
||||||
|
|
||||||
INCLUDE_game
|
INCLUDE_game
|
||||||
|
|
||||||
@ -60,6 +61,7 @@ void GameState::Initialize(){
|
|||||||
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);
|
NEW_STATE(States::DIALOG,State_Dialog);
|
||||||
|
NEW_STATE(States::ARENA,State_Arena);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState::_ChangeState(States::State newState){
|
void GameState::_ChangeState(States::State newState){
|
||||||
|
@ -54,6 +54,7 @@ namespace States{
|
|||||||
DIALOG,
|
DIALOG,
|
||||||
KEYBIND,
|
KEYBIND,
|
||||||
DEATH,
|
DEATH,
|
||||||
|
ARENA,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -78,5 +79,6 @@ 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;
|
||||||
|
virtual bool IsPlayerControlledGameplayState()=0; //Return true if this state allows the player to be controlled. Returns false for any other type of state.
|
||||||
static States::State GetCurrentState();
|
static States::State GetCurrentState();
|
||||||
};
|
};
|
@ -892,7 +892,7 @@ bool Player::CanAct(){
|
|||||||
|
|
||||||
const bool Player::CanAct(const Ability&ability){
|
const bool Player::CanAct(const Ability&ability){
|
||||||
return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&state!=State::DEADLYDASH&&state!=State::RETREAT&&
|
return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&state!=State::DEADLYDASH&&state!=State::RETREAT&&
|
||||||
(GameState::STATE==GameState::states[States::GAME_RUN]||GameState::STATE==GameState::states[States::GAME_HUB]);
|
GameState::STATE->IsPlayerControlledGameplayState();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::HasIframes(){
|
bool Player::HasIframes(){
|
||||||
|
87
Adventures in Lestoria/State_Arena.cpp
Normal file
87
Adventures in Lestoria/State_Arena.cpp
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#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_Arena.h"
|
||||||
|
#include "AdventuresInLestoria.h"
|
||||||
|
#include "DEFINES.h"
|
||||||
|
#include "Menu.h"
|
||||||
|
#include "ItemDrop.h"
|
||||||
|
#include "VisualNovel.h"
|
||||||
|
#include "State_OverworldMap.h"
|
||||||
|
#include "GameEvent.h"
|
||||||
|
#include "SaveFile.h"
|
||||||
|
#include "MenuComponent.h"
|
||||||
|
#include "Unlock.h"
|
||||||
|
#include "Tutorial.h"
|
||||||
|
|
||||||
|
INCLUDE_MONSTER_LIST
|
||||||
|
INCLUDE_game
|
||||||
|
|
||||||
|
void State_Arena::OnStateChange(GameState*prevState){
|
||||||
|
if(Menu::IsMenuOpen()){
|
||||||
|
Menu::CloseAllMenus();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Unlock::IsUnlocked("STORY_1_3")&&!Tutorial::TaskIsComplete(TutorialTaskName::CLEAR_DEMO)){
|
||||||
|
Tutorial::SetNextTask(TutorialTaskName::CLEAR_DEMO);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if(Unlock::IsUnlocked("STORY_1_2")&&!Tutorial::TaskIsComplete(TutorialTaskName::BLACKSMITH)){
|
||||||
|
Tutorial::SetNextTask(TutorialTaskName::BLACKSMITH);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if(Unlock::IsUnlocked("BOSS_2_B")&&!Tutorial::TaskIsComplete(TutorialTaskName::ARTIFICER_INTRO)){
|
||||||
|
Tutorial::SetNextTask(TutorialTaskName::ARTIFICER_INTRO);
|
||||||
|
}
|
||||||
|
|
||||||
|
SaveFile::SaveGame();
|
||||||
|
|
||||||
|
game->GetPlayer()->SetState(State::NORMAL);
|
||||||
|
|
||||||
|
game->LoadLevel("HUB");
|
||||||
|
}
|
||||||
|
void State_Arena::OnLevelLoad(){
|
||||||
|
game->UpdateDiscordStatus("Eternal Arena",game->GetPlayer()->GetClassName());
|
||||||
|
}
|
||||||
|
void State_Arena::OnUserUpdate(AiL*game){
|
||||||
|
State_GameRun::OnUserUpdate(game);
|
||||||
|
|
||||||
|
game->ClearTimedOutGarbage();
|
||||||
|
}
|
||||||
|
void State_Arena::Draw(AiL*game){
|
||||||
|
State_GameRun::Draw(game);
|
||||||
|
}
|
49
Adventures in Lestoria/State_Arena.h
Normal file
49
Adventures in Lestoria/State_Arena.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#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 "State_GameRun.h"
|
||||||
|
#include "olcPGEX_ViewPort.h"
|
||||||
|
|
||||||
|
class State_Arena:public State_GameRun{
|
||||||
|
ViewPort port;
|
||||||
|
Renderable r;
|
||||||
|
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;
|
||||||
|
};
|
@ -48,4 +48,5 @@ protected:
|
|||||||
virtual void OnUserUpdate(AiL*game)override;
|
virtual void OnUserUpdate(AiL*game)override;
|
||||||
virtual void Draw(AiL*game)override;
|
virtual void Draw(AiL*game)override;
|
||||||
virtual void OnLevelLoad()override;
|
virtual void OnLevelLoad()override;
|
||||||
|
inline virtual bool IsPlayerControlledGameplayState()override final{return false;}
|
||||||
};
|
};
|
@ -43,4 +43,5 @@ class State_Dialog:public GameState {
|
|||||||
virtual void OnUserUpdate(AiL*game)override final;
|
virtual void OnUserUpdate(AiL*game)override final;
|
||||||
virtual void Draw(AiL*game)override final;
|
virtual void Draw(AiL*game)override final;
|
||||||
virtual void OnLevelLoad()override final;
|
virtual void OnLevelLoad()override final;
|
||||||
|
inline virtual bool IsPlayerControlledGameplayState()override final{return false;}
|
||||||
};
|
};
|
@ -47,4 +47,5 @@ protected:
|
|||||||
virtual void OnUserUpdate(AiL*game)override;
|
virtual void OnUserUpdate(AiL*game)override;
|
||||||
virtual void Draw(AiL*game)override;
|
virtual void Draw(AiL*game)override;
|
||||||
virtual void OnLevelLoad()override;
|
virtual void OnLevelLoad()override;
|
||||||
|
inline virtual bool IsPlayerControlledGameplayState()override final{return true;}
|
||||||
};
|
};
|
@ -50,6 +50,7 @@ class State_LevelComplete:public GameState{
|
|||||||
virtual void Draw(AiL*game)override final;
|
virtual void Draw(AiL*game)override final;
|
||||||
virtual void DrawOverlay(AiL*game)override final;
|
virtual void DrawOverlay(AiL*game)override final;
|
||||||
virtual void OnLevelLoad()override final;
|
virtual void OnLevelLoad()override final;
|
||||||
|
inline virtual bool IsPlayerControlledGameplayState()override final{return false;}
|
||||||
public:
|
public:
|
||||||
static void TurnOffXPSound();
|
static void TurnOffXPSound();
|
||||||
};
|
};
|
@ -43,6 +43,7 @@ class State_MainMenu:public GameState{
|
|||||||
virtual void OnUserUpdate(AiL*game)override final;
|
virtual void OnUserUpdate(AiL*game)override final;
|
||||||
virtual void Draw(AiL*game)override final;
|
virtual void Draw(AiL*game)override final;
|
||||||
virtual void OnLevelLoad()override final;
|
virtual void OnLevelLoad()override final;
|
||||||
|
inline virtual bool IsPlayerControlledGameplayState()override final{return false;}
|
||||||
|
|
||||||
const ZoneData&ChooseRandomFocusArea();
|
const ZoneData&ChooseRandomFocusArea();
|
||||||
vf2d cameraMoveDir;
|
vf2d cameraMoveDir;
|
||||||
|
@ -63,6 +63,7 @@ public:
|
|||||||
virtual void Draw(AiL*game)override final;
|
virtual void Draw(AiL*game)override final;
|
||||||
virtual void DrawOverlay(AiL*game)override final;
|
virtual void DrawOverlay(AiL*game)override final;
|
||||||
virtual void OnLevelLoad()override final;
|
virtual void OnLevelLoad()override final;
|
||||||
|
inline virtual bool IsPlayerControlledGameplayState()override final{return false;}
|
||||||
static void StartLevel();
|
static void StartLevel();
|
||||||
static void UpdateCurrentConnectionPoint(const ConnectionPoint&connection);
|
static void UpdateCurrentConnectionPoint(const ConnectionPoint&connection);
|
||||||
};
|
};
|
@ -43,4 +43,5 @@ class State_Story:public GameState{
|
|||||||
virtual void OnUserUpdate(AiL*game)override final;
|
virtual void OnUserUpdate(AiL*game)override final;
|
||||||
virtual void Draw(AiL*game)override final;
|
virtual void Draw(AiL*game)override final;
|
||||||
virtual void OnLevelLoad()override final;
|
virtual void OnLevelLoad()override final;
|
||||||
|
inline virtual bool IsPlayerControlledGameplayState()override final{return false;}
|
||||||
};
|
};
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 12137
|
#define VERSION_BUILD 12140
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user