From 121d79ab6b28ba73c1b79fb6a2d0b0f8937dbc70 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 10 Aug 2022 18:18:15 +0300 Subject: [PATCH] Random item artifact chances The chance that randomly generated item is an artifact will now depend on the number of already existing artifacts. --- doc/fixes3-7-0.txt | 1 + src/mkobj.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index e5ebf68d8..0792fcd2b 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/mkobj.c b/src/mkobj.c index 8c1edbfc3..7d81c9554 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -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