- Added AI support for Quirion Elves.

This commit is contained in:
Sloth
2014-10-20 11:04:22 +00:00
parent b118859260
commit 80730f1924
3 changed files with 14 additions and 6 deletions

View File

@@ -863,9 +863,11 @@ public class ComputerUtilCard {
final String logic = sa.getParam("AILogic"); final String logic = sa.getParam("AILogic");
if (logic.equals("MostProminentInHumanDeck")) { if (logic.equals("MostProminentInHumanDeck")) {
chosen.add(ComputerUtilCard.getMostProminentColor(CardLists.filterControlledBy(game.getCardsInGame(), opp), colorChoices)); chosen.add(ComputerUtilCard.getMostProminentColor(CardLists.filterControlledBy(game.getCardsInGame(), opp), colorChoices));
} else if (logic.equals("MostProminentInComputerDeck")) { }
else if (logic.equals("MostProminentInComputerDeck")) {
chosen.add(ComputerUtilCard.getMostProminentColor(CardLists.filterControlledBy(game.getCardsInGame(), ai), colorChoices)); chosen.add(ComputerUtilCard.getMostProminentColor(CardLists.filterControlledBy(game.getCardsInGame(), ai), colorChoices));
} else if (logic.equals("MostProminentDualInComputerDeck")) { }
else if (logic.equals("MostProminentDualInComputerDeck")) {
List<String> prominence = ComputerUtilCard.getColorByProminence(CardLists.filterControlledBy(game.getCardsInGame(), ai)); List<String> prominence = ComputerUtilCard.getColorByProminence(CardLists.filterControlledBy(game.getCardsInGame(), ai));
chosen.add(prominence.get(0)); chosen.add(prominence.get(0));
chosen.add(prominence.get(1)); chosen.add(prominence.get(1));
@@ -895,6 +897,14 @@ public class ComputerUtilCard {
else if (logic.equals("MostProminentInActivePlayerHand")) { else if (logic.equals("MostProminentInActivePlayerHand")) {
chosen.add(ComputerUtilCard.getMostProminentColor(game.getPhaseHandler().getPlayerTurn().getCardsIn(ZoneType.Hand), colorChoices)); chosen.add(ComputerUtilCard.getMostProminentColor(game.getPhaseHandler().getPlayerTurn().getCardsIn(ZoneType.Hand), colorChoices));
} }
else if (logic.equals("MostProminentInComputerDeckButGreen")) {
List<String> prominence = ComputerUtilCard.getColorByProminence(CardLists.filterControlledBy(game.getCardsInGame(), ai));
if (prominence.get(0) == MagicColor.Constant.GREEN) {
chosen.add(prominence.get(1));
} else {
chosen.add(prominence.get(0));
}
}
else if (logic.equals("MostProminentKeywordInComputerDeck")) { else if (logic.equals("MostProminentKeywordInComputerDeck")) {
CardCollectionView list = ai.getAllCards(); CardCollectionView list = ai.getAllCards();
int m1 = 0; int m1 = 0;
@@ -910,7 +920,7 @@ public class ComputerUtilCard {
chosen.add(chosenColor); chosen.add(chosenColor);
} }
} }
if (chosen.size() == 0) { if (chosen.isEmpty()) {
chosen.add(MagicColor.Constant.GREEN); chosen.add(MagicColor.Constant.GREEN);
} }
return chosen; return chosen;

View File

@@ -3,9 +3,8 @@ ManaCost:1 G
Types:Creature Elf Druid Types:Creature Elf Druid
PT:1/1 PT:1/1
K:ETBReplacement:Other:ChooseColor K:ETBReplacement:Other:ChooseColor
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a color. SVar:ChooseColor:DB$ ChooseColor | Defined$ You | AILogic$ MostProminentInComputerDeckButGreen | SpellDescription$ As CARDNAME enters the battlefield, choose a color.
A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add {G} to your mana pool. A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add {G} to your mana pool.
A:AB$ Mana | Cost$ T | Produced$ Chosen | SpellDescription$ Add one mana of the chosen color to your mana pool. A:AB$ Mana | Cost$ T | Produced$ Chosen | SpellDescription$ Add one mana of the chosen color to your mana pool.
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/quirion_elves.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/quirion_elves.jpg
Oracle:As Quirion Elves enters the battlefield, choose a color.\n{T}: Add {G} to your mana pool.\n{T}: Add one mana of the chosen color to your mana pool. Oracle:As Quirion Elves enters the battlefield, choose a color.\n{T}: Add {G} to your mana pool.\n{T}: Add one mana of the chosen color to your mana pool.

View File

@@ -4,7 +4,6 @@ Types:Creature Beast
PT:2/3 PT:2/3
A:AB$ ChooseColor | Cost$ 2 G T Sac<1/CARDNAME> | Defined$ You | SubAbility$ DestroyAll | SpellDescription$ Destroy all enchantments of the color of your choice. A:AB$ ChooseColor | Cost$ 2 G T Sac<1/CARDNAME> | Defined$ You | SubAbility$ DestroyAll | SpellDescription$ Destroy all enchantments of the color of your choice.
SVar:DestroyAll:DB$ DestroyAll | ValidCards$ Enchantment.ChosenColor SVar:DestroyAll:DB$ DestroyAll | ValidCards$ Enchantment.ChosenColor
SVar:RemRandomDeck:True
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/root_greevil.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/root_greevil.jpg
Oracle:{2}{G}, {T}, Sacrifice Root Greevil: Destroy all enchantments of the color of your choice. Oracle:{2}{G}, {T}, Sacrifice Root Greevil: Destroy all enchantments of the color of your choice.