Knockback away from bear’s position makes more sense.

pull/35/head
sigonasr2 12 months ago
parent 1d5a936c20
commit e45a2dc7da
  1. 4
      Adventures in Lestoria/Bear.cpp
  2. 2
      Adventures in Lestoria/Version.h
  3. BIN
      x64/Release/Adventures in Lestoria.exe

@ -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"));
}
}

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 6393
#define VERSION_BUILD 6394
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save