]> granicus.if.org Git - nethack/commitdiff
Horses have a tiny chance of being generated with a saddle
authorPasi Kallinen <paxed@alt.org>
Mon, 19 Sep 2016 12:44:04 +0000 (15:44 +0300)
committerPasi Kallinen <paxed@alt.org>
Mon, 19 Sep 2016 12:44:07 +0000 (15:44 +0300)
Saddles are rare. Make them less so by giving domestic saddleable
creatures 1% chance of being generated with a saddle.

src/makemon.c

index b38f64fa49209e654702e7743f3611f16dc608e4..a058cb16c0b6513941f53ca73e0ba87a38ee3698 100644 (file)
@@ -1302,6 +1302,13 @@ int mmflags;
             m_initweap(mtmp); /* equip with weapons / armor */
         m_initinv(mtmp); /* add on a few special items incl. more armor */
         m_dowear(mtmp, TRUE);
+
+        if (!rn2(100) && is_domestic(ptr)
+            && can_saddle(mtmp) && !which_armor(mtmp, W_SADDLE)) {
+            struct obj *otmp = mksobj(SADDLE, TRUE, FALSE);
+            put_saddle_on_mon(otmp, mtmp);
+        }
+
     } else {
         /* no initial inventory is allowed */
         if (mtmp->minvent)