Skip to content

Commit

Permalink
fix unidentified
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Oct 10, 2023
1 parent a2b07bb commit 8df5ed1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions sources/generateFloor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ namespace
}

// the vandal
if (f.level > 10 && randomChance() < 0.05)
if (f.level > 40 && randomChance() < 0.05)
{
const Vec2i p = findAny(f, TileEnum::Empty);
f.tile(p) = TileEnum::Monster;
Expand All @@ -1418,7 +1418,7 @@ namespace
}

// the nuclear bomb
if (f.level > 50 && randomChance() < 0.05)
if (f.level > 60 && randomChance() < 0.05)
{
const Vec2i p = findAny(f, TileEnum::Empty);
f.tile(p) = TileEnum::Monster;
Expand Down Expand Up @@ -1454,7 +1454,7 @@ namespace
}

// templars
if (f.level > 70 && randomChance() < 0.05)
if (f.level > 60 && randomChance() < 0.05)
{
const Vec2i spawn = findAny(f, TileEnum::Spawn);
const uint32 cnt = randomRange(3u, 7u);
Expand Down
3 changes: 1 addition & 2 deletions sources/generateItems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,8 +875,7 @@ Item itemShop(uint32 maxLevel)
CAGE_ASSERT(gen.power > 0);
bool unidentified = false;
Real costMult = 1;
const Real uniChance = clamp((Real(maxLevel) - 50) * 0.01, 0, 0.5);
if (gen.power > 10 && randomChance() < uniChance)
if (gen.power > 60 && randomChance() < 0.2)
{
unidentified = true;
costMult = pow(randomChance() + 0.9, 5);
Expand Down

0 comments on commit 8df5ed1

Please sign in to comment.