diff --git a/Adventures in Lestoria/BreakingPillar.cpp b/Adventures in Lestoria/BreakingPillar.cpp index b92881e8..f61e3e81 100644 --- a/Adventures in Lestoria/BreakingPillar.cpp +++ b/Adventures in Lestoria/BreakingPillar.cpp @@ -69,6 +69,7 @@ void Monster::STRATEGY::BREAKING_PILLAR(Monster&m,float fElapsedTime,std::string for(int i=0;iSetIframeTimeOnHit(0.15f); } return false; }); diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 2b87332f..bbece154 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -746,6 +746,18 @@ void Player::Update(float fElapsedTime){ } #pragma endregion + #pragma region Thief + if(daggerThrowWaitTimer-fElapsedTime<=0.f){ + daggerThrowWaitTimer=INFINITY; + float angleToCursor=atan2(GetWorldAimingLocation(Player::USE_WALK_DIR).y-GetPos().y,GetWorldAimingLocation(Player::USE_WALK_DIR).x-GetPos().x); + + const float daggerLifetime{"Thief.Ability 1.Dagger Range"_F/"Thief.Ability 1.Dagger Speed"_F}; + + CreateBullet(Bullet)(GetPos(),vf2d{"Thief.Ability 1.Dagger Speed"_F,angleToCursor}.cart(),"Thief.Ability 1.Dagger Radius"_F,GetAttack()*"Thief.Ability 1.Damage"_I,"dagger.png",OnUpperLevel(),false,daggerLifetime,true,true,WHITE,{1.f,1.f},0.f,"Dagger Hit")EndBullet; + } + daggerThrowWaitTimer-=fElapsedTime; + #pragma endregion + #pragma region Handle knockup timers if(knockUpTimer>0.f){ knockUpTimer=std::max(0.f,knockUpTimer-fElapsedTime); diff --git a/Adventures in Lestoria/Player.h b/Adventures in Lestoria/Player.h index 041ba2a9..24fb0ccc 100644 --- a/Adventures in Lestoria/Player.h +++ b/Adventures in Lestoria/Player.h @@ -366,6 +366,7 @@ private: bool renderedSpriteUsesAdditiveBlending{false}; float deadlyDashAdditiveBlendingToggleTimer{}; std::unordered_setmyClass{}; + float daggerThrowWaitTimer{INFINITY}; 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/Stone_Elemental.cpp b/Adventures in Lestoria/Stone_Elemental.cpp index 36197db8..47bbed61 100644 --- a/Adventures in Lestoria/Stone_Elemental.cpp +++ b/Adventures in Lestoria/Stone_Elemental.cpp @@ -142,7 +142,10 @@ void Monster::STRATEGY::STONE_ELEMENTAL(Monster&m,float fElapsedTime,std::string m.target=targetWalkPos; RUN_TOWARDS(m,fElapsedTime,"Run Towards"); m.PerformAnimation("STONE PILLAR CAST"); - m.UpdateFacingDirection(game->GetPlayer()->GetPos()); + m.UpdateFacingDirection(targetWalkPos); + }else{ + m.PerformAnimation("STONE PILLAR CAST"); + m.UpdateFacingDirection(m.V(A::LOCKON_POS)); } }break; case SHOOT_STONE_CAST:{ diff --git a/Adventures in Lestoria/Thief.cpp b/Adventures in Lestoria/Thief.cpp index b9558ad3..48aef5b1 100644 --- a/Adventures in Lestoria/Thief.cpp +++ b/Adventures in Lestoria/Thief.cpp @@ -128,11 +128,8 @@ void Thief::InitializeClassAbilities(){ p->ghostPositions.push_back(p->GetPos()+vf2d{0,-p->GetZ()}); p->ghostFrameTimer=p->RETREAT_GHOST_FRAME_DELAY; p->ghostRemoveTimer=p->RETREAT_GHOST_FRAMES*p->RETREAT_GHOST_FRAME_DELAY; + p->daggerThrowWaitTimer="Thief.Ability 1.Dagger Throw Delay"_F; float angleToCursor=atan2(p->GetWorldAimingLocation(Player::USE_WALK_DIR).y-p->GetPos().y,p->GetWorldAimingLocation(Player::USE_WALK_DIR).x-p->GetPos().x); - - const float daggerLifetime{"Thief.Ability 1.Dagger Range"_F/"Thief.Ability 1.Dagger Speed"_F}; - - CreateBullet(Bullet)(p->GetPos(),vf2d{"Thief.Ability 1.Dagger Speed"_F,angleToCursor}.cart(),"Thief.Ability 1.Dagger Radius"_F,p->GetAttack()*"Thief.Ability 1.Damage"_I,"dagger.png",p->OnUpperLevel(),false,daggerLifetime,true,true,WHITE,{1.f,1.f},0.f,"Dagger Hit")EndBullet; p->SetAnimationBasedOnTargetingDirection("IDLE",angleToCursor); p->SetState(State::RETREAT); SoundEffect::PlaySFX("Thief.Ability 1.Sound"_S,SoundEffect::CENTERED); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index edb8eb9d..3b9557af 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 10258 +#define VERSION_BUILD 10261 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/Campaigns/2_8.tmx b/Adventures in Lestoria/assets/Campaigns/2_8.tmx index 5fc93093..cd6a6328 100644 --- a/Adventures in Lestoria/assets/Campaigns/2_8.tmx +++ b/Adventures in Lestoria/assets/Campaigns/2_8.tmx @@ -1522,7 +1522,7 @@ - + diff --git a/Adventures in Lestoria/assets/config/Monsters.txt b/Adventures in Lestoria/assets/config/Monsters.txt index 47a05b2a..36158b4e 100644 --- a/Adventures in Lestoria/assets/config/Monsters.txt +++ b/Adventures in Lestoria/assets/config/Monsters.txt @@ -752,6 +752,7 @@ Monsters Size = 147% XP = 71 + Collision Radius = 5 Strategy = Stone Elemental @@ -1000,6 +1001,8 @@ Monsters #Size of each animation frame SheetFrameSize = 48,48 + + Collision Radius = 5 # Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST 4-Way Spritesheet = True diff --git a/Adventures in Lestoria/assets/config/classes/Thief.txt b/Adventures in Lestoria/assets/config/classes/Thief.txt index 6ec34e3b..c12bc17d 100644 --- a/Adventures in Lestoria/assets/config/classes/Thief.txt +++ b/Adventures in Lestoria/assets/config/classes/Thief.txt @@ -76,6 +76,7 @@ Thief # The distance the retreat moves the Thief. RetreatDistance = 200 Sound = Ranger Retreat + Dagger Throw Delay = 0.1s #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/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 5dbf0c95..7a1a38cc 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ