diff --git a/src/nhlobj.c b/src/nhlobj.c index 54cfa7a18..eed6c1b77 100644 --- a/src/nhlobj.c +++ b/src/nhlobj.c @@ -140,6 +140,13 @@ lua_State *L; nhl_add_table_entry_int(L, "owt", obj->owt); nhl_add_table_entry_int(L, "quan", obj->quan); nhl_add_table_entry_int(L, "spe", obj->spe); + + if (obj->otyp == STATUE) { + nhl_add_table_entry_int(L, "historic", (obj->spe & STATUE_HISTORIC)); + nhl_add_table_entry_int(L, "statue_male", (obj->spe & STATUE_MALE)); + nhl_add_table_entry_int(L, "statue_female", (obj->spe & STATUE_FEMALE)); + } + nhl_add_table_entry_char(L, "oclass", def_oc_syms[(uchar) obj->oclass].sym); nhl_add_table_entry_char(L, "invlet", obj->invlet); diff --git a/test/testwish.lua b/test/testwish.lua index eb7d40b2a..b63bb760b 100644 --- a/test/testwish.lua +++ b/test/testwish.lua @@ -3,15 +3,22 @@ local wishtest_objects = { ["a rock"] = { otyp_name = "rock", quan = 1, oclass = "*" }, ["5 +3 blessed silver daggers"] = { otyp_name = "silver dagger", blessed = 1, cursed = 0, spe = 3, quan = 5 }, ["an empty locked large box"] = { otyp_name = "large box", is_container = 1, has_contents = 0, olocked = 1 }, + ["an empty trapped unlocked chest"] = { otyp_name = "chest", is_container = 1, has_contents = 0, olocked = 0, otrapped = 1 }, + ["an empty untrapped locked chest"] = { otyp_name = "chest", is_container = 1, has_contents = 0, olocked = 1, otrapped = 0 }, + ["an empty locked broken chest"] = { otyp_name = "chest", is_container = 1, has_contents = 0, olocked = 0, obroken = 1 }, + ["broken empty chest"] = { otyp_name = "chest", obroken = 1 }, ["potion of holy water"] = { otyp_name = "water", oclass = "!", blessed = 1, cursed = 0 }, ["potion of unholy water"] = { otyp_name = "water", oclass = "!", blessed = 0, cursed = 1 }, ["cursed greased +2 grey dragon scale mail"] = { otyp_name = "gray dragon scale mail", oclass = "[", blessed = 0, cursed = 1, spe = 2, greased = 1 }, ["uncursed magic marker (11)"] = { otyp_name = "magic marker", blessed = 0, cursed = 0, spe = 11 }, ["lit oil lamp"] = { otyp_name = "oil lamp", lamplit = 1 }, + ["6 burning tallow candles"] = { otyp_name = "tallow candle", lamplit = 1, quan = 6 }, ["unlit oil lamp"] = { otyp_name = "oil lamp", lamplit = 0 }, + ["7 extinguished wax candles"] = { otyp_name = "wax candle", lamplit = 0, quan = 7 }, ["2 blank scrolls"] = { otyp_name = "blank paper", quan = 2 }, + ["3 unlabeled scrolls"] = { otyp_name = "blank paper", quan = 3 }, + ["1 unlabelled scroll"] = { otyp_name = "blank paper", quan = 1 }, ["3 rusty poisoned darts"] = { otyp_name = "dart", quan = 3, opoisoned = 1, oeroded = 1 }, - ["broken empty chest"] = { otyp_name = "chest", obroken = 1 }, ["4 diluted dark green potions named whisky"] = { otyp_descr = "dark green", oclass = "!", quan = 4, odiluted = 1, has_oname = 1, oname = "whisky" }, ["poisoned food ration"] = { otyp_name = "food ration", oclass = "%", age = 1 }, ["empty tin"] = { otyp_name = "tin", oclass = "%", corpsenm = -1, spe = 0 }, @@ -33,6 +40,8 @@ local wishtest_objects = { ["bear trap"] = { otyp_name = "beartrap", oclass = "(" }, ["landmine"] = { otyp_name = "land mine", oclass = "(" }, ["land mine"] = { otyp_name = "land mine", oclass = "(" }, + ["blessed historic statue of woodland-elf named Foo"] = { otyp_name = "statue", blessed = 1, historic = 1, corpsenm_name = "Woodland-elf", oname = "Foo" }, + ["blessed figurine of a ki-rin"] = { otyp_name = "figurine", blessed = 1, corpsenm_name = "ki-rin" }, -- ["partly eaten orange"] = { otyp_descr = "orange", oclass = "%", oeaten = ... }, };