|
|
|
@ -88,14 +88,14 @@ void Monster::STRATEGY::BEAR(Monster&m,float fElapsedTime,std::string strategy){ |
|
|
|
|
if(geom2d::overlaps(attackCircle,game->GetPlayer()->Hitbox())){ |
|
|
|
|
if(game->GetPlayer()->Hurt(m.GetAttack(),m.OnUpperLevel(),0.f)){ |
|
|
|
|
game->GetPlayer()->Knockup(ConfigFloat("Attack Knockup Duration")); |
|
|
|
|
vf2d playerDirVecNorm=geom2d::line<float>(m.V(A::LOCKON_POS),game->GetPlayer()->GetPos()).vector().norm(); |
|
|
|
|
vf2d playerDirVecNorm=geom2d::line<float>(m.GetPos(),game->GetPlayer()->GetPos()).vector().norm(); |
|
|
|
|
game->GetPlayer()->Knockback(playerDirVecNorm*ConfigFloat("Attack Knockback Amount")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for(Monster&otherM:MONSTER_LIST){ |
|
|
|
|
if(!otherM.AttackAvoided(m.GetZ())&&&m!=&otherM&&geom2d::overlaps(attackCircle,otherM.Hitbox())){ |
|
|
|
|
otherM.Knockup(ConfigFloat("Attack Knockup Duration")); |
|
|
|
|
vf2d monsterDirVecNorm=geom2d::line<float>(m.V(A::LOCKON_POS),otherM.GetPos()).vector().norm(); |
|
|
|
|
vf2d monsterDirVecNorm=geom2d::line<float>(m.GetPos(),otherM.GetPos()).vector().norm(); |
|
|
|
|
game->GetPlayer()->Knockback(monsterDirVecNorm*ConfigFloat("Attack Knockback Amount")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|