diff --git a/Adventures in Lestoria/Ability.cpp b/Adventures in Lestoria/Ability.cpp index 33d354b6..1cab5dcb 100644 --- a/Adventures in Lestoria/Ability.cpp +++ b/Adventures in Lestoria/Ability.cpp @@ -43,11 +43,9 @@ INCLUDE_game PrecastData::PrecastData() :castTime(0),range(0),size(0){}; PrecastData::PrecastData(float castTime) - :castTime(castTime),range(0),size(0){precastTargetingRequired=true;}; + :castTime(castTime),range(0),size(0),precastTargetingRequired(castTime>0){}; PrecastData::PrecastData(float castTime,float range,float size) - :castTime(castTime),range(range),size(size){ - if(range>0||castTime>0)precastTargetingRequired=true; - }; + :castTime(castTime),range(range),size(size),precastTargetingRequired(range>0||castTime>0){}; InputGroup Ability::DEFAULT; diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 46e95299..c4cf117b 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -504,8 +504,8 @@ void Player::Update(float fElapsedTime){ SetAdditiveBlending(!IsUsingAdditiveBlending()); } if(deadlyDashAfterDashTimer<=0.f){ - geom2d::line mouseDir{GetPos(),GetWorldAimingLocation()}; - vf2d clampedMousePolarDir{util::pointTo(GetPos(),GetWorldAimingLocation()).polar()}; + geom2d::line mouseDir{GetPos(),GetWorldAimingLocation(Player::USE_WALK_DIR)}; + vf2d clampedMousePolarDir{util::pointTo(GetPos(),GetWorldAimingLocation(Player::USE_WALK_DIR)).polar()}; clampedMousePolarDir.x=std::clamp(mouseDir.length(),24.f,"Thief.Ability 2.Range"_F*24.f/100); const vf2d originalPos{GetPos()}; @@ -776,7 +776,8 @@ vf2d Player::GetVelocity(){ } bool Player::CanMove(){ - return knockUpTimer==0.f&&state!=State::ANIMATION_LOCK&&state!=State::DEADLYDASH&&(state!=State::CASTING||(castInfo.castTotalTime-castInfo.castTimer>0.2f)); + const bool DeadlyDashExpiringOnThisFrame{deadlyDashAfterDashTimer-game->GetElapsedTime()<=0.f}; + return knockUpTimer==0.f&&state!=State::ANIMATION_LOCK&&(DeadlyDashExpiringOnThisFrame||state!=State::DEADLYDASH)&&(state!=State::CASTING||(castInfo.castTotalTime-castInfo.castTimer>0.2f)); } bool Player::CanAct(){ @@ -1050,7 +1051,7 @@ bool Player::CanPathfindTo(vf2d pos,vf2d targetPos,float range){ void Player::PrepareCast(Ability&ability){ castPrepAbility=&ability; - if(ability.precastInfo.castTime>0||ability.precastInfo.range>0){ + if(ability.precastInfo.range>0){ SetState(State::PREP_CAST); }else{ CastSpell(ability); @@ -1646,8 +1647,7 @@ void Player::CheckAndPerformAbility(Ability&ability,InputGroup key){ CancelCast(); ConsumeMana(ability.manaCost); }else - if(ability.precastInfo.precastTargetingRequired&&GetState()==State::NORMAL - &&HasEnoughOfItem){ + if(ability.precastInfo.precastTargetingRequired&&GetState()==State::NORMAL&&HasEnoughOfItem){ PrepareCast(ability); } } diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index c26291a7..e23e2225 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -21,7 +21,7 @@ Add rectangular hitbox posssibility to the game for monsters. (specifically for DEMO ==== -Enable weapons for the new classes in the weapons crafting menu. +Add Unit Test for Attack Speed Reduction stat. PGETinker notes =============== diff --git a/Adventures in Lestoria/Thief.cpp b/Adventures in Lestoria/Thief.cpp index 953c1fb6..2be1c81b 100644 --- a/Adventures in Lestoria/Thief.cpp +++ b/Adventures in Lestoria/Thief.cpp @@ -109,7 +109,7 @@ void Thief::InitializeClassAbilities(){ p->SetState(State::ROLL); p->rolling_timer="Thief.Right Click Ability.Roll Time"_F; p->AddBuff(BuffType::SPEEDBOOST,"Thief.Right Click Ability.Movespeed Buff"_f[1],"Thief.Right Click Ability.Movespeed Buff"_f[0]/100.f); - geom2d::line mouseDir{p->GetPos(),p->GetWorldAimingLocation(Player::USE_WALK_DIR)}; + geom2d::line mouseDir{p->GetPos(),p->GetWorldAimingLocation(Player::USE_WALK_DIR,Player::INVERTED)}; float velocity=(0.5f*-p->friction*"Thief.Right Click Ability.Roll Time"_F*"Thief.Right Click Ability.Roll Time"_F-std::clamp(mouseDir.length(),24.f,24.f*"Thief.Right Click Ability.Max Roll Range"_F/100))/-"Thief.Right Click Ability.Roll Time"_F; //Derived from kinetic motion formula. p->SetVelocity(mouseDir.vector().norm()*velocity); p->ApplyIframes("Thief.Right Click Ability.Iframe Time"_F); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 978215fa..1274a0ac 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 10153 +#define VERSION_BUILD 10164 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 5dc6e99b..bdf1b38b 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ