- Added SVar AntiBuffedby to be used on permanents the human controls to make the AI play certain cards in Main1.

- Added AntiBuffedby SVar to Timid Drake.
This commit is contained in:
jendave
2011-08-06 05:55:23 +00:00
parent c02500a787
commit b349f14ce5
2 changed files with 12 additions and 2 deletions

View File

@@ -31155,6 +31155,7 @@ no text
3/3
Flying
WheneverKeyword:EntersBattleField:Type/Creature:Play:MoveFrom-Play-Hand:Self:ASAP:No_Condition:Initiator - Other than Self:When another creature enters the battlefield, return Timid Drake to its owner's hand.
SVar:AntiBuffedBy:Creature
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/timid_drake.jpg

View File

@@ -153,8 +153,7 @@ public class ComputerAI_General implements Computer {
if(c.isCreature() && (c.getKeyword().contains("Haste")) || c.getKeyword().contains("Exalted")) return true;
CardList buffed = new CardList(AllZone.Computer_Play.getCards());
// buffed.getKeyword("BuffedBy"); //get all cards the computer controls with BuffedBy
CardList buffed = new CardList(AllZone.Computer_Play.getCards()); //get all cards the computer controls with BuffedBy
for(int i = 0; i < buffed.size(); i++) {
Card buffedcard = buffed.get(i);
if (buffedcard.getSVar("BuffedBy").length() > 0) {
@@ -164,6 +163,16 @@ public class ComputerAI_General implements Computer {
}
}
CardList antibuffed = new CardList(AllZone.Human_Play.getCards()); //get all cards the computer controls with AntiBuffedBy
for(int i = 0; i < buffed.size(); i++) {
Card buffedcard = antibuffed.get(i);
if (buffedcard.getSVar("AntiBuffedBy").length() > 0) {
String buffedby = buffedcard.getSVar("AntiBuffedBy");
final String bffdby[] = buffedby.split(",");
if (c.isValidCard(bffdby)) return true;
}
}
if(c.isLand()) return false;
CardList Vengevines = new CardList();