Fixed bosses being able to leave their arenas. (Issue#41) Fix Slime King not actually moving during the Phase 4 retreat jump (division by zero when jump lockon timers were implemented). Release Build 8652.

mac-build
sigonasr2 8 months ago
parent 564ab7434c
commit 62f74bde4e
  1. 4
      Adventures in Lestoria/Monster.cpp
  2. 4
      Adventures in Lestoria/SlimeKing.cpp
  3. 2
      Adventures in Lestoria/Version.h
  4. BIN
      x64/Release/Adventures in Lestoria.exe

@ -165,7 +165,7 @@ bool Monster::_SetX(float x,const bool monsterInvoked){
}
#pragma endregion
#pragma region lambdas
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||!geom2d::overlaps(newPos,collision);};
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||(!isBoss&&!geom2d::overlaps(newPos,collision));};
#pragma endregion
collision.pos+=tilePos;
if(NoEnemyCollisionWithTile()){
@ -204,7 +204,7 @@ bool Monster::_SetY(float y,const bool monsterInvoked){
}
#pragma endregion
#pragma region lambdas
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||!geom2d::overlaps(newPos,collision);};
auto NoEnemyCollisionWithTile=[&](){return (isBoss&&insideArenaBounds)||(!isBoss&&!geom2d::overlaps(newPos,collision));};
#pragma endregion
collision.pos+=tilePos;
if(NoEnemyCollisionWithTile()){

@ -349,10 +349,10 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
}
if(m.I(A::PHASE_REPEAT_COUNT)>=5){
m.I(A::PHASE_REPEAT_COUNT)=0;
float jumpAngle=util::angleTo(m.GetPos(),game->GetCurrentMapData().MapSize*game->GetCurrentMapData().tilewidth/2); //We jump towards the center to keep the player from constantly dealing with a stuck boss.
float jumpAngle=util::angleTo(m.GetPos(),game->GetCurrentMapData().MapSize/2*game->GetCurrentMapData().tilewidth); //We jump towards the center to keep the player from constantly dealing with a stuck boss.
float jumpDistance=ConfigFloat("Phase4.JumpDistance")/100*game->GetCurrentMapData().tilewidth;
float jumpSpd=jumpDistance/ConfigFloat("Phase4.JumpDuration");
float lockedInTargetTime=jumpDistance/ConfigFloat("Phase4.JumpLockinTargetTime");
float lockedInTargetTime=ConfigFloat("Phase4.JumpLockinTargetTime");
StartJump(ConfigFloat("Phase4.JumpDuration"),m.GetPos()+vf2d{cos(jumpAngle)*jumpDistance,sin(jumpAngle)*jumpDistance},0,jumpSpd,lockedInTargetTime);
}else
if(m.I(A::PATTERN_REPEAT_COUNT)<5&&m.F(A::SHOOT_TIMER)==0){

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_PATCH 0
#define VERSION_BUILD 8647
#define VERSION_BUILD 8652
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save