]> granicus.if.org Git - nethack/commitdiff
Knight quest home level has some saddled warhorses
authorPasi Kallinen <paxed@alt.org>
Sat, 19 Feb 2022 09:51:06 +0000 (11:51 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 19 Feb 2022 09:51:10 +0000 (11:51 +0200)
Also, when creating a saddle in a monster inventory in special
level lua code, automatically saddle the monster, if possible.

dat/Kni-strt.lua
doc/fixes3-7-0.txt
src/sp_lev.c

index d7f9284c5606d380de376b9da1d75212d75b96f6..00783106a3a48ff2e98f504b2d304599dd6d8f30 100644 (file)
@@ -103,3 +103,7 @@ des.monster({ id = "quasit", x=32, y=00, peaceful=0 })
 des.monster({ id = "quasit", x=34, y=00, peaceful=0 })
 des.monster({ id = "quasit", x=36, y=00, peaceful=0 })
 
+-- Some warhorses
+for i = 1, 2 + nh.rn2(3) do
+    des.monster({ id = "warhorse", peaceful = 1, inventory = function() if percent(50) then des.object("saddle"); end end });
+end
\ No newline at end of file
index f1643e64e02c81511aa54f88699b114d2cdc0bb7..0cdfcf83763796d8559e60394a7fcc4653738901 100644 (file)
@@ -787,6 +787,7 @@ martial arts users, sasquatches, and heroes wearing kicking boots can
 knights get no caitiff penalty against undead
 candy bars are bright blue in text mode
 towels weigh more than blindfolds
+knight quest home level contains some saddled warhorses
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index f2ee11783dc4a0f80ba63b7c1004d36fc62b7287..cde1642950d99e118cc82c977efc5a33e2acea48 100644 (file)
@@ -2198,7 +2198,10 @@ create_object(object* o, struct mkroom* croom)
                 ; /* ['otmp' remains on floor] */
             } else {
                 remove_object(otmp);
-                (void) mpickobj(invent_carrying_monster, otmp);
+                if (otmp->otyp == SADDLE)
+                    put_saddle_on_mon(otmp, invent_carrying_monster);
+                else
+                    (void) mpickobj(invent_carrying_monster, otmp);
             }
         } else {
             struct obj *cobj = container_obj[container_idx - 1];