diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-05-25 10:45:06 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-05-25 10:45:06 -0400 |
commit | a4e8c201077e389e71b4a0fa9a63ffe666481c42 (patch) | |
tree | ab17a553757bb2570575741152db2ab218a983e5 /lib/Games/SMTNocturne/Demons | |
parent | 26bba9f137ac161c9c394c74332968fd91d7acfc (diff) | |
download | games-smtnocturne-demons-a4e8c201077e389e71b4a0fa9a63ffe666481c42.tar.gz games-smtnocturne-demons-a4e8c201077e389e71b4a0fa9a63ffe666481c42.zip |
don't allow fusing bosses that haven't been beaten yet
Diffstat (limited to 'lib/Games/SMTNocturne/Demons')
-rw-r--r-- | lib/Games/SMTNocturne/Demons/Demon.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Games/SMTNocturne/Demons/Demon.pm b/lib/Games/SMTNocturne/Demons/Demon.pm index 41b689a..1185f2d 100644 --- a/lib/Games/SMTNocturne/Demons/Demon.pm +++ b/lib/Games/SMTNocturne/Demons/Demon.pm @@ -40,6 +40,9 @@ sub from_fusion_stats { @possible = grep { $_->fusion_type eq $options->{fusion_type} } @possible if $options->{fusion_type}; + my %bosses = map { $_ => 1 } @{ $options->{bosses} || [] }; + @possible = grep { !$_->boss || $bosses{$_->name} } @possible; + my $found; for my $demon (@possible) { $found = $demon; |