diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-03 14:10:59 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-03 14:10:59 +0000 |
commit | 09fa4ab8c049f2f8eefa0329a0b30abcdc9ce695 (patch) | |
tree | 578b3135454b22d2542b15fd8d973d537796ee7c /crawl-ref/source/dungeon.cc | |
parent | f5b7f9f83ba80c0e512b886fca3821290a949f79 (diff) | |
download | crawl-ref-09fa4ab8c049f2f8eefa0329a0b30abcdc9ce695.tar.gz crawl-ref-09fa4ab8c049f2f8eefa0329a0b30abcdc9ce695.zip |
Implemented 1604345: colour-code weapons and ammo based on their skill.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@544 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 64524d98b5..2a44f2996b 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -5954,38 +5954,38 @@ void item_colour( item_def &item ) } if (is_demonic( item )) - item.colour = random_colour(); + item.colour = random_uncommon_colour(); else if (is_range_weapon( item )) - item.colour = BROWN; + item.colour = WHITE; else { - switch (item.sub_type) + switch (weapon_skill(item)) { - case WPN_CLUB: - case WPN_GIANT_CLUB: - case WPN_GIANT_SPIKED_CLUB: - case WPN_ANCUS: - case WPN_WHIP: - case WPN_QUARTERSTAFF: + case SK_SHORT_BLADES: + item.colour = CYAN; + break; + case SK_LONG_SWORDS: + item.colour = LIGHTCYAN; + break; + case SK_AXES: + item.colour = LIGHTGREY; + break; + case SK_MACES_FLAILS: item.colour = BROWN; break; - case WPN_QUICK_BLADE: + case SK_POLEARMS: item.colour = LIGHTBLUE; break; - case WPN_EXECUTIONERS_AXE: - item.colour = RED; - break; default: - item.colour = LIGHTCYAN; - if (get_equip_race(item) == ISFLAG_DWARVEN) - item.colour = CYAN; + // huh? + item.colour = random_colour(); break; } } - // I don't think this is ever done -- see start of case {dlb}: if (is_random_artefact( item ) && one_chance_in(5)) item.colour = random_colour(); + break; case OBJ_MISSILES: @@ -5993,12 +5993,20 @@ void item_colour( item_def &item ) { case MI_STONE: case MI_LARGE_ROCK: - case MI_ARROW: item.colour = BROWN; break; + case MI_ARROW: + item.colour = LIGHTBLUE; + break; case MI_NEEDLE: item.colour = WHITE; break; + case MI_BOLT: + item.colour = CYAN; + break; + case MI_DART: + item.colour = LIGHTCYAN; + break; default: item.colour = LIGHTCYAN; if (get_equip_race(item) == ISFLAG_DWARVEN) |