line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
432
|
use 5.20.0; |
|
1
|
|
|
|
|
10
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
61
|
|
3
|
|
|
|
|
|
|
package Games::Nintendo::Mario::NSMB::Wii 0.209; |
4
|
|
|
|
|
|
|
# ABSTRACT: a class for Italian plumbers who wave their hands around |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
432
|
use parent qw(Games::Nintendo::Mario::NSMB); |
|
1
|
|
|
|
|
339
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#pod =head1 WARNING!! |
9
|
|
|
|
|
|
|
#pod |
10
|
|
|
|
|
|
|
#pod Nobody has given RJBS a copy of NSMB Wii yet, so he hasn't played it, so this |
11
|
|
|
|
|
|
|
#pod class may not be an accurate reflection of its behavior. |
12
|
|
|
|
|
|
|
#pod |
13
|
|
|
|
|
|
|
#pod =head1 SYNOPSIS |
14
|
|
|
|
|
|
|
#pod |
15
|
|
|
|
|
|
|
#pod use Games::Nintendo::Mario::NSMB::Wii; |
16
|
|
|
|
|
|
|
#pod |
17
|
|
|
|
|
|
|
#pod my $hero = Games::Nintendo::Mario::SMB->new( |
18
|
|
|
|
|
|
|
#pod name => 'Blue Toad', |
19
|
|
|
|
|
|
|
#pod state => 'normal', |
20
|
|
|
|
|
|
|
#pod ); |
21
|
|
|
|
|
|
|
#pod |
22
|
|
|
|
|
|
|
#pod $hero->powerup('mushroom'); # doop doop doop! |
23
|
|
|
|
|
|
|
#pod $hero->powerup('flower'); # change clothes |
24
|
|
|
|
|
|
|
#pod |
25
|
|
|
|
|
|
|
#pod $hero->damage for (1 .. 2); # cue the Mario Death Music |
26
|
|
|
|
|
|
|
#pod |
27
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
28
|
|
|
|
|
|
|
#pod |
29
|
|
|
|
|
|
|
#pod This class subclasses Games::Nintendo::Mario, providing a model of the behavior |
30
|
|
|
|
|
|
|
#pod of the Mario Brothers in New Super Mario Bros. for Wii. All of the methods |
31
|
|
|
|
|
|
|
#pod described in the Mario interface exist as documented. |
32
|
|
|
|
|
|
|
#pod |
33
|
|
|
|
|
|
|
#pod =head2 NAMES |
34
|
|
|
|
|
|
|
#pod |
35
|
|
|
|
|
|
|
#pod The plumber may be named Mario or Luigi, or can be "Blue Toad" or "Yellow |
36
|
|
|
|
|
|
|
#pod Toad." |
37
|
|
|
|
|
|
|
#pod |
38
|
|
|
|
|
|
|
#pod =head2 STATES |
39
|
|
|
|
|
|
|
#pod |
40
|
|
|
|
|
|
|
#pod The plumber's state may be any of: normal super fire shell mini mega ice |
41
|
|
|
|
|
|
|
#pod penguin propeller |
42
|
|
|
|
|
|
|
#pod |
43
|
|
|
|
|
|
|
#pod =head2 POWERUPS |
44
|
|
|
|
|
|
|
#pod |
45
|
|
|
|
|
|
|
#pod Valid powerups are: mushroom flower shell mega_mushroom mini_mushroom |
46
|
|
|
|
|
|
|
#pod ice_flower penguinsuit propeller_mushroom |
47
|
|
|
|
|
|
|
#pod |
48
|
|
|
|
|
|
|
#pod =method games |
49
|
|
|
|
|
|
|
#pod |
50
|
|
|
|
|
|
|
#pod This ruleset reflects Mario in New Super Mario Bros. Wii, the first SMB game |
51
|
|
|
|
|
|
|
#pod for Nintendo Wii. |
52
|
|
|
|
|
|
|
#pod |
53
|
|
|
|
|
|
|
#pod =cut |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
51
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
233
|
|
56
|
|
|
|
|
|
|
|
57
|
10
|
|
|
10
|
|
30
|
sub _names { ('Mario', 'Luigi', 'Blue Toad', 'Yellow Toad') } |
58
|
10
|
|
|
10
|
|
38
|
sub _states { qw[normal super fire shell mini mega propeller ice penguin] } |
59
|
0
|
|
|
0
|
|
|
sub _items { qw[mushroom flower shell mega_mushroom mini_mushroom propeller_mushroom ice_flower penguinsuit] } |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
my %__default_behavior = ( |
62
|
|
|
|
|
|
|
damage => 'dead', |
63
|
|
|
|
|
|
|
mushroom => 'super', |
64
|
|
|
|
|
|
|
flower => 'fire', |
65
|
|
|
|
|
|
|
shell => 'shell', |
66
|
|
|
|
|
|
|
mega_mushroom => 'mega', |
67
|
|
|
|
|
|
|
mini_mushroom => 'mini', |
68
|
|
|
|
|
|
|
propeller_mushroom => 'propeller', |
69
|
|
|
|
|
|
|
ice_flower => 'ice', |
70
|
|
|
|
|
|
|
penguinsuit => 'penguin', |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my %state = ( |
74
|
|
|
|
|
|
|
normal => { %__default_behavior }, |
75
|
|
|
|
|
|
|
super => { |
76
|
|
|
|
|
|
|
%__default_behavior, |
77
|
|
|
|
|
|
|
damage => 'normal', |
78
|
|
|
|
|
|
|
mushroom => 'save', |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
fire => { |
81
|
|
|
|
|
|
|
%__default_behavior, |
82
|
|
|
|
|
|
|
damage => 'normal', |
83
|
|
|
|
|
|
|
flower => 'save', |
84
|
|
|
|
|
|
|
mushroom => 'save', |
85
|
|
|
|
|
|
|
}, |
86
|
|
|
|
|
|
|
shell => { |
87
|
|
|
|
|
|
|
%__default_behavior, |
88
|
|
|
|
|
|
|
damage => 'super', |
89
|
|
|
|
|
|
|
mushroom => 'save', |
90
|
|
|
|
|
|
|
flower => 'save', |
91
|
|
|
|
|
|
|
}, |
92
|
|
|
|
|
|
|
mega => { map { $_ => 'ignore' } keys %__default_behavior }, |
93
|
|
|
|
|
|
|
mini => { %__default_behavior, mini => 'save' }, |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
propeller => { |
96
|
|
|
|
|
|
|
%__default_behavior, |
97
|
|
|
|
|
|
|
damage => 'normal', |
98
|
|
|
|
|
|
|
mushroom => 'save', |
99
|
|
|
|
|
|
|
}, |
100
|
|
|
|
|
|
|
ice => { |
101
|
|
|
|
|
|
|
%__default_behavior, |
102
|
|
|
|
|
|
|
damage => 'normal', |
103
|
|
|
|
|
|
|
mushroom => 'save', |
104
|
|
|
|
|
|
|
}, |
105
|
|
|
|
|
|
|
penguin => { |
106
|
|
|
|
|
|
|
%__default_behavior, |
107
|
|
|
|
|
|
|
damage => 'normal', |
108
|
|
|
|
|
|
|
mushroom => 'save', |
109
|
|
|
|
|
|
|
}, |
110
|
|
|
|
|
|
|
); |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub games { |
113
|
0
|
|
|
0
|
1
|
|
return ('New Super Mario Bros. Wii'); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
"Go Wigi!"; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
__END__ |