diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj b/Adventures in Lestoria/Adventures in Lestoria.vcxproj index 68a396a2..eb2edbdf 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj +++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj @@ -639,6 +639,10 @@ + + + + @@ -910,6 +914,10 @@ + + + + @@ -997,6 +1005,7 @@ + diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters index 053a8ae7..33c5ce18 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters +++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters @@ -1079,6 +1079,12 @@ Source Files\Bullet Types + + Source Files\Monster Strategies + + + Source Files\Monster Strategies + @@ -1247,6 +1253,9 @@ Documentation\Mechanics + + Documentation\Mechanics + diff --git a/Adventures in Lestoria/BreakingPillar.cpp b/Adventures in Lestoria/BreakingPillar.cpp new file mode 100644 index 00000000..95989472 --- /dev/null +++ b/Adventures in Lestoria/BreakingPillar.cpp @@ -0,0 +1,62 @@ +#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 "Monster.h" +#include "MonsterStrategyHelpers.h" +#include "config.h" + +using A=Attribute; + +void Monster::STRATEGY::BREAKING_PILLAR(Monster&m,float fElapsedTime,std::string strategy){ + enum PhaseName{ + INITIALIZE, + IDLE, + }; + + if(m.GetHealthRatio()>=ConfigFloat("Break Phase 1 HP % Threshold")/100.f){ + m.animation.ModifyDisplaySprite(m.internal_animState,ConfigString("Unbroken Animation Name")); + }else + if(m.GetHealthRatio()>=ConfigFloat("Break Phase 2 HP % Threshold")/100.f){ + m.animation.ModifyDisplaySprite(m.internal_animState,ConfigString("Break Phase 1 Animation Name")); + }else m.animation.ModifyDisplaySprite(m.internal_animState,ConfigString("Break Phase 2 Animation Name")); + + if(m.IsDead()&&!m.B(A::MARKED_DEAD)){ //Kill and fade out the pillar. + m.lifetime=0.01f; + m.B(A::MARKED_DEAD)=true; + } +} \ No newline at end of file diff --git a/Adventures in Lestoria/Chapter_2_Boss.txt b/Adventures in Lestoria/Chapter_2_Boss.txt new file mode 100644 index 00000000..dbe08c5a --- /dev/null +++ b/Adventures in Lestoria/Chapter_2_Boss.txt @@ -0,0 +1,69 @@ +Chapter 2 Boss + +Stonegolem + + + +HP: 30 000 + +Size: 800% + + + +The boss casts 3 Pillars at the beginning of the fight, targeting the player. + + + +1 at a time. + +2 sec cast. + +0.5 sec delay until next cast starts. + +40 dmg + +Pillar-radius: 350 + + + +every 10% (first time at 90%) use a shockwave where you need to hide behind one of the pillar to avoid the damage. (Shockwave has 3 seconds cast, 60 dmg) + +The pillars get damaged with every shockwave. after the 3rd the pillar break. + + + +starting 75% every 10% (75%, 65%, 55% ...) The Stone golem targetst the Player with 3 Pillar attacks like the one at the beginning of the fight. + +2 of the 3 Pillars spawn damaged and will break 3 seconds later again. one is solid and can tank up to 3 shockwaves. + + + +Like previously every pillar appears with 2,5 seconds delay from each other. (2 sec with an indicator, 0,5 seconds delay after a pillar got created) + +The Boss continues with its normal behaviour while the pillars are getting casted. + + + +every Pillar that breaks Casts a ring of projectiles on death (15 dmg) + + + + + +The golem attacks similar like bear boss but with half the radius on the attack. (35 dmg) + +after every attack there is a 25% chance The Stone golem targets the Player. the targeting gets Indicated around the player. + +after 2.5 seconds the golems throws a giant rock with 250 radius on the players position. Damaging the player and destroying Pillars hit. (55 dmg) + +Stone Throw cant overlap with shockwave. when a 10% mark is reached while a rock is targeting the player, Shockwave cast starts after the rock was thrown. + + + + + +if the golem wasnt able to attack the player for 7 seconds it throws 2 stones in the air. + +Afterwards Screenwide ~25 indicators appear where small rocks will rain down with a delay of 2,5 - 4 seonds (30 dmg each, 50 radius) + +(The trigger condition for this ability may changes in the future, depending how it actually plays out.) \ No newline at end of file diff --git a/Adventures in Lestoria/Monster.h b/Adventures in Lestoria/Monster.h index 448b71d0..d1fd5afc 100644 --- a/Adventures in Lestoria/Monster.h +++ b/Adventures in Lestoria/Monster.h @@ -288,6 +288,8 @@ private: 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); + static void STONE_GOLEM(Monster&m,float fElapsedTime,std::string strategy); + static void BREAKING_PILLAR(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. bool attackedByPlayer=false; //Gets set to true before a strategy executes if the monster has been attacked by the player. diff --git a/Adventures in Lestoria/MonsterAttribute.h b/Adventures in Lestoria/MonsterAttribute.h index e25881f7..255d6c85 100644 --- a/Adventures in Lestoria/MonsterAttribute.h +++ b/Adventures in Lestoria/MonsterAttribute.h @@ -120,4 +120,5 @@ enum class Attribute{ ATTACK_CHOICE, WIND_STRENGTH, WIND_PHASE_TIMER, + MARKED_DEAD, }; \ No newline at end of file diff --git a/Adventures in Lestoria/RUN_STRATEGY.cpp b/Adventures in Lestoria/RUN_STRATEGY.cpp index dac8ae29..013e4f87 100644 --- a/Adventures in Lestoria/RUN_STRATEGY.cpp +++ b/Adventures in Lestoria/RUN_STRATEGY.cpp @@ -65,6 +65,8 @@ void Monster::InitializeStrategies(){ 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.insert("Stone Golem",Monster::STRATEGY::STONE_GOLEM); + STRATEGY_DATA.insert("Breaking Pillar",Monster::STRATEGY::BREAKING_PILLAR); STRATEGY_DATA.SetInitialized(); } diff --git a/Adventures in Lestoria/StoneGolem.cpp b/Adventures in Lestoria/StoneGolem.cpp new file mode 100644 index 00000000..ea68617e --- /dev/null +++ b/Adventures in Lestoria/StoneGolem.cpp @@ -0,0 +1,53 @@ +#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 "Monster.h" +#include "MonsterStrategyHelpers.h" + + +void Monster::STRATEGY::STONE_GOLEM(Monster&m,float fElapsedTime,std::string strategy){ + enum PhaseName{ + INITIALIZE, + }; + + switch(m.phase){ + case INITIALIZE:{ + + }break; + } +} \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index c08306e8..022c6c25 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 3 -#define VERSION_BUILD 9551 +#define VERSION_BUILD 9554 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/config/MonsterStrategies.txt b/Adventures in Lestoria/assets/config/MonsterStrategies.txt index e5efb421..d0a0d737 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -881,4 +881,16 @@ MonsterStrategy Large Tornado Knockback Amount = 300 } } + Stone Golem + { + + } + Breaking Pillar + { + Unbroken Animation Name = NORMAL + Break Phase 1 HP % Threshold = below 68% + Break Phase 1 Animation Name = BREAK1 + Break Phase 2 HP % Threshold = below 34% + Break Phase 2 Animation Name = BREAK2 + } } \ 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 a36bd937..fcb01a30 100644 --- a/Adventures in Lestoria/assets/config/Monsters.txt +++ b/Adventures in Lestoria/assets/config/Monsters.txt @@ -978,6 +978,96 @@ Monsters 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 + } + Stone Golem + { + Health = 30000 + Attack = 40 + + CollisionDmg = 40 + + MoveSpd = 180% + Size = 400% + + XP = 5 + + # A flag to show an arrow indicator when the boss is off-screen. + ShowBossIndicator = True + + Strategy = Stone Golem + + #Size of each animation frame + SheetFrameSize = 48,48 + + # 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 = 2, 0.6, Repeat + WALK = 4, 0.2, Repeat + TOSS ROCK = 4, 0.2, OneShot + DEATH = 4, 0.15, OneShot + BURROW UNDERGROUND = 5, 0.15, OneShot + RISE FROM UNDERGROUND = 5, 0.15, OneShot + ROCK TOSS CAST = 2, 0.3, Repeat + STONE PILLAR CAST = 2, 0.3, Repeat + } + + Ignore Collisions = False + + Hurt Sound = Monster Hurt + 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 + } + Stone Golem Pillar + { # Has three lives and breaks once all three health is lost. Changes sprite based on health. + Health = 3 + Attack = 40 + + CollisionDmg = 0 + + Immovable = True + Invulnerable = True + + MoveSpd = 0% + # The Pillar is supposed to be 350 radius. + Size = 300% + Collision Radius = 7 + + XP = 0 + + Strategy = Breaking Pillar + + #Size of each animation frame + SheetFrameSize = 24,96 + + # Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST + 4-Way Spritesheet = False + + 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. + NORMAL = 4, 0.4, OneShot + BREAK1 = 4, 0.4, OneShot + BREAK2 = 4, 0.4, OneShot + DEATH = 1, 0.15, OneShot + } + + Hurt Sound = Warrior Ground Slam + # 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 } diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 55f8b139..498317ce 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ