Changeset 465 for veekun/trunk/lib

Show
Ignore:
Timestamp:
03/22/09 21:48:18 (12 months ago)
Author:
eevee
Message:

Added support for Platinum moves, some boilerplate, and the Platinum sprite on main Pokémon pages.

Location:
veekun/trunk/lib/Vee
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Controller/Dex.pm

    r416 r465  
    597597     
    598598    # column reduction 
    599     my %move_columns = ( dp => 1 ); 
    600      
    601     my @column_pairs = ( [qw/rb y/], [qw/gs c/], [qw/rusa frlg/] ); 
     599    my %move_columns = ( ); 
     600     
     601    my @column_pairs = ( [qw/rb y/], [qw/gs c/], [qw/rusa frlg/], [qw/dp pt/] ); 
    602602    my @column_deletions = (1) x @column_pairs; 
    603603     
     
    12731273        ); 
    12741274    } 
    1275     $stat_percentiles{average} = Vee::Utils::round( $c->model('DBIC::Pokemon')->count({ id => { '<=', $Generations[-1]{maxid} } , -and => \ "(stat_at + stat_de + stat_sa + stat_sd + stat_sp + stat_hp) / 6 < $stat_average" }) / $#PokemonNames * 100, 1 ); 
     1275    $stat_percentiles{average} = Vee::Utils::round( 
     1276        $c->model('DBIC::Pokemon')->count({ 
     1277            -and => [ 
     1278                { id => { '<=', $Generations[-1]{maxid} } }, 
     1279                \ "(stat_at + stat_de + stat_sa + stat_sd + stat_sp + stat_hp) / 6 < $stat_average" 
     1280            ], 
     1281        }) / $#PokemonNames * 100, 
     1282        1 
     1283    ); 
    12761284    $c->stash->{stat_percentiles} = \%stat_percentiles; 
    12771285} 
  • veekun/trunk/lib/Vee/Dex.pm

    r406 r465  
    3232           fr => 'Fire Red', lg => 'Leaf Green', frlg => 'Fire Red/Leaf Green', 
    3333           rsfl => 'Ruby/Sapphire/Fire/Leaf', rsefl => 'Ruby/Sapphire/Emerald/Fire/Leaf', 
    34            d => 'Diamond', p => 'Pearl', dp => 'Diamond/Pearl' ); 
     34           d => 'Diamond', p => 'Pearl', dp => 'Diamond/Pearl', pt => 'Platinum', dppt => 'Diamond/Pearl/Platinum' ); 
    3535for my $k (keys %Icons) { $Icons{$k} = qq'<img src="/dex-images/balls/$k.png" class="pokeball" alt="$Icons{$k}" title="$Icons{$k}"/>' } 
    3636 
     
    3939    { games => 'Gold/Silver/Crystal',             short => 'new',  abbr => 'gsc', maxid => 251, maxmoveid => 251, region => 'Johto', }, 
    4040    { games => 'Ruby/Sapphire/Emerald/Fire/Leaf', short => 'rusa', abbr => 'rse', maxid => 386, maxmoveid => 354, region => 'Hoenn', locpercents => [qw/20 20 10 10 10 10 5 5 4 4 1 1/], }, 
    41     { games => 'Diamond/Pearl',                   short => 'dp',   abbr => 'dp',  maxid => 493, maxmoveid => 467, region => 'Sinnoh', locpercents => [qw/20 20 10 10 10 10 5 5 4 4 1 1/], locsurfpercents => [qw/60 30 5 4 1/], }, 
     41    { games => 'Diamond/Pearl/Platinum',          short => 'dppt', abbr => 'dppt',maxid => 493, maxmoveid => 467, region => 'Sinnoh', locpercents => [qw/20 20 10 10 10 10 5 5 4 4 1 1/], locsurfpercents => [qw/60 30 5 4 1/], }, 
    4242); 
    4343