about summary refs log tree commit diff stats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/pokeviewer/pokemon.rb22
-rw-r--r--app/models/pokeviewer/revision.rb16
2 files changed, 16 insertions, 22 deletions
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