diff --git a/.idea/AdventuresInLestoria.iml b/.idea/AdventuresInLestoria.iml new file mode 100644 index 00000000..f08604bb --- /dev/null +++ b/.idea/AdventuresInLestoria.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Adventures in Lestoria/Checkbox.h b/Adventures in Lestoria/Checkbox.h index ec436a03..f971f8e7 100644 --- a/Adventures in Lestoria/Checkbox.h +++ b/Adventures in Lestoria/Checkbox.h @@ -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); } } diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 2fc02d60..30ef48ef 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -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; diff --git a/Adventures in Lestoria/Player.h b/Adventures in Lestoria/Player.h index be33e1ea..843c1b7d 100644 --- a/Adventures in Lestoria/Player.h +++ b/Adventures in Lestoria/Player.h @@ -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; diff --git a/Adventures in Lestoria/Thief.cpp b/Adventures in Lestoria/Thief.cpp index 9ab2c250..4d160eb9 100644 --- a/Adventures in Lestoria/Thief.cpp +++ b/Adventures in Lestoria/Thief.cpp @@ -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 diff --git a/Adventures in Lestoria/assets/config/audio/events.txt b/Adventures in Lestoria/assets/config/audio/events.txt index 7899e219..0e6dd45d 100644 --- a/Adventures in Lestoria/assets/config/audio/events.txt +++ b/Adventures in Lestoria/assets/config/audio/events.txt @@ -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 diff --git a/Adventures in Lestoria/assets/config/classes/Thief.txt b/Adventures in Lestoria/assets/config/classes/Thief.txt index 4ce325a7..72fc9239 100644 --- a/Adventures in Lestoria/assets/config/classes/Thief.txt +++ b/Adventures in Lestoria/assets/config/classes/Thief.txt @@ -23,7 +23,7 @@ Thief SwordAnimationSwingTime = 0.2s SwordSlashLingerTime = 0.125s #Sweep angle of the sword slash (in both directions) - SwordSlashSweepAngle = 45° + SwordSlashSweepAngle = 45� } Right Click Ability diff --git a/Adventures in Lestoria/assets/sounds/chargeup.ogg b/Adventures in Lestoria/assets/sounds/chargeup.ogg new file mode 100644 index 00000000..cf5897a0 Binary files /dev/null and b/Adventures in Lestoria/assets/sounds/chargeup.ogg differ diff --git a/Adventures in Lestoria/assets/sounds/deadlydash.ogg b/Adventures in Lestoria/assets/sounds/deadlydash.ogg new file mode 100644 index 00000000..a2038f23 Binary files /dev/null and b/Adventures in Lestoria/assets/sounds/deadlydash.ogg differ