- Added Kudzu

This commit is contained in:
swordshine
2013-07-15 00:18:51 +00:00
parent 4bb0b15adc
commit d2c2138be6
3 changed files with 22 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -6096,6 +6096,7 @@ res/cardsfolder/k/krovikan_whispers.txt -text
res/cardsfolder/k/kruin_outlaw_terror_of_kruin_pass.txt -text
res/cardsfolder/k/kruin_striker.txt -text
res/cardsfolder/k/kry_shield.txt svneol=native#text/plain
res/cardsfolder/k/kudzu.txt -text
res/cardsfolder/k/kukemssa_pirates.txt -text
res/cardsfolder/k/kukemssa_serpent.txt -text
res/cardsfolder/k/kuldotha_flamefiend.txt svneol=native#text/plain

View File

@@ -0,0 +1,12 @@
Name:Kudzu
ManaCost:1 G G
Types:Enchantment Aura
K:Enchant land
A:SP$ Attach | Cost$ 1 G G | ValidTgts$ Land | AILogic$ Curse
T:Mode$ Taps | ValidCard$ Card.AttachedBy | Execute$ TrigDestroy | TriggerDescription$ When enchanted land becomes tapped, destroy it. That land's controller attaches CARDNAME to a land of his or her choice.
SVar:TrigDestroy:AB$ Destroy | Cost$ 0 | Defined$ TriggeredCard | SubAbility$ DBChoose
SVar:DBChoose:DB$ ChooseCard | Defined$ TriggeredCardController | Choices$ Land | Mandatory$ True | AILogic$ OppPreferred | SubAbility$ DBAttach
SVar:DBAttach:DB$ Attach | Defined$ ChosenCard
SVar:NonStackingAttachEffect:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/kudzu.jpg
Oracle:Enchant land\nWhen enchanted land becomes tapped, destroy it. That land's controller attaches Kudzu to a land of his or her choice.

View File

@@ -50,7 +50,7 @@ public class ChooseCardAi extends SpellAbilityAi {
if (sa.hasParam("TargetControls")) {
choices = CardLists.filterControlledBy(choices, ai.getOpponent());
}
if (sa.getParam("AILogic").equals("AtLeast1")) {
if (sa.getParam("AILogic").equals("AtLeast1") || sa.getParam("AILogic").equals("OppPreferred")) {
if (choices.isEmpty()) {
return false;
}
@@ -140,6 +140,14 @@ public class ChooseCardAi extends SpellAbilityAi {
} else {
choice = ComputerUtilCard.getBestAI(options);
}
} else if ("OppPreferred".equals(logic)) {
List<Card> oppControlled = CardLists.filterControlledBy(options, ai.getOpponents());
if (!oppControlled.isEmpty()) {
choice = ComputerUtilCard.getBestAI(oppControlled);
} else {
List<Card> aiControlled = CardLists.filterControlledBy(options, ai);
choice = ComputerUtilCard.getWorstAI(aiControlled);
}
} else {
choice = ComputerUtilCard.getBestAI(options);
}