From e3b5dc667d87f1a44da79fdfe890c8dba58e37d7 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 2 Oct 2009 04:19:46 -0500 Subject: sketch out some working data loading --- lib/Games/SMTNocturne/Fusion/Chart.pm | 1077 +++++++++++++++++++++++ lib/Games/SMTNocturne/Fusion/Demon.pm | 808 +++++++++++++++++ lib/Games/SMTNocturne/Fusion/Role/Deathstone.pm | 6 + lib/Games/SMTNocturne/Fusion/Role/Evolve.pm | 6 + lib/Games/SMTNocturne/Fusion/Role/Special.pm | 6 + lib/Games/SMTNocturne/Fusion/Types.pm | 18 + 6 files changed, 1921 insertions(+) create mode 100644 lib/Games/SMTNocturne/Fusion/Chart.pm create mode 100644 lib/Games/SMTNocturne/Fusion/Demon.pm create mode 100644 lib/Games/SMTNocturne/Fusion/Role/Deathstone.pm create mode 100644 lib/Games/SMTNocturne/Fusion/Role/Evolve.pm create mode 100644 lib/Games/SMTNocturne/Fusion/Role/Special.pm create mode 100644 lib/Games/SMTNocturne/Fusion/Types.pm (limited to 'lib') diff --git a/lib/Games/SMTNocturne/Fusion/Chart.pm b/lib/Games/SMTNocturne/Fusion/Chart.pm new file mode 100644 index 0000000..0aae894 --- /dev/null +++ b/lib/Games/SMTNocturne/Fusion/Chart.pm @@ -0,0 +1,1077 @@ +package Games::SMTNocturne::Fusion::Chart; +use Moose; +use YAML::Any qw(Load); +use Games::SMTNocturne::Fusion::Types; + +has _type_chart => ( + is => 'ro', + isa => 'HashRef[HashRef[Maybe[Games::SMTNocturne::Fusion::DemonType]]]', + lazy => 1, + default => sub { + local $/ = undef; + my $data = ; + close DATA; + return Load($data); + }, +); + +1; + +__DATA__ +--- +Avatar: + Avatar: ~ + Avian: Holy + Beast: Snake + Brute: Kishin + Deity: Megami + Divine: Megami + Dragon: Fury + Element: ~ + Entity: Fury + Fairy: Divine + Fallen: Divine + Femme: Kishin + Fiend: ~ + Foul: ~ + Fury: Holy + Genma: Kishin + Haunt: ~ + Holy: Megami + Jirae: Kishin + Kishin: Holy + Lady: Fury + Megami: Deity + Mitama: Avatar + Night: Holy + Raptor: Wilder + Seraph: Deity + Snake: Lady + Tyrant: ~ + Vile: Deity + Wargod: Deity + Wilder: ~ + Yoma: Divine +Avian: + Avatar: Holy + Avian: ~ + Beast: Femme + Brute: Kishin + Deity: Megami + Divine: Snake + Dragon: Fury + Element: ~ + Entity: Deity + Fairy: Night + Fallen: Snake + Femme: Brute + Fiend: ~ + Foul: ~ + Fury: Kishin + Genma: Megami + Haunt: ~ + Holy: Lady + Jirae: Kishin + Kishin: Lady + Lady: ~ + Megami: Deity + Mitama: Avian + Night: Femme + Raptor: Megami + Seraph: Megami + Snake: Kishin + Tyrant: ~ + Vile: ~ + Wargod: Kishin + Wilder: ~ + Yoma: Night +Beast: + Avatar: Snake + Avian: Femme + Beast: Element + Brute: Femme + Deity: Avatar + Divine: Holy + Dragon: Snake + Element: Beast + Entity: Holy + Fairy: Divine + Fallen: Night + Femme: Foul + Fiend: Night + Foul: Wilder + Fury: Avatar + Genma: Fairy + Haunt: Wilder + Holy: Avatar + Jirae: Yoma + Kishin: Holy + Lady: Snake + Megami: Holy + Mitama: Beast + Night: Fairy + Raptor: Wilder + Seraph: ~ + Snake: Brute + Tyrant: Night + Vile: Foul + Wargod: Holy + Wilder: Jirae + Yoma: Fallen +Brute: + Avatar: Kishin + Avian: Kishin + Beast: Femme + Brute: Element + Deity: Kishin + Divine: Yoma + Dragon: Night + Element: Brute + Entity: Fury + Fairy: Night + Fallen: Jirae + Femme: Beast + Fiend: Haunt + Foul: Wilder + Fury: Lady + Genma: Divine + Haunt: Foul + Holy: Femme + Jirae: Fairy + Kishin: Snake + Lady: Fury + Megami: Femme + Mitama: Brute + Night: Kishin + Raptor: Fury + Seraph: ~ + Snake: Beast + Tyrant: Haunt + Vile: Haunt + Wargod: ~ + Wilder: Fairy + Yoma: Femme +Deity: + Avatar: Megami + Avian: Megami + Beast: Avatar + Brute: Kishin + Deity: ~ + Divine: Megami + Dragon: ~ + Element: Deity + Entity: Megami + Fairy: Night + Fallen: Fury + Femme: Lady + Fiend: ~ + Foul: ~ + Fury: ~ + Genma: Megami + Haunt: ~ + Holy: Megami + Jirae: Brute + Kishin: Fury + Lady: ~ + Megami: ~ + Mitama: Deity + Night: Vile + Raptor: Tyrant + Seraph: ~ + Snake: Kishin + Tyrant: ~ + Vile: ~ + Wargod: Kishin + Wilder: ~ + Yoma: Megami +Divine: + Avatar: Megami + Avian: Snake + Beast: Holy + Brute: Yoma + Deity: Megami + Divine: Element + Dragon: Megami + Element: Divine + Entity: Megami + Fairy: Megami + Fallen: Vile + Femme: Beast + Fiend: Vile + Foul: Fairy + Fury: Deity + Genma: Megami + Haunt: Jirae + Holy: Fairy + Jirae: Night + Kishin: Vile + Lady: Megami + Megami: Holy + Mitama: Divine + Night: Snake + Raptor: Foul + Seraph: Megami + Snake: Fairy + Tyrant: Vile + Vile: Fallen + Wargod: Holy + Wilder: Fallen + Yoma: Snake +Dragon: + Avatar: Fury + Avian: Fury + Beast: Snake + Brute: Night + Deity: ~ + Divine: Megami + Dragon: ~ + Element: ~ + Entity: Lady + Fairy: Snake + Fallen: Snake + Femme: Night + Fiend: ~ + Foul: Snake + Fury: ~ + Genma: Holy + Haunt: ~ + Holy: Snake + Jirae: Kishin + Kishin: Fury + Lady: ~ + Megami: Avatar + Mitama: Dragon + Night: Femme + Raptor: ~ + Seraph: Holy + Snake: Lady + Tyrant: ~ + Vile: Snake + Wargod: Lady + Wilder: ~ + Yoma: Avatar +Element: + Avatar: ~ + Avian: ~ + Beast: Beast + Brute: Brute + Deity: Deity + Divine: Divine + Dragon: ~ + Element: Mitama + Entity: ~ + Fairy: Fairy + Fallen: Fallen + Femme: Femme + Fiend: ~ + Foul: Foul + Fury: Fury + Genma: ~ + Haunt: Haunt + Holy: Holy + Jirae: Jirae + Kishin: Kishin + Lady: Lady + Megami: Megami + Mitama: Element + Night: Night + Raptor: ~ + Seraph: ~ + Snake: Snake + Tyrant: Tyrant + Vile: Vile + Wargod: ~ + Wilder: Wilder + Yoma: Yoma +Entity: + Avatar: Fury + Avian: Deity + Beast: Holy + Brute: Fury + Deity: Megami + Divine: Megami + Dragon: Lady + Element: ~ + Entity: ~ + Fairy: Megami + Fallen: Kishin + Femme: Lady + Fiend: ~ + Foul: Brute + Fury: Lady + Genma: Fury + Haunt: Brute + Holy: Kishin + Jirae: Fury + Kishin: Fury + Lady: Fury + Megami: Deity + Mitama: Entity + Night: Brute + Raptor: Vile + Seraph: Deity + Snake: Fury + Tyrant: ~ + Vile: ~ + Wargod: Fury + Wilder: Brute + Yoma: Megami +Fairy: + Avatar: Divine + Avian: Night + Beast: Divine + Brute: Night + Deity: Night + Divine: Megami + Dragon: Snake + Element: Fairy + Entity: Megami + Fairy: Element + Fallen: Yoma + Femme: Haunt + Fiend: Night + Foul: Haunt + Fury: Brute + Genma: ~ + Haunt: Night + Holy: Megami + Jirae: Yoma + Kishin: Brute + Lady: Yoma + Megami: Fallen + Mitama: Fairy + Night: Snake + Raptor: Haunt + Seraph: Holy + Snake: Yoma + Tyrant: Night + Vile: Night + Wargod: ~ + Wilder: Yoma + Yoma: Holy +Fallen: + Avatar: Divine + Avian: Snake + Beast: Night + Brute: Jirae + Deity: Fury + Divine: Vile + Dragon: Snake + Element: Fallen + Entity: Kishin + Fairy: Yoma + Fallen: Element + Femme: Wilder + Fiend: Fury + Foul: Vile + Fury: Vile + Genma: Lady + Haunt: Night + Holy: Beast + Jirae: Brute + Kishin: Night + Lady: Fury + Megami: Divine + Mitama: Fallen + Night: Haunt + Raptor: Foul + Seraph: Lady + Snake: Beast + Tyrant: Fury + Vile: Brute + Wargod: Lady + Wilder: Night + Yoma: Jirae +Femme: + Avatar: Kishin + Avian: Brute + Beast: Foul + Brute: Beast + Deity: Lady + Divine: Beast + Dragon: Night + Element: Femme + Entity: Lady + Fairy: Haunt + Fallen: Wilder + Femme: Element + Fiend: Lady + Foul: Wilder + Fury: Lady + Genma: Night + Haunt: Foul + Holy: Lady + Jirae: Wilder + Kishin: Lady + Lady: Kishin + Megami: Fairy + Mitama: Femme + Night: Jirae + Raptor: Foul + Seraph: ~ + Snake: Kishin + Tyrant: Lady + Vile: Brute + Wargod: ~ + Wilder: Fallen + Yoma: Brute +Fiend: + Avatar: ~ + Avian: ~ + Beast: Night + Brute: Haunt + Deity: ~ + Divine: Vile + Dragon: ~ + Element: ~ + Entity: ~ + Fairy: Night + Fallen: Fury + Femme: Lady + Fiend: ~ + Foul: Haunt + Fury: Deity + Genma: Yoma + Haunt: Foul + Holy: ~ + Jirae: Wilder + Kishin: ~ + Lady: ~ + Megami: ~ + Mitama: Fiend + Night: Lady + Raptor: Fury + Seraph: Fallen + Snake: Brute + Tyrant: ~ + Vile: Fury + Wargod: ~ + Wilder: Night + Yoma: Night +Foul: + Avatar: ~ + Avian: ~ + Beast: Wilder + Brute: Wilder + Deity: ~ + Divine: Fairy + Dragon: Snake + Element: Foul + Entity: Brute + Fairy: Haunt + Fallen: Vile + Femme: Wilder + Fiend: Haunt + Foul: ~ + Fury: ~ + Genma: ~ + Haunt: Brute + Holy: ~ + Jirae: Femme + Kishin: ~ + Lady: Vile + Megami: ~ + Mitama: Foul + Night: Brute + Raptor: Vile + Seraph: Fallen + Snake: Fallen + Tyrant: Haunt + Vile: Haunt + Wargod: ~ + Wilder: Beast + Yoma: Snake +Fury: + Avatar: Holy + Avian: Kishin + Beast: Avatar + Brute: Lady + Deity: ~ + Divine: Deity + Dragon: ~ + Element: Fury + Entity: Lady + Fairy: Brute + Fallen: Vile + Femme: Lady + Fiend: Deity + Foul: ~ + Fury: ~ + Genma: Lady + Haunt: ~ + Holy: Kishin + Jirae: Femme + Kishin: Lady + Lady: Vile + Megami: Deity + Mitama: Fury + Night: Lady + Raptor: Tyrant + Seraph: Vile + Snake: Kishin + Tyrant: Deity + Vile: Tyrant + Wargod: Deity + Wilder: ~ + Yoma: Holy +Genma: + Avatar: Kishin + Avian: Megami + Beast: Fairy + Brute: Divine + Deity: Megami + Divine: Megami + Dragon: Holy + Element: ~ + Entity: Fury + Fairy: ~ + Fallen: Lady + Femme: Night + Fiend: Yoma + Foul: ~ + Fury: Lady + Genma: ~ + Haunt: ~ + Holy: Yoma + Jirae: Lady + Kishin: Megami + Lady: Femme + Megami: Divine + Mitama: Genma + Night: Holy + Raptor: Lady + Seraph: Megami + Snake: Femme + Tyrant: Yoma + Vile: Yoma + Wargod: Holy + Wilder: Yoma + Yoma: ~ +Haunt: + Avatar: ~ + Avian: ~ + Beast: Wilder + Brute: Foul + Deity: ~ + Divine: Jirae + Dragon: ~ + Element: Haunt + Entity: Brute + Fairy: Night + Fallen: Night + Femme: Foul + Fiend: Foul + Foul: Brute + Fury: ~ + Genma: ~ + Haunt: ~ + Holy: ~ + Jirae: Vile + Kishin: ~ + Lady: Vile + Megami: ~ + Mitama: Haunt + Night: Yoma + Raptor: Vile + Seraph: Fallen + Snake: Brute + Tyrant: Foul + Vile: Foul + Wargod: ~ + Wilder: Jirae + Yoma: Jirae +Holy: + Avatar: Megami + Avian: Lady + Beast: Avatar + Brute: Femme + Deity: Megami + Divine: Fairy + Dragon: Snake + Element: Holy + Entity: Kishin + Fairy: Megami + Fallen: Beast + Femme: Lady + Fiend: ~ + Foul: ~ + Fury: Kishin + Genma: Yoma + Haunt: ~ + Holy: Element + Jirae: Beast + Kishin: Lady + Lady: Avatar + Megami: Divine + Mitama: Holy + Night: Fairy + Raptor: Wilder + Seraph: Divine + Snake: Kishin + Tyrant: ~ + Vile: ~ + Wargod: Kishin + Wilder: ~ + Yoma: Divine +Jirae: + Avatar: Kishin + Avian: Kishin + Beast: Yoma + Brute: Fairy + Deity: Brute + Divine: Night + Dragon: Kishin + Element: Jirae + Entity: Fury + Fairy: Yoma + Fallen: Brute + Femme: Wilder + Fiend: Wilder + Foul: Femme + Fury: Femme + Genma: Lady + Haunt: Vile + Holy: Beast + Jirae: Element + Kishin: Snake + Lady: Beast + Megami: Lady + Mitama: Jirae + Night: Foul + Raptor: Foul + Seraph: ~ + Snake: Fallen + Tyrant: Wilder + Vile: Haunt + Wargod: Kishin + Wilder: Brute + Yoma: Beast +Kishin: + Avatar: Holy + Avian: Lady + Beast: Holy + Brute: Snake + Deity: Fury + Divine: Vile + Dragon: Fury + Element: Kishin + Entity: Fury + Fairy: Brute + Fallen: Night + Femme: Lady + Fiend: ~ + Foul: ~ + Fury: Lady + Genma: Megami + Haunt: ~ + Holy: Lady + Jirae: Snake + Kishin: ~ + Lady: Fury + Megami: Lady + Mitama: Kishin + Night: Femme + Raptor: Tyrant + Seraph: Divine + Snake: Femme + Tyrant: ~ + Vile: ~ + Wargod: Fury + Wilder: ~ + Yoma: Femme +Lady: + Avatar: Fury + Avian: ~ + Beast: Snake + Brute: Fury + Deity: ~ + Divine: Megami + Dragon: ~ + Element: Lady + Entity: Fury + Fairy: Yoma + Fallen: Fury + Femme: Kishin + Fiend: ~ + Foul: Vile + Fury: Vile + Genma: Femme + Haunt: Vile + Holy: Avatar + Jirae: Beast + Kishin: Fury + Lady: ~ + Megami: Fury + Mitama: Lady + Night: Kishin + Raptor: Kishin + Seraph: Deity + Snake: Femme + Tyrant: ~ + Vile: ~ + Wargod: Kishin + Wilder: Haunt + Yoma: Night +Megami: + Avatar: Deity + Avian: Deity + Beast: Holy + Brute: Femme + Deity: ~ + Divine: Holy + Dragon: Avatar + Element: Megami + Entity: Deity + Fairy: Fallen + Fallen: Divine + Femme: Fairy + Fiend: ~ + Foul: ~ + Fury: Deity + Genma: Divine + Haunt: ~ + Holy: Divine + Jirae: Lady + Kishin: Lady + Lady: Fury + Megami: ~ + Mitama: Megami + Night: Fallen + Raptor: Tyrant + Seraph: Deity + Snake: Fairy + Tyrant: ~ + Vile: Fury + Wargod: Deity + Wilder: Vile + Yoma: Kishin +Mitama: + Avatar: Avatar + Avian: Avian + Beast: Beast + Brute: Brute + Deity: Deity + Divine: Divine + Dragon: Dragon + Element: Element + Entity: Entity + Fairy: Fairy + Fallen: Fallen + Femme: Femme + Fiend: Fiend + Foul: Foul + Fury: Fury + Genma: Genma + Haunt: Haunt + Holy: Holy + Jirae: Jirae + Kishin: Kishin + Lady: Lady + Megami: Megami + Mitama: Mitama + Night: Night + Raptor: Raptor + Seraph: Seraph + Snake: Snake + Tyrant: Tyrant + Vile: Vile + Wargod: Wargod + Wilder: Wilder + Yoma: Yoma +Night: + Avatar: Holy + Avian: Femme + Beast: Fairy + Brute: Kishin + Deity: Vile + Divine: Snake + Dragon: Femme + Element: Night + Entity: Brute + Fairy: Snake + Fallen: Haunt + Femme: Jirae + Fiend: Lady + Foul: Brute + Fury: Lady + Genma: Holy + Haunt: Yoma + Holy: Fairy + Jirae: Foul + Kishin: Femme + Lady: Kishin + Megami: Fallen + Mitama: Night + Night: Element + Raptor: Vile + Seraph: Fallen + Snake: Fallen + Tyrant: Lady + Vile: Lady + Wargod: ~ + Wilder: Beast + Yoma: Divine +Raptor: + Avatar: Wilder + Avian: Megami + Beast: Wilder + Brute: Fury + Deity: Tyrant + Divine: Foul + Dragon: ~ + Element: ~ + Entity: Vile + Fairy: Haunt + Fallen: Foul + Femme: Foul + Fiend: Fury + Foul: Vile + Fury: Tyrant + Genma: Lady + Haunt: Vile + Holy: Wilder + Jirae: Foul + Kishin: Tyrant + Lady: Kishin + Megami: Tyrant + Mitama: Raptor + Night: Vile + Raptor: ~ + Seraph: ~ + Snake: Foul + Tyrant: Fury + Vile: Fury + Wargod: ~ + Wilder: Vile + Yoma: Haunt +Seraph: + Avatar: Deity + Avian: Megami + Beast: ~ + Brute: ~ + Deity: ~ + Divine: Megami + Dragon: Holy + Element: ~ + Entity: Deity + Fairy: Holy + Fallen: Lady + Femme: ~ + Fiend: Fallen + Foul: Fallen + Fury: Vile + Genma: Megami + Haunt: Fallen + Holy: Divine + Jirae: ~ + Kishin: Divine + Lady: Deity + Megami: Deity + Mitama: Seraph + Night: Fallen + Raptor: ~ + Seraph: Element + Snake: ~ + Tyrant: Fallen + Vile: Divine + Wargod: Kishin + Wilder: ~ + Yoma: Megami +Snake: + Avatar: Lady + Avian: Kishin + Beast: Brute + Brute: Beast + Deity: Kishin + Divine: Fairy + Dragon: Lady + Element: Snake + Entity: Fury + Fairy: Yoma + Fallen: Beast + Femme: Kishin + Fiend: Brute + Foul: Fallen + Fury: Kishin + Genma: Femme + Haunt: Brute + Holy: Kishin + Jirae: Fallen + Kishin: Femme + Lady: Femme + Megami: Fairy + Mitama: Snake + Night: Fallen + Raptor: Foul + Seraph: ~ + Snake: Element + Tyrant: Brute + Vile: Kishin + Wargod: Kishin + Wilder: Night + Yoma: Night +Tyrant: + Avatar: ~ + Avian: ~ + Beast: Night + Brute: Haunt + Deity: ~ + Divine: Vile + Dragon: ~ + Element: Tyrant + Entity: ~ + Fairy: Night + Fallen: Fury + Femme: Lady + Fiend: ~ + Foul: Haunt + Fury: Deity + Genma: Yoma + Haunt: Foul + Holy: ~ + Jirae: Wilder + Kishin: ~ + Lady: ~ + Megami: ~ + Mitama: Tyrant + Night: Lady + Raptor: Fury + Seraph: Fallen + Snake: Brute + Tyrant: ~ + Vile: Fury + Wargod: ~ + Wilder: Night + Yoma: Night +Vile: + Avatar: Deity + Avian: ~ + Beast: Foul + Brute: Haunt + Deity: ~ + Divine: Fallen + Dragon: Snake + Element: Vile + Entity: ~ + Fairy: Night + Fallen: Brute + Femme: Brute + Fiend: Fury + Foul: Haunt + Fury: Tyrant + Genma: Yoma + Haunt: Foul + Holy: ~ + Jirae: Haunt + Kishin: ~ + Lady: ~ + Megami: Fury + Mitama: Vile + Night: Lady + Raptor: Fury + Seraph: Divine + Snake: Kishin + Tyrant: Fury + Vile: ~ + Wargod: Kishin + Wilder: Foul + Yoma: Jirae +Wargod: + Avatar: Deity + Avian: Kishin + Beast: Holy + Brute: ~ + Deity: Kishin + Divine: Holy + Dragon: Lady + Element: ~ + Entity: Fury + Fairy: ~ + Fallen: Lady + Femme: ~ + Fiend: ~ + Foul: ~ + Fury: Deity + Genma: Holy + Haunt: ~ + Holy: Kishin + Jirae: Kishin + Kishin: Fury + Lady: Kishin + Megami: Deity + Mitama: Wargod + Night: ~ + Raptor: ~ + Seraph: Kishin + Snake: Kishin + Tyrant: ~ + Vile: Kishin + Wargod: ~ + Wilder: ~ + Yoma: ~ +Wilder: + Avatar: ~ + Avian: ~ + Beast: Jirae + Brute: Fairy + Deity: ~ + Divine: Fallen + Dragon: ~ + Element: Wilder + Entity: Brute + Fairy: Yoma + Fallen: Night + Femme: Fallen + Fiend: Night + Foul: Beast + Fury: ~ + Genma: Yoma + Haunt: Jirae + Holy: ~ + Jirae: Brute + Kishin: ~ + Lady: Haunt + Megami: Vile + Mitama: Wilder + Night: Beast + Raptor: Vile + Seraph: ~ + Snake: Night + Tyrant: Night + Vile: Foul + Wargod: ~ + Wilder: Element + Yoma: Beast +Yoma: + Avatar: Divine + Avian: Night + Beast: Fallen + Brute: Femme + Deity: Megami + Divine: Snake + Dragon: Avatar + Element: Yoma + Entity: Megami + Fairy: Holy + Fallen: Jirae + Femme: Brute + Fiend: Night + Foul: Snake + Fury: Holy + Genma: ~ + Haunt: Jirae + Holy: Divine + Jirae: Beast + Kishin: Femme + Lady: Night + Megami: Kishin + Mitama: Yoma + Night: Divine + Raptor: Haunt + Seraph: Megami + Snake: Night + Tyrant: Night + Vile: Jirae + Wargod: ~ + Wilder: Beast + Yoma: Element diff --git a/lib/Games/SMTNocturne/Fusion/Demon.pm b/lib/Games/SMTNocturne/Fusion/Demon.pm new file mode 100644 index 0000000..f1439f0 --- /dev/null +++ b/lib/Games/SMTNocturne/Fusion/Demon.pm @@ -0,0 +1,808 @@ +package Games::SMTNocturne::Fusion::Demon; +use Moose; +use MooseX::ClassAttribute; +use YAML::Any qw(Load); +use Games::SMTNocturne::Fusion::Types; + +with 'MooseX::Traits', + 'MooseX::Role::Matcher' => { default_match => 'name' }; + +class_has _list => ( + is => 'ro', + isa => 'ArrayRef[HashRef]', + lazy => 1, + default => sub { + local $/ = undef; + my $data = ; + close DATA; + return Load($data); + }, +); + +class_has list => ( + is => 'ro', + isa => 'ArrayRef[Games::SMTNocturne::Fusion::Demon]', + lazy => 1, + default => sub { + my $meta = shift; + my $class = $meta->name; + my %traits = map { + $_ => ["Games::SMTNocturne::Fusion::Role::" . ucfirst($_)] + } qw(deathstone evolve special); + $traits{normal} = []; + return [ map { + $class->new_with_traits(traits => $traits{$_->{fusion_type}}, %$_) + } @{ $class->_list } ]; + }, +); + +has name => ( + is => 'ro', + isa => 'Str', + required => 1, +); + +has level => ( + is => 'ro', + isa => 'Int', + required => 1, +); + +has type => ( + is => 'ro', + isa => 'Games::SMTNocturne::Fusion::DemonType', + required => 1, +); + +has fusion_type => ( + is => 'ro', + isa => 'Games::SMTNocturne::Fusion::FusionType', + required => 1, +); + +sub lookup { + my ($class, @props) = @_; + my @possible = $class->grep_matches($class->list, @props); + + return wantarray ? @possible : (@possible == 1 ? $possible[0] : undef); +} + +__PACKAGE__->meta->make_immutable; +no Moose; + +1; + +__DATA__ +--- +- fusion_type: normal + level: '38' + name: Horus + type: Deity +- fusion_type: normal + level: '47' + name: Atavaka + type: Deity +- fusion_type: special + level: '56' + name: Amaterasu + type: Deity +- fusion_type: normal + level: '65' + name: Odin + type: Deity +- fusion_type: normal + level: '78' + name: Mithra + type: Deity +- fusion_type: normal + level: '93' + name: Vishnu + type: Deity +- fusion_type: normal + level: '18' + name: Uzume + type: Megami +- fusion_type: normal + level: '30' + name: Sarasvati + type: Megami +- fusion_type: normal + level: '48' + name: Sati + type: Megami +- fusion_type: normal + level: '54' + name: Laksmi + type: Megami +- fusion_type: normal + level: '64' + name: Scathach + type: Megami +- fusion_type: normal + level: '44' + name: Dionysus + type: Fury +- fusion_type: evolve + level: '54' + name: Wu Kong + type: Fury +- fusion_type: normal + level: '61' + name: Beji Weng + type: Fury +- fusion_type: special + level: '95' + name: Shiva + type: Fury +- fusion_type: normal + level: '24' + name: Kikuri-Hime + type: Lady +- fusion_type: normal + level: '41' + name: Kushinada + type: Lady +- fusion_type: evolve + level: '57' + name: Parvati + type: Lady +- fusion_type: normal + level: '67' + name: Kali + type: Lady +- fusion_type: evolve + level: '74' + name: Skadi + type: Lady +- fusion_type: normal + level: '17' + name: Minakata + type: Kishin +- fusion_type: normal + level: '27' + name: Zouchou + type: Kishin +- fusion_type: normal + level: '33' + name: Koumoko + type: Kishin +- fusion_type: normal + level: '39' + name: Okuninushi + type: Kishin +- fusion_type: normal + level: '45' + name: Mikazuchi + type: Kishin +- fusion_type: normal + level: '52' + name: Jiroku + type: Kishin +- fusion_type: normal + level: '63' + name: Futomimi + type: Kishin +- fusion_type: normal + level: '72' + name: Bishamon + type: Kishin +- fusion_type: normal + level: '76' + name: Thor + type: Kishin +- fusion_type: normal + level: '13' + name: Shiisaa + type: Holy +- fusion_type: normal + level: '21' + name: Unicorn + type: Holy +- fusion_type: evolve + level: '27' + name: Senri + type: Holy +- fusion_type: normal + level: '36' + name: Feng Huang + type: Holy +- fusion_type: normal + level: '43' + name: Baihu + type: Holy +- fusion_type: normal + level: '55' + name: Chimera + type: Holy +- fusion_type: normal + level: '7' + name: Erthys + type: Element +- fusion_type: normal + level: '11' + name: Aeros + type: Element +- fusion_type: normal + level: '15' + name: Aquans + type: Element +- fusion_type: normal + level: '20' + name: Flameis + type: Element +- fusion_type: normal + level: '25' + name: Ara Mitama + type: Mitama +- fusion_type: normal + level: '29' + name: Nigi Mitama + type: Mitama +- fusion_type: normal + level: '32' + name: Kusi Mitama + type: Mitama +- fusion_type: normal + level: '35' + name: Saki Mitama + type: Mitama +- fusion_type: normal + level: '8' + name: Apsaras + type: Yoma +- fusion_type: normal + level: '14' + name: Isora + type: Yoma +- fusion_type: normal + level: '19' + name: Koppa + type: Yoma +- fusion_type: normal + level: '23' + name: Dis + type: Yoma +- fusion_type: evolve + level: '28' + name: Karasu + type: Yoma +- fusion_type: normal + level: '37' + name: Onkot + type: Yoma +- fusion_type: normal + level: '44' + name: Jinn + type: Yoma +- fusion_type: normal + level: '48' + name: Purski + type: Yoma +- fusion_type: evolve + level: '52' + name: Efreet + type: Yoma +- fusion_type: normal + level: '2' + name: Pixie + type: Fairy +- fusion_type: normal + level: '7' + name: Jack Frost + type: Fairy +- fusion_type: evolve + level: '10' + name: High Pixie + type: Fairy +- fusion_type: normal + level: '19' + name: Pyro Jack + type: Fairy +- fusion_type: normal + level: '26' + name: Kelpie + type: Fairy +- fusion_type: normal + level: '38' + name: Troll + type: Fairy +- fusion_type: normal + level: '43' + name: Setanta + type: Fairy +- fusion_type: normal + level: '46' + name: Oberon + type: Fairy +- fusion_type: normal + level: '57' + name: Titania + type: Fairy +- fusion_type: normal + level: '11' + name: Angel + type: Divine +- fusion_type: normal + level: '18' + name: Archangel + type: Divine +- fusion_type: normal + level: '28' + name: Principality + type: Divine +- fusion_type: normal + level: '33' + name: Power + type: Divine +- fusion_type: normal + level: '41' + name: Virtue + type: Divine +- fusion_type: normal + level: '50' + name: Dominion + type: Divine +- fusion_type: normal + level: '64' + name: Throne + type: Divine +- fusion_type: normal + level: '20' + name: Forneus + type: Fallen +- fusion_type: normal + level: '29' + name: Eligor + type: Fallen +- fusion_type: normal + level: '37' + name: Berith + type: Fallen +- fusion_type: normal + level: '45' + name: Ose + type: Fallen +- fusion_type: normal + level: '58' + name: Decarabia + type: Fallen +- fusion_type: normal + level: '68' + name: Flauros + type: Fallen +- fusion_type: normal + level: '14' + name: Nozuchi + type: Snake +- fusion_type: normal + level: '28' + name: Naga + type: Snake +- fusion_type: normal + level: '34' + name: Mizuchi + type: Snake +- fusion_type: evolve + level: '37' + name: Raja Naga + type: Snake +- fusion_type: normal + level: '55' + name: Quetzalcoatl + type: Snake +- fusion_type: normal + level: '66' + name: Yurlungur + type: Snake +- fusion_type: normal + level: '13' + name: Inugami + type: Beast +- fusion_type: normal + level: '18' + name: Nekomata + type: Beast +- fusion_type: normal + level: '23' + name: Badb Catha + type: Beast +- fusion_type: normal + level: '34' + name: Orthrus + type: Beast +- fusion_type: normal + level: '54' + name: Sparna + type: Beast +- fusion_type: normal + level: '61' + name: Cerberus + type: Beast +- fusion_type: normal + level: '3' + name: Kodama + type: Jirae +- fusion_type: normal + level: '5' + name: Hua Po + type: Jirae +- fusion_type: normal + level: '13' + name: Sudama + type: Jirae +- fusion_type: normal + level: '35' + name: Sarutahiko + type: Jirae +- fusion_type: normal + level: '49' + name: Titan + type: Jirae +- fusion_type: normal + level: '55' + name: Gogmagog + type: Jirae +- fusion_type: normal + level: '4' + name: Shikigami + type: Brute +- fusion_type: normal + level: '20' + name: Momunofu + type: Brute +- fusion_type: normal + level: '25' + name: Oni + type: Brute +- fusion_type: normal + level: '44' + name: Ikusa + type: Brute +- fusion_type: normal + level: '54' + name: Shiki-Ouji + type: Brute +- fusion_type: normal + level: '59' + name: Kin-Ki + type: Brute +- fusion_type: normal + level: '62' + name: Sui-Ki + type: Brute +- fusion_type: normal + level: '66' + name: Fuu-Ki + type: Brute +- fusion_type: special + level: '81' + name: Ongyo-Ki + type: Brute +- fusion_type: normal + level: '7' + name: Datsue-Ba + type: Femme +- fusion_type: normal + level: '20' + name: Taraka + type: Femme +- fusion_type: normal + level: '32' + name: Shikome + type: Femme +- fusion_type: normal + level: '43' + name: Yaksini + type: Femme +- fusion_type: normal + level: '52' + name: Dakini + type: Femme +- fusion_type: normal + level: '58' + name: Clotho + type: Femme +- fusion_type: normal + level: '63' + name: Lachesis + type: Femme +- fusion_type: normal + level: '67' + name: Atropos + type: Femme +- fusion_type: normal + level: '72' + name: Rangda + type: Femme +- fusion_type: normal + level: '30' + name: Arahabaki + type: Vile +- fusion_type: normal + level: '33' + name: Baphomet + type: Vile +- fusion_type: normal + level: '35' + name: Pazuzu + type: Vile +- fusion_type: special + level: '58' + name: Girimehkala + type: Vile +- fusion_type: normal + level: '65' + name: Tao Tie + type: Vile +- fusion_type: special + level: '73' + name: Samael + type: Vile +- fusion_type: normal + level: '83' + name: Mada + type: Vile +- fusion_type: normal + level: '52' + name: Loki + type: Tyrant +- fusion_type: normal + level: '69' + name: Abaddon + type: Tyrant +- fusion_type: normal + level: '74' + name: Surt + type: Tyrant +- fusion_type: evolve + level: '77' + name: Aciel + type: Tyrant +- fusion_type: normal + level: '84' + name: Beelzebub + type: Tyrant +- fusion_type: normal + level: '91' + name: Mot + type: Tyrant +- fusion_type: evolve + level: '95' + name: Beelzebub (Fly) + type: Tyrant +- fusion_type: normal + level: '8' + name: Lilim + type: Night +- fusion_type: normal + level: '18' + name: Fomor + type: Night +- fusion_type: normal + level: '25' + name: Incubus + type: Night +- fusion_type: normal + level: '37' + name: Succubus + type: Night +- fusion_type: normal + level: '47' + name: Kaiwan + type: Night +- fusion_type: normal + level: '53' + name: Loa + type: Night +- fusion_type: evolve + level: '56' + name: Queen Mab + type: Night +- fusion_type: normal + level: '66' + name: Black Frost + type: Night +- fusion_type: normal + level: '70' + name: Nyx + type: Night +- fusion_type: evolve + level: '80' + name: Lilith + type: Night +- fusion_type: normal + level: '6' + name: Zhen + type: Wilder +- fusion_type: normal + level: '15' + name: Bicorn + type: Wilder +- fusion_type: normal + level: '25' + name: Raiju + type: Wilder +- fusion_type: normal + level: '31' + name: Nue + type: Wilder +- fusion_type: normal + level: '43' + name: Mothman + type: Wilder +- fusion_type: normal + level: '75' + name: Hresvelgr + type: Wilder +- fusion_type: normal + level: '4' + name: Preta + type: Haunt +- fusion_type: normal + level: '11' + name: Choronzon + type: Haunt +- fusion_type: normal + level: '17' + name: Yaka + type: Haunt +- fusion_type: normal + level: '20' + name: Chatterskull + type: Haunt +- fusion_type: normal + level: '28' + name: Pisaca + type: Haunt +- fusion_type: normal + level: '49' + name: Legion + type: Haunt +- fusion_type: normal + level: '63' + name: Rakshasa + type: Haunt +- fusion_type: normal + level: '1' + name: Will O' Wisp + type: Foul +- fusion_type: normal + level: '6' + name: Slime + type: Foul +- fusion_type: normal + level: '7' + name: Mou-Ryo + type: Foul +- fusion_type: normal + level: '16' + name: Blob + type: Foul +- fusion_type: normal + level: '28' + name: Black Ooze + type: Foul +- fusion_type: normal + level: '42' + name: Phantom + type: Foul +- fusion_type: special + level: '45' + name: Sakahagi + type: Foul +- fusion_type: normal + level: '52' + name: Shadow + type: Foul +- fusion_type: evolve + level: '73' + name: Uriel + type: Seraph +- fusion_type: special + level: '84' + name: Raphael + type: Seraph +- fusion_type: special + level: '87' + name: Gabriel + type: Seraph +- fusion_type: special + level: '90' + name: Michael + type: Seraph +- fusion_type: special + level: '95' + name: Metatron + type: Seraph +- fusion_type: evolve + level: '33' + name: Valkyrie + type: Wargod +- fusion_type: evolve + level: '58' + name: Ganesha + type: Wargod +- fusion_type: evolve + level: '38' + name: Kurama + type: Genma +- fusion_type: evolve + level: '46' + name: Hanuman + type: Genma +- fusion_type: evolve + level: '52' + name: Cu Chulainn + type: Genma +- fusion_type: evolve + level: '24' + name: Gui Xian + type: Dragon +- fusion_type: evolve + level: '44' + name: Long + type: Dragon +- fusion_type: evolve + level: '22' + name: Makami + type: Avatar +- fusion_type: normal + level: '26' + name: Cai-Zhi + type: Avatar +- fusion_type: normal + level: '46' + name: Yatagarasu + type: Avatar +- fusion_type: normal + level: '60' + name: Barong + type: Avatar +- fusion_type: evolve + level: '63' + name: Garuda + type: Avian +- fusion_type: special + level: '63' + name: Gurr + type: Raptor +- fusion_type: evolve + level: '64' + name: Albion + type: Entity +- fusion_type: deathstone + level: '30' + name: Matador + type: Fiend +- fusion_type: deathstone + level: '37' + name: Daisoujou + type: Fiend +- fusion_type: deathstone + level: '42' + name: Hell Biker + type: Fiend +- fusion_type: deathstone + level: '52' + name: White Rider + type: Fiend +- fusion_type: deathstone + level: '55' + name: Red Rider + type: Fiend +- fusion_type: deathstone + level: '61' + name: Black Rider + type: Fiend +- fusion_type: deathstone + level: '63' + name: Pale Rider + type: Fiend +- fusion_type: deathstone + level: '69' + name: The Harlot + type: Fiend +- fusion_type: deathstone + level: '77' + name: Trumpeter + type: Fiend diff --git a/lib/Games/SMTNocturne/Fusion/Role/Deathstone.pm b/lib/Games/SMTNocturne/Fusion/Role/Deathstone.pm new file mode 100644 index 0000000..dc05f5f --- /dev/null +++ b/lib/Games/SMTNocturne/Fusion/Role/Deathstone.pm @@ -0,0 +1,6 @@ +package Games::SMTNocturne::Fusion::Role::Deathstone; +use Moose::Role; + +no Moose::Role; + +1; diff --git a/lib/Games/SMTNocturne/Fusion/Role/Evolve.pm b/lib/Games/SMTNocturne/Fusion/Role/Evolve.pm new file mode 100644 index 0000000..0a89f76 --- /dev/null +++ b/lib/Games/SMTNocturne/Fusion/Role/Evolve.pm @@ -0,0 +1,6 @@ +package Games::SMTNocturne::Fusion::Role::Evolve; +use Moose::Role; + +no Moose::Role; + +1; diff --git a/lib/Games/SMTNocturne/Fusion/Role/Special.pm b/lib/Games/SMTNocturne/Fusion/Role/Special.pm new file mode 100644 index 0000000..62615b2 --- /dev/null +++ b/lib/Games/SMTNocturne/Fusion/Role/Special.pm @@ -0,0 +1,6 @@ +package Games::SMTNocturne::Fusion::Role::Special; +use Moose::Role; + +no Moose::Role; + +1; diff --git a/lib/Games/SMTNocturne/Fusion/Types.pm b/lib/Games/SMTNocturne/Fusion/Types.pm new file mode 100644 index 0000000..2811902 --- /dev/null +++ b/lib/Games/SMTNocturne/Fusion/Types.pm @@ -0,0 +1,18 @@ +package Games::SMTNocturne::Fusion::Types; +use strict; +use warnings; +use Moose::Util::TypeConstraints; + +enum 'Games::SMTNocturne::Fusion::DemonType' => + qw(Deity Megami Fury Lady Kishin Holy Element Mitama Yoma Fairy Divine + Fallen Snake Beast Jirae Brute Femme Vile Tyrant Night Wilder Haunt + Foul Seraph Wargod Genma Dragon Avatar Avian Raptor Entity Fiend); +enum 'Games::SMTNocturne::Fusion::FusionType' => + qw(deathstone evolve normal special); +subtype 'Games::SMTNocturne::Fusion::DemonList', + as 'ArrayRef[Games::SMTNocturne::Fusion::Demon]'; +coerce 'Games::SMTNocturne::Fusion::DemonList', + from 'ArrayRef[Str]', + via { [map { Games::SMTNocturne::Fusion::Demon->lookup($_) } @$_] }; + +1; -- cgit v1.2.3-54-g00ecf