|
|
|
@ -71,7 +71,7 @@ void Warrior::InitializeClassAbilities(){ |
|
|
|
|
if(p->GetState()==State::NORMAL){ |
|
|
|
|
rightClickAbility.cooldown=rightClickAbility.COOLDOWN_TIME; |
|
|
|
|
p->SetState(State::BLOCK); |
|
|
|
|
p->AddBuff(BuffType::SLOWDOWN,3,0.3); |
|
|
|
|
p->AddBuff(BuffType::SLOWDOWN,"Warrior.Right Click Ability.Duration"_F,"Warrior.Right Click Ability.SlowAmt"_F); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
@ -80,12 +80,12 @@ void Warrior::InitializeClassAbilities(){ |
|
|
|
|
#pragma region Warrior Ability 1 (Battlecry) |
|
|
|
|
Warrior::ability1.action= |
|
|
|
|
[](Player*p,vf2d pos={}){ |
|
|
|
|
game->AddEffect(std::make_unique<Effect>(p->GetPos(),0.1,AnimationState::BATTLECRY_EFFECT,p->upperLevel,1,0.3)); |
|
|
|
|
p->AddBuff(BuffType::ATTACK_UP,10,0.1); |
|
|
|
|
p->AddBuff(BuffType::DAMAGE_REDUCTION,10,0.1); |
|
|
|
|
game->AddEffect(std::make_unique<Effect>(p->GetPos(),"Warrior.Ability 1.EffectLifetime"_F,AnimationState::BATTLECRY_EFFECT,p->upperLevel,"Warrior.Ability 1.Range"_F/350,"Warrior.Ability 1.EffectFadetime"_F)); |
|
|
|
|
p->AddBuff(BuffType::ATTACK_UP,"Warrior.Ability 1.AttackUpDuration"_F,"Warrior.Ability 1.AttackIncrease"_F); |
|
|
|
|
p->AddBuff(BuffType::DAMAGE_REDUCTION,"Warrior.Ability 1.DamageReductionDuration"_F,"Warrior.Ability 1.DamageReduction"_F); |
|
|
|
|
for(Monster&m:MONSTER_LIST){ |
|
|
|
|
if(m.GetSizeMult()<=1&&geom2d::overlaps(geom2d::circle<float>(p->GetPos(),12*3.5),geom2d::circle<float>(m.GetPos(),m.GetSizeMult()*12))){ |
|
|
|
|
m.AddBuff(BuffType::SLOWDOWN,5,0.3); |
|
|
|
|
if(m.GetSizeMult()>="Warrior.Ability 1.AffectedSizeMin"_F&&m.GetSizeMult()<="Warrior.Ability 1.AffectedSizeMax"_F&&geom2d::overlaps(geom2d::circle<float>(p->GetPos(),12*"Warrior.Ability 1.Range"_I/100.f),geom2d::circle<float>(m.GetPos(),m.GetSizeMult()*12))){ |
|
|
|
|
m.AddBuff(BuffType::SLOWDOWN,"Warrior.Ability 1.SlowdownDuration"_F,"Warrior.Ability 1.SlowdownAmt"_F); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|