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