diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index cf9660f2..cbfbaaae 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -1024,9 +1024,11 @@ void AiL::RenderWorld(float fElapsedTime){ } const std::vectorattackBuffs{player->GetStatBuffs({"Attack","Attack %"})}; const std::vectormovespeedBuffs{player->GetBuffs(BuffType::SPEEDBOOST)}; + const std::vectoradrenalineRushBuffs{player->GetBuffs(BuffType::ADRENALINE_RUSH)}; Pixel playerCol{WHITE}; if(attackBuffs.size()>0)playerCol={255,uint8_t(255*abs(sin(1.4f*attackBuffs[0].duration))),uint8_t(255*abs(sin(1.4f*attackBuffs[0].duration)))}; + else if(adrenalineRushBuffs.size()>0)playerCol={uint8_t(255*abs(sin(6.f*adrenalineRushBuffs[0].duration))),255,uint8_t(255*abs(sin(6.f*adrenalineRushBuffs[0].duration)))}; else if(movespeedBuffs.size()>0)playerCol={uint8_t(255*abs(sin(2.f*movespeedBuffs[0].duration))),255,uint8_t(255*abs(sin(2.f*movespeedBuffs[0].duration)))}; if(player->IsUsingAdditiveBlending())SetDecalMode(DecalMode::ADDITIVE); else SetDecalMode(DecalMode::NORMAL); diff --git a/Adventures in Lestoria/Buff.h b/Adventures in Lestoria/Buff.h index 88d2d58b..c70bbbdf 100644 --- a/Adventures in Lestoria/Buff.h +++ b/Adventures in Lestoria/Buff.h @@ -52,6 +52,7 @@ enum BuffType{ FIXED_COLLISION_DMG, //Does a fixed amount of collision damage based on intensity of this buff. COLLISION_KNOCKBACK_STRENGTH, //Causes an amount of knockback based on intensity when hit via collision with this buff SELF_INFLICTED_SLOWDOWN, //Used for monsters and can't be applied by any player abilities. + ADRENALINE_RUSH, }; class AiL; diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 5cb6212a..46e95299 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -289,6 +289,9 @@ float Player::GetMoveSpdMult(){ for(const Buff&b:GetBuffs(SPEEDBOOST)){ mod_moveSpd+=moveSpdPct*b.intensity; } + for(const Buff&b:GetBuffs(BuffType::ADRENALINE_RUSH)){ + mod_moveSpd+=moveSpdPct*"Thief.Ability 3.Movement Speed Increase"_F/100.f; + } return mod_moveSpd; } @@ -1468,7 +1471,11 @@ const uint32_t Player::GetAccumulatedXP()const{ } const float Player::GetAttackRecoveryRateReduction()const{ - return GetEquipStat("Attack Spd"); + float attackSpd{GetModdedStatBonuses("Attack Spd")}; + for(const Buff&b:GetBuffs(BuffType::ADRENALINE_RUSH)){ + attackSpd+=ATTACK_COOLDOWN*"Thief.Ability 3.Attack Speed Increase"_F/100.f; + } + return attackSpd; } void EntityStats::Reset(){ diff --git a/Adventures in Lestoria/Thief.cpp b/Adventures in Lestoria/Thief.cpp index e8e010b0..953c1fb6 100644 --- a/Adventures in Lestoria/Thief.cpp +++ b/Adventures in Lestoria/Thief.cpp @@ -44,6 +44,7 @@ All rights reserved. #include "SoundEffect.h" #include "util.h" #include "BulletTypes.h" +#include INCLUDE_MONSTER_LIST INCLUDE_BULLET_LIST @@ -152,10 +153,16 @@ void Thief::InitializeClassAbilities(){ return true; }; #pragma endregion - #pragma region Thief Ability 3 (???) + #pragma region Thief Ability 3 (Adrenaline Rush) Thief::ability3.action= [](Player*p,vf2d pos={}){ - return false; + SoundEffect::PlaySFX("Adrenaline Rush",p->GetPos()); + p->AddBuff(BuffType::ADRENALINE_RUSH,"Thief.Ability 3.Duration"_F,0.f); + for(int i:std::ranges::iota_view(0,50)){ + float size{util::random_range(0.4f,0.8f)}; + game->AddEffect(std::make_unique(p->GetPos()+vf2d{8,util::random(2*PI)}.cart(),util::random_range(0.1f,0.4f),"circle.png",p->OnUpperLevel(),vf2d{size,size},0.3f,vf2d{util::random_range(-6.f,6.f),util::random_range(-8.f,-1.f)},PixelLerp(WHITE,GREEN,util::random(1)))); + } + return true; }; #pragma endregion } \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 7a8a4945..978215fa 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 10146 +#define VERSION_BUILD 10153 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/config/audio/events.txt b/Adventures in Lestoria/assets/config/audio/events.txt index 63a6595c..f6fdc049 100644 --- a/Adventures in Lestoria/assets/config/audio/events.txt +++ b/Adventures in Lestoria/assets/config/audio/events.txt @@ -7,6 +7,12 @@ Events SFX { + Adrenaline Rush + { + CombatSound = True + # Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%) + File[0] = adrenaline_rush.ogg, 70% + } Bear Slam Attack { CombatSound = True diff --git a/Adventures in Lestoria/assets/config/classes/Thief.txt b/Adventures in Lestoria/assets/config/classes/Thief.txt index 9929cdb8..6ec34e3b 100644 --- a/Adventures in Lestoria/assets/config/classes/Thief.txt +++ b/Adventures in Lestoria/assets/config/classes/Thief.txt @@ -98,7 +98,7 @@ Thief Damage = 4x Range = 450 - Hit Radius = 12px + Hit Radius = 20px Initial Wait = 0.2s Ending Wait = 0.3s @@ -129,6 +129,7 @@ Thief Attack Speed Increase = 30% Movement Speed Increase = 10% + Duration = 8s #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. Cooldown Bar Color 1 = 64, 0, 0, 192 diff --git a/Adventures in Lestoria/assets/sounds/adrenaline_rush.ogg b/Adventures in Lestoria/assets/sounds/adrenaline_rush.ogg new file mode 100644 index 00000000..4b4e18b5 Binary files /dev/null and b/Adventures in Lestoria/assets/sounds/adrenaline_rush.ogg differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 513a04d9..5dc6e99b 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ