Also close bug
[filters.git] / pirate
diff --git a/pirate b/pirate
index d35b1387b27144ac79567a35c3239a7efd69ccfb..67ad872a18149da0f94caccade4e874c5bd7b930 100755 (executable)
--- a/pirate
+++ b/pirate
@@ -19,7 +19,7 @@
        '\bof\b' =>  "o'",
        '\bdon\'t\b' => "dern't",
        '\bdo not\b' => "dern't",
-       '\bnever\b' => "ne'er",
+       '\bnever\b' => "no nay ne'er",
        '\bever\b' => "e'er",
        '\bover\b' => "o'er",
        '\bYes\b' => 'Aye',
@@ -34,6 +34,7 @@
        '\baround\b' => "aroun'",
        '\bto\b' => "t'",
        '\bit\'s\b' => "'tis",
+       '\bIt\'s\b' => 'It be',
        '\bwoman\b' => 'wench',
        '\blady\b' => 'wench',
        '\bwife\b' => 'lady',
        '\bjet\b' => 'flying machine',
        '\bdriving\b' => 'sailing',
        '\bdrive\b' => 'sail',
+       '\bwith\b' => "wi'",
+       '\bam\b' => 'be',
+       '\bis\b' => 'be',
+       '\bare\b' => 'be',
+       '\bwas\b' => 'be',
+       '\bwere\b' => 'be',
+       '\bwere\b' => 'be',
 );
 
 while (@trans_table) {
@@ -84,8 +92,14 @@ while (@trans_table) {
 
 s/ing\b/in'/g;
 s/ings\b/in's/g;
-s/(\.[ \t])/avast($1,3)/eg;
-s/([!\?][ \t])/avast($1,2)/eg; # Greater chance after exclamation
+s/(\.( |\t|$))/avast($1,3)/eg;
+s/([!\?]( \t|$))/avast($1,2)/eg; # Greater chance after exclamation
+s/\Br\B/roll()/eg;
+
+sub roll {
+       return 'r' x (rand(5)+1) if rand > 0.5;
+       return 'r';
+}
 
 sub avast {
        my $stub=shift;
@@ -112,6 +126,7 @@ sub avast {
                "$stub Fire the cannons!",
                ", to be sure$stub",
                ", I'll warrant ye$stub",
+               "$stub Arr, me hearty!",
        );
 
        if (int rand($chance) == 1) {
This page took 0.011133 seconds and 4 git commands to generate.