- Annihilator Part 2, added Kozilek, Butcher of Truth (draw cards on cast not yet implemented), Annihilator seems to work alright though.

- Fixed some AI mistakes of cards using sortCMC.
This commit is contained in:
jendave
2011-08-06 04:05:19 +00:00
parent 7a61accea2
commit 0b8af7f05f
4 changed files with 51 additions and 31 deletions

View File

@@ -1,3 +1,11 @@
Kozilek, Butcher of Truth
10
Legendary Creature Eldrazi
no text
12/12
Annihilator 4
When this card is put into a graveyard from anywhere, reveal this card and shuffle it into its owner's library instead.
Glasses of Urza Glasses of Urza
1 1
Artifact Artifact

View File

@@ -14249,7 +14249,6 @@ public class CardFactory implements NewConstants {
CardList list = getArtEnchantments(); CardList list = getArtEnchantments();
if(list.size() > 0) { if(list.size() > 0) {
CardListUtil.sortCMC(list); CardListUtil.sortCMC(list);
list.reverse();
setTargetCard(list.get(0)); setTargetCard(list.get(0));
AllZone.GameAction.sacrifice(card); AllZone.GameAction.sacrifice(card);
} }
@@ -17289,6 +17288,7 @@ public class CardFactory implements NewConstants {
{ {
CardListUtil.sortAttackLowFirst(compCreats); CardListUtil.sortAttackLowFirst(compCreats);
CardListUtil.sortCMC(compCreats); CardListUtil.sortCMC(compCreats);
compCreats.reverse();
for (int i=0; i < compCreats.size()-humCreats.size();i++) for (int i=0; i < compCreats.size()-humCreats.size();i++)
AllZone.GameAction.sacrifice(compCreats.get(i)); AllZone.GameAction.sacrifice(compCreats.get(i));
} }

View File

@@ -208,6 +208,7 @@ public class CardListUtil
list.sort(com); list.sort(com);
} }
//Sorts from high to low
public static void sortCMC(CardList list) public static void sortCMC(CardList list)
{ {
Comparator<Card> com = new Comparator<Card>() Comparator<Card> com = new Comparator<Card>()

View File

@@ -780,6 +780,8 @@ public class CombatUtil {
AllZone.Phase.getPhase().equals(Constant.Phase.Combat_Declare_Attackers_InstantAbility)) { AllZone.Phase.getPhase().equals(Constant.Phase.Combat_Declare_Attackers_InstantAbility)) {
//Annihilator: //Annihilator:
if (!c.getCreatureAttackedThisCombat())
{
ArrayList<String> kws = c.getKeyword(); ArrayList<String> kws = c.getKeyword();
Pattern p = Pattern.compile("Annihilator [0-9]+"); Pattern p = Pattern.compile("Annihilator [0-9]+");
Matcher m; Matcher m;
@@ -798,7 +800,15 @@ public class CombatUtil {
{ {
if (crd.getController().equals(Constant.Player.Human)) if (crd.getController().equals(Constant.Player.Human))
{ {
//comp sacks CardList list = new CardList(AllZone.Computer_Play.getCards());
CardListUtil.sortCMC(list);
list.reverse();
int max = list.size();
if (max>a)
max = a;
for (int i=0;i<max;i++)
AllZone.GameAction.sacrifice(list.get(i));
} }
else else
{ {
@@ -807,10 +817,11 @@ public class CombatUtil {
} }
}; };
ability.setStackDescription(""); ability.setStackDescription("Annihilator - Defending player sacrifices " + a + " permanents.");
AllZone.Stack.add(ability); AllZone.Stack.add(ability);
} } //find
} } //for
}//creatureAttacked
//Annihilator //Annihilator
//Beastmaster Ascension //Beastmaster Ascension