summaryrefslogtreecommitdiffstats
path: root/lib/Games/SMTNocturne/Demons.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-25 03:31:24 -0400
committerJesse Luehrs <doy@tozt.net>2014-05-25 03:31:24 -0400
commit709a804f99658b7eea2d6442de0f634d45c95860 (patch)
tree81d9976378ff537595cb44270501ef164e602f7b /lib/Games/SMTNocturne/Demons.pm
parent12f456008c223c137b023533aae929dc54992ff8 (diff)
downloadgames-smtnocturne-demons-709a804f99658b7eea2d6442de0f634d45c95860.tar.gz
games-smtnocturne-demons-709a804f99658b7eea2d6442de0f634d45c95860.zip
handle invalid fusions properly
Diffstat (limited to 'lib/Games/SMTNocturne/Demons.pm')
-rw-r--r--lib/Games/SMTNocturne/Demons.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Games/SMTNocturne/Demons.pm b/lib/Games/SMTNocturne/Demons.pm
index 70f861e..29f382e 100644
--- a/lib/Games/SMTNocturne/Demons.pm
+++ b/lib/Games/SMTNocturne/Demons.pm
@@ -90,6 +90,8 @@ sub _normal_fusion {
my $new_type = Games::SMTNocturne::Demons::FusionChart::fuse(
$demon1->type, $demon2->type
);
+ return unless $new_type;
+
my $new_level = ($demon1->level + $demon2->level) / 2;
return Games::SMTNocturne::Demons::Demon->from_type_and_level(