From: <gi...@cr...> - 2025-07-12 19:10:16
|
via f73b0916658deaebf1451429dcd3b8738b14a52b (commit) from 77f475f057e2bdce60da2e5ab67d4e6d87d1693f (commit) ----------------------------------------------------------------------- commit f73b0916658deaebf1451429dcd3b8738b14a52b Author: DracoOmega <dra...@gm...> Date: Sat Jul 12 16:37:27 2025 -0230 Don't generate buggy mundane unrands (BlackTorch) The 'mundane' itemspec tag causes an item to lose its plusses and ego *after* it goes through the normal generation process. But nothing (apparently) stopped the item from generating as an artefact before having its plusses/ego squashed. For randarts, this just resulted in a +0 randart with the rest of its properties intact (even its ego, since randarts don't store it in the same field as non-artefacts!). But unrands repurpose the brand field as their unrand ID, meaning that having its 'ego' set to 0 turned the item into 'DUMMY UNRANDART 1' (which would eventually assert since it doesn't have a colour defined...) Now 'mundane' necessarily also forbids the itemspec from generating an artefact, which should fix these problems. ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/mapdef.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index a0aa5c3216..94e6be92a0 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -5299,6 +5299,7 @@ bool item_list::parse_single_spec(item_spec& result, string s) { result.level = ISPEC_MUNDANE; result.ego = -1; + result.allow_uniques = 0; } if (strip_tag(s, "damaged")) result.level = ISPEC_DAMAGED; -- Dungeon Crawl Stone Soup |