From a4e8c201077e389e71b4a0fa9a63ffe666481c42 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 25 May 2014 10:45:06 -0400 Subject: don't allow fusing bosses that haven't been beaten yet --- t/lib/Test/Games/SMTNocturne/Demons.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 't/lib/Test/Games/SMTNocturne/Demons.pm') diff --git a/t/lib/Test/Games/SMTNocturne/Demons.pm b/t/lib/Test/Games/SMTNocturne/Demons.pm index 5ccd8ac..92ad93c 100644 --- a/t/lib/Test/Games/SMTNocturne/Demons.pm +++ b/t/lib/Test/Games/SMTNocturne/Demons.pm @@ -6,13 +6,21 @@ use Exporter 'import'; use Games::SMTNocturne::Demons; use Test::More; -our @EXPORT = ('fusion_is'); +our @EXPORT = ('fusion_is', 'set_fusion_options'); + +my $FUSION_OPTIONS = {}; + +sub set_fusion_options { + $FUSION_OPTIONS = $_[0]; +} sub fusion_is { local $Test::Builder::Level = $Test::Builder::Level + 1; my ($demon1, $demon2, $expected) = @_; - my $fused = eval { Games::SMTNocturne::Demons::fuse($demon1, $demon2) }; + my $fused = eval { + Games::SMTNocturne::Demons::fuse($demon1, $demon2, $FUSION_OPTIONS) + }; die $@ if $@ && $@ !~ /\bnyi\b/; local $TODO = $@ if $@; -- cgit v1.2.3-54-g00ecf