Start implemnting ranger config

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
pull/28/head
Nic0Nic0Nii 1 year ago
parent d38422b9da
commit ac1896b671
  1. 2
      Crawler/Ranger.cpp
  2. 8
      Crawler/assets/config/classes/Ranger.txt

@ -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>(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>(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;

@ -2,6 +2,14 @@ Ranger
{
ClassName = Ranger
Auto Attack
{
DamageMult = 1
Radius = 100
Cooldown = 0.35
ArrowSpd = 250
}
Right Click Ability
{
Name = Retreat

Loading…
Cancel
Save