diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj b/Adventures in Lestoria/Adventures in Lestoria.vcxproj
index fd8c5bb6..1c34f050 100644
--- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj
+++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj
@@ -369,6 +369,10 @@
+
+
+
+
@@ -672,6 +676,10 @@
+
+
+
+
diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
index 09b06248..adc7031d 100644
--- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
+++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
@@ -438,6 +438,9 @@
Header Files
+
+ Header Files
+
@@ -752,6 +755,9 @@
Source Files\Bullet Types
+
+ Source Files
+
diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp
index f750f62d..77e13220 100644
--- a/Adventures in Lestoria/AdventuresInLestoria.cpp
+++ b/Adventures in Lestoria/AdventuresInLestoria.cpp
@@ -1051,7 +1051,7 @@ void AiL::RenderWorld(float fElapsedTime){
#pragma endregion
for(Monster&m:MONSTER_LIST){
- m.strategyDraw(this,m);
+ m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy());
}
if(player->GetZ()>0){
@@ -1744,6 +1744,7 @@ void AiL::LoadLevel(MapName map){
foregroundTileGroups.clear();
upperForegroundTileGroups.clear();
MONSTER_LIST.clear();
+ GameEvent::events.clear();
worldColor=WHITE;
worldColorFunc=[&](vi2d pos){return game->worldColor;};
currentLevel=map;
@@ -2475,6 +2476,7 @@ void AiL::DisplayBossEncounterInfo(){
alpha=uint8_t((bossDisplayTimer)*255);
}
vf2d textScale={3,5};
+ textScale.x=std::min(3.f,float(ScreenWidth())/GetTextSizeProp(displayText).x);
DrawShadowStringPropDecal(vf2d{float(ScreenWidth()/2),float(ScreenHeight()/2)}-vf2d{GetTextSizeProp(displayText)}*textScale/2,displayText,{252, 186, 3, alpha},{128,0,0,alpha},textScale,std::numeric_limits::max(),2);
}
if(InBossEncounter()){
@@ -2492,7 +2494,6 @@ void AiL::DisplayBossEncounterInfo(){
}
}
-
void AiL::BossDamageDealt(int damage){
totalDamageDealt+=damage;
}
diff --git a/Adventures in Lestoria/Bear.cpp b/Adventures in Lestoria/Bear.cpp
index ba17f568..f74923ce 100644
--- a/Adventures in Lestoria/Bear.cpp
+++ b/Adventures in Lestoria/Bear.cpp
@@ -60,9 +60,9 @@ void Monster::STRATEGY::BEAR(Monster&m,float fElapsedTime,std::string strategy){
m.PerformShootAnimation();
m.F(A::CASTING_TIMER)=ConfigFloat("Chargeup Time");
m.V(A::LOCKON_POS)=geom2d::line(m.GetPos(),game->GetPlayer()->GetPos()).vector();
- m.SetStrategyDrawFunction([](AiL*game,Monster&m){
+ m.SetStrategyDrawFunction([](AiL*game,Monster&m,const std::string&strategy){
if(m.IsAlive()){
- game->view.DrawRotatedDecal(m.GetPos()+m.V(A::LOCKON_POS),GFX["range_indicator.png"].Decal(),0.f,{12.f,12.f},vf2d{_GetFloat(m,"Smash Attack Diameter",MONSTER_DATA[m.GetName()].GetAIStrategy()),_GetFloat(m,"Smash Attack Diameter",MONSTER_DATA[m.GetName()].GetAIStrategy())}/100.f,{255,255,0,160});
+ game->view.DrawRotatedDecal(m.GetPos()+m.V(A::LOCKON_POS),GFX["range_indicator.png"].Decal(),0.f,{12.f,12.f},vf2d{ConfigFloat("Smash Attack Diameter"),ConfigFloat("Smash Attack Diameter")}/100.f,{255,255,0,160});
}
});
m.RotateTowardsPos(m.GetPos()+m.V(A::LOCKON_POS));
@@ -99,7 +99,7 @@ void Monster::STRATEGY::BEAR(Monster&m,float fElapsedTime,std::string strategy){
}
m.spriteRot=0.f;
game->SetupWorldShake(0.2f);
- m.SetStrategyDrawFunction([&](AiL*game,Monster&m){});
+ m.SetStrategyDrawFunction([&](AiL*game,Monster&m,const std::string&strategy){});
}
}break;
}
diff --git a/Adventures in Lestoria/GameEvent.cpp b/Adventures in Lestoria/GameEvent.cpp
new file mode 100644
index 00000000..75ef7e64
--- /dev/null
+++ b/Adventures in Lestoria/GameEvent.cpp
@@ -0,0 +1,73 @@
+#pragma region License
+/*
+License (OLC-3)
+~~~~~~~~~~~~~~~
+
+Copyright 2024 Joshua Sigona
+
+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 © 2023 The FreeType
+Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
+All rights reserved.
+*/
+#pragma endregion
+
+#include "GameEvent.h"
+#include "Monster.h"
+#include