Skip to content

Instantly share code, notes, and snippets.

@maraigue
Created December 30, 2013 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maraigue/8183739 to your computer and use it in GitHub Desktop.
Save maraigue/8183739 to your computer and use it in GitHub Desktop.
# for https://github.com/kyubuns/misterioso/commit/3598eec678cf7368e105141b1cd7b8c259f1af12
EQUIPMENT_COLOR_TABLE = {
1 => 'black',
2 => 'orange',
3 => 'forestgreenq',
4 => 'blue',
5 => 'red',
}
EQUIPMENT_COLOR_DEFAULT = 'gray'
EQUIPMENT_COLOR_NOCARD = 'black'
def equipment_color(character)
if character.equip_card
EQUIPMENT_COLOR_TABLE[character.equip_card.master_card.rarity] || EQUIPMENT_COLOR_DEFAULT
else
EQUIPMENT_COLOR_NOCARD
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment