Add in adrenaline rush buff. Make attack speed bonuses be applied via modifiers. Release Build 10153.
This commit is contained in:
parent
b2fc642723
commit
747c9bbffe
@ -1024,9 +1024,11 @@ void AiL::RenderWorld(float fElapsedTime){
|
|||||||
}
|
}
|
||||||
const std::vector<Buff>attackBuffs{player->GetStatBuffs({"Attack","Attack %"})};
|
const std::vector<Buff>attackBuffs{player->GetStatBuffs({"Attack","Attack %"})};
|
||||||
const std::vector<Buff>movespeedBuffs{player->GetBuffs(BuffType::SPEEDBOOST)};
|
const std::vector<Buff>movespeedBuffs{player->GetBuffs(BuffType::SPEEDBOOST)};
|
||||||
|
const std::vector<Buff>adrenalineRushBuffs{player->GetBuffs(BuffType::ADRENALINE_RUSH)};
|
||||||
|
|
||||||
Pixel playerCol{WHITE};
|
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)))};
|
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)))};
|
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);
|
if(player->IsUsingAdditiveBlending())SetDecalMode(DecalMode::ADDITIVE);
|
||||||
else SetDecalMode(DecalMode::NORMAL);
|
else SetDecalMode(DecalMode::NORMAL);
|
||||||
|
@ -52,6 +52,7 @@ enum BuffType{
|
|||||||
FIXED_COLLISION_DMG, //Does a fixed amount of collision damage based on intensity of this buff.
|
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
|
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.
|
SELF_INFLICTED_SLOWDOWN, //Used for monsters and can't be applied by any player abilities.
|
||||||
|
ADRENALINE_RUSH,
|
||||||
};
|
};
|
||||||
|
|
||||||
class AiL;
|
class AiL;
|
||||||
|
@ -289,6 +289,9 @@ float Player::GetMoveSpdMult(){
|
|||||||
for(const Buff&b:GetBuffs(SPEEDBOOST)){
|
for(const Buff&b:GetBuffs(SPEEDBOOST)){
|
||||||
mod_moveSpd+=moveSpdPct*b.intensity;
|
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;
|
return mod_moveSpd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1468,7 +1471,11 @@ const uint32_t Player::GetAccumulatedXP()const{
|
|||||||
}
|
}
|
||||||
|
|
||||||
const float Player::GetAttackRecoveryRateReduction()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(){
|
void EntityStats::Reset(){
|
||||||
|
@ -44,6 +44,7 @@ All rights reserved.
|
|||||||
#include "SoundEffect.h"
|
#include "SoundEffect.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "BulletTypes.h"
|
#include "BulletTypes.h"
|
||||||
|
#include <ranges>
|
||||||
|
|
||||||
INCLUDE_MONSTER_LIST
|
INCLUDE_MONSTER_LIST
|
||||||
INCLUDE_BULLET_LIST
|
INCLUDE_BULLET_LIST
|
||||||
@ -152,10 +153,16 @@ void Thief::InitializeClassAbilities(){
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma region Thief Ability 3 (???)
|
#pragma region Thief Ability 3 (Adrenaline Rush)
|
||||||
Thief::ability3.action=
|
Thief::ability3.action=
|
||||||
[](Player*p,vf2d pos={}){
|
[](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<Effect>(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
|
#pragma endregion
|
||||||
}
|
}
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 3
|
#define VERSION_PATCH 3
|
||||||
#define VERSION_BUILD 10146
|
#define VERSION_BUILD 10153
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
@ -7,6 +7,12 @@ Events
|
|||||||
|
|
||||||
SFX
|
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
|
Bear Slam Attack
|
||||||
{
|
{
|
||||||
CombatSound = True
|
CombatSound = True
|
||||||
|
@ -98,7 +98,7 @@ Thief
|
|||||||
|
|
||||||
Damage = 4x
|
Damage = 4x
|
||||||
Range = 450
|
Range = 450
|
||||||
Hit Radius = 12px
|
Hit Radius = 20px
|
||||||
Initial Wait = 0.2s
|
Initial Wait = 0.2s
|
||||||
Ending Wait = 0.3s
|
Ending Wait = 0.3s
|
||||||
|
|
||||||
@ -129,6 +129,7 @@ Thief
|
|||||||
|
|
||||||
Attack Speed Increase = 30%
|
Attack Speed Increase = 30%
|
||||||
Movement Speed Increase = 10%
|
Movement Speed Increase = 10%
|
||||||
|
Duration = 8s
|
||||||
|
|
||||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
#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
|
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||||
|
BIN
Adventures in Lestoria/assets/sounds/adrenaline_rush.ogg
Normal file
BIN
Adventures in Lestoria/assets/sounds/adrenaline_rush.ogg
Normal file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user