comparison 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
comparison
equal deleted inserted replaced
5:e91d6f908222 6:4246c7ef6487
91 my @final_list = (); 91 my @final_list = ();
92 my $rnum = $mapRules{"Rare"}; 92 my $rnum = $mapRules{"Rare"};
93 my $unum = $mapRules{"Uncommon"}; 93 my $unum = $mapRules{"Uncommon"};
94 my $cnum = $mapRules{"Common"}; 94 my $cnum = $mapRules{"Common"};
95 95
96 96 $holochoose = int(rand(3));
97 ##########3 97 ##########3
98 #my $rnum = 500; 98 #my $rnum = 500;
99 #my $unum =500; 99 #my $unum =500;
100 #my $cnum = 500; 100 #my $cnum = 500;
101 #; 101 #;
102 ############## 102 ##############
103 for $crd(@reduced) 103 for $crd(@reduced)
104 { 104 {
105 if (($crd -> hasTags("Rare") or $crd -> hasTags("Rare Holo"))and ($rnum>0)){push @r_list, $crd; $rnum--;} 105
106
107 if ($holochoose==0 or $holochoose==1 ){if (($crd -> hasTags("Rare"))and ($rnum>0)){push @r_list, $crd; $rnum--;}}
108 if ($holochoose==2){if (($crd -> hasTags("Rare Holo"))and ($rnum>0)){push @r_list, $crd; $rnum--;}}
109 #if (($crd -> hasTags("Rare") or $crd -> hasTags("Rare Holo"))and ($rnum>0)){push @r_list, $crd; $rnum--;}
106 if (($crd -> hasTags("Uncommon"))and ($unum>0)){push @u_list, $crd; $unum--;} 110 if (($crd -> hasTags("Uncommon"))and ($unum>0)){push @u_list, $crd; $unum--;}
107 if (($crd -> hasTags("Common"))and ($cnum>0)){push @c_list, $crd; $cnum--;} 111 if (($crd -> hasTags("Common"))and ($cnum>0)){push @c_list, $crd; $cnum--;}
108 if ($rnum+$unum+$cnum == 0){last;} 112 if ($rnum+$unum+$cnum == 0){last;}
109 } 113 }
110 114
133 137
134 sub gen 138 sub gen
135 { 139 {
136 open FILE, "<index.html"; 140 open FILE, "<index.html";
137 return do { local $/; <FILE> }; 141 return do { local $/; <FILE> };
142
138 }; 143 };
139 144
140 #print "done"; 145 #print "done";
141 146
142 #print &change_rules("Fossil"); 147 #print &change_rules("Fossil");