Implement Thief Hidden Dagger attack. Add in missing icons for Elixir of the Wind and Recovery Potions. Release Build 10061.
This commit is contained in:
parent
5f40ee8306
commit
c80ec17999
@ -197,11 +197,11 @@ BulletDestroyState Bullet::_MonsterHit(Monster&monster){
|
|||||||
return destroyBullet;
|
return destroyBullet;
|
||||||
}
|
}
|
||||||
BulletDestroyState Bullet::PlayerHit(Player*player){
|
BulletDestroyState Bullet::PlayerHit(Player*player){
|
||||||
if(!hitsMultiple)fadeOutTime=0.1f;
|
if(!hitsMultiple)fadeOutTime=0.15f;
|
||||||
return BulletDestroyState::KEEP_ALIVE;
|
return BulletDestroyState::KEEP_ALIVE;
|
||||||
}
|
}
|
||||||
BulletDestroyState Bullet::MonsterHit(Monster&monster){
|
BulletDestroyState Bullet::MonsterHit(Monster&monster){
|
||||||
if(!hitsMultiple)fadeOutTime=0.1f;
|
if(!hitsMultiple)fadeOutTime=0.15f;
|
||||||
return BulletDestroyState::KEEP_ALIVE;
|
return BulletDestroyState::KEEP_ALIVE;
|
||||||
}
|
}
|
||||||
bool Bullet::OnUpperLevel(){return upperLevel;}
|
bool Bullet::OnUpperLevel(){return upperLevel;}
|
||||||
|
@ -87,6 +87,7 @@ private:
|
|||||||
BulletType type{BulletType::UNDEFINED};
|
BulletType type{BulletType::UNDEFINED};
|
||||||
bool deactivated{false};
|
bool deactivated{false};
|
||||||
double aliveTime{};
|
double aliveTime{};
|
||||||
|
float onContactFadeoutTime{}; //What fadeouttime will be set to when the bullet hits a monster.
|
||||||
protected:
|
protected:
|
||||||
float drawOffsetY{};
|
float drawOffsetY{};
|
||||||
BulletDestroyState _PlayerHit(Player*player); //Return true to destroy the bullet on hit, return false otherwise. THE BULLET HIT HAS ALREADY OCCURRED.
|
BulletDestroyState _PlayerHit(Player*player); //Return true to destroy the bullet on hit, return false otherwise. THE BULLET HIT HAS ALREADY OCCURRED.
|
||||||
|
@ -106,10 +106,26 @@ void Thief::InitializeClassAbilities(){
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
#pragma region Thief Ability 1 (???)
|
#pragma region Thief Ability 1 (Hidden Dagger)
|
||||||
Thief::ability1.action=
|
Thief::ability1.action=
|
||||||
[](Player*p,vf2d pos={}){
|
[](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 endregion
|
||||||
#pragma region Thief Ability 2 (???)
|
#pragma region Thief Ability 2 (???)
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 3
|
#define VERSION_PATCH 3
|
||||||
#define VERSION_BUILD 10053
|
#define VERSION_BUILD 10061
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
@ -59,8 +59,15 @@ Thief
|
|||||||
# Whether or not this ability cancels casts.
|
# Whether or not this ability cancels casts.
|
||||||
CancelCast = 1
|
CancelCast = 1
|
||||||
|
|
||||||
Jump Range = 200
|
|
||||||
Damage = 2x
|
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.
|
#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
|
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||||
|
@ -107,6 +107,7 @@ Images
|
|||||||
GFX_SafeAreaIndicator = safeIndicatorGradient.png
|
GFX_SafeAreaIndicator = safeIndicatorGradient.png
|
||||||
GFX_Feather = feather.png
|
GFX_Feather = feather.png
|
||||||
GFX_LargeRock = large_rock.png
|
GFX_LargeRock = large_rock.png
|
||||||
|
GFX_Dagger = dagger.png
|
||||||
|
|
||||||
GFX_Thief_Sheet = nico-thief.png
|
GFX_Thief_Sheet = nico-thief.png
|
||||||
|
|
||||||
|
BIN
Adventures in Lestoria/assets/dagger.png
Normal file
BIN
Adventures in Lestoria/assets/dagger.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 645 B |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user