|
|
@ -126,7 +126,11 @@ void Ranger::InitializeClassAbilities(){ |
|
|
|
Ranger::ability2.action= |
|
|
|
Ranger::ability2.action= |
|
|
|
[](Player*p,vf2d pos={}){ |
|
|
|
[](Player*p,vf2d pos={}){ |
|
|
|
vf2d arrowVelocity=util::pointTo(p->GetPos(),p->GetWorldAimingLocation()); |
|
|
|
vf2d arrowVelocity=util::pointTo(p->GetPos(),p->GetWorldAimingLocation()); |
|
|
|
BULLET_LIST.push_back(std::make_unique<ChargedArrow>(p->GetPos(),arrowVelocity*"Ranger.Ability 2.Speed"_F,12*"Ranger.Ability 2.Radius"_F/100,p->GetAttack()*"Ranger.Ability 2.DamageMult"_F,p->OnUpperLevel(),true)); |
|
|
|
|
|
|
|
|
|
|
|
float beamRadius{12*"Ranger.Ability 2.Radius"_F/100}; |
|
|
|
|
|
|
|
if(p->HasEnchant("Charge Beam"))beamRadius*="Charge Beam"_ENC["ATTACK RADIUS INCREASE MULT"]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BULLET_LIST.push_back(std::make_unique<ChargedArrow>(p->GetPos(),arrowVelocity*"Ranger.Ability 2.Speed"_F,beamRadius,p->GetAttack()*"Ranger.Ability 2.DamageMult"_F,p->OnUpperLevel(),true)); |
|
|
|
p->SetState(State::SHOOT_ARROW); |
|
|
|
p->SetState(State::SHOOT_ARROW); |
|
|
|
p->rangerShootAnimationTimer=0.3f; |
|
|
|
p->rangerShootAnimationTimer=0.3f; |
|
|
|
p->SetAnimationBasedOnTargetingDirection("SHOOT",atan2(arrowVelocity.y,arrowVelocity.x)); |
|
|
|
p->SetAnimationBasedOnTargetingDirection("SHOOT",atan2(arrowVelocity.y,arrowVelocity.x)); |
|
|
|