From 017a72b8cc4667b9e49c5c0c47030b1bdcacaad6 Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii Date: Tue, 1 Aug 2023 20:21:24 +0000 Subject: [PATCH] Added retreat configuration variables. Co-authored-by: sigonasr2 --- Crawler/Player.h | 6 +++--- Crawler/assets/config/classes/Ranger.txt | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Crawler/Player.h b/Crawler/Player.h index 8620b888..914c4c87 100644 --- a/Crawler/Player.h +++ b/Crawler/Player.h @@ -56,7 +56,7 @@ private: protected: const float ATTACK_COOLDOWN="Warrior.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 SetState(State newState); void SetFacingDirection(Key direction); @@ -86,8 +86,8 @@ protected: void PrepareCast(Ability&ability); vf2d precastLocation={}; void SetVelocity(vf2d vel); - const float RETREAT_DISTANCE=24*2.5; - const float RETREAT_TIME=0.2; //How long the Retreat ability takes. + const float RETREAT_DISTANCE=122.5*"Ranger.Right Click Ability.RetreatDistance"_F/100; + float RETREAT_TIME="Ranger.Right Click Ability.RetreatTime"_F; //How long the Retreat ability takes. const int RETREAT_GHOST_FRAMES=8; const float RETREAT_GHOST_FRAME_DELAY=0.025; float ghostFrameTimer=0; diff --git a/Crawler/assets/config/classes/Ranger.txt b/Crawler/assets/config/classes/Ranger.txt index 796a7985..4e18b669 100644 --- a/Crawler/assets/config/classes/Ranger.txt +++ b/Crawler/assets/config/classes/Ranger.txt @@ -23,6 +23,11 @@ Ranger Precast Time = 0 Casting Range = 0 Casting Size = 0 + + # How long the retreat takes. + RetreatTime = 0.2 + # The distance the retreat moves the Ranger. + RetreatDistance = 500 } Ability 1 {