From 18980dcc9f29085a084da9d78bca742b992c69d8 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 15 Jun 2014 15:22:50 -0400 Subject: can't fuse a fiend from another fiend --- lib/Games/SMTNocturne/Demons.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/Games') diff --git a/lib/Games/SMTNocturne/Demons.pm b/lib/Games/SMTNocturne/Demons.pm index 7df5358..ef945e6 100644 --- a/lib/Games/SMTNocturne/Demons.pm +++ b/lib/Games/SMTNocturne/Demons.pm @@ -34,6 +34,10 @@ sub fuse { if (!$options->{basic}) { if (my $demon = _try_special_fusion($demon1, $demon2, $options)) { + # XXX this is the wrong place for this, but not sure how to do + # it better + return if $demon->type eq 'Fiend' + && ($demon1->type eq 'Fiend' || $demon2->type eq 'Fiend'); return $demon; } else { @@ -158,11 +162,17 @@ sub fusions_for { } else { if ($special->{target}) { - push @special_fusions, map { + my @new_special = map { $_->raw } map { fusions_for($_, $options) } @{ $special->{target} }; + if ($demon->type eq 'Fiend') { + @new_special = grep { + $_->[1]->type ne 'Fiend' && $_->[2]->type ne 'Fiend' + } @new_special; + } + push @special_fusions, @new_special; } else { die "???"; -- cgit v1.2.3