Mercurial > boosterpack
diff index.pl @ 6:4246c7ef6487 boosterpack
[svn r8] bug fix -- holos need to be one int three compared to rares
author | robert |
---|---|
date | Tue, 08 Sep 2009 17:20:52 -0400 |
parents | e91d6f908222 |
children | 4c495190076f |
line wrap: on
line diff
1.1 --- a/index.pl Tue Sep 08 06:55:23 2009 -0400 1.2 +++ b/index.pl Tue Sep 08 17:20:52 2009 -0400 1.3 @@ -93,7 +93,7 @@ 1.4 my $unum = $mapRules{"Uncommon"}; 1.5 my $cnum = $mapRules{"Common"}; 1.6 1.7 - 1.8 + $holochoose = int(rand(3)); 1.9 ##########3 1.10 #my $rnum = 500; 1.11 #my $unum =500; 1.12 @@ -102,7 +102,11 @@ 1.13 ############## 1.14 for $crd(@reduced) 1.15 { 1.16 - if (($crd -> hasTags("Rare") or $crd -> hasTags("Rare Holo"))and ($rnum>0)){push @r_list, $crd; $rnum--;} 1.17 + 1.18 + 1.19 + if ($holochoose==0 or $holochoose==1 ){if (($crd -> hasTags("Rare"))and ($rnum>0)){push @r_list, $crd; $rnum--;}} 1.20 + if ($holochoose==2){if (($crd -> hasTags("Rare Holo"))and ($rnum>0)){push @r_list, $crd; $rnum--;}} 1.21 + #if (($crd -> hasTags("Rare") or $crd -> hasTags("Rare Holo"))and ($rnum>0)){push @r_list, $crd; $rnum--;} 1.22 if (($crd -> hasTags("Uncommon"))and ($unum>0)){push @u_list, $crd; $unum--;} 1.23 if (($crd -> hasTags("Common"))and ($cnum>0)){push @c_list, $crd; $cnum--;} 1.24 if ($rnum+$unum+$cnum == 0){last;} 1.25 @@ -135,6 +139,7 @@ 1.26 { 1.27 open FILE, "<index.html"; 1.28 return do { local $/; <FILE> }; 1.29 + 1.30 }; 1.31 1.32 #print "done";