From ac1896b67115ba52d18e90df67c2925e2d7c7627 Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii Date: Mon, 31 Jul 2023 20:31:27 +0000 Subject: [PATCH] Start implemnting ranger config Co-authored-by: sigonasr2 --- Crawler/Ranger.cpp | 2 +- Crawler/assets/config/classes/Ranger.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Crawler/Ranger.cpp b/Crawler/Ranger.cpp index 10fcfdd1..60caeb5b 100644 --- a/Crawler/Ranger.cpp +++ b/Crawler/Ranger.cpp @@ -34,7 +34,7 @@ bool Ranger::AutoAttack(){ vf2d extendedLine=pointTowardsCursor.upoint(1.1); float angleToCursor=atan2(extendedLine.y-GetPos().y,extendedLine.x-GetPos().x); attack_cooldown_timer=ARROW_ATTACK_COOLDOWN; - BULLET_LIST.push_back(std::make_unique(Arrow(GetPos(),extendedLine,vf2d{cos(angleToCursor)*250,float(sin(angleToCursor)*250-PI/8*250)}+movementVelocity,12,GetAttack(),OnUpperLevel(),true))); + BULLET_LIST.push_back(std::make_unique(Arrow(GetPos(),extendedLine,vf2d{cos(angleToCursor)*"Ranger.Auto Attack.ArrowSpd"_F,float(sin(angleToCursor)*"Ranger.Auto Attack.ArrowSpd"_F-PI/8*"Ranger.Auto Attack.ArrowSpd"_F)}+movementVelocity,"Ranger.Auto Attack.Radius"_F/100*12,GetAttack()*"Ranger.Auto Attack.DamageMult"_F,OnUpperLevel(),true))); SetState(State::SHOOT_ARROW); SetAnimationBasedOnTargetingDirection(angleToCursor); return true; diff --git a/Crawler/assets/config/classes/Ranger.txt b/Crawler/assets/config/classes/Ranger.txt index e4fe62f8..796a7985 100644 --- a/Crawler/assets/config/classes/Ranger.txt +++ b/Crawler/assets/config/classes/Ranger.txt @@ -2,6 +2,14 @@ Ranger { ClassName = Ranger + Auto Attack + { + DamageMult = 1 + Radius = 100 + Cooldown = 0.35 + + ArrowSpd = 250 + } Right Click Ability { Name = Retreat