| 1 | 1 | ▶ | use 5.20.0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | package Games::Nintendo::Mario::SMBTLL 0.209; | ||
| 4 | # ABSTRACT: a class for long-lost Italian plumbers | ||
| 5 | |||
| 6 | 1 | ▶ | use parent qw(Games::Nintendo::Mario::SMB); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | #pod =head1 SYNOPSIS | ||
| 9 | #pod | ||
| 10 | #pod use Games::Nintendo::Mario::SMBLL; | ||
| 11 | #pod | ||
| 12 | #pod my $hero = Games::Nintendo::Mario::SMB->new( | ||
| 13 | #pod name => 'Luigi', | ||
| 14 | #pod state => 'normal', | ||
| 15 | #pod ); | ||
| 16 | #pod | ||
| 17 | #pod $hero->powerup('mushroom'); # doop doop doop! | ||
| 18 | #pod $hero->powerup('flower'); # change clothes | ||
| 19 | #pod | ||
| 20 | #pod $hero->powerup('poison_mushroom'); # uh oh! | ||
| 21 | #pod $hero->damage; # cue the Mario Death Music | ||
| 22 | #pod | ||
| 23 | #pod =head1 DESCRIPTION | ||
| 24 | #pod | ||
| 25 | #pod This class subclasses Games::Nintendo::Mario, providing a model of the behavior | ||
| 26 | #pod of the Mario Brothers in Super Mario Brothers: The Lost Levels. All of the | ||
| 27 | #pod methods described in the Mario interface exist as documented. | ||
| 28 | #pod | ||
| 29 | #pod =head2 NAMES | ||
| 30 | #pod | ||
| 31 | #pod The plumber may be named Mario or Luigi. | ||
| 32 | #pod | ||
| 33 | #pod =head2 STATES | ||
| 34 | #pod | ||
| 35 | #pod The plumber's state may be any of: C<normal>, C<super>, or C<fire> | ||
| 36 | #pod | ||
| 37 | #pod =head2 POWERUPS | ||
| 38 | #pod | ||
| 39 | #pod Valid powerups are: C<mushroom>, C<poison_mushroom>, and C<flower> | ||
| 40 | #pod | ||
| 41 | #pod =method games | ||
| 42 | #pod | ||
| 43 | #pod This ruleset reflects Mario in Super Mario Bros.: The Lost Levels, the original | ||
| 44 | #pod Japanese sequel to SMB, later released as SMBTLL in the US (and now available | ||
| 45 | #pod on the Wii Virtual Console). | ||
| 46 | #pod | ||
| 47 | #pod =cut | ||
| 48 | |||
| 49 | 5 | ▶ | sub _items { qw[mushroom flower poison_mushroom] } |
|
Subroutine
_items: called CC=1 SCAR=0.0
| |||
| 50 | |||
| 51 | 6 | ▶ | sub _goto_hash { |
|
Subroutine
_goto_hash: called CC=1 SCAR=0.0
| |||
| 52 | 6 | my ($self) = @_; | |
| 53 | |||
| 54 | 6 | my $goto_hash = $self->SUPER::_goto_hash; | |
| 55 | |||
| 56 | return { | ||
| 57 | %$goto_hash, | ||
| 58 | poison_mushroom => $goto_hash->{damage} | ||
| 59 | } | ||
| 60 | 6 | } | |
| 61 | |||
| 62 | 0 | ▶ | sub games { |
|
Subroutine
games: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 63 | return ( | ||
| 64 | 0 | 'Super Mario Bros.: The Lost Levels', | |
| 65 | # 'Super Mario Bros. 2: For Super Players', | ||
| 66 | ); | ||
| 67 | } | ||
| 68 | |||
| 69 | 1 | "It's-a me! Mario!"; | |
| 70 | |||
| 71 | __END__ | ||