Fixed gold generation
This commit is contained in:
parent
591c8e5dae
commit
262f337b7b
@ -189,12 +189,12 @@ sub generate_gold
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
# Get the classes and sort by the highest starting gold (see page 28):
|
# Get the classes and sort by the highest starting gold (see page 28):
|
||||||
my @sorted = sort { "OSRIC::Class::$a"->max_starting_gold <=>
|
my @sorted = sort { "OSRIC::Class::$b"->max_starting_gold <=>
|
||||||
"OSRIC::Class::$b"->max_starting_gold }
|
"OSRIC::Class::$a"->max_starting_gold }
|
||||||
@{$self->{personal}->{classes}};
|
@{$self->{personal}->{classes}};
|
||||||
|
|
||||||
# Generate the starting gold:
|
# Generate the starting gold:
|
||||||
$self->{wealth}->{coins} = "OSRIC::Class::$classes[0]"->get_gold;
|
$self->{wealth}->{coins} = "OSRIC::Class::$sorted[0]"->get_gold;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Encodes the character to JSON:
|
# Encodes the character to JSON:
|
||||||
|
Loading…
Reference in New Issue
Block a user