osric-cgi/lib/OSRIC/Race/Dwarf.pm

55 lines
1019 B
Perl
Raw Permalink Normal View History

2015-01-28 04:49:10 -05:00
package OSRIC::Race::Dwarf;
use parent qw(OSRIC::Race);
2015-01-26 14:45:09 -05:00
use OSRIC::Util qw/d/;
# The stat buffs/nerfs a race gives:
sub stats_boosts
{
{
str => 0,
dex => 0,
con => 1,
2015-06-09 07:10:47 -04:00
intl => 0,
2015-01-26 14:45:09 -05:00
wis => 0,
cha => -1,
}
}
# The permitted classes:
sub permitted_classes
{
2015-01-28 04:21:26 -05:00
[ [ "Assassin" ], [ "Cleric" ], [ "Fighter" ], [ "Thief" ],
[ "Fighter", "Thief" ] ]
2015-01-26 14:45:09 -05:00
}
# A hash of subs to generate the starting age based on class:
sub ages
{
{
2015-01-28 04:21:26 -05:00
assassin => sub { 75 + d(6, 3) },
cleric => sub { 250 + d(20, 2) },
druid => sub { 250 + d(20, 2) },
fighter => sub { 40 + d(4, 5) },
2015-01-26 14:45:09 -05:00
illusionist => sub { 0 },
magicuser => sub { 0 },
2015-01-28 04:21:26 -05:00
paladin => sub { 40 + d(4, 5) },
ranger => sub { 40 + d(4, 5) },
2015-02-09 20:04:21 -05:00
thief => sub { 75 + d(6, 3) },
2015-01-26 14:45:09 -05:00
}
}
# The racial limitations:
sub racial_limitations
{
{
str => { min => 8, max => 18 },
dex => { min => 3, max => 17 },
con => { min => 12, max => 19 },
2015-06-09 07:10:47 -04:00
intl => { min => 3, max => 18 },
2015-01-26 14:45:09 -05:00
wis => { min => 3, max => 18 },
cha => { min => 3, max => 16 },
}
}
1;