Add deadly dash attack sound effects and basic behavior

mac-build
NicoNicoNii 4 months ago
parent c62f24cdcd
commit 873e25f927
  1. 2
      .idea/AdventuresInLestoria.iml
  2. 1
      Adventures in Lestoria/Checkbox.h
  3. 13
      Adventures in Lestoria/Player.cpp
  4. 3
      Adventures in Lestoria/Player.h
  5. 8
      Adventures in Lestoria/Thief.cpp
  6. 12
      Adventures in Lestoria/assets/config/audio/events.txt
  7. 2
      Adventures in Lestoria/assets/config/classes/Thief.txt
  8. BIN
      Adventures in Lestoria/assets/sounds/chargeup.ogg
  9. BIN
      Adventures in Lestoria/assets/sounds/deadlydash.ogg

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

@ -81,7 +81,6 @@ public:
if(checked){
const vf2d scale{GetSize()/GFX["checkmark.png"].Sprite()->Size()};
LOG(std::format("{} / {} / {}",GFX["checkmark.png"].Sprite()->Size().str(),GetSize().str(),scale.str()));
window.DrawDecal(rect.pos,GFX["checkmark.png"].Decal(),scale);
}
}

@ -488,6 +488,19 @@ void Player::Update(float fElapsedTime){
SetState(State::NORMAL);
}
}break;
case State::DEADLYDASH:{
deadlyDashWaitTimer-=fElapsedTime;
deadlyDashAfterDashTimer-=fElapsedTime;
if(deadlyDashWaitTimer<=0.f){
deadlyDashWaitTimer=INFINITY;
}
if(deadlyDashAfterDashTimer<=0.f){
deadlyDashAfterDashTimer=INFINITY;
SoundEffect::PlaySFX("Deadly Dash",GetPos());
SetPos(deadlyDashEndingPos);
SetState(State::NORMAL);
}
}break;
default:{
spin_angle=0.f;
ySquishFactor=1.f;

@ -354,6 +354,9 @@ private:
float rangerShootAnimationTimer=0.f;
Renderable minimapImg; //An image of the character represented on a minimap. Should be 12x12 and generally be a circle.
void CheckAndPerformAbility(Ability&ability,InputGroup key);
float deadlyDashWaitTimer{};
float deadlyDashAfterDashTimer{};
vf2d deadlyDashEndingPos{};
protected:
const float ATTACK_COOLDOWN="Warrior.Auto Attack.Cooldown"_F;
const float MAGIC_ATTACK_COOLDOWN="Wizard.Auto Attack.Cooldown"_F;

@ -143,7 +143,15 @@ void Thief::InitializeClassAbilities(){
p->ApplyIframes("Thief.Ability 2.Initial Wait"_F+"Thief.Ability 2.Ending Wait"_F);
geom2d::line mouseDir{p->GetPos(),p->GetWorldAimingLocation()};
p->SetAnimationBasedOnTargetingDirection("DEADLYDASH",mouseDir.vector().polar().y);
SoundEffect::PlaySFX("Charge Up",p->GetPos());
vf2d clampedMousePolarDir{util::pointTo(p->GetPos(),p->GetWorldAimingLocation()).polar()};
clampedMousePolarDir.x=std::max(24.f,mouseDir.length());
p->deadlyDashEndingPos=p->GetPos()+clampedMousePolarDir.cart();
p->SetState(State::DEADLYDASH);
p->deadlyDashWaitTimer="Thief.Ability 2.Initial Wait"_F;
p->deadlyDashAfterDashTimer=p->deadlyDashWaitTimer+"Thief.Ability 2.Ending Wait"_F;
return true;
};
#pragma endregion

@ -29,6 +29,12 @@ Events
# Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%)
File[0] = changevolume.ogg, 50%, 60%, 60%
}
Charge Up
{
CombatSound = True
# Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%)
File[0] = chargeup.ogg, 70%
}
Consume Potion
{
# Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%)
@ -49,6 +55,12 @@ Events
# Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%)
File[0] = craft_equip.ogg, 70%
}
Deadly Dash
{
CombatSound = True
# Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%)
File[0] = deadlydash.ogg, 60%, 70%, 80%
}
Dig
{
CombatSound = True

@ -23,7 +23,7 @@ Thief
SwordAnimationSwingTime = 0.2s
SwordSlashLingerTime = 0.125s
#Sweep angle of the sword slash (in both directions)
SwordSlashSweepAngle = 45°
SwordSlashSweepAngle = 45<EFBFBD>
}
Right Click Ability

Loading…
Cancel
Save