diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj b/Adventures in Lestoria/Adventures in Lestoria.vcxproj index 5d62ca38..7a67cd85 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj +++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj @@ -979,6 +979,10 @@ + + + + diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters index 5c4d9ccf..dbd21796 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters +++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters @@ -1283,6 +1283,9 @@ Source Files\Bullet Types + + Source Files\Bullet Types + diff --git a/Adventures in Lestoria/BulletTypes.h b/Adventures in Lestoria/BulletTypes.h index b40f7fa4..5a06db0d 100644 --- a/Adventures in Lestoria/BulletTypes.h +++ b/Adventures in Lestoria/BulletTypes.h @@ -414,4 +414,17 @@ struct RotateBullet:public Bullet{ void ModifyOutgoingDamageData(HurtDamageInfo&data); private: const float headingAngleChange; -}; \ No newline at end of file +}; + +struct InkBullet:public Bullet{ + InkBullet(const vf2d pos,const vf2d targetPos,const vf2d vel,const float inkExplosionRadius,const float inkSlowdownPct,const float inkPuddleLifetime); + void Update(float fElapsedTime)override; + BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!! + BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!! + void ModifyOutgoingDamageData(HurtDamageInfo&data); +private: + const vf2d targetPos; + const float inkExplosionRadius; + const float inkSlowdownPct; + const float inkPuddleLifetime; +} \ No newline at end of file diff --git a/Adventures in Lestoria/GiantOctopus.cpp b/Adventures in Lestoria/GiantOctopus.cpp index b1cf91f1..2fa87c59 100644 --- a/Adventures in Lestoria/GiantOctopus.cpp +++ b/Adventures in Lestoria/GiantOctopus.cpp @@ -98,9 +98,11 @@ void Monster::STRATEGY::GIANT_OCTOPUS(Monster&m,float fElapsedTime,std::string s } }break; case NORMAL:{ + const bool InSecondPhase{m.GetHealth()<=ConfigInt("Phase 2 Health Threshold")}; m.F(A::SHOOT_TIMER)-=fElapsedTime; m.F(A::CASTING_TIMER)-=fElapsedTime; m.F(A::LAST_SHOOT_TIMER)-=fElapsedTime; + m.F(A::LAST_INK_SHOOT_TIMER)-=fElapsedTime; if(m.F(A::SHOOT_ANIMATION_TIME)>0.f){ m.F(A::SHOOT_ANIMATION_TIME)-=fElapsedTime; if(m.F(A::SHOOT_ANIMATION_TIME)<=0.f)m.PerformIdleAnimation(); @@ -135,6 +137,19 @@ void Monster::STRATEGY::GIANT_OCTOPUS(Monster&m,float fElapsedTime,std::string s m.F(A::CASTING_TIMER)=util::random_range(ConfigFloatArr("Arm Move Timer",0),ConfigFloatArr("Arm Move Timer",1)); } if(m.F(A::SHOOT_TIMER)<=0.f){ + if(InSecondPhase){ + if(m.F(A::LAST_INK_SHOOT_TIMER)<=0.f){ + CreateBullet(InkBullet)(m.GetPos())EndBullet; + m.F(A::LAST_INK_SHOOT_TIMER)=ConfigFloat("Phase 2.Ink Bullet Frequency"); + goto BulletShot; + }else + if(m.I(A::BULLET_COUNT_AFTER_INK_ATTACK)>ConfigInt("Phase 2.Homing Bullet Starts After")){ + if(m.I(A::ATTACK_COUNT)%ConfigInt("Phase 2.Homing Bullet Frequency")==0)CreateBullet(HomingBullet)(m.GetPos(),util::pointTo(m.GetPos(),game->GetPlayer()->GetPos())*ConfigFloat("Bullet Speed"),ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Bullet Color"),{ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Radius")})EndBullet; + else CreateBullet(Bullet)(m.GetPos(),util::pointTo(m.GetPos(),game->GetPlayer()->GetPos())*ConfigFloat("Bullet Speed"),ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Bullet Color"),{ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Radius")})EndBullet; + goto BulletShot; + } + m.I(A::BULLET_COUNT_AFTER_INK_ATTACK)++; + } if(m.I(A::ATTACK_COUNT)>=ConfigInt("Big Bullet Frequency")-1){ CreateBullet(BurstBullet)(m.GetPos(),util::pointTo(m.GetPos(),game->GetPlayer()->GetPos())*ConfigFloat("Big Bullet Speed"),game->GetPlayer(),ConfigPixels("Big Bullet Detection Radius"),ConfigInt("Big Bullet Extra Bullet Count"),util::degToRad(ConfigFloat("Big Bullet Extra Bullet Rotate Speed")),ConfigFloat("Big Bullet Extra Bullet Radius"),vf2d{ConfigFloatArr("Big Bullet Extra Bullet Image Scale",0),ConfigFloatArr("Big Bullet Extra Bullet Image Scale",1)},ConfigFloat("Big Bullet Extra Bullet Speed"),ConfigFloat("Big Bullet Extra Bullet Acceleration"),ConfigFloat("Big Bullet Radius"),ConfigInt("Big Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Big Bullet Color"),vf2d{ConfigFloat("Big Bullet Image Scale"),ConfigFloat("Big Bullet Image Scale")})EndBullet; m.F(A::SHOOT_TIMER)=ConfigFloat("Big Bullet Boss Rest Time"); @@ -143,6 +158,7 @@ void Monster::STRATEGY::GIANT_OCTOPUS(Monster&m,float fElapsedTime,std::string s m.F(A::SHOOT_TIMER)=ConfigFloat("Shoot Frequency"); CreateBullet(Bullet)(m.GetPos(),util::pointTo(m.GetPos(),game->GetPlayer()->GetPos())*ConfigFloat("Bullet Speed"),ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Bullet Color"),{ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Radius")})EndBullet; } + BulletShot: m.F(A::LAST_SHOOT_TIMER)=1.f; m.PerformShootAnimation(m.GetFacingDirectionToTarget(game->GetPlayer()->GetPos())); m.I(A::ATTACK_COUNT)++; diff --git a/Adventures in Lestoria/InkBullet.cpp b/Adventures in Lestoria/InkBullet.cpp new file mode 100644 index 00000000..51f2307e --- /dev/null +++ b/Adventures in Lestoria/InkBullet.cpp @@ -0,0 +1,37 @@ +#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 \ No newline at end of file diff --git a/Adventures in Lestoria/MonsterAttribute.h b/Adventures in Lestoria/MonsterAttribute.h index f920f52d..b9af6eb7 100644 --- a/Adventures in Lestoria/MonsterAttribute.h +++ b/Adventures in Lestoria/MonsterAttribute.h @@ -161,4 +161,6 @@ enum class Attribute{ ATTACK_ANIMATION_SPEED, ARM_SPEEDS_INCREASED, LAST_SHOOT_TIMER, + BULLET_COUNT_AFTER_INK_ATTACK, + LAST_INK_SHOOT_TIMER, }; \ 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 fe9cfc76..810e31a5 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -1243,6 +1243,9 @@ MonsterStrategy # How resistant the boss is to attacks. Permanent Resistance Buff = 80% + + # Amount of health the boss needs to have for the second phase bullet pattern rules to begin applying. + Phase 2 Health Threshold = 30000hp # Amount of health the boss needs to have for the arms to have a sped up animation. Arm Speedup Health Threshold = 12000hp @@ -1275,5 +1278,18 @@ MonsterStrategy Big Bullet Extra Bullet Acceleration = 50 Big Bullet Boss Rest Time = 2s Big Bullet Color = 255r,0g,0b,255a + + Phase 2 + { + Ink Bullet Speed = 250 + Ink Bullet Frequency = 15s + Ink Explosion Radius = 57px + # Movespeed to decrease by + Ink Slowdown Amount = 10% + Ink Puddle Lifetime = 30s + Homing Bullet Starts After = 6 Ink Bullets + # Every nth bullet will be a homing bullet, n determined by this value + Homing Bullet Frequency = 2 Bullets + } } } \ No newline at end of file diff --git a/Adventures in Lestoria/assets/config/gfx/gfx.txt b/Adventures in Lestoria/assets/config/gfx/gfx.txt index 38f2fa70..d651b8e4 100644 --- a/Adventures in Lestoria/assets/config/gfx/gfx.txt +++ b/Adventures in Lestoria/assets/config/gfx/gfx.txt @@ -143,6 +143,7 @@ Images GFX_Molotov = molotov.png GFX_BurstBullet = burstbullet.png GFX_BurstRotateBullet = burstrotatebullet.png + GFX_InkBullet = inkbullet.png GFX_Thief_Sheet = nico-thief.png GFX_Trapper_Sheet = nico-trapper.png diff --git a/Adventures in Lestoria/assets/gamepack.pak b/Adventures in Lestoria/assets/gamepack.pak deleted file mode 100644 index 2ec91e55..00000000 Binary files a/Adventures in Lestoria/assets/gamepack.pak and /dev/null differ diff --git a/Adventures in Lestoria/assets/ink.png b/Adventures in Lestoria/assets/ink.png new file mode 100644 index 00000000..73203ed4 Binary files /dev/null and b/Adventures in Lestoria/assets/ink.png differ diff --git a/Adventures in Lestoria/assets/inkbullet.png b/Adventures in Lestoria/assets/inkbullet.png new file mode 100644 index 00000000..edd1f5f8 Binary files /dev/null and b/Adventures in Lestoria/assets/inkbullet.png differ