diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj b/Adventures in Lestoria/Adventures in Lestoria.vcxproj index 01267dc3..8fea8156 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj +++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj @@ -786,6 +786,10 @@ + + + + @@ -916,6 +920,7 @@ + diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters index 328af5ab..9f6e55f9 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters +++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters @@ -636,6 +636,12 @@ Header Files + + Header Files + + + Header Files + @@ -1013,6 +1019,48 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + @@ -1132,10 +1180,6 @@ Configurations\Items - - - - Configurations\Audio @@ -1181,6 +1225,7 @@ Configurations + diff --git a/Adventures in Lestoria/MajorHawk.cpp b/Adventures in Lestoria/MajorHawk.cpp new file mode 100644 index 00000000..08623a80 --- /dev/null +++ b/Adventures in Lestoria/MajorHawk.cpp @@ -0,0 +1,56 @@ +#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 © 2024 The FreeType +Project (www.freetype.org). Please see LICENSE_FT.txt for more information. +All rights reserved. +*/ +#pragma endregion +#include "AdventuresInLestoria.h" +#include "DEFINES.h" +#include "Monster.h" +#include "MonsterStrategyHelpers.h" +#include "BulletTypes.h" +#include "util.h" + +INCLUDE_game +INCLUDE_MONSTER_LIST + +using A=Attribute; + +void Monster::STRATEGY::MAJOR_HAWK(Monster&m,float fElapsedTime,std::string strategy){ + //Runs the Hawk strategy and has an aggressive mode when the amount of this monster falls below an amount. + const int majorHawkCount=std::reduce(MONSTER_LIST.begin(),MONSTER_LIST.end(),0,[&](const int&acc,const std::unique_ptr&monster){return std::move(acc)+((monster->GetName()==ConfigString("Aggressive Name Check"))?1:0);}); + + if(majorHawkCount<=ConfigInt("Aggressive Hawk Count"))HAWK(m,fElapsedTime,"Major Hawk"); + else HAWK(m,fElapsedTime,"Hawk"); //Use normal hawk behaviors when there are too many Major Hawks. +} \ No newline at end of file diff --git a/Adventures in Lestoria/Monster.h b/Adventures in Lestoria/Monster.h index 462cbaab..e5f5346c 100644 --- a/Adventures in Lestoria/Monster.h +++ b/Adventures in Lestoria/Monster.h @@ -279,6 +279,8 @@ private: static void GOBLIN_BOMB(Monster&m,float fElapsedTime,std::string strategy); static void HAWK(Monster&m,float fElapsedTime,std::string strategy); static void STONE_ELEMENTAL(Monster&m,float fElapsedTime,std::string strategy); + static void ZEPHY(Monster&m,float fElapsedTime,std::string strategy); + static void MAJOR_HAWK(Monster&m,float fElapsedTime,std::string strategy); static void DONOTHING(Monster&m,float fElapsedTime,std::string strategy); }; bool bumpedIntoTerrain=false; //Gets set to true before a strategy executes if the monster runs into some terrain on this frame. diff --git a/Adventures in Lestoria/RUN_STRATEGY.cpp b/Adventures in Lestoria/RUN_STRATEGY.cpp index a3258bcf..5a5d007a 100644 --- a/Adventures in Lestoria/RUN_STRATEGY.cpp +++ b/Adventures in Lestoria/RUN_STRATEGY.cpp @@ -62,6 +62,8 @@ void Monster::InitializeStrategies(){ STRATEGY_DATA.insert("Goblin Bomb",Monster::STRATEGY::GOBLIN_BOMB); STRATEGY_DATA.insert("Hawk",Monster::STRATEGY::HAWK); STRATEGY_DATA.insert("Stone Elemental",Monster::STRATEGY::STONE_ELEMENTAL); + STRATEGY_DATA.insert("Zephy",Monster::STRATEGY::ZEPHY); + STRATEGY_DATA.insert("Major Hawk",Monster::STRATEGY::MAJOR_HAWK); STRATEGY_DATA.insert("Do Nothing",Monster::STRATEGY::DONOTHING); STRATEGY_DATA.SetInitialized(); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 637653b5..f2980d8f 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 0 -#define VERSION_BUILD 9352 +#define VERSION_BUILD 9353 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/Zephy.cpp b/Adventures in Lestoria/Zephy.cpp new file mode 100644 index 00000000..0a684b7d --- /dev/null +++ b/Adventures in Lestoria/Zephy.cpp @@ -0,0 +1,52 @@ +#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 © 2024 The FreeType +Project (www.freetype.org). Please see LICENSE_FT.txt for more information. +All rights reserved. +*/ +#pragma endregion +#include "AdventuresInLestoria.h" +#include "DEFINES.h" +#include "Monster.h" +#include "MonsterStrategyHelpers.h" +#include "BulletTypes.h" +#include "util.h" + +INCLUDE_game +INCLUDE_BULLET_LIST + +using A=Attribute; + +void Monster::STRATEGY::ZEPHY(Monster&m,float fElapsedTime,std::string strategy){ + +} \ No newline at end of file diff --git a/Adventures in Lestoria/assets/config/MonsterStrategies.txt b/Adventures in Lestoria/assets/config/MonsterStrategies.txt index 2a765b8c..55ef0488 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -763,4 +763,16 @@ MonsterStrategy { } + Major Hawk + { + # The Major Hawk strategy does everything the normal Hawk strategy does + # But is tuned such that when it's the only one spawned it gains a more aggressive pattern. + + # The name of the monster to count for aggressive check. + Aggressive Name Check = Major Hawk + + # Number of Major Hawks on the field to start using "aggressive" tactics. + Aggressive Hawk Count = 1 + Flight Charge Cooldown = 3s + } } \ No newline at end of file diff --git a/Adventures in Lestoria/assets/config/Monsters.txt b/Adventures in Lestoria/assets/config/Monsters.txt index b2179e72..063b7082 100644 --- a/Adventures in Lestoria/assets/config/Monsters.txt +++ b/Adventures in Lestoria/assets/config/Monsters.txt @@ -818,6 +818,113 @@ Monsters Death Sound = Slime Dead Walk Sound = Slime Walk + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + # DROP[0] = Ring of the Bear,100%,1,1 + } + Major Hawk + { + Health = 520 + Attack = 31 + + CollisionDmg = 31 + + MoveSpd = 220% + Size = 120% + + XP = 5 + + Strategy = Major Hawk + + ################################### + ##### BEGIN HAWK PROPERTY OVERRIDES + ################################### - Required since the Major Hawk strategy is an add-on. + Wing Flap Frequency = 0.8s + + # Amount of Z (in pixels) the Hawk flies at. + Flight Height = 48px + # Amount of Z (in pixels) higher or lower the Hawk chooses to fly at. + Flight Height Variance = 8px + # 0-X% application of a slowdown debuff to vary the speeds of each Hawk. + Flight Speed Variance = 20% + # How far from the player the Hawk circles around. + Flight Distance = 240px + + Flight Oscillation Amount = 1.5px + + # Dropdown/Rising speed in pixels per second while attacking. + Attack Z Speed = 160px/s + + Flight Charge Cooldown = 8s + Attack Wait Time = 1s + ################################# + ##### END HAWK PROPERTY OVERRIDES + ################################# + + #Size of each animation frame + SheetFrameSize = 32,32 + + # Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST + 4-Way Spritesheet = True + + Animations + { + # Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse) + # Animations must be defined in the same order as they are in their sprite sheets + # The First Four animations must represent a standing, walking, attack, and death animation. Their names are up to the creator. + IDLE = 1, 0.6, Repeat + JUMP = 4, 0.2, Repeat + ATTACKING = 2, 0.2, Repeat + DEATH = 3, 0.15, OneShot + ATTACK = 4, 0.1, Repeat + } + + Ignore Collisions = True + + Hurt Sound = Monster Hurt + Death Sound = Slime Dead + Walk Sound = Wing Flap + + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + # DROP[0] = Ring of the Bear,100%,1,1 + } + Zephy, King of Birds + { + Health = 7000 + Attack = 48 + + CollisionDmg = 48 + + MoveSpd = 180% + Size = 400% + + XP = 5 + + Strategy = Zephy + + #Size of each animation frame + SheetFrameSize = 32,32 + + # Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST + 4-Way Spritesheet = True + + Animations + { + # Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse) + # Animations must be defined in the same order as they are in their sprite sheets + # The First Four animations must represent a standing, walking, attack, and death animation. Their names are up to the creator. + IDLE = 1, 0.6, Repeat + JUMP = 4, 0.2, Repeat + ATTACKING = 2, 0.2, Repeat + DEATH = 3, 0.15, OneShot + ATTACK = 4, 0.1, Repeat + } + + Ignore Collisions = True + + Hurt Sound = Monster Hurt + Death Sound = Slime Dead + Walk Sound = Wing Flap + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity # DROP[0] = Ring of the Bear,100%,1,1 } diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index be5ddf4c..25a6284b 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ