Skip to content

Commit

Permalink
fix portals in front of boss floors
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Oct 12, 2023
1 parent cb0325e commit 938f4f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sources/generateFloor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 +630,15 @@ namespace

f.tile(4, h / 2) = TileEnum::Spawn;
f.tile(6, h / 2) = TileEnum::Stairs;
if (isLevelBoss(maxLevel))
{
const sint32 x = 5 + levelToBossIndex(maxLevel) * 2;
f.tile(x, 3) = TileEnum::Waypoint;
f.extra(x, 3).push_back(Waypoint{ maxLevel - 1 });
}
for (uint32 i = 1; i < portals + 1; i++)
{
const sint32 x = 6 + i * 2;
f.tile(x - 1, h / 2) = TileEnum::Waypoint;
f.extra(x - 1, h / 2).push_back(Waypoint{ bossIndexToLevel(i) - 1 });
f.tile(x, h / 2) = TileEnum::Waypoint;
f.extra(x, h / 2).push_back(Waypoint{ bossIndexToLevel(i) + 1 });
f.tile(x, 2) = TileEnum::Decoration;
Expand Down

0 comments on commit 938f4f9

Please sign in to comment.