about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-10-13 10:01:44 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-10-13 10:01:44 -0400
commit44a0c2e75ef577e6e847cbeb940ea936904c9d72 (patch)
tree2682fe4e131f567c2ff7e2c6f229a3fe9e6d0e6c
parent5eab020d3db17c08050e751c155f266dd0a87c4d (diff)
downloadpokeviewer-44a0c2e75ef577e6e847cbeb940ea936904c9d72.tar.gz
pokeviewer-44a0c2e75ef577e6e847cbeb940ea936904c9d72.tar.bz2
pokeviewer-44a0c2e75ef577e6e847cbeb940ea936904c9d72.zip
Redesigned Pokémon show page
The new design is heavily inspired by the status screen from Diamond &
Pearl. It's not entirely done yet, with notable missing features
including sheen and gender. However, it would also be nice to show a
star for shiny Pokémon, Pokérus status, possibly a mention as to what
game the Pokémon is currently in, and descriptive hover bubbles for
moves. It is also notable that currently, as ribbons are located all the
way to the right, their hover bubbles usually go off screen.

The list of Pokémon page has not been redesigned, and the main layout is
still bare.
-rw-r--r--app/assets/images/pokeviewer/types/mystery.gifbin0 -> 905 bytes
-rw-r--r--app/assets/stylesheets/pokeviewer/pokemon.css.scss393
-rw-r--r--app/helpers/pokeviewer/pokemon_helper.rb87
-rw-r--r--app/models/pokeviewer/pokemon.rb22
-rw-r--r--app/models/pokeviewer/revision.rb16
-rw-r--r--app/views/layouts/pokeviewer/application.html.haml7
-rw-r--r--app/views/pokeviewer/pokemon/show.html.haml213
-rw-r--r--config/locales/en.yml42
8 files changed, 534 insertions, 246 deletions
diff --git a/app/assets/images/pokeviewer/types/mystery.gif b/app/assets/images/pokeviewer/types/mystery.gif new file mode 100644 index 0000000..566a2f2 --- /dev/null +++ b/app/assets/images/pokeviewer/types/mystery.gif
Binary files differ
diff --git a/app/assets/stylesheets/pokeviewer/pokemon.css.scss b/app/assets/stylesheets/pokeviewer/pokemon.css.scss index ca6ae9c..4c1fc2c 100644 --- a/app/assets/stylesheets/pokeviewer/pokemon.css.scss +++ b/app/assets/stylesheets/pokeviewer/pokemon.css.scss
@@ -3,34 +3,20 @@
3 They will automatically be included in application.css. 3 They will automatically be included in application.css.
4*/ 4*/
5 5
6body {
7
8}
9
10#left-sidebar, #right-sidebar {
11 flex: 3 0px;
12}
13
14#container {
15 display: flex;
16
17}
18
19#banner { 6#banner {
20 box-sizing: border-box; 7 box-sizing: border-box;
21 height: 10em; 8 height: 2em;
22 margin: 0 auto; 9 margin: 0 auto;
23 width: 60%; 10 width: 60%;
24} 11}
25 12
26#content { 13#content {
27 flex: 10 0px; 14 margin: 2em;
28} 15}
29 16
30.trainer { 17.trainer {
31 margin: 1em; 18 margin: 1em;
32 font-family: 'Power Green'; 19 font-family: 'Power Green';
33/* width: 758px;*/
34 box-sizing: border-box; 20 box-sizing: border-box;
35 background-color: #f7f7f7; 21 background-color: #f7f7f7;
36 border: 1px solid #999; 22 border: 1px solid #999;
@@ -162,6 +148,7 @@ body {
162 border-radius: 4px; 148 border-radius: 4px;
163 position: absolute; 149 position: absolute;
164 max-width: 45ch; 150 max-width: 45ch;
151 text-align: left;
165 152
166 .pc-data-name { 153 .pc-data-name {
167 font-weight: bold; 154 font-weight: bold;
@@ -182,10 +169,10 @@ body {
182.pokemon { 169.pokemon {
183 font-family: 'Power Green'; 170 font-family: 'Power Green';
184 display: flex; 171 display: flex;
185 margin: 1em; 172 margin: 1em 0;
186 border: 1px solid #777; 173 background-color: #c0c8c4;
187 border-radius: 5px; 174 border: 1px solid #888;
188 background-color: #fafafa; 175 overflow: hidden;
189 176
190 .male { 177 .male {
191 color: blue; 178 color: blue;
@@ -200,164 +187,256 @@ body {
200 white-space: pre; 187 white-space: pre;
201 } 188 }
202 189
203 .pd-details { 190 &.in-emerald {
204 color: white; 191 .pokemon-image {
205 padding: .25em .5em; 192 img {
206 } 193 margin: -14px;
207 194 }
208 .pd-contents {
209 p {
210 margin: .25em;
211 } 195 }
212 } 196 }
213 197
214 .pokemon-basics { 198 .pokemon-basics {
215 margin: .5em; 199 width: 8.5em;
216 min-width: 5em; 200
217 } 201 .pokemon-nameline {
202 background-color: #dcb880;
203 padding: 6px 6px 0 6px;
204 border-top: 1px solid #d8a878;
205 border-left: 1px solid #d8a878;
206 border-right: 1px solid #d8a878;
207 border-top-left-radius: 6px;
208 border-top-right-radius: 6px;
209 margin: .25em .25em 0;
210 }
218 211
219 .pokemon-column { 212 .pokemon-ball {
220 border-left: 1px solid #aaa; 213 margin: -8px;
214 }
221 215
222 &>div + div { 216 .pokemon-name {
223 border-top: 1px solid #aaa; 217 margin-left: 3px;
224 } 218 }
225 }
226 219
227 .pokemon-row { 220 .pokemon-gender {
228 display: flex; 221 float: right;
229 flex: 1 0px; 222 }
230 223
231 &>div + div { 224 .pokemon-level {
232 border-left: 1px solid #aaa; 225 padding: 4px 8px 0px;
226 border-bottom-left-radius: 6px;
227 border-bottom-right-radius: 6px;
228 background-color: white;
229 margin: 0 .25em;
233 } 230 }
234 }
235 231
236 .pokemon-memo { 232 .pokemon-image {
237 background-color: #e7e8ff; 233 text-align: center;
238 flex-grow: 1;
239 234
240 .pd-details { 235 .pokemon-image-wrap {
241 background-color: #be3ff8; /*#d078f8;*/ 236 margin: 1em auto;
237 border: 10px solid #e0e0c8;
238 background-color: white;
239 border-radius: 10px;
240 display: inline-block;
241 padding: 4px;
242 }
242 } 243 }
243 }
244 244
245 .pokemon-moves { 245 .pokemon-item-label {
246 flex-grow: 1; 246 background-color: #dcb880;
247 color: white;
248 border-top: 1px solid #d8a878;
249 padding: .25em .25em 0 0.5em;
250
251 &.with-item {
252 padding-left: 30px;
253 }
247 254
248 .pd-details { 255 &:not(.with-item) {
249 background-color: #3fb5f8; 256 margin-top: .25em;
257 }
250 } 258 }
251 259
252 ul { 260 .pokemon-item {
253 display: flex; 261 background-color: white;
254 flex-direction: column; 262 padding: .25em .25em .25em .5em;
255 justify-content: space-between;
256 margin: 0;
257 padding: 0;
258 263
259 li { 264 img {
260 display: block; 265 vertical-align: bottom;
261 padding: 0.25em; 266 margin: -4px -4px -4px -8px;
262 box-sizing: border-box;
263 } 267 }
264 } 268 }
265 } 269 }
266 270
267 .pokemon-stats { 271 table {
268 background-color: #d7f4f6; 272 border-spacing: 0;
273 width: 100%;
274
275 th {
276 text-align: left;
277 color: white;
278 font-weight: normal;
279 white-space: nowrap;
280 }
281
282 .table-bubble {
283 background-color: #e4f0f0;
284 text-align: center;
285 padding: 4px 1em 0 1em;
286 height: 100%;
287
288 &.tb-top {
289 border-top-left-radius: 8px;
290 border-top-right-radius: 8px;
291 }
269 292
270 .pd-details { 293 &.tb-bottom {
271 background-color: #2068e0; 294 border-bottom-left-radius: 8px;
272 border-bottom: 1px solid #A9C6C8; 295 border-bottom-right-radius: 8px;
296 }
273 } 297 }
274 298
275 .nature-benefit { 299 .tb-only {
276 color: green; 300 text-align: center;
301 background-color: #e4f0f0;
302 border-radius: 6px;
303 padding: 3px 3px 0 3px;
304 height: 100%;
277 } 305 }
278 306
279 .nature-hinder { 307 tr:nth-child(odd) {
280 color: red; 308 .table-bubble {
309 background-color: #e4e8d0;
310 }
281 } 311 }
312 }
313
314 .pokemon-tab {
315 border-left: 1px solid #585450;
316 flex: 1 0px;
317 }
318
319 .pokemon-details {
320 background-color: #94c49c;
282 321
283 table { 322 table {
284 border-collapse: collapse; 323 padding-top: .75em;
285 border-style: hidden;
286 table-layout: fixed;
287 324
288 th, td { 325 th {
289 text-align: center; 326 padding: .25em 1em 0 .5em;
290 border: 1px solid #A9C6C8;
291 padding: 0.25em 0.25em;
292 width: 16.67%;
293 } 327 }
294 328
295 th { 329 td {
296 background-color: #bfdfff; 330 padding: 0 .5em 0 0;
331 }
332
333 tr:nth-child(odd) {
334 background-color: #84ac88;
297 } 335 }
298 } 336 }
299 } 337 }
300 338
301 .pokemon-condition { 339 .pokemon-stats {
302 background-color: #b9d7f2; 340 background-color: #6870d8;
303 border-left: 1px solid #aaa;
304 flex: 1 0px;
305 341
306 .pkcv-cool-circle { 342 table {
307 fill: #f59a55; 343 padding-top: .5em;
308 }
309 344
310 .pkcv-beauty-circle { 345 tr:nth-child(even) {
311 fill: #8095ff; 346 background-color: #8890f8;
312 } 347 }
313 348
314 .pkcv-cute-circle { 349 th {
315 fill: #f5a8d3; 350 padding: .25em .5em 0 1.5em;
316 } 351 }
317 352
318 .pkcv-smart-circle { 353 td {
319 fill: #79e15c; 354 padding: 0 1em 0 0;
320 } 355 }
321 356
322 .pkcv-tough-circle { 357 .pokemon-nature-label th {
323 fill: #f7f100; 358 padding-top: .75em;
324 } 359 }
325 360
326 .pkcv-outline { 361 .nature-benefit {
327 stroke: gray; 362 color: #99ff00;
328 stroke-width: 5; 363 }
329 stroke-linejoin: round;
330 fill: white;
331 fill-opacity: 0.3;
332 }
333 364
334 .pkcv-line { 365 .nature-hinder {
335 stroke: gray; 366 color: red;
336 stroke-width: 2; 367 }
337 } 368 }
369 }
338 370
339 .pkcv-data { 371 .pokemon-moves {
340 fill: #4ee100; 372 background-color: #ff847c;
341 fill-opacity: 0.9;
342 }
343 373
344 .pkcv-label, .pkcv-label-outline { 374 table {
345 font-family: "Power Green"; 375 padding-top: .75em;
346 font-size: 50px; 376
347 text-anchor: middle; 377 tr:nth-child(even) {
348 } 378 background-color: #f7aca6;
379
380 .tb-only {
381 color: black;
382 }
383 }
384
385 tr:nth-child(odd) {
386 td {
387 padding-top: .25em;
388 color: white;
389 }
390 }
391
392 th {
393 padding: .25em 0.25em 0 .25em;
394 text-align: right;
395 }
396
397 td {
398 padding-right: .5em;
399 }
400
401 .pp-label {
402 display: block;
403 position: absolute;
404 padding-left: .125em;
405 }
349 406
350 .pkcv-label-outline { 407 .pp-value {
351 stroke: #f0f8f8; 408 display: block;
352 stroke-width: 6; 409 margin-left: 2em;
353 stroke-linejoin: butt; 410 text-align: right;
411 }
354 } 412 }
355 } 413 }
356 414
415 .pokemon-met-label {
416 background-color: #84ac88;
417 padding: .75em 0 0 .5em;
418 overflow: hidden;
419 color: white;
420 }
421
422 .pokemon-description {
423 background: linear-gradient(
424 to bottom,
425 #e4f0f0,
426 #e4f0f0 50%,
427 #e4e8d0 50%,
428 #e4e8d0
429 );
430
431 background-size: 100% 3em;
432 padding: 0 .5em;
433 height: 100%;
434 line-height: 1.5em;
435 border-top: 1px solid #888;
436 }
437
357 .pokemon-ribbons { 438 .pokemon-ribbons {
358 .pd-details { 439 background-color: #f8d8f8;
359 background-color: #ffc8c8;
360 }
361 440
362 ul { 441 ul {
363 display: flex; 442 display: flex;
@@ -370,4 +449,66 @@ body {
370 } 449 }
371 } 450 }
372 } 451 }
452
453 .pokemon-contest {
454 background-color: #b9d7f2;
455
456 .pokemon-condition {
457 display: block;
458
459 .pkcv-cool-circle {
460 fill: #f59a55;
461 }
462
463 .pkcv-beauty-circle {
464 fill: #8095ff;
465 }
466
467 .pkcv-cute-circle {
468 fill: #f5a8d3;
469 }
470
471 .pkcv-smart-circle {
472 fill: #79e15c;
473 }
474
475 .pkcv-tough-circle {
476 fill: #f7f100;
477 }
478
479 .pkcv-outline {
480 stroke: gray;
481 stroke-width: 5;
482 stroke-linejoin: round;
483 fill: white;
484 fill-opacity: 0.3;
485 }
486
487 .pkcv-line {
488 stroke: gray;
489 stroke-width: 2;
490 }
491
492 .pkcv-data {
493 fill: #4ee100;
494 fill-opacity: 0.9;
495 }
496
497 .pkcv-label, .pkcv-label-outline {
498 font-family: "Power Green";
499 font-size: 50px;
500 text-anchor: middle;
501 }
502
503 .pkcv-label-outline {
504 stroke: #f0f8f8;
505 stroke-width: 6;
506 stroke-linejoin: butt;
507 }
508 }
509 }
510}
511
512.clear {
513 clear: both;
373} 514}
diff --git a/app/helpers/pokeviewer/pokemon_helper.rb b/app/helpers/pokeviewer/pokemon_helper.rb index f29fc35..9524914 100644 --- a/app/helpers/pokeviewer/pokemon_helper.rb +++ b/app/helpers/pokeviewer/pokemon_helper.rb
@@ -83,9 +83,94 @@ module Pokeviewer
83 83
84 tag.svg(svg.to_s.html_safe, 84 tag.svg(svg.to_s.html_safe,
85 viewBox: "-80 -30 570 430", 85 viewBox: "-80 -30 570 430",
86 width: 300, 86 width: "100%",
87 class: "pokemon-condition") 87 class: "pokemon-condition")
88 end 88 end
89 89
90 def image_for_type(type)
91 image_tag "pokeviewer/types/#{type}.gif"
92 end
93
94 def move_details(revision, index)
95 move = revision.send "move_#{index}".intern
96
97 if move
98 move_name = move.name
99 move_type = image_for_type move.move_type
100 move_pp = revision.send "move_#{index}_pp".intern
101 move_pp = "#{move_pp}/#{move_pp}"
102 else
103 move_name = "-"
104 move_type = ""
105 move_pp = "--/--"
106 end
107
108 tag.tr(
109 tag.th(move_type) +
110 tag.td(move_name)) +
111 tag.tr(
112 tag.th("") +
113 tag.td(
114 tag.div(
115 tag.span(
116 "PP",
117 class: 'pp-label') +
118 tag.span(
119 move_pp,
120 class: 'pp-value') +
121 tag.div(
122 "",
123 class: 'clear'),
124 class: 'tb-only')))
125 end
126
127 def display_met(pokemon)
128 met_type = pokemon.met_type
129
130 if met_type == :normal or met_type == :hatched
131 result = "".html_safe
132
133 if met_type == :normal
134 if pokemon.outsider?
135 result << "Apparently met"
136 else
137 result << "Met"
138 end
139 else
140 if pokemon.outsider?
141 result << "Apparently hatched"
142 else
143 result << "Hatched"
144 end
145 end
146
147 result << " in "
148
149 pokemon.location.name.split(" ").each_with_index do |w, i|
150 result << "&nbsp;".html_safe if i > 0
151 result << w
152 end
153
154 result << " at Lv.&nbsp;".html_safe
155
156 if met_type == :hatched
157 result << "5"
158 else
159 result << pokemon.met_level.to_s
160 end
161
162 result << "."
163
164 result
165 elsif met_type == :npc_trade
166 "Met in a trade."
167 elsif met_type == :fateful_encounter
168 "Obtained in a fateful encounter at Lv.&nbsp;".html_safe +
169 pokemon.met_level.to_s
170 elsif met_type == :orre
171 "Met in a trade."
172 end
173 end
174
90 end 175 end
91end 176end
diff --git a/app/models/pokeviewer/pokemon.rb b/app/models/pokeviewer/pokemon.rb index 1b690f5..ab516fb 100644 --- a/app/models/pokeviewer/pokemon.rb +++ b/app/models/pokeviewer/pokemon.rb
@@ -142,28 +142,6 @@ module Pokeviewer
142 ot_number.to_s.rjust(5, '0') 142 ot_number.to_s.rjust(5, '0')
143 end 143 end
144 144
145 def display_met
146 if met_type == :normal
147 if outsider?
148 "Apparently met in #{location.name} at Lv. #{met_level}."
149 else
150 "Met in #{location.name} at Lv. #{met_level}."
151 end
152 elsif met_type == :hatched
153 if outsider?
154 "Apparently hatched in #{location.name} at Lv. 5."
155 else
156 "Hatched in #{location.name} at Lv. 5."
157 end
158 elsif met_type == :npc_trade
159 "Met in a trade."
160 elsif met_type == :fateful_encounter
161 "Obtained in a fateful encounter at Lv. #{met_level}."
162 elsif met_type == :orre
163 "Met in a trade."
164 end
165 end
166
167 def nature_benefits?(stat) 145 def nature_benefits?(stat)
168 if stat == :attack 146 if stat == :attack
169 [:lonely, :brave, :adamant, :naughty].include? nature.intern 147 [:lonely, :brave, :adamant, :naughty].include? nature.intern
diff --git a/app/models/pokeviewer/revision.rb b/app/models/pokeviewer/revision.rb index b77bb1f..2626ae3 100644 --- a/app/models/pokeviewer/revision.rb +++ b/app/models/pokeviewer/revision.rb
@@ -140,6 +140,22 @@ module Pokeviewer
140 less_than_or_equal_to: 4, 140 less_than_or_equal_to: 4,
141 only_integer: true} 141 only_integer: true}
142 142
143 def move_1_pp
144 move_1.pp * (5 + move_1_pp_bonuses) / 5
145 end
146
147 def move_2_pp
148 move_2.pp * (5 + move_2_pp_bonuses) / 5
149 end
150
151 def move_3_pp
152 move_3.pp * (5 + move_3_pp_bonuses) / 5
153 end
154
155 def move_4_pp
156 move_4.pp * (5 + move_4_pp_bonuses) / 5
157 end
158
143 def ribbons 159 def ribbons
144 result = [] 160 result = []
145 161
diff --git a/app/views/layouts/pokeviewer/application.html.haml b/app/views/layouts/pokeviewer/application.html.haml index 6bce8b9..31b19ea 100644 --- a/app/views/layouts/pokeviewer/application.html.haml +++ b/app/views/layouts/pokeviewer/application.html.haml
@@ -7,9 +7,4 @@
7 = csrf_meta_tags 7 = csrf_meta_tags
8 %body 8 %body
9 %header#banner Pokéviewer 9 %header#banner Pokéviewer
10 #container 10 #content= yield
11 #left-sidebar
12 Sidebar stuff
13 #content= yield
14 #right-sidebar
15 Sidebar stuff
diff --git a/app/views/pokeviewer/pokemon/show.html.haml b/app/views/pokeviewer/pokemon/show.html.haml index e3bee11..6c478ef 100644 --- a/app/views/pokeviewer/pokemon/show.html.haml +++ b/app/views/pokeviewer/pokemon/show.html.haml
@@ -1,86 +1,128 @@
1.pokemon{ class: (not @pokemon.trainer.nil?) && "in-#{@pokemon.trainer.game}" } 1.pokemon{ class: (not @pokemon.trainer.nil?) && "in-#{@pokemon.trainer.game}" }
2 .pokemon-basics 2 .pokemon-basics
3 .pokemon-species-id= "No. #{@pokemon.species_id}" 3 .pokemon-nameline
4 .pokemon-species-name= @pokemon.species.name 4 = image_tag(@pokemon.pokeball_icon_path, class: "pokemon-ball")
5 .pokemon-image= image_tag @pokemon.sprite_path 5 %span.pokemon-name= @pokemon.revisions.last.nickname
6 .pokemon-name= @pokemon.revisions.last.nickname 6 %span.pokemon-gender N
7 .pokemon-ot
8 OT/
9 %span{ class: @pokemon.ot_gender }>= @pokemon.ot_name
10 .pokemon-id= "ID/#{@pokemon.display_ot_number}"
11 .pokemon-level= "Lv. #{@pokemon.revisions.last.level}" 7 .pokemon-level= "Lv. #{@pokemon.revisions.last.level}"
12 .pokemon-column 8 .pokemon-image
13 .pokemon-stats 9 .pokemon-image-wrap= image_tag @pokemon.sprite_path
14 .pd-details Stats 10 - if @pokemon.revisions.last.item.nil?
15 %table.pd-contents 11 .pokemon-item-label Item
16 %tr 12 .pokemon-item None
17 %th HP 13 - else
18 %th 14 .pokemon-item-label.with-item Item
19 Attack 15 .pokemon-item.pkv-has-hover
20 - if @pokemon.nature_benefits?(:attack) 16 = image_tag(@pokemon.revisions.last.item.icon_path)
21 %span.nature-benefit + 17 = @pokemon.revisions.last.item.name
22 - if @pokemon.nature_hinders?(:attack) 18 .pkv-hover
23 %span.nature-hinder - 19 .pc-data-name= @pokemon.revisions.last.item.name
24 %th 20 - if @pokemon.revisions.last.item.tm?
25 Defense 21 .pc-move-name= @pokemon.revisions.last.item.move.name
26 - if @pokemon.nature_benefits?(:defense) 22 = @pokemon.revisions.last.item.description(@pokemon.trainer.game)
27 %span.nature-benefit + 23 .pokemon-tab.pokemon-details
28 - if @pokemon.nature_hinders?(:defense) 24 %table
29 %span.nature-hinder - 25 %tr
30 %th 26 %th Pokédex No.
31 Sp. Atk 27 %td
32 - if @pokemon.nature_benefits?(:special_attack) 28 .table-bubble.tb-top= @pokemon.species_id
33 %span.nature-benefit + 29 %tr
34 - if @pokemon.nature_hinders?(:special_attack) 30 %th Name
35 %span.nature-hinder - 31 %td
36 %th 32 .table-bubble= @pokemon.species.name
37 Sp. Def 33 %tr
38 - if @pokemon.nature_benefits?(:special_defense) 34 %th Type
39 %span.nature-benefit + 35 %td
40 - if @pokemon.nature_hinders?(:special_defense) 36 .table-bubble
41 %span.nature-hinder - 37 = image_for_type @pokemon.species.type_1
42 %th 38 - if @pokemon.species.type_2
43 Speed 39 = image_for_type @pokemon.species.type_2
44 - if @pokemon.nature_benefits?(:speed) 40 %tr
45 %span.nature-benefit + 41 %th OT
46 - if @pokemon.nature_hinders?(:speed) 42 %td.ot-gender{ class: @pokemon.ot_gender }
47 %span.nature-hinder - 43 .table-bubble= @pokemon.ot_name
48 %tr 44 %tr
49 %td= @pokemon.revisions.last.hp 45 %th ID No.
50 %td= @pokemon.revisions.last.attack 46 %td
51 %td= @pokemon.revisions.last.defense 47 .table-bubble.tb-bottom= @pokemon.display_ot_number
52 %td= @pokemon.revisions.last.special_attack 48 %tr
53 %td= @pokemon.revisions.last.special_defense 49 %th &nbsp;
54 %td= @pokemon.revisions.last.speed 50 %td
55 .pokemon-row 51 .pokemon-met-label Trainer Memo
56 .pokemon-moves 52 .pokemon-description= display_met @pokemon
57 .pd-details Moves 53 .pokemon-tab.pokemon-stats
58 %ul 54 %table
59 %li= @pokemon.revisions.last.move_1.name 55 %tr
60 - if @pokemon.revisions.last.move_2 56 %th HP
61 %li= @pokemon.revisions.last.move_2.name 57 %td
62 - else 58 .table-bubble.tb-top= @pokemon.revisions.last.hp
63 %li - 59 %tr
64 - if @pokemon.revisions.last.move_3 60 %th
65 %li= @pokemon.revisions.last.move_3.name 61 Attack
66 - else 62 - if @pokemon.nature_benefits?(:attack)
67 %li - 63 %span.nature-benefit +
68 - if @pokemon.revisions.last.move_4 64 - if @pokemon.nature_hinders?(:attack)
69 %li= @pokemon.revisions.last.move_4.name 65 %span.nature-hinder -
70 - else 66 %td
71 %li - 67 .table-bubble= @pokemon.revisions.last.attack
72 .pokemon-memo 68 %tr
73 .pd-details Trainer Memo 69 %th
74 .pd-contents 70 Defense
75 %p 71 - if @pokemon.nature_benefits?(:defense)
76 %span.pokemon-nature<= @pokemon.nature.titlecase 72 %span.nature-benefit +
77 nature. 73 - if @pokemon.nature_hinders?(:defense)
78 %p= @pokemon.display_met 74 %span.nature-hinder -
79 .pokemon-contest 75 %td
80 .pd-details Contest Condition 76 .table-bubble= @pokemon.revisions.last.defense
81 = condition_diagram @pokemon.revisions.last 77 %tr
82 .pokemon-ribbons 78 %th
83 .pd-details Ribbons 79 Sp. Atk
80 - if @pokemon.nature_benefits?(:special_attack)
81 %span.nature-benefit +
82 - if @pokemon.nature_hinders?(:special_attack)
83 %span.nature-hinder -
84 %td
85 .table-bubble= @pokemon.revisions.last.special_attack
86 %tr
87 %th
88 Sp. Def
89 - if @pokemon.nature_benefits?(:special_defense)
90 %span.nature-benefit +
91 - if @pokemon.nature_hinders?(:special_defense)
92 %span.nature-hinder -
93 %td
94 .table-bubble= @pokemon.revisions.last.special_defense
95 %tr
96 %th
97 Speed
98 - if @pokemon.nature_benefits?(:speed)
99 %span.nature-benefit +
100 - if @pokemon.nature_hinders?(:speed)
101 %span.nature-hinder -
102 %td
103 .table-bubble.tb-bottom= @pokemon.revisions.last.speed
104 %tr.pokemon-nature-label
105 %th{ colspan: 2 } Nature
106 %tr
107 %th
108 %td
109 .tb-only= @pokemon.nature_text
110 %tr
111 %th{ colspan: 2 } Ability
112 %tr
113 %th
114 %td
115 .tb-only.pkv-has-hover
116 = @pokemon.ability.name
117 .pkv-hover
118 .pc-data-name= @pokemon.ability.name
119 = @pokemon.ability.description
120 .pokemon-tab.pokemon-moves
121 %table
122 - (1..4).each do |i|
123 = move_details @pokemon.revisions.last, i
124 .pokemon-tab.pokemon-contest= condition_diagram @pokemon.revisions.last
125 .pokemon-tab.pokemon-ribbons
84 %ul 126 %ul
85 - @pokemon.revisions.last.ribbons.each do |ribbon| 127 - @pokemon.revisions.last.ribbons.each do |ribbon|
86 %li.pkv-has-hover 128 %li.pkv-has-hover
@@ -88,14 +130,3 @@
88 .pkv-hover 130 .pkv-hover
89 .pc-data-name= ribbon[:name] 131 .pc-data-name= ribbon[:name]
90 = ribbon[:description] 132 = ribbon[:description]
91 .pokemon-etc
92 .pd-details Misc
93 = image_tag(@pokemon.pokeball_icon_path)
94 - unless @pokemon.revisions.last.item.nil?
95 .pd-hold-item.pkv-has-hover
96 = image_tag(@pokemon.revisions.last.item.icon_path)
97 .pkv-hover
98 .pc-data-name= @pokemon.revisions.last.item.name
99 - if @pokemon.revisions.last.item.tm?
100 .pc-move-name= @pokemon.revisions.last.item.move.name
101 = @pokemon.revisions.last.item.description(@pokemon.trainer.game)
diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..b5425f5 --- /dev/null +++ b/config/locales/en.yml
@@ -0,0 +1,42 @@
1en:
2 enumerize:
3 pokemon:
4 pokeball:
5 master: "Master Ball"
6 ultra: "Ultra Ball"
7 great: "Great Ball"
8 poke: "Poké Ball"
9 safari: "Safari Ball"
10 net: "Net Ball"
11 dive: "Dive Ball"
12 nest: "Nest Ball"
13 repeat: "Repeat Ball"
14 timer: "Timer Ball"
15 luxury: "Luxury Ball"
16 premier: "Premier Ball"
17 nature:
18 hardy: "Hardy"
19 lonely: "Lonely"
20 brave: "Brave"
21 adamant: "Adamant"
22 naughty: "Naughty"
23 bold: "Bold"
24 docile: "Docile"
25 relaxed: "Relaxed"
26 impish: "Impish"
27 lax: "Lax"
28 timid: "Timid"
29 hasty: "Hasty"
30 serious: "Serious"
31 jolly: "Jolly"
32 naive: "Naive"
33 modest: "Modest"
34 mild: "Mild"
35 quiet: "Quiet"
36 bashful: "Bashful"
37 rash: "Rash"
38 calm: "Calm"
39 gentle: "Gentle"
40 sassy: "Sassy"
41 careful: "Careful"
42 quirky: "Quirky"