]> granicus.if.org Git - nethack/commitdiff
Put throne room gold in the chest
authorPasi Kallinen <paxed@alt.org>
Sat, 15 Oct 2016 07:26:20 +0000 (10:26 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 15 Oct 2016 07:26:20 +0000 (10:26 +0300)
doc/fixes36.1
src/mkroom.c

index 282b8bdd3f60b506d968f444840e16d18248ce32..9878cf7163a1c3f26135fa3694ccbdf988de4a9f 100644 (file)
@@ -350,6 +350,7 @@ kicking activates statue traps
 pets start with apport equal to your charisma
 sometimes generate the random mazes with wide corridors, thick walls,
        or with dead ends changed to loops
+put throne room gold in the chest
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index 49b84f3e1e1e2fc6ae194c3ff28846d7a1dd56e5..c76531b52d403f6cc9983bd4d28bad4cbfe882f4 100644 (file)
@@ -380,12 +380,16 @@ struct mkroom *sroom;
         }
     switch (type) {
     case COURT: {
-        struct obj *chest;
+        struct obj *chest, *gold;
         levl[tx][ty].typ = THRONE;
         (void) somexy(sroom, &mm);
-        (void) mkgold((long) rn1(50 * level_difficulty(), 10), mm.x, mm.y);
+        gold = mksobj(GOLD_PIECE, TRUE, FALSE);
+        gold->quan = (long) rn1(50 * level_difficulty(), 10);
+        gold->owt = weight(gold);
         /* the royal coffers */
         chest = mksobj_at(CHEST, mm.x, mm.y, TRUE, FALSE);
+        add_to_container(chest, gold);
+        chest->owt = weight(chest);
         chest->spe = 2; /* so it can be found later */
         level.flags.has_court = 1;
         break;