]> granicus.if.org Git - nethack/commitdiff
Random item artifact chances
authorPasi Kallinen <paxed@alt.org>
Wed, 10 Aug 2022 15:18:15 +0000 (18:18 +0300)
committerPasi Kallinen <paxed@alt.org>
Wed, 10 Aug 2022 15:18:18 +0000 (18:18 +0300)
The chance that randomly generated item is an artifact will
now depend on the number of already existing artifacts.

doc/fixes3-7-0.txt
src/mkobj.c

index e5ebf68d8774923fbf2c3c037ecdbb86289ec034..0792fcd2b40c34f88c6adc023a0a03915badc0c1 100644 (file)
@@ -992,6 +992,7 @@ make healing and extra healing better by upping the average amount healed
 lifesaving healing amount depends on the consitution
 hitting a monster with a wielded potion hits you far less
 pyrolisks get a mundane bite attack
+chances of random item being an artifact depends on already existing artifacts
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 8c1edbfc389755370bd95bc3fcd2bb10b4bc7717..7d81c955471d6677c7c9e6718921ff2d8d7508e7 100644 (file)
@@ -817,7 +817,7 @@ mksobj(int otyp, boolean init, boolean artif)
             if (is_poisonable(otmp) && !rn2(100))
                 otmp->opoisoned = 1;
 
-            if (artif && !rn2(20))
+            if (artif && !rn2(20 + (10 * nartifact_exist())))
                 otmp = mk_artifact(otmp, (aligntyp) A_NONE);
             break;
         case FOOD_CLASS:
@@ -1020,7 +1020,7 @@ mksobj(int otyp, boolean init, boolean artif)
                 otmp->spe = rne(3);
             } else
                 blessorcurse(otmp, 10);
-            if (artif && !rn2(40))
+            if (artif && !rn2(40 + (10 * nartifact_exist())))
                 otmp = mk_artifact(otmp, (aligntyp) A_NONE);
             /* simulate lacquered armor for samurai */
             if (Role_if(PM_SAMURAI) && otmp->otyp == SPLINT_MAIL