From 44a0c2e75ef577e6e847cbeb940ea936904c9d72 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 13 Oct 2017 10:01:44 -0400 Subject: Redesigned Pokémon show page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- app/models/pokeviewer/pokemon.rb | 22 ---------------------- app/models/pokeviewer/revision.rb | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 22 deletions(-) (limited to 'app/models') 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 ot_number.to_s.rjust(5, '0') end - def display_met - if met_type == :normal - if outsider? - "Apparently met in #{location.name} at Lv. #{met_level}." - else - "Met in #{location.name} at Lv. #{met_level}." - end - elsif met_type == :hatched - if outsider? - "Apparently hatched in #{location.name} at Lv. 5." - else - "Hatched in #{location.name} at Lv. 5." - end - elsif met_type == :npc_trade - "Met in a trade." - elsif met_type == :fateful_encounter - "Obtained in a fateful encounter at Lv. #{met_level}." - elsif met_type == :orre - "Met in a trade." - end - end - def nature_benefits?(stat) if stat == :attack [: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 less_than_or_equal_to: 4, only_integer: true} + def move_1_pp + move_1.pp * (5 + move_1_pp_bonuses) / 5 + end + + def move_2_pp + move_2.pp * (5 + move_2_pp_bonuses) / 5 + end + + def move_3_pp + move_3.pp * (5 + move_3_pp_bonuses) / 5 + end + + def move_4_pp + move_4.pp * (5 + move_4_pp_bonuses) / 5 + end + def ribbons result = [] -- cgit 1.4.1