diff options
author | ontoclasm <yokomeshi@gmail.com> | 2014-06-02 16:52:29 -0500 |
---|---|---|
committer | ontoclasm <yokomeshi@gmail.com> | 2014-06-02 17:15:12 -0500 |
commit | 5bf09a84563aa8b8113281822e91bdefbd4a3492 (patch) | |
tree | 9e92cd7bfe3d704e3cf234de3a68e31f726d4b02 /crawl-ref/source/tilepick.cc | |
parent | 2f773b7a4e0edd21cf6f08dd0a504180ef1eaf02 (diff) | |
download | crawl-ref-5bf09a84563aa8b8113281822e91bdefbd4a3492.tar.gz crawl-ref-5bf09a84563aa8b8113281822e91bdefbd4a3492.zip |
Helmet tiles (roctavian, 8519)
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r-- | crawl-ref/source/tilepick.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 2a3666b875..305c13c7c5 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -3256,7 +3256,7 @@ static tileidx_t _tileidx_armour_base(const item_def &item) #endif case ARM_HELMET: - return _modrng(item.rnd, TILE_THELM_FIRST, TILE_THELM_LAST); + return TILE_THELM_HELM; case ARM_GLOVES: return TILE_ARM_GLOVES; @@ -5607,6 +5607,25 @@ tileidx_t tileidx_enchant_equ(const item_def &item, tileidx_t tile, bool player) }; const int etype = enchant_to_int(item); + + if (tile == TILE_THELM_HELM) + { + switch (etype) + { + case 1: + case 2: + case 3: + tile = _modrng(item.rnd, TILE_THELM_EGO_FIRST, TILE_THELM_EGO_LAST); + break; + case 4: + tile = _modrng(item.rnd, TILE_THELM_ART_FIRST, TILE_THELM_ART_LAST); + break; + default: + tile = _modrng(item.rnd, TILE_THELM_FIRST, TILE_THELM_LAST); + } + return tile; + } + int idx; if (player) idx = tile_player_count(tile) - 1; |