]> granicus.if.org Git - nethack/commitdiff
Flint and hard gems break less often when thrown
authorPasi Kallinen <paxed@alt.org>
Tue, 22 Feb 2022 08:01:17 +0000 (10:01 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 22 Feb 2022 08:01:17 +0000 (10:01 +0200)
doc/fixes3-7-0.txt
src/dothrow.c

index 3b980b3df9f7b85051a935ba033130b954a59f7a..9f0f2d3bbef3ecacd9b7f59713ecc6ecf79d293e 100644 (file)
@@ -803,6 +803,7 @@ illiterate hero receiving a spellbook from their deity gets the spell shoved
 adjust levels of sleep, confuse monster, and charm monster spells
 replace monk starting sleep spell with confuse monster
 chargeable rings have a chance of getting charged when hit with electricity
+flint and hard gems break less often when thrown
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index b674eae3712903b8aa0416788e2cdaf1b97af3fa..c61a07e08031d835a681809e0d2643fe053a4760 100644 (file)
@@ -1923,6 +1923,11 @@ thitmonst(
                 if (obj->blessed && !rnl(4))
                     broken = 0;
 
+                /* Flint and hard gems don't break easily */
+                if (((obj->oclass == GEM_CLASS && objects[otyp].oc_tough)
+                     || obj->otyp == FLINT) && !rn2(2))
+                    broken = 0;
+
                 if (broken) {
                     if (*u.ushops || obj->unpaid)
                         check_shop_obj(obj, g.bhitpos.x, g.bhitpos.y, TRUE);