summaryrefslogtreecommitdiffstats
path: root/lib/Games/SMTNocturne/Demons
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Games/SMTNocturne/Demons')
-rw-r--r--lib/Games/SMTNocturne/Demons/Demon.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Games/SMTNocturne/Demons/Demon.pm b/lib/Games/SMTNocturne/Demons/Demon.pm
index 53d3cd8..4a1b8ce 100644
--- a/lib/Games/SMTNocturne/Demons/Demon.pm
+++ b/lib/Games/SMTNocturne/Demons/Demon.pm
@@ -29,13 +29,13 @@ sub from_name {
return $DEMONS_BY_NAME{$name};
}
-sub from_type_and_level {
- my ($class, $type, $level) = @_;
+sub from_fusion_stats {
+ my ($class, $type, $level, $fusion_type) = @_;
die "unknown type $type" unless $DEMONS_BY_TYPE{$type};
my $found;
- for my $demon (@{ $DEMONS_BY_TYPE{$type} }) {
+ for my $demon (grep { $_->fusion_type eq $fusion_type } @{ $DEMONS_BY_TYPE{$type} }) {
$found = $demon;
last if $demon->level >= $level;
}