Added retreat configuration variables.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
pull/28/head
Nic0Nic0Nii 2 years ago
parent ac1896b671
commit 017a72b8cc
  1. 6
      Crawler/Player.h
  2. 5
      Crawler/assets/config/classes/Ranger.txt

@ -56,7 +56,7 @@ private:
protected: protected:
const float ATTACK_COOLDOWN="Warrior.Auto Attack.Cooldown"_F; const float ATTACK_COOLDOWN="Warrior.Auto Attack.Cooldown"_F;
const float MAGIC_ATTACK_COOLDOWN="Wizard.Auto Attack.Cooldown"_F; const float MAGIC_ATTACK_COOLDOWN="Wizard.Auto Attack.Cooldown"_F;
const float ARROW_ATTACK_COOLDOWN=0.6f; float ARROW_ATTACK_COOLDOWN="Ranger.Auto Attack.Cooldown"_F;
void SetSwordSwingTimer(float val); void SetSwordSwingTimer(float val);
void SetState(State newState); void SetState(State newState);
void SetFacingDirection(Key direction); void SetFacingDirection(Key direction);
@ -86,8 +86,8 @@ protected:
void PrepareCast(Ability&ability); void PrepareCast(Ability&ability);
vf2d precastLocation={}; vf2d precastLocation={};
void SetVelocity(vf2d vel); void SetVelocity(vf2d vel);
const float RETREAT_DISTANCE=24*2.5; const float RETREAT_DISTANCE=122.5*"Ranger.Right Click Ability.RetreatDistance"_F/100;
const float RETREAT_TIME=0.2; //How long the Retreat ability takes. float RETREAT_TIME="Ranger.Right Click Ability.RetreatTime"_F; //How long the Retreat ability takes.
const int RETREAT_GHOST_FRAMES=8; const int RETREAT_GHOST_FRAMES=8;
const float RETREAT_GHOST_FRAME_DELAY=0.025; const float RETREAT_GHOST_FRAME_DELAY=0.025;
float ghostFrameTimer=0; float ghostFrameTimer=0;

@ -23,6 +23,11 @@ Ranger
Precast Time = 0 Precast Time = 0
Casting Range = 0 Casting Range = 0
Casting Size = 0 Casting Size = 0
# How long the retreat takes.
RetreatTime = 0.2
# The distance the retreat moves the Ranger.
RetreatDistance = 500
} }
Ability 1 Ability 1
{ {

Loading…
Cancel
Save