summaryrefslogtreecommitdiffstats
path: root/lib/Games
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-25 02:23:14 -0400
committerJesse Luehrs <doy@tozt.net>2014-05-25 02:23:14 -0400
commit3812e89fbaec8075af2d8185d6ef0c32d13b3383 (patch)
tree99e7f09a1c6f2cb70f092243aba996c9a724b1d8 /lib/Games
parent4eba504c1522ecec0595db81cfffd04badf67e56 (diff)
downloadgames-smtnocturne-demons-3812e89fbaec8075af2d8185d6ef0c32d13b3383.tar.gz
games-smtnocturne-demons-3812e89fbaec8075af2d8185d6ef0c32d13b3383.zip
rename some things
Diffstat (limited to 'lib/Games')
-rw-r--r--lib/Games/SMTNocturne/Demons.pm6
-rw-r--r--lib/Games/SMTNocturne/Demons/Demon.pm4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Games/SMTNocturne/Demons.pm b/lib/Games/SMTNocturne/Demons.pm
index b075dc5..b648bf6 100644
--- a/lib/Games/SMTNocturne/Demons.pm
+++ b/lib/Games/SMTNocturne/Demons.pm
@@ -8,9 +8,9 @@ use Games::SMTNocturne::Demons::FusionChart;
sub fuse {
my ($demon1, $demon2) = @_;
- $demon1 = Games::SMTNocturne::Demons::Demon->new_from_name($demon1)
+ $demon1 = Games::SMTNocturne::Demons::Demon->from_name($demon1)
unless ref($demon1);
- $demon2 = Games::SMTNocturne::Demons::Demon->new_from_name($demon2)
+ $demon2 = Games::SMTNocturne::Demons::Demon->from_name($demon2)
unless ref($demon2);
my $new_type = Games::SMTNocturne::Demons::FusionChart::fuse(
@@ -18,7 +18,7 @@ sub fuse {
);
my $new_level = ($demon1->level + $demon2->level) / 2;
- return Games::SMTNocturne::Demons::Demon->new_from_type_and_level(
+ return Games::SMTNocturne::Demons::Demon->from_type_and_level(
$new_type, $new_level
);
}
diff --git a/lib/Games/SMTNocturne/Demons/Demon.pm b/lib/Games/SMTNocturne/Demons/Demon.pm
index 6d8d73d..12d276e 100644
--- a/lib/Games/SMTNocturne/Demons/Demon.pm
+++ b/lib/Games/SMTNocturne/Demons/Demon.pm
@@ -19,7 +19,7 @@ for my $type (keys %DEMONS_BY_TYPE) {
@$demons = sort { $a->{level} <=> $b->{level} } @$demons;
}
-sub new_from_name {
+sub from_name {
my ($class, $name) = @_;
die "unknown demon $name" unless $DEMONS_BY_NAME{$name};
@@ -27,7 +27,7 @@ sub new_from_name {
return bless { %{ $DEMONS_BY_NAME{$name} } }, $class;
}
-sub new_from_type_and_level {
+sub from_type_and_level {
my ($class, $type, $level) = @_;
die "unknown type $type" unless $DEMONS_BY_TYPE{$type};