29 lines
574 B
Perl
29 lines
574 B
Perl
package GEmeTool::Save::Pokemon;
|
|
|
|
use v5.16.3;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Moo;
|
|
use Rsaves;
|
|
use Rsaves::Constants::Emerald::Species;
|
|
|
|
has _pokemon => (
|
|
is => 'rw',
|
|
);
|
|
|
|
sub species {
|
|
my $self = shift;
|
|
my $pokemon = $self->_pokemon;
|
|
my $substruct_0 = Rsaves::find_pokemon_substruct($pokemon->{substructures}, 0);
|
|
return $substruct_0->{species};
|
|
}
|
|
|
|
sub get_image {
|
|
my $self = shift;
|
|
my $pokemon_name = $Rsaves::Constants::Emerald::Species::SPECIES[$self->species];
|
|
return "pokeemerald/graphics/pokemon/@{[lc($pokemon_name)]}/icon.png";
|
|
}
|
|
1;
|