little fixes to the handling of buffedby and antibuffedby SVars.

This commit is contained in:
jendave
2011-08-06 06:09:34 +00:00
parent 98b15dcb94
commit 0267614bbf

View File

@@ -158,17 +158,17 @@ public class ComputerAI_General implements Computer {
Card buffedcard = buffed.get(j); Card buffedcard = buffed.get(j);
if (buffedcard.getSVar("BuffedBy").length() > 0) { if (buffedcard.getSVar("BuffedBy").length() > 0) {
String buffedby = buffedcard.getSVar("BuffedBy"); String buffedby = buffedcard.getSVar("BuffedBy");
final String bffdby[] = buffedby.split(","); String bffdby[] = buffedby.split(",");
if (c.isValidCard(bffdby)) return true; if (c.isValidCard(bffdby)) return true;
} }
}//BuffedBy }//BuffedBy
CardList antibuffed = new CardList(AllZone.Human_Play.getCards()); //get all cards the computer controls with AntiBuffedBy CardList antibuffed = new CardList(AllZone.Human_Play.getCards()); //get all cards the human controls with AntiBuffedBy
for(int k = 0; k < antibuffed.size(); k++) { for(int k = 0; k < antibuffed.size(); k++) {
Card buffedcard = antibuffed.get(k); Card buffedcard = antibuffed.get(k);
if (buffedcard.getSVar("AntiBuffedBy").length() > 0) { if (buffedcard.getSVar("AntiBuffedBy").length() > 0) {
String buffedby = buffedcard.getSVar("AntiBuffedBy"); String buffedby = buffedcard.getSVar("AntiBuffedBy");
final String bffdby[] = buffedby.split(","); String bffdby[] = buffedby.split(",");
if (c.isValidCard(bffdby)) return true; if (c.isValidCard(bffdby)) return true;
} }
}//AntiBuffedBy }//AntiBuffedBy