From 97b7df9631adf914eaf11212768a1ce32cb12b16 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 26 May 2014 10:26:11 -0400 Subject: allow listing all demons of a given type --- lib/Games/SMTNocturne/Demons.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') 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 || {} } }; -- cgit v1.2.3