diff options
author | ontoclasm <yokomeshi@gmail.com> | 2014-08-02 11:59:51 +0100 |
---|---|---|
committer | ontoclasm <yokomeshi@gmail.com> | 2014-08-02 12:00:34 +0100 |
commit | d143ad9ffa5bdad082cdef6a04f178aff11c920a (patch) | |
tree | 9caf2a37996f929183455e586fe10a8adbf62479 /crawl-ref/source/tilepick.cc | |
parent | 65b51e361dd4766a477fba1e62bd380e5f772e67 (diff) | |
download | crawl-ref-d143ad9ffa5bdad082cdef6a04f178aff11c920a.tar.gz crawl-ref-d143ad9ffa5bdad082cdef6a04f178aff11c920a.zip |
Robes (roctavian, 8847)
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r-- | crawl-ref/source/tilepick.cc | 20 |
1 files changed, 20 insertions, 0 deletions
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; |