| 1 | package RPG::Traveller::Starmap::Star; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 7 | ▶ | use strict; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 7 | ▶ | use Moose; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 7 | ▶ | use RPG::Traveller::Starmap::Constants qw/ :starsizes :startypes /; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 7 | ▶ | use RPG::Traveller::Starmap::Star::OrbitPlane; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 7 | ▶ | use RPG::Dice; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 7 | ▶ | use Bit::Vector; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 7 | ▶ | use feature 'switch'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | # ABSTRACT: Base class for a star | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 7 | has size => ( is => "rw", isa => "Int" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 7 | has type => ( is => "rw", isa => "Int" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 7 | has spectralClass => ( is => "rw", isa => "Int" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 7 | has orbitPlane => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | is => "rw", | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | isa => "RPG::Traveller::Starmap::Star::OrbitPlane" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 7 | has habitableOrbit => ( is => "rw", isa => "Int" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 7 | has minOrbit => ( is => "rw", isa => "Int" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 7 | has orbitMap => ( is => "rw", isa => "Bit::Vector" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | sub getSpectralClass { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getSpectralClass: not called CC=11 SCAR=48.8
Pod
undocumented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | my $d1 = RPG::Dice->new('1d6'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | given ( $d1->roll() ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | when ( [ 1, 3, 5 ] ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | my $roll = ( $d1->roll() ) + 4; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | while ( $roll == 10 ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | $roll = ( $d1->roll() ) + 4; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | $self->spectralClass($roll); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | when ( [ 2, 4, 6 ] ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | my $roll = ( $d1->roll() ) - 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | while ( $roll == 5 ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | $roll = ( $d1->roll() ) - 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | $self->spectralClass($roll); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 0 | ▶ | if ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$self->type == 6 && $self->spactralClass > 4 || $self->type == 7 and $self->size == 5
$self->type == 6 and $self->spactralClass > 4 or $self->type == 7
$self->type == 6 and $self->spactralClass > 4
MC/DC0%0/4
$self->type == 6 && $self->spactralClass > 4 || $self->type == 7 and $self->size == 5
$self->type == 6
$self->spactralClass > 4
$self->type == 7
$self->size == 5
Truth table0%0/8
A and B or C and D
A= $self->type == 6B= $self->spactralClass > 4C= $self->type == 7D= $self->size == 5
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | ( ( $self->type() == K ) && ( $self->spactralClass() > 4 ) ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | || ( $self->type() == M ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | && ( $self->size() == IV ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 0 | $self->size(V); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | ▶ | if ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$self->type == 2 or $self->type == 4 and $self->spectralClass < 5 and $self->size == 5
$self->type == 4 and $self->spectralClass < 5 and $self->size == 5
$self->type == 4 and $self->spectralClass < 5
MC/DC0%0/4
$self->type == 2 or $self->type == 4 and $self->spectralClass < 5 and $self->size == 5
$self->type == 2
$self->type == 4
$self->spectralClass < 5
$self->size == 5
Truth table0%0/5
A or B and C and D
A= $self->type == 2B= $self->type == 4C= $self->spectralClass < 5D= $self->size == 5
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | ( $self->type() == B ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | || ( ( $self->type() == F ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | && ( $self->spectralClass() < 5 ) ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | && ( $self->size() == IV ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | $self->size(V); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | ▶ | sub orbitZones { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
orbitZones: not called CC=1 SCAR=6.9
Pod
undocumented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 7 | 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | __END__ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||