Skip to content

Commit

Permalink
Using wishes has long term consequences...
Browse files Browse the repository at this point in the history
This is a twist on EvilHack's monster generation, but instead of basing the generation on game landmarks - it's based on the number of wishes the player has made.

1 wish = 2x the rate.
2 wishes = 4x the rate, then 6x, and so on until it's capped at 10x.

The overall difficulty of new monsters is also increased for each wish. I hope this offers a challenge while letting players have the freedom to choose their fates. If they choose wishless, the endgame should be a decent bit easier (potentially eliminating the need for some wishes), but the player might also want to wish up a furious late game challenge on purpose, who knows!
  • Loading branch information
elunna committed Sep 26, 2023
1 parent 1f8ec89 commit 8af72f3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/dungeon.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ typedef struct mapseen {

enum monster_generation {
MIN_MONGEN_RATE = 80,
MAX_MONGEN_RATE = 10
MAX_MONGEN_RATE = 5
};

#endif /* DUNGEON_H */
25 changes: 15 additions & 10 deletions src/allmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ boolean resuming;
* Vanilla generates a critter every 70-ish turns.
* The rate accelerates to every 50 or so below the Castle,
* and 'round every 25 turns once you've done the Invocation.
*
*
* (From EvilHack)
* We will push it even further. Monsters post-Invocation
* will almost always appear on the stairs (if present), and
* much more frequently; this, along with the extra intervene()
Expand All @@ -286,6 +287,11 @@ boolean resuming;
* The rate increases linearly with turns. The rule of thumb is that
* at turn x the rate is approximately (x / 30.0000) times the normal
* rate. Maximal rate is 8x the normal rate.
* -------------------------------------------------------------------
* In Hack'EM - we are going to put Yet Another Twist on monster generation
* and use it to "punish" wishes. For every wish the player makes, the
* rate will increase! This lets the player have their wishes at the cost
* of a harder game later.
*/
monclock = MIN_MONGEN_RATE;
/* performing the invocation gets the entire dungeon riled up */
Expand All @@ -295,19 +301,18 @@ boolean resuming;
past_clock = moves - timeout_start;
if (past_clock > 0)
monclock = MIN_MONGEN_RATE * 30000 / (past_clock + 30000);
if (monclock > MIN_MONGEN_RATE / 2 && (depth(&u.uz) > depth(&stronghold_level)
|| u.uevent.uhand_of_elbereth
|| ((quest_status.got_quest || quest_status.got_thanks)
&& u.ulevel < 14)))
if (monclock > MIN_MONGEN_RATE / 2 && (u.uconduct.wishes >= 1L))
monclock = MIN_MONGEN_RATE / 2;
if (monclock > MIN_MONGEN_RATE / 3 && depth(&u.uz) > depth(&hella_level))
monclock = MIN_MONGEN_RATE / 3;
if (monclock > MIN_MONGEN_RATE / 4 && depth(&u.uz) > depth(&wiz1_level))
if (monclock > MIN_MONGEN_RATE / 4 && (u.uconduct.wishes >= 2L))
monclock = MIN_MONGEN_RATE / 4;
if (monclock > MIN_MONGEN_RATE / 6 && u.uevent.udemigod)
if (monclock > MIN_MONGEN_RATE / 6 && (u.uconduct.wishes >= 3L))
monclock = MIN_MONGEN_RATE / 6;
if (monclock > MIN_MONGEN_RATE / 8 && (u.uconduct.wishes >= 4L))
monclock = MIN_MONGEN_RATE / 8;
if (monclock > MIN_MONGEN_RATE / 10 && (u.uconduct.wishes >= 5L))
monclock = MIN_MONGEN_RATE / 10;
}
/* make sure we don't fall off the bottom */
/* make sure we don't fall off the bottom */
if (monclock < MAX_MONGEN_RATE)
monclock = MAX_MONGEN_RATE;
if (monclock > MIN_MONGEN_RATE)
Expand Down
2 changes: 2 additions & 0 deletions src/dungeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,8 @@ level_difficulty()
if (uamul && uamul->otyp == AMULET_OF_DANGER) {
res += 15;
}
/* Wishes increase difficulty */
res += (int) u.uconduct.wishes * 5;
return (xchar) res;
}

Expand Down

0 comments on commit 8af72f3

Please sign in to comment.