|
|
|
@ -44,6 +44,7 @@ All rights reserved. |
|
|
|
|
#include "BulletTypes.h" |
|
|
|
|
#include "config.h" |
|
|
|
|
#include "util.h" |
|
|
|
|
#include "SoundEffect.h" |
|
|
|
|
|
|
|
|
|
INCLUDE_MONSTER_LIST |
|
|
|
|
INCLUDE_BULLET_LIST |
|
|
|
@ -105,6 +106,7 @@ bool Wizard::AutoAttack(){ |
|
|
|
|
attack_cooldown_timer=MAGIC_ATTACK_COOLDOWN-GetAttackRecoveryRateReduction(); |
|
|
|
|
float angleToCursor=atan2(game->GetWorldMousePos().y-GetPos().y,game->GetWorldMousePos().x-GetPos().x); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<EnergyBolt>(EnergyBolt(GetPos(),{cos(angleToCursor)*"Wizard.Auto Attack.Speed"_F,sin(angleToCursor)*"Wizard.Auto Attack.Speed"_F},"Wizard.Auto Attack.Radius"_F/100*12,int(GetAttack()*"Wizard.Auto Attack.DamageMult"_F),upperLevel,true,WHITE))); |
|
|
|
|
SoundEffect::PlaySFX("Wizard Auto Attack",SoundEffect::CENTERED); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
void Wizard::InitializeClassAbilities(){ |
|
|
|
@ -129,6 +131,7 @@ void Wizard::InitializeClassAbilities(){ |
|
|
|
|
for(int i=0;i<"Wizard.Right Click Ability.ParticleCount"_I;i++){ |
|
|
|
|
game->AddEffect(std::make_unique<Effect>(p->GetPos()+vf2d{(util::random("Wizard.Right Click Ability.ParticleRange"_F/100*2)-"Wizard.Right Click Ability.ParticleRange"_F/100)*12,(util::random("Wizard.Right Click Ability.ParticleRange"_F/100*2)-"Wizard.Right Click Ability.ParticleRange"_F/100)*12},util::random("Wizard.Right Click Ability.ParticleLifetimeMax"_F)+"Wizard.Right Click Ability.ParticleLifetimeMin"_F,"circle.png",p->upperLevel,"Wizard.Right Click Ability.ParticleSize"_F,"Wizard.Right Click Ability.ParticleFadetime"_F,vf2d{util::random("Wizard.Right Click Ability.ParticleSpeedMax"_F*2)+"Wizard.Right Click Ability.ParticleSpeedMin"_F,util::random("Wizard.Right Click Ability.ParticleSpeedMax"_F*2)+"Wizard.Right Click Ability.ParticleSpeedMin"_F},"Wizard.Right Click Ability.ParticleColor"_Pixel)); |
|
|
|
|
} |
|
|
|
|
SoundEffect::PlaySFX("Wizard Teleport",SoundEffect::CENTERED); |
|
|
|
|
return true; |
|
|
|
|
} else { |
|
|
|
|
p->notificationDisplay={"Cannot Teleport to that location!",0.5}; |
|
|
|
@ -141,6 +144,7 @@ void Wizard::InitializeClassAbilities(){ |
|
|
|
|
[](Player*p,vf2d pos={}){ |
|
|
|
|
float angleToCursor=atan2(game->GetWorldMousePos().y-p->GetPos().y,game->GetWorldMousePos().x-p->GetPos().x); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<FireBolt>(FireBolt(p->GetPos(),{cos(angleToCursor)*"Wizard.Ability 1.BulletSpeed"_F,sin(angleToCursor)*"Wizard.Ability 1.BulletSpeed"_F},"Wizard.Ability 1.Radius"_F/100*12,int(p->GetAttack()*"Wizard.Ability 1.InitialDamageMult"_F),p->upperLevel,true,"Wizard.Ability 1.BulletColor"_Pixel))); |
|
|
|
|
SoundEffect::PlaySFX("Wizard Fire Bolt Shoot",SoundEffect::CENTERED); |
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
|
#pragma endregion |
|
|
|
@ -149,6 +153,7 @@ void Wizard::InitializeClassAbilities(){ |
|
|
|
|
[](Player*p,vf2d pos={}){ |
|
|
|
|
float angleToCursor=atan2(game->GetWorldMousePos().y-p->GetPos().y,game->GetWorldMousePos().x-p->GetPos().x); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<LightningBolt>(LightningBolt(p->GetPos(),{cos(angleToCursor)*"Wizard.Ability 2.BulletSpeed"_F,sin(angleToCursor)*"Wizard.Ability 2.BulletSpeed"_F},"Wizard.Ability 2.Radius"_F/100*12,int(p->GetAttack()*"Wizard.Ability 2.DamageMult"_F),p->upperLevel,true,"Wizard.Ability 2.BulletColor"_Pixel))); |
|
|
|
|
SoundEffect::PlaySFX("Wizard Lightning Bolt Shoot",SoundEffect::CENTERED); |
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
|
#pragma endregion |
|
|
|
|