WWW::DaysOfWonder::Memoir44::Scenario - scenario object


WWW-DaysOfWonder-Memoir44 documentation  | view source Contained in the WWW-DaysOfWonder-Memoir44 distribution.

Index


NAME

Top

WWW::DaysOfWonder::Memoir44::Scenario - scenario object

VERSION

Top

version 2.110310

DESCRIPTION

Top

This module represents a scenario with all its attributes. It implements MooseX::Storage role, and therefore methods pack() and unpack() are available.

ATTRIBUTES

Top

my $int = $scenario->id;

Id of the scenario.

my $str = $scenario->name;

Name of the scenario.

my $str = $scenario->operation;

Operation the scenario is part of.

my $date = $scenario->updated;

Date of last scenario update (format yyyy-mm-dd).

my $int = $scenario->rating;

Average scenario rating (1, 2 or 3).

my $str = $scenario->front;

Front where the scenario takes place. Can be West, East, Mediterranean, etc.

my $str = $scenario->author;

Who wrote the scenario.

my $str = $scenario->board;

Country, beach, winter or desert.

my $str = $scenario->format;

Standard, overlord or breakthru.

my $str = $scenario->source;

Game (bundled with board game), approved (official extensions), public (all the other).

my $bool = $scenario->need_tp;

Whether terrain pack extension is needed.

my $bool = $scenario->need_ef;

Whether eastern front extension is needed.

my $bool = $scenario->need_mt;

Whether mediterranean theater extension is needed.

my $bool = $scenario->need_pt;

Whether pacific theater extension is needed.

my $bool = $scenario->need_ap;

Whether air pack extension is needed.

my $bool = $scenario->need_bm;

Whether battle maps extension is needed.

my $bool = $scenario->need_cb;

Whether campaign book extension is needed.

METHODS

Top

as_string

    my $str = $scenario->as_string;

Return a line (with a final \n) dumping the scenario and all its attributes. It is also the method called for stringification, eg when doing stuff like:

    print $scenario;

tp

ef

pt

mt

ap

    my $str = $scenario->tp;
    my $str = $scenario->ef;
    my $str = $scenario->pt;
    my $str = $scenario->mt;
    my $str = $scenario->ap;

Those five methods return either an empty string or the abbreviation of the expansion depending on the value of the need_XX boolean attribute of the $scenario. They are useful for display purposes.

rating_as_star

    my $str = $scenario->rating_as_star;

Return a string of 0 to 3 stars * depending on the rating attribute of the $scenario.

AUTHOR

Top

  Jerome Quelin

COPYRIGHT AND LICENSE

Top


WWW-DaysOfWonder-Memoir44 documentation  | view source Contained in the WWW-DaysOfWonder-Memoir44 distribution.