about summary refs log tree commit diff stats
path: root/app/views/pokeviewer/pokemon/_pokemon.html.haml
blob: 573e7eb63ddee3f77baf2e670a54d1b2e385e855 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
.pokemon{ class: (not @pokemon.trainer.nil?) && "in-#{@pokemon.trainer.game}" }
  .pokemon-basics
    .pokemon-nameline
      = image_tag(@pokemon.pokeball_icon_path, class: "pokemon-ball")
      %span.pokemon-name= link_to_unless_current @pokemon.current.nickname, @pokemon
      %span.pokemon-gender{ class: @pokemon.gender }= @pokemon.gender_symbol
    .pokemon-level= "Lv. #{@pokemon.current.level}"
    .pokemon-image
      .pokemon-image-wrap
        = image_tag @pokemon.current.sprite_path, class: "pokemon-sprite"
        - if @pokemon.shiny?
          = image_tag "pokeviewer/ShinyIVStar.png", class: "pkv-shiny-star"
    - if @pokemon.current.item.nil?
      .pokemon-item-label Item
      .pokemon-item None
    - else
      .pokemon-item-label.with-item Item
      .pokemon-item.pkv-has-hover
        = image_tag(@pokemon.current.item.icon_path)
        = @pokemon.current.item.name
        .pkv-hover
          .pc-data-name= @pokemon.current.item.name
          - if @pokemon.current.item.tm?
            .pc-move-name= @pokemon.current.item.move.name
          = @pokemon.current.item.description(@pokemon.trainer.game)
  .pokemon-tab.pokemon-details
    %table
      %tr
        %th Pokédex No.
        %td
          .table-bubble.tb-top= @pokemon.current.species_id
      %tr
        %th Name
        %td
          .table-bubble= @pokemon.current.species.name
      %tr
        %th Type
        %td
          .table-bubble
            = image_for_type @pokemon.current.species.type_1
            - if @pokemon.current.species.type_2
              = image_for_type @pokemon.current.species.type_2
      %tr
        %th OT
        %td.ot-gender{ class: @pokemon.ot_gender }
          .table-bubble= @pokemon.ot_name
      %tr
        %th ID No.
        %td
          .table-bubble.tb-bottom= @pokemon.display_ot_number
      %tr
        %th  
        %td
    .pokemon-met-label Trainer Memo
    .pokemon-description= display_met @pokemon
  .pokemon-tab.pokemon-stats
    %table
      %tr
        %th HP
        %td
          .table-bubble.tb-top= @pokemon.current.hp
      %tr
        %th
          Attack
          - if @pokemon.nature_benefits?(:attack)
            %span.nature-benefit +
          - if @pokemon.nature_hinders?(:attack)
            %span.nature-hinder -
        %td
          .table-bubble= @pokemon.current.attack
      %tr
        %th
          Defense
          - if @pokemon.nature_benefits?(:defense)
            %span.nature-benefit +
          - if @pokemon.nature_hinders?(:defense)
            %span.nature-hinder -
        %td
          .table-bubble= @pokemon.current.defense
      %tr
        %th
          Sp. Atk
          - if @pokemon.nature_benefits?(:special_attack)
            %span.nature-benefit +
          - if @pokemon.nature_hinders?(:special_attack)
            %span.nature-hinder -
        %td
          .table-bubble= @pokemon.current.special_attack
      %tr
        %th
          Sp. Def
          - if @pokemon.nature_benefits?(:special_defense)
            %span.nature-benefit +
          - if @pokemon.nature_hinders?(:special_defense)
            %span.nature-hinder -
        %td
          .table-bubble= @pokemon.current.special_defense
      %tr
        %th
          Speed
          - if @pokemon.nature_benefits?(:speed)
            %span.nature-benefit +
          - if @pokemon.nature_hinders?(:speed)
            %span.nature-hinder -
        %td
          .table-bubble.tb-bottom= @pokemon.current.speed
      %tr.pokemon-nature-label
        %th{ colspan: 2 } Nature
      %tr
        %th
        %td
          .tb-only= @pokemon.nature_text
      %tr
        %th{ colspan: 2 } Ability
      %tr
        %th
        %td
          .tb-only.pkv-has-hover
            = @pokemon.current.ability.name
            .pkv-hover
              .pc-data-name= @pokemon.current.ability.name
              = @pokemon.current.ability.description
  .pokemon-tab.pokemon-moves
    %table
      - (1..4).each do |i|
        = move_details @pokemon.current, i
  .pokemon-tab.pokemon-contest= condition_diagram @pokemon.current
  .pokemon-tab.pokemon-ribbons
    %ul
      - @pokemon.current.ribbons.each do |ribbon|
        %li.pkv-has-hover
          = image_tag("pokeviewer/ribbons/#{ribbon[:filename]}")
          .pkv-hover
            .pc-data-name= ribbon[:name]
            = ribbon[:description]