- Timestamp:
- 08/25/09 10:39:32 (7 months ago)
- Location:
- veekun/trunk
- Files:
-
- 2 modified
-
lib/Vee/Controller/Dex/Utils.pm (modified) (3 diffs)
-
templates/dex/utils/iv.tt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/lib/Vee/Controller/Dex/Utils.pm
r441 r523 476 476 477 477 # ok done with that validation nonsense 478 478 479 479 my (@ivs, @iv_ranges, @possible_stats); 480 480 my @nature_change = (1) x 6; … … 492 492 my $func = ($stat =~ /hp/) ? \&ingame_hp : \&ingame_stats; 493 493 494 # entire range of possible stats for this Pokemon 495 $possible_stats[$s] = 496 int( $nature_change[$s] * $func->($base, $p->{level}, 0, $effort) ) . ' - ' . 497 int( $nature_change[$s] * $func->($base, $p->{level}, 31, $effort) ); 498 499 # bail if there was no input provided 500 if (not $p->{$stat}) { 501 next; 502 } 503 494 504 # possible IVs; doing this inversely is very difficult due to rounding 495 505 for my $iv (0 .. 31) { … … 505 515 if $iv_ranges[$s]{min} != $iv_ranges[$s]{max} 506 516 or $iv_ranges[$s]{min} == -1; 507 508 # entire range of possible stats for this Pokemon509 $possible_stats[$s] =510 int( $nature_change[$s] * $func->($base, $p->{level}, 0, $effort) ) . ' - ' .511 int( $nature_change[$s] * $func->($base, $p->{level}, 31, $effort) );512 517 } 513 518 $s->{ivs} = \@ivs; -
veekun/trunk/templates/dex/utils/iv.tt
r252 r523 55 55 <td class="stat">[% pokemon.${StatColumns.$s} %]</td> 56 56 <td class="possible-stats[% nature_class %]">[% possible_stats.$s %]</td> 57 [% IF iv_ranges.$s.min >= 0 %] 57 [% IF NOT iv_ranges.$s%] 58 <td colspan="2">No input</td> 59 [% ELSIF iv_ranges.$s.min >= 0 %] 58 60 <td class="possible-ivs">[% iv_ranges.$s.min %][% IF iv_ranges.$s.min != iv_ranges.$s.max %] - [% iv_ranges.$s.max %][% END %]</td> 59 61 <td class="iv-graph"><div class="iv-bar">
