Changeset 523 for veekun/trunk/lib
- Timestamp:
- 08/25/09 10:39:32 (3 months ago)
- Files:
-
- 1 modified
-
veekun/trunk/lib/Vee/Controller/Dex/Utils.pm (modified) (3 diffs)
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;
