diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-06-15 15:22:50 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-06-15 15:22:50 -0400 |
commit | 18980dcc9f29085a084da9d78bca742b992c69d8 (patch) | |
tree | f6ffe6e723d90e807d1c0c030d794ea1dcfe2098 | |
parent | e9a22f7f436470314db3e07665f010b6154cbfb5 (diff) | |
download | games-smtnocturne-demons-18980dcc9f29085a084da9d78bca742b992c69d8.tar.gz games-smtnocturne-demons-18980dcc9f29085a084da9d78bca742b992c69d8.zip |
can't fuse a fiend from another fiend
-rw-r--r-- | lib/Games/SMTNocturne/Demons.pm | 12 |
1 files changed, 11 insertions, 1 deletions
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 "???"; |