summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-26 10:26:11 -0400
committerJesse Luehrs <doy@tozt.net>2014-05-26 10:26:11 -0400
commit97b7df9631adf914eaf11212768a1ce32cb12b16 (patch)
treede836963383c1083f318425e152b50bfc7fe43c6 /lib
parent235f460139542ea01d767c9631fffcdc48735da5 (diff)
downloadgames-smtnocturne-demons-97b7df9631adf914eaf11212768a1ce32cb12b16.tar.gz
games-smtnocturne-demons-97b7df9631adf914eaf11212768a1ce32cb12b16.zip
allow listing all demons of a given type
Diffstat (limited to 'lib')
-rw-r--r--lib/Games/SMTNocturne/Demons.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Games/SMTNocturne/Demons.pm b/lib/Games/SMTNocturne/Demons.pm
index d3f3f1a..b09672b 100644
--- a/lib/Games/SMTNocturne/Demons.pm
+++ b/lib/Games/SMTNocturne/Demons.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Exporter 'import';
-our @EXPORT_OK = qw(demon fuse fusions_for);
+our @EXPORT_OK = qw(demon demons_of_type fuse fusions_for);
use Games::SMTNocturne::Demons::Demon;
use Games::SMTNocturne::Demons::Fusion;
@@ -15,6 +15,12 @@ sub demon {
return Games::SMTNocturne::Demons::Demon->from_name($demon);
}
+sub demons_of_type {
+ my ($type) = @_;
+
+ return Games::SMTNocturne::Demons::Demon->from_type($type);
+}
+
sub fuse {
my ($demon1, $demon2, $options) = @_;
$options = { %{ $options || {} } };