From be8190c3a2b57047ec4b8ba394e3b57aae3b4c2f Mon Sep 17 00:00:00 2001 From: Alex Kerr Date: Wed, 28 Jan 2015 09:34:27 +0000 Subject: [PATCH] Nicer gold functions --- lib/OSRIC/Class/Assassin.pm | 2 +- lib/OSRIC/Class/Cleric.pm | 2 +- lib/OSRIC/Class/Druid.pm | 2 +- lib/OSRIC/Class/Fighter.pm | 2 +- lib/OSRIC/Class/Illusionist.pm | 2 +- lib/OSRIC/Class/MagicUser.pm | 2 +- lib/OSRIC/Class/Paladin.pm | 2 +- lib/OSRIC/Class/Ranger.pm | 2 +- lib/OSRIC/Class/Thief.pm | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/OSRIC/Class/Assassin.pm b/lib/OSRIC/Class/Assassin.pm index 38d0ecb..6e74832 100644 --- a/lib/OSRIC/Class/Assassin.pm +++ b/lib/OSRIC/Class/Assassin.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 120 } -sub get_gold { ((d(6) + d(6)) * 10) } # 2d6 * 10 +sub get_gold { (d(6, 2) * 10) } # 2d6 * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/Cleric.pm b/lib/OSRIC/Class/Cleric.pm index 2076c6a..a66dd8f 100644 --- a/lib/OSRIC/Class/Cleric.pm +++ b/lib/OSRIC/Class/Cleric.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 180 } -sub get_gold { ((d(6) + d(6) + d(6)) * 10) } # 3d6 * 10 +sub get_gold { (d(6, 3) * 10) } # 3d6 * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/Druid.pm b/lib/OSRIC/Class/Druid.pm index 131016b..367a200 100644 --- a/lib/OSRIC/Class/Druid.pm +++ b/lib/OSRIC/Class/Druid.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 180 } -sub get_gold { ((d(6) + d(6) + d(6)) * 10) } # 3d6 * 10 +sub get_gold { (d(6, 3) * 10) } # 3d6 * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/Fighter.pm b/lib/OSRIC/Class/Fighter.pm index 142c47b..7559db7 100644 --- a/lib/OSRIC/Class/Fighter.pm +++ b/lib/OSRIC/Class/Fighter.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 200 } -sub get_gold { (((d(6) + d(6) + d(6)) + 2) * 10) } # (3d6 + 2) * 10 +sub get_gold { ((d(6, 3) + 2) * 10) } # (3d6 + 2) * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/Illusionist.pm b/lib/OSRIC/Class/Illusionist.pm index 59e74ff..0322f1d 100644 --- a/lib/OSRIC/Class/Illusionist.pm +++ b/lib/OSRIC/Class/Illusionist.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 80 } -sub get_gold { ((d(4) + d(4)) * 10) } # 2d4 * 10 +sub get_gold { (d(4, 2) * 10) } # 2d4 * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/MagicUser.pm b/lib/OSRIC/Class/MagicUser.pm index 3fb4318..ddc2fb6 100644 --- a/lib/OSRIC/Class/MagicUser.pm +++ b/lib/OSRIC/Class/MagicUser.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 80 } -sub get_gold { ((d(4) + d(4)) * 10) } # 2d4 * 10 +sub get_gold { (d(4, 2) * 10) } # 2d4 * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/Paladin.pm b/lib/OSRIC/Class/Paladin.pm index 4e9f4f3..b66d107 100644 --- a/lib/OSRIC/Class/Paladin.pm +++ b/lib/OSRIC/Class/Paladin.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 200 } -sub get_gold { (((d(6) + d(6) + d(6)) + 2) * 10) } # (3d6 + 2) * 10 +sub get_gold { ((d(6, 3) + 2) * 10) } # (3d6 + 2) * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/Ranger.pm b/lib/OSRIC/Class/Ranger.pm index c8fbce0..42130d2 100644 --- a/lib/OSRIC/Class/Ranger.pm +++ b/lib/OSRIC/Class/Ranger.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 200 } -sub get_gold { (((d(6) + d(6) + d(6)) + 2) * 10) } # (3d6 + 2) * 10 +sub get_gold { ((d(6, 3) + 2) * 10) } # (3d6 + 2) * 10 # Minimum score requirements: sub minimum_scores diff --git a/lib/OSRIC/Class/Thief.pm b/lib/OSRIC/Class/Thief.pm index 17e5c90..bec0a19 100644 --- a/lib/OSRIC/Class/Thief.pm +++ b/lib/OSRIC/Class/Thief.pm @@ -5,7 +5,7 @@ use OSRIC::Util qw/d/; # A sub to get the maximum amount of starting gold (for sorting) and one to get # an actual amount of starting gold: sub max_starting_gold { 120 } -sub get_gold { ((d(6) + d(6)) * 10) } # 2d6 * 10 +sub get_gold { (d(6, 2) * 10) } # 2d6 * 10 # Minimum score requirements: sub minimum_scores