summaryrefslogtreecommitdiffstats
path: root/lib/Games
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-25 02:45:41 -0400
committerJesse Luehrs <doy@tozt.net>2014-05-25 02:45:41 -0400
commitbfb381b794062830a33eab3739e23a7204fdeebf (patch)
tree3d6dbe3e62188285f9df8f53e1ccfb6383b443ae /lib/Games
parente5ae6b60b07a7bd8ac0cc6541fd061a00a764b35 (diff)
downloadgames-smtnocturne-demons-bfb381b794062830a33eab3739e23a7204fdeebf.tar.gz
games-smtnocturne-demons-bfb381b794062830a33eab3739e23a7204fdeebf.zip
method to get all demons of a given type
Diffstat (limited to 'lib/Games')
-rw-r--r--lib/Games/SMTNocturne/Demons/Demon.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Games/SMTNocturne/Demons/Demon.pm b/lib/Games/SMTNocturne/Demons/Demon.pm
index 1cf2bf1..81114a8 100644
--- a/lib/Games/SMTNocturne/Demons/Demon.pm
+++ b/lib/Games/SMTNocturne/Demons/Demon.pm
@@ -43,6 +43,14 @@ sub from_type_and_level {
return $found;
}
+sub from_type {
+ my ($class, $type) = @_;
+
+ die "unknown type $type" unless $DEMONS_BY_TYPE{$type};
+
+ return @{ $DEMONS_BY_TYPE{$type} };
+}
+
# sub boss { $_[0]->{boss} }
sub fusion_type { $_[0]->{fusion_type} }
sub level { $_[0]->{level} }