diff --git a/Adventures in Lestoria/Bullet.cpp b/Adventures in Lestoria/Bullet.cpp index 3c8eadc1..86fedd43 100644 --- a/Adventures in Lestoria/Bullet.cpp +++ b/Adventures in Lestoria/Bullet.cpp @@ -197,11 +197,11 @@ BulletDestroyState Bullet::_MonsterHit(Monster&monster){ return destroyBullet; } BulletDestroyState Bullet::PlayerHit(Player*player){ - if(!hitsMultiple)fadeOutTime=0.1f; + if(!hitsMultiple)fadeOutTime=0.15f; return BulletDestroyState::KEEP_ALIVE; } BulletDestroyState Bullet::MonsterHit(Monster&monster){ - if(!hitsMultiple)fadeOutTime=0.1f; + if(!hitsMultiple)fadeOutTime=0.15f; return BulletDestroyState::KEEP_ALIVE; } bool Bullet::OnUpperLevel(){return upperLevel;} diff --git a/Adventures in Lestoria/Bullet.h b/Adventures in Lestoria/Bullet.h index 5c41d821..4f140b8b 100644 --- a/Adventures in Lestoria/Bullet.h +++ b/Adventures in Lestoria/Bullet.h @@ -87,6 +87,7 @@ private: BulletType type{BulletType::UNDEFINED}; bool deactivated{false}; double aliveTime{}; + float onContactFadeoutTime{}; //What fadeouttime will be set to when the bullet hits a monster. protected: float drawOffsetY{}; BulletDestroyState _PlayerHit(Player*player); //Return true to destroy the bullet on hit, return false otherwise. THE BULLET HIT HAS ALREADY OCCURRED. diff --git a/Adventures in Lestoria/Thief.cpp b/Adventures in Lestoria/Thief.cpp index d6121147..5aee21f4 100644 --- a/Adventures in Lestoria/Thief.cpp +++ b/Adventures in Lestoria/Thief.cpp @@ -106,10 +106,26 @@ void Thief::InitializeClassAbilities(){ return false; }; #pragma endregion - #pragma region Thief Ability 1 (???) + #pragma region Thief Ability 1 (Hidden Dagger) Thief::ability1.action= [](Player*p,vf2d pos={}){ - return false; + geom2d::line mouseDir{p->GetWorldAimingLocation(Player::USE_WALK_DIR),p->GetPos()}; + float velocity=(0.5f*-p->friction*"Thief.Ability 1.RetreatTime"_F*"Thief.Ability 1.RetreatTime"_F-24.f*"Thief.Ability 1.RetreatDistance"_F/100)/-"Thief.Ability 1.RetreatTime"_F; //Derived from kinetic motion formula. + p->SetVelocity(mouseDir.vector().norm()*velocity); + p->retreatTimer="Thief.Ability 1.RetreatTime"_F; + p->ApplyIframes("Thief.Ability 1.RetreatTime"_F); + 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; + 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)EndBullet; + p->SetAnimationBasedOnTargetingDirection(angleToCursor); + p->SetState(State::RETREAT); + SoundEffect::PlaySFX("Thief.Ability 1.Sound"_S,SoundEffect::CENTERED); + return true; }; #pragma endregion #pragma region Thief Ability 2 (???) diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 0ef28a42..1bedf14c 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 10053 +#define VERSION_BUILD 10061 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/config/classes/Thief.txt b/Adventures in Lestoria/assets/config/classes/Thief.txt index 19000fae..59681d41 100644 --- a/Adventures in Lestoria/assets/config/classes/Thief.txt +++ b/Adventures in Lestoria/assets/config/classes/Thief.txt @@ -59,8 +59,15 @@ Thief # Whether or not this ability cancels casts. CancelCast = 1 - Jump Range = 200 Damage = 2x + Dagger Speed = 300 + Dagger Range = 1000 + Dagger Radius = 9px + # How long the retreat takes. + RetreatTime = 0.2 + # The distance the retreat moves the Thief. + RetreatDistance = 200 + Sound = Ranger Retreat #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/Adventures in Lestoria/assets/config/gfx/gfx.txt b/Adventures in Lestoria/assets/config/gfx/gfx.txt index 7a137ed3..4b0965c8 100644 --- a/Adventures in Lestoria/assets/config/gfx/gfx.txt +++ b/Adventures in Lestoria/assets/config/gfx/gfx.txt @@ -107,6 +107,7 @@ Images GFX_SafeAreaIndicator = safeIndicatorGradient.png GFX_Feather = feather.png GFX_LargeRock = large_rock.png + GFX_Dagger = dagger.png GFX_Thief_Sheet = nico-thief.png diff --git a/Adventures in Lestoria/assets/dagger.png b/Adventures in Lestoria/assets/dagger.png new file mode 100644 index 00000000..83bbf274 Binary files /dev/null and b/Adventures in Lestoria/assets/dagger.png differ diff --git a/Adventures in Lestoria/assets/gamepack.pak b/Adventures in Lestoria/assets/gamepack.pak index be6552c5..27c1f313 100644 Binary files a/Adventures in Lestoria/assets/gamepack.pak and b/Adventures in Lestoria/assets/gamepack.pak differ diff --git a/Adventures in Lestoria/assets/items/Elixir of the Wind.png b/Adventures in Lestoria/assets/items/Elixir of the Wind.png index 9a9093ee..4ba2ebd3 100644 Binary files a/Adventures in Lestoria/assets/items/Elixir of the Wind.png and b/Adventures in Lestoria/assets/items/Elixir of the Wind.png differ diff --git a/Adventures in Lestoria/assets/items/Recovery Potion.png b/Adventures in Lestoria/assets/items/Recovery Potion.png index aadcffd5..444adb70 100644 Binary files a/Adventures in Lestoria/assets/items/Recovery Potion.png and b/Adventures in Lestoria/assets/items/Recovery Potion.png differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 389b6a11..acac09d1 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ