about summary refs log tree commit diff stats
path: root/app/views
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 19:01:56 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 19:01:56 -0400
commit9c022576fa053fd32aaebc7acb2bb44884a623d7 (patch)
tree6aa6d47da389082eab25fa5a49fae1d07ff56c02 /app/views
parenta7060addea52af313ed85336dc37949ad8e69f05 (diff)
downloadpokeviewer-9c022576fa053fd32aaebc7acb2bb44884a623d7.tar.gz
pokeviewer-9c022576fa053fd32aaebc7acb2bb44884a623d7.tar.bz2
pokeviewer-9c022576fa053fd32aaebc7acb2bb44884a623d7.zip
Added hold items
An items model was created, but the seed only contains items that can be
held, which excludes key items and HMs. Berry Juice, while unobtainable,
is still included. The item model contains three description fields: one
for Ruby/Sapphire, one for FireRed/LeafGreen, and one for Emerald. This
is because the descriptions for items are different between the games.
In a lot of cases, the Emerald description is the same as the
Ruby/Sapphire one, so in those cases, the Emerald description is nil.
The purpose of having the different descriptions is so that when a
Pokémon holds an item, the website can display the description that is
accurate to the game that that Pokémon is currently in.

In order to fully support TMs, the move model was improved to
additionally contain type and also the three description fields which
operate similarly to those of the item model. For TMs, the description
fields on the item are usually nil. However, some TMs in Ruby/Sapphire,
as well as Emerald, have different descriptions than the moves that
they correspond with. In these cases, those descriptions are in the item
model, and override the move descriptions when the move is looked at as
a TM.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/pokeviewer/pokemon/show.html.haml10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/views/pokeviewer/pokemon/show.html.haml b/app/views/pokeviewer/pokemon/show.html.haml index e90148e..9e892a7 100644 --- a/app/views/pokeviewer/pokemon/show.html.haml +++ b/app/views/pokeviewer/pokemon/show.html.haml
@@ -88,3 +88,13 @@
88 .pkv-hover 88 .pkv-hover
89 .pc-data-name= ribbon[:name] 89 .pc-data-name= ribbon[:name]
90 = ribbon[:description] 90 = ribbon[:description]
91 .pokemon-etc
92 .pd-details Misc
93 - unless @pokemon.revisions.last.item.nil?
94 .pd-hold-item.pkv-has-hover
95 = image_tag(@pokemon.revisions.last.item.icon_path)
96 .pkv-hover
97 .pc-data-name= @pokemon.revisions.last.item.name
98 - if @pokemon.revisions.last.item.tm?
99 .pc-move-name= @pokemon.revisions.last.item.move.name
100 = @pokemon.revisions.last.item.description(@pokemon.trainer.game)