diff --git a/lib/OSRIC/Races.pm b/lib/OSRIC/Race.pm similarity index 100% rename from lib/OSRIC/Races.pm rename to lib/OSRIC/Race.pm diff --git a/lib/OSRIC/Races/Dwarf.pm b/lib/OSRIC/Race/Dwarf.pm similarity index 62% rename from lib/OSRIC/Races/Dwarf.pm rename to lib/OSRIC/Race/Dwarf.pm index e9bcccb..75d8c33 100644 --- a/lib/OSRIC/Races/Dwarf.pm +++ b/lib/OSRIC/Race/Dwarf.pm @@ -1,4 +1,4 @@ -package OSRIC::Races::Dwarf +package OSRIC::Race::Dwarf use parent qw(OSRIC::Races); use OSRIC::Util qw/d/; @@ -18,22 +18,23 @@ sub stats_boosts # The permitted classes: sub permitted_classes { - [ "Assassin", "Cleric", "Fighter", "Thief", [ "Fighter", "Thief" ] ] + [ [ "Assassin" ], [ "Cleric" ], [ "Fighter" ], [ "Thief" ], + [ "Fighter", "Thief" ] ] } # A hash of subs to generate the starting age based on class: sub ages { { - assassin => sub { (75 + (d(6) + d(6) + d(6))) }, - cleric => sub { (250 + (d(20) + d(20))) }, - druid => sub { 0 }, - fighter => sub { (40 + (d(4) + d(4) + d(4) + d(4) + d(4))) }, + assassin => sub { 75 + d(6, 3) }, + cleric => sub { 250 + d(20, 2) }, + druid => sub { 250 + d(20, 2) }, + fighter => sub { 40 + d(4, 5) }, illusionist => sub { 0 }, magicuser => sub { 0 }, - paladin => sub { 0 }, - ranger => sub { 0 }, - theif => sub { (75 + (d(6) + d(6) + d(6))) }, + paladin => sub { 40 + d(4, 5) }, + ranger => sub { 40 + d(4, 5) }, + theif => sub { 75 + d(6, 3) }, } } diff --git a/lib/OSRIC/Races/Elf.pm b/lib/OSRIC/Race/Elf.pm similarity index 59% rename from lib/OSRIC/Races/Elf.pm rename to lib/OSRIC/Race/Elf.pm index 2b82f54..f6c8294 100644 --- a/lib/OSRIC/Races/Elf.pm +++ b/lib/OSRIC/Race/Elf.pm @@ -1,4 +1,4 @@ -package OSRIC::Races::Elf; +package OSRIC::Race::Elf; use parent qw(OSRIC::Races); use OSRIC::Util qw/d/; @@ -18,7 +18,7 @@ sub stats_boosts # The permitted classes: sub permitted_classes { - [ "Assassin", "Cleric", "Fighter", "MagicUser", "Thief", + [ [ "Assassin" ], [ "Cleric" ], [ "Fighter" ], [ "MagicUser" ], [ "Thief" ], [ "Fighter", "MagicUser" ], [ "Fighter", "Thief" ], [ "MagicUser", "Thief" ], [ "Fighter", "MagicUser", "Thief" ] ] } @@ -27,15 +27,15 @@ sub permitted_classes sub ages { { - assassin => sub { 0 }, - cleric => sub { my $i = 0; $i += d(10) for(1..10); $i += 500; }, - druid => sub { 0 }, - fighter => sub { my $i = 0; $i += d(6) for(1..5); $i += 130; }, - illusionist => sub { 0 }, - magicuser => sub { my $i = 0; $i += d(6) for(1..5); $i += 150; }, - paladin => sub { 0 }, - ranger => sub { 0 }, - theif => sub { my $i = 0; $i += d(6) for(1..5); $i += 100; }, + assassin => sub { 100 + d(6,5) }, + cleric => sub { 500 + d(10, 10) }, + druid => sub { 500 + d(10, 10) }, + fighter => sub { 130 + d(6, 5) }, + illusionist => sub { 150 + d(6, 5) }, + magicuser => sub { 150 + d(6, 5) }, + paladin => sub { 130 + d(6, 5) }, + ranger => sub { 130 + d(6, 5) }, + theif => sub { 100 + d(6, 5) }, } } diff --git a/lib/OSRIC/Races/Gnome.pm b/lib/OSRIC/Race/Gnome.pm similarity index 51% rename from lib/OSRIC/Races/Gnome.pm rename to lib/OSRIC/Race/Gnome.pm index 56bb843..bf65f96 100644 --- a/lib/OSRIC/Races/Gnome.pm +++ b/lib/OSRIC/Race/Gnome.pm @@ -1,4 +1,4 @@ -package OSRIC::Races::Gnome; +package OSRIC::Race::Gnome; use parent qw(OSRIC::Races); use OSRIC::Util qw/d/; @@ -18,8 +18,8 @@ sub stats_boosts # The permitted classes: sub permitted_classes { - [ "Assassin", "Cleric", "Fighter", "Illusionist", "Thief", - [ "Fighter", "Illusionist" ], [ "Fighter", "Thief" ], + [ [ "Assassin" ], [ "Cleric" ], [ "Fighter" ], [ "Illusionist" ], + [ "Thief" ], [ "Fighter", "Illusionist" ], [ "Fighter", "Thief" ], [ "Illusionist", "Thief" ] ] } @@ -27,15 +27,15 @@ sub permitted_classes sub ages { { - assassin => sub { my $i = 0; $i += d(4) for(1..5); $i += 80; }, - cleric => sub { my $i = 0; $i += d(12) for(1..3); $i += 300; }, - druid => sub { 0 }, - fighter => sub { my $i = 0; $i += d(4) for(1..5); $i += 60; }, - illusionist => sub { my $i = 0; $i += d(12) for(1..2); $i += 100; } - magicuser => sub { 0 }, - paladin => sub { 0 }, - ranger => sub { 0 }, - theif => sub { my $i = 0; $i += d(4) for(1..5); $i += 80; }, + assassin => sub { 80 + d(4, 5) }, + cleric => sub { 300 + d(12, 3) }, + druid => sub { 300 + d(12, 3) }, + fighter => sub { 60 + d(4, 5) }, + illusionist => sub { 100 + d(12, 2) } + magicuser => sub { 100 + d(12, 2) }, + paladin => sub { 60 + d(4, 5) }, + ranger => sub { 60 + d(4, 5) }, + theif => sub { 80 + d(4, 5) }, } } diff --git a/lib/OSRIC/Race/HalfElf.pm b/lib/OSRIC/Race/HalfElf.pm new file mode 100644 index 0000000..927210a --- /dev/null +++ b/lib/OSRIC/Race/HalfElf.pm @@ -0,0 +1,58 @@ +package OSRIC::Race::HalfElf; +use parent qw(OSRIC::Races); +use OSRIC::Util qw/d/; + +# The stat buffs/nerfs a race gives: +sub stats_boosts +{ + { + str => 0, + dex => 0, + con => 0, + int => 0, + wis => 0, + cha => 0, + } +} + +# The permitted classes: +sub permitted_classes +{ + [ [ "Assassin" ], [ "Cleric" ], [ "Fighter" ], [ "MagicUser" ], + [ "Ranger" ], [ "Thief" ], [ "Cleric", "Fighter" ], + [ "Cleric", "Ranger" ], [ "Cleric", "MagicUser" ], + [ "Fighter", "MagicUser" ], [ "Fighter", "Thief" ], + [ "MagicUser", "Thief" ], [ "Cleric", "Fighter", "MagicUser" ], + [ "Fighter", "MagicUser", "Thief" ] ] +} + +# A hash of subs to generate the starting age based on class: +sub ages +{ + { + assassin => sub { 22 + d(8, 3) }, + cleric => sub { 40 + d(4, 2) }, + druid => sub { 40 + d(4, 2) }, + fighter => sub { 22 + d(4, 3) }, + illusionist => sub { 30 + d(8, 3) }, + magicuser => sub { 30 + d(8, 2) }, + paladin => sub { 22 + d(4, 3) }, + ranger => sub { 22 + d(4, 3) }, + theif => sub { 22 + d(8, 3) }, + } +} + +# The racial limitations: +sub racial_limitations +{ + { + str => { min => 3, max => 18 }, + dex => { min => 6, max => 18 }, + con => { min => 6, max => 18 }, + int => { min => 4, max => 18 }, + wis => { min => 3, max => 18 }, + cha => { min => 3, max => 18 }, + } +} + +1; diff --git a/lib/OSRIC/Race/HalfOrc.pm b/lib/OSRIC/Race/HalfOrc.pm new file mode 100644 index 0000000..204123b --- /dev/null +++ b/lib/OSRIC/Race/HalfOrc.pm @@ -0,0 +1,55 @@ +package OSRIC::Race::HalfOrc; +use parent qw(OSRIC::Races); +use OSRIC::Util qw/d/; + +# The stat buffs/nerfs a race gives: +sub stats_boosts +{ + { + str => 1, + dex => 0, + con => 1, + int => 0, + wis => 0, + cha => -2, + } +} + +# The permitted classes: +sub permitted_classes +{ + [ [ "Assassin" ], [ "Cleric" ], [ "Fighter" ], [ "Thief" ], + [ "Cleric", "Fighter" ], [ "Cleric", "Thief" ], [ "Cleric", "Assassin" ], + [ "Fighter", "Thief" ], [ "Fighter", "Assassin" ] ] +} + +# A hash of subs to generate the starting age based on class: +sub ages +{ + { + assassin => sub { 20 + d(4, 2) }, + cleric => sub { 20 + d(4) }, + druid => sub { 20 + d(4) }, + fighter => sub { 13 + d(4) }, + illusionist => sub { 0 }, + magicuser => sub { 0 }, + paladin => sub { 13 + d(4) }, + ranger => sub { 13 + d(4) }, + theif => sub { 20 + d(4, 2) }, + } +} + +# The racial limitations: +sub racial_limitations +{ + { + str => { min => 6, max => 18 }, + dex => { min => 3, max => 17 }, + con => { min => 13, max => 19 }, + int => { min => 3, max => 17 }, + wis => { min => 3, max => 14 }, + cha => { min => 3, max => 12 }, + } +} + +1; diff --git a/lib/OSRIC/Race/Halfling.pm b/lib/OSRIC/Race/Halfling.pm new file mode 100644 index 0000000..02bff64 --- /dev/null +++ b/lib/OSRIC/Race/Halfling.pm @@ -0,0 +1,53 @@ +package OSRIC::Race::Halfling; +use parent qw(OSRIC::Races); +use OSRIC::Util qw/d/; + +# The stat buffs/nerfs a race gives: +sub stats_boosts +{ + { + str => -1, + dex => 1, + con => 0, + int => 0, + wis => 0, + cha => 0, + } +} + +# The permitted classes: +sub permitted_classes +{ + [ [ "Fighter" ], [ "Druid" ], [ "Thief" ], [ "Fighter", "Thief" ] ] +} + +# A hash of subs to generate the starting age based on class: +sub ages +{ + { + assassin => sub { 40 + d(4, 2) }, + cleric => sub { 40 + d(4, 3) }, + druid => sub { 40 + d(4, 3) }, + fighter => sub { 20 + d(4, 3) }, + illusionist => sub { 0 }, + magicuser => sub { 0 }, + paladin => sub { 20 + d(4, 3) }, + ranger => sub { 20 + d(4, 3) }, + theif => sub { 40 + d(4, 2) }, + } +} + +# The racial limitations: +sub racial_limitations +{ + { + str => { min => 6, max => 17 }, + dex => { min => 8, max => 19 }, + con => { min => 10, max => 18 }, + int => { min => 6, max => 18 }, + wis => { min => 3, max => 17 }, + cha => { min => 3, max => 18 }, + } +} + +1; diff --git a/lib/OSRIC/Race/Human.pm b/lib/OSRIC/Race/Human.pm new file mode 100644 index 0000000..1e437e5 --- /dev/null +++ b/lib/OSRIC/Race/Human.pm @@ -0,0 +1,55 @@ +package OSRIC::Race::Human; +use parent qw(OSRIC::Races); +use OSRIC::Util qw/d/; + +# The stat buffs/nerfs a race gives: +sub stats_boosts +{ + { + str => 0, + dex => 0, + con => 0, + int => 0, + wis => 0, + cha => 0, + } +} + +# The permitted classes: +sub permitted_classes +{ + [ [ "Assassin" ], [ "Cleric" ], [ "Druid" ], [ "Fighter" ], + [ "Illusionist" ], [ "MagicUser" ], [ "Paladin" ], [ "Ranger" ], + [ "Thief" ] ] +} + +# A hash of subs to generate the starting age based on class: +sub ages +{ + { + assassin => sub { 20 + d(4) }, + cleric => sub { 20 + d(4) }, + druid => sub { 20 + d(4) }, + fighter => sub { 15 + d(4) }, + illusionist => sub { 24 + d(8, 2) }, + magicuser => sub { 24 + d(8, 2) }, + paladin => sub { 15 + d(4) }, + ranger => sub { 15 + d(4) }, + theif => sub { 20 + d(4) }, + } +} + +# The racial limitations: +sub racial_limitations +{ + { + str => { min => 0, max => 18 }, + dex => { min => 0, max => 18 }, + con => { min => 0, max => 18 }, + int => { min => 0, max => 18 }, + wis => { min => 0, max => 18 }, + cha => { min => 0, max => 18 }, + } +} + +1; diff --git a/lib/OSRIC/Races/HalfElf.pm b/lib/OSRIC/Races/HalfElf.pm deleted file mode 100644 index 047f6ab..0000000 --- a/lib/OSRIC/Races/HalfElf.pm +++ /dev/null @@ -1,55 +0,0 @@ -package OSRIC::Races::HalfElf; -use parent qw(OSRIC::Races); -use OSRIC::Util qw/d/; - -# The stat buffs/nerfs a race gives: -sub stats_boosts -{ - { - str => 0, - dex => 0, - con => 0, - int => 0, - wis => 0, - cha => 0, - } -} - -# The permitted classes: -sub permitted_classes -{ - [ "Assassin", "Cleric", "Fighter", "MagicUser", "Ranger", "Thief", - [ "Cleric", "Fighter" ], [ "Cleric", "Ranger" ], - [ "Illusionist", "Thief" ] ] -} - -# A hash of subs to generate the starting age based on class: -sub ages -{ - { - assassin => sub { my $i = 0; $i += d(4) for(1..5); $i += 80; }, - cleric => sub { my $i = 0; $i += d(12) for(1..3); $i += 300; }, - druid => sub { 0 }, - fighter => sub { my $i = 0; $i += d(4) for(1..5); $i += 60; }, - illusionist => sub { my $i = 0; $i += d(12) for(1..2); $i += 100; } - magicuser => sub { 0 }, - paladin => sub { 0 }, - ranger => sub { 0 }, - theif => sub { my $i = 0; $i += d(4) for(1..5); $i += 80; }, - } -} - -# The racial limitations: -sub racial_limitations -{ - { - str => { min => 6, max => 18 }, - dex => { min => 3, max => 19 }, - con => { min => 8, max => 17 }, - int => { min => 7, max => 18 }, - wis => { min => 3, max => 18 }, - cha => { min => 3, max => 18 }, - } -} - -1; diff --git a/lib/OSRIC/Races/HalfOrc.pm b/lib/OSRIC/Races/HalfOrc.pm deleted file mode 100644 index 4c662e6..0000000 --- a/lib/OSRIC/Races/HalfOrc.pm +++ /dev/null @@ -1,5 +0,0 @@ -package OSRIC::Races:: -use parent qw(OSRIC::Races); -use OSRIC::Util qw/d/; - -1; diff --git a/lib/OSRIC/Races/Halfling.pm b/lib/OSRIC/Races/Halfling.pm deleted file mode 100644 index 4c662e6..0000000 --- a/lib/OSRIC/Races/Halfling.pm +++ /dev/null @@ -1,5 +0,0 @@ -package OSRIC::Races:: -use parent qw(OSRIC::Races); -use OSRIC::Util qw/d/; - -1; diff --git a/lib/OSRIC/Races/Human.pm b/lib/OSRIC/Races/Human.pm deleted file mode 100644 index 4c662e6..0000000 --- a/lib/OSRIC/Races/Human.pm +++ /dev/null @@ -1,5 +0,0 @@ -package OSRIC::Races:: -use parent qw(OSRIC::Races); -use OSRIC::Util qw/d/; - -1;