Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- my @evocation_sample = qw(2 5 10 15 20 25);
- # DCSS 0.10 -- evoke.cc: _ball_of_energy
- print <<HEADER;
- {| border="1"
- ! Evocations !! Minimum MP% for Max Success Rate !! Max Success Rate !! MP Restored (Average)
- HEADER
- foreach (@evocation_sample) {
- my $evoc = $_;
- # first roll
- my $ran1 = $evoc * 6;
- my $max_roll1 = $ran1 - 1;
- my $success1 = ($max_roll1 - 10) * 1.0 / $ran1;
- #second roll
- my $success2 = 24.0/25;
- #third roll
- my $ran3 = 77 - $evoc * 2 - 1; # min mp% for max success rate
- # max success rate
- my $max_success = $success1 * $success2;
- my $mp_recovered_avg = 5 + $evoc/2.0;
- print "|-\n";
- printf "! %d\n", $evoc;
- printf "| %d%% || %.2f%% || %.2f\n", $ran3, $max_success*100, $mp_recovered_avg;
- }
- print "|}\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement