From d143ad9ffa5bdad082cdef6a04f178aff11c920a Mon Sep 17 00:00:00 2001 From: ontoclasm Date: Sat, 2 Aug 2014 11:59:51 +0100 Subject: Robes (roctavian, 8847) --- crawl-ref/source/tilepick.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'crawl-ref/source/tilepick.cc') diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 81261dc0ae..d71f552989 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -5616,6 +5616,8 @@ tileidx_t tileidx_enchant_equ(const item_def &item, tileidx_t tile, bool player) const int etype = enchant_to_int(item); + // XXX: only helmets and robes have variants, but it would be nice + // if this weren't hardcoded. if (tile == TILE_THELM_HELM) { switch (etype) @@ -5634,6 +5636,24 @@ tileidx_t tileidx_enchant_equ(const item_def &item, tileidx_t tile, bool player) return tile; } + if (tile == TILE_ARM_ROBE) + { + switch (etype) + { + case 1: + case 2: + case 3: + tile = _modrng(item.rnd, TILE_ARM_ROBE_EGO_FIRST, TILE_ARM_ROBE_EGO_LAST); + break; + case 4: + tile = _modrng(item.rnd, TILE_ARM_ROBE_ART_FIRST, TILE_ARM_ROBE_ART_LAST); + break; + default: + tile = _modrng(item.rnd, TILE_ARM_ROBE_FIRST, TILE_ARM_ROBE_LAST); + } + return tile; + } + int idx; if (player) idx = tile_player_count(tile) - 1; -- cgit v1.2.3-54-g00ecf