11/01 build - small updates, basically to stay up-to-date with the latest beta.

This commit is contained in:
jendave
2011-08-06 02:45:06 +00:00
parent 8bd5c4a2c4
commit f04ab6733c
8 changed files with 506 additions and 464 deletions

View File

@@ -1928,84 +1928,40 @@ public class CardFactory implements NewConstants {
Tgt[0] = k[0].contains("Tgt");
final int NumCards[] = {-1};
final String NumCardsType[] = {"none"};
final boolean NumCardsTypeYouCtrl[] = {false};
final boolean NumCardsTypeInPlay[] = {false};
final boolean NumCardsTypeInYourYard[] = {false};
final boolean NumCardsTypeInAllYards[] = {false};
final boolean NumCardsDomain[] = {false};
if (k[1].length() == 1)
final String NumCardsX[] = {"none"};
if (k[1].length() <= 2)
NumCards[0] = Integer.parseInt(k[1]);
else
{
if (k[1].startsWith("NumCardsType"))
{
String kk[] = k[1].split("/");
NumCardsType[0] = kk[1];
NumCardsTypeYouCtrl[0] = kk[2].equals("YouCtrl");
NumCardsTypeInPlay[0] = kk[2].equals("InPlay");
NumCardsTypeInYourYard[0] = kk[2].equals("InYourYard");
NumCardsTypeInAllYards[0] = kk[2].equals("InAllYards");
if (k[1].startsWith("Count$"))
{
String kk[] = k[1].split("\\$");
NumCardsX[0] = kk[1];
}
NumCardsDomain[0] = k[1].equals("Domain");
}
final int NumDiscard[] = {0};
final String UnlessDiscardType[] = {"none"};
final boolean AtRandom[] = {false};
final int NumLoseLife[] = {0};
final int NumToLibrary[] = {0};
final String LibraryPosition[] = {"none"};
final int NumOppDraw[] = {0};
// drawbacks and descriptions
final String DrawBack[] = {"none"};
final String spDesc[] = {"none"};
final String stDesc[] = {"none"};
if (k.length > 2)
{
if (k[2].contains("Discard"))
if (k[2].contains("Drawback$"))
{
String kk[] = k[2].split("/");
if (kk[1].equals("X"))
NumDiscard[0] = -1;
else
NumDiscard[0] = Integer.parseInt(kk[1]);
if (kk.length > 2)
{
if (kk[2].equals("UnlessDiscardType"))
UnlessDiscardType[0] = kk[3];
AtRandom[0] = kk[2].equals("AtRandom");
}
String kk[] = k[2].split("\\$");
DrawBack[0] = kk[1];
if (k.length > 3)
spDesc[0] = k[3];
if (k.length > 4)
stDesc[0] = k[4];
}
if (k[2].contains("LoseLife"))
else
{
String kk[] = k[2].split("/");
if (kk[1].equals("X"))
NumLoseLife[0] = -1;
else
NumLoseLife[0] = Integer.parseInt(kk[1]);
}
if (k[2].contains("NumToLibrary"))
{
String kk[] = k[2].split("/");
if (kk[1].equals("X"))
NumToLibrary[0] = -1;
else
NumToLibrary[0] = Integer.parseInt(kk[1]);
LibraryPosition[0] = kk[2];
}
if (k[2].contains("NumOppDraw"))
{
String kk[] = k[2].split("/");
if (kk[1].equals("X"))
NumOppDraw[0] = -1;
else
NumOppDraw[0] = Integer.parseInt(kk[1]);
if (k.length > 2)
spDesc[0] = k[2];
if (k.length > 3)
stDesc[0] = k[3];
}
}
@@ -2013,132 +1969,71 @@ public class CardFactory implements NewConstants {
{
private static final long serialVersionUID = -7049779241008089696L;
private int ncards;
public int getNumCards()
{
if (NumCards[0] != -1)
return NumCards[0];
int n = 0;
String cardController = card.getController();
PlayerZone myPlay = AllZone.getZone(Constant.Zone.Play, cardController);
PlayerZone opPlay = AllZone.getZone(Constant.Zone.Play, AllZone.GameAction.getOpponent(cardController));
PlayerZone myYard = AllZone.getZone(Constant.Zone.Graveyard, cardController);
PlayerZone opYard = AllZone.getZone(Constant.Zone.Graveyard, AllZone.GameAction.getOpponent(cardController));
CardList AllCards = new CardList();
if (! NumCardsType[0].equals("none"))
{
if (NumCardsTypeInYourYard[0] == false)
AllCards.addAll(myYard.getCards());
if (NumCardsTypeInAllYards[0] == false)
{
AllCards.addAll(myYard.getCards());
AllCards.addAll(opYard.getCards());
}
if (NumCardsTypeYouCtrl[0] == true)
AllCards.addAll(myPlay.getCards());
if (NumCardsTypeInPlay[0] == true)
{
AllCards.addAll(myPlay.getCards());
AllCards.addAll(opPlay.getCards());
}
AllCards = AllCards.filter(new CardListFilter()
{
public boolean addCard(Card c)
{
if (c.getType().contains(NumCardsType[0]))
return true;
return false;
}
});
n = AllCards.size();
}
if (NumCardsDomain[0] == true)
{
AllCards.addAll(myPlay.getCards());
String basic[] = {"Forest", "Plains", "Mountain", "Island", "Swamp"};
for(int i = 0; i < basic.length; i++)
if (! AllCards.getType(basic[i]).isEmpty())
n++;
}
if (NumDiscard[0] == -1)
NumDiscard[0] = n;
if (NumLoseLife[0] == -1)
NumLoseLife[0] = n;
if (NumToLibrary[0] == -1)
NumToLibrary[0] = n;
if (NumOppDraw[0] == -1)
NumOppDraw[0] = n;
return n;
if (! NumCardsX[0].equals("none"))
return CardFactoryUtil.xCount(card, NumCardsX[0]);
return 0;
}
public boolean canPlayAI()
{
int n = getNumCards();
ncards = getNumCards();
int h = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer).size();
int hl = AllZone.getZone(Constant.Zone.Library, Constant.Player.Human).size();
int cl = AllZone.getZone(Constant.Zone.Library, Constant.Player.Computer).size();
Random r = new Random();
if (((h + n) - (NumDiscard[0] + NumToLibrary[0]) <= 7)
&& (AllZone.GameAction.getPlayerLife(Constant.Player.Computer).getLife() - NumLoseLife[0]) >= 8
&& (r.nextInt(10) > 4))
if (((hl - ncards) < 2) && Tgt[0])
{
setTargetPlayer(Constant.Player.Computer);
return true;
}
if (((h + ncards) <= 7) && !((cl - ncards) < 1) && (r.nextInt(10) > 4))
{
setTargetPlayer(Constant.Player.Computer);
return true;
}
return false;
}
public void resolve()
{
int n = getNumCards();
ncards = getNumCards();
String TgtPlayer = card.getController();
if (Tgt[0])
TgtPlayer = getTargetPlayer();
for (int i=0; i < n; i++)
for (int i=0; i < ncards; i++)
AllZone.GameAction.drawCard(TgtPlayer);
if (NumDiscard[0] > 0)
{
if (!UnlessDiscardType[0].equals("none"))
AllZone.GameAction.discardUnless(TgtPlayer, NumDiscard[0], UnlessDiscardType[0]);
else if (AtRandom[0] == true)
AllZone.GameAction.discardRandom(TgtPlayer, NumDiscard[0]);
else
AllZone.GameAction.discard(TgtPlayer, NumDiscard[0]);
}
if (NumLoseLife[0] > 0)
AllZone.GameAction.getPlayerLife(TgtPlayer).subtractLife(NumLoseLife[0]);
if (NumToLibrary[0] > 0)
AllZone.GameAction.handToLibrary(TgtPlayer, NumToLibrary[0], LibraryPosition[0]);
if (NumOppDraw[0] > 0)
for (int i = 0; i < NumOppDraw[0]; i++)
AllZone.GameAction.drawCard(AllZone.GameAction.getOpponent(TgtPlayer));
if (! DrawBack[0].equals("none"))
CardFactoryUtil.doDrawBack(DrawBack[0], ncards, card.getController(), AllZone.GameAction.getOpponent(card.getController()), TgtPlayer, card, null);
}
};
if (Tgt[0])
spDraw.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spDraw));
spDraw.setDescription(card.getText());
card.setText("");
if (! spDesc[0].equals("none"))
spDraw.setDescription(spDesc[0]);
else
spDraw.setDescription("Draw " + NumCards[0] + " cards.");
if (! stDesc[0].equals("none"))
spDraw.setStackDescription(stDesc[0]);
else
spDraw.setStackDescription("You draw " + NumCards[0] + " cards.");
card.clearSpellAbility();
card.addSpellAbility(spDraw);
}//spDrawCards
@@ -4850,34 +4745,6 @@ public class CardFactory implements NewConstants {
//*************** START *********** START **************************
else if(cardName.equals("Night's Whisper"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -8594340516961923197L;
public boolean canPlayAI()
{
return AllZone.Computer_Life.getLife()>2;
}
public void resolve()
{
//draw 2 cards, subtract 2 life
String player = card.getController();
AllZone.GameAction.drawCard(player);
AllZone.GameAction.drawCard(player);
AllZone.GameAction.getPlayerLife(player).subtractLife(2);
}//resolve()
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Infest"))
{
@@ -10371,68 +10238,6 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Words of Wisdom"))
{
SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -7394898791285593737L;
public void resolve()
{
AllZone.GameAction.drawCard(card.getController());
AllZone.GameAction.drawCard(card.getController());
String opponent = AllZone.GameAction.getOpponent(card.getController());
AllZone.GameAction.drawCard(opponent);
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Counsel of the Soratami") || cardName.equals("Inspiration") || cardName.equals("Touch of Brilliance"))
{
SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -1889094576060845154L;
public void resolve()
{
AllZone.GameAction.drawCard(card.getController());
AllZone.GameAction.drawCard(card.getController());
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Concentrate") || cardName.equals("Harmonize") )
{
SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -3561111468549060269L;
public void resolve()
{
AllZone.GameAction.drawCard(card.getController());
AllZone.GameAction.drawCard(card.getController());
AllZone.GameAction.drawCard(card.getController());
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Amnesia"))
{
@@ -10535,32 +10340,7 @@ public class CardFactory implements NewConstants {
}
};//command
card.addDestroyCommand(destroy);
}
//*************** START *********** START **************************
else if(cardName.equals("Ancestral Recall"))
{
SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = 4696857462510589599L;
public void resolve()
{
AllZone.GameAction.drawCard(getTargetPlayer());
AllZone.GameAction.drawCard(getTargetPlayer());
AllZone.GameAction.drawCard(getTargetPlayer());
}
public boolean canPlayAI()
{
return AllZone.Computer_Hand.getCards().length <= 5;
}
};
spell.setChooseTargetAI(CardFactoryUtil.AI_targetComputer());
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
}//*************** START *********** START **************************
//*************** START *********** START **************************
else if(cardName.equals("Deep Analysis"))
@@ -11616,46 +11396,6 @@ public class CardFactory implements NewConstants {
card.setFlashback(true);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Minions' Murmurs"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = 7270026936498671973L;
public boolean canPlayAI()
{
int n = countCreatures();
return 0 < n && n < AllZone.Computer_Life.getLife();
}//canPlayAI()
public void resolve()
{
int n = countCreatures();
for(int i = 0; i < n; i++)
AllZone.GameAction.drawCard(card.getController());
AllZone.GameAction.getPlayerLife(card.getController()).subtractLife(n);
}//resolve()
int countCreatures()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
CardList list = new CardList(play.getCards());
list = list.getType("Creature");
return list.size();
}
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Tendrils of Corruption"))
{
@@ -13818,87 +13558,6 @@ public class CardFactory implements NewConstants {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Brainstorm"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -5722651962081633839L;
public void resolve()
{
AllZone.GameAction.drawCard(card.getController());
AllZone.GameAction.drawCard(card.getController());
AllZone.GameAction.drawCard(card.getController());
String player = card.getController();
if(player.equals(Constant.Player.Human))
humanResolve();
else
computerResolve();
}
public void humanResolve()
{
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Human);
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, Constant.Player.Human);
CardList putOnTop = new CardList(hand.getCards());
Object o = AllZone.Display.getChoiceOptional("First card to put on top: ", putOnTop.toArray());
if(o != null)
{
Card c1 = (Card)o;
putOnTop.remove(c1);
hand.remove(c1);
lib.add(c1,0);
}
o = AllZone.Display.getChoiceOptional("Second card to put on top: ", putOnTop.toArray());
if(o != null)
{
Card c2 = (Card)o;
putOnTop.remove(c2);
hand.remove(c2);
lib.add(c2,0);
}
}
public void computerResolve()
{
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer);
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, Constant.Player.Computer);
CardList putOnTop = new CardList(hand.getCards());
Card c1 = putOnTop.get(0);
putOnTop.remove(c1);
hand.remove(c1);
lib.add(c1, 0);
Card c2 = putOnTop.get(0);
putOnTop.remove(c2);
hand.remove(c2);
lib.add(c2, 0);
//TODO: somehow find the least desirable cards at the moment, and put those on top
}
public boolean canPlay()
{
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
if (lib.size() >= 2)
return true;
else
return false;
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Banishing Knack"))
@@ -16013,7 +15672,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
}//*************** END ************ END **************************
//*************** START *********** START **************************
if (cardName.equals("Ior Ruin Expedition"))
{
final SpellAbility ability = new Ability(card, "0")
@@ -16811,6 +16470,26 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
ability.setBeforePayMana(new Input_NoCost_TapAbility(ability));
}//*************** END ************ END **************************
//*************** START *********** START **************************
if(cardName.equals("Scepter of Insight"))
{
final SpellAbility ability = new Ability_Tap(card, "3 U")
{
private static final long serialVersionUID = -3567474686431369541L;
public boolean canPlayAI() {return AllZone.Phase.getPhase().equals(Constant.Phase.Main2);}
public void resolve()
{
AllZone.GameAction.drawCard(card.getController());
}
};//SpellAbility
card.addSpellAbility(ability);
ability.setDescription("3 U, tap: Draw a card.");
ability.setStackDescription(card.getName() + " - draw a card.");
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found

View File

@@ -5342,6 +5342,109 @@ class CardFactory_Auras {
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END **************************
//*************** START *********** START **************************
if(cardName.equals("Asha's Favor"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = 8803901572203454960L;
public boolean canPlayAI()
{
CardList list = new CardList(AllZone.Computer_Play.getCards());
list = list.getType("Creature");
if(list.isEmpty())
return false;
//else
CardListUtil.sortAttack(list);
CardListUtil.sortFlying(list);
for (int i=0;i<list.size();i++) {
if (CardFactoryUtil.canTarget(card, list.get(i)))
{
setTargetCard(list.get(i));
return true;
}
}
return false;
}//canPlayAI()
public void resolve()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(card);
Card c = getTargetCard();
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c) )
{
card.enchantCard(c);
System.out.println("Enchanted: " +getTargetCard());
}
}//resolve()
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
Command onEnchant = new Command()
{
private static final long serialVersionUID = 7126996983975855960L;
public void execute()
{
if (card.isEnchanting())
{
Card crd = card.getEnchanting().get(0);
crd.addExtrinsicKeyword("Flying");
crd.addExtrinsicKeyword("First Strike");
crd.addExtrinsicKeyword("Vigilance");
}
}//execute()
};//Command
Command onUnEnchant = new Command()
{
private static final long serialVersionUID = 6114584155701098976L;
public void execute()
{
if (card.isEnchanting())
{
Card crd = card.getEnchanting().get(0);
crd.removeExtrinsicKeyword("Flying");
crd.removeExtrinsicKeyword("First Strike");
crd.removeExtrinsicKeyword("Vigilance");
}
}//execute()
};//Command
Command onLeavesPlay = new Command()
{
private static final long serialVersionUID = -7360753270796020955L;
public void execute()
{
if (card.isEnchanting())
{
Card crd = card.getEnchanting().get(0);
card.unEnchantCard(crd);
}
}
};
card.addEnchantCommand(onEnchant);
card.addUnEnchantCommand(onUnEnchant);
card.addLeavesPlayCommand(onLeavesPlay);
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END **************************
return card;

View File

@@ -9221,7 +9221,7 @@ public class CardFactory_Creatures {
//*************** START *********** START **************************
else if(cardName.equals("Bonded Fetch"))
else if(cardName.equals("Bonded Fetch") || cardName.equals("Merfolk Looter"))
{
final Ability_Tap ability = new Ability_Tap(card)
{
@@ -9822,7 +9822,8 @@ public class CardFactory_Creatures {
//*************** START *********** START **************************
if (cardName.equals("Goldmeadow Harrier") || cardName.equals("Loxodon Mystic")
|| cardName.equals("Master Decoy") || cardName.equals("Benalish Hero"))
|| cardName.equals("Master Decoy") || cardName.equals("Benalish Trapper") || cardName.equals("Whipcorder")
|| cardName.equals("Blinding Mage") || cardName.equals("Ostiary Thrull"))
{
final SpellAbility ability = new Ability_Tap(card, "W")
{
@@ -12861,6 +12862,77 @@ public class CardFactory_Creatures {
});
}//*************** END ************ END **************************
//*************** START *********** START **************************
if(cardName.equals("Silver Drake"))
{
final SpellAbility ability = new Ability(card, "0")
{
public void resolve()
{
Card c = getTargetCard();
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, c.getOwner());
if(AllZone.GameAction.isCardInPlay(c))
{
AllZone.getZone(c).remove(c);
if(! c.isToken())
{
Card newCard = AllZone.CardFactory.getCard(c.getName(), c.getOwner());
hand.add(newCard);
}
}
}
};
Command intoPlay = new Command()
{
private static final long serialVersionUID = -8473976122518500976L;
public void execute()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
CardList creatures = new CardList(play.getCards());
creatures = creatures.getType("Creature");
CardList whiteBlue = new CardList();
for(int i=0;i <creatures.size(); i++)
{
//if(!CardUtil.getColors(nonBlackCards.get(i)).contains(Constant.Color.Black))
if (CardUtil.getColors(creatures.get(i)).contains(Constant.Color.White))
{
whiteBlue.add(creatures.get(i));
}
else if (CardUtil.getColors(creatures.get(i)).contains(Constant.Color.Blue))
{
whiteBlue.add(creatures.get(i));
}
}
AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, whiteBlue, "Select a white or blue creature you control.", false));
ButtonUtil.disableAll();
}//execute()
};//Command
card.addComesIntoPlayCommand(intoPlay);
card.clearSpellAbility();
card.addSpellAbility(new Spell_Permanent(card)
{
private static final long serialVersionUID = -5048658151377675270L;
public boolean canPlayAI()
{
return false;
}
});
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Fleetfoot Panther") || cardName.equals("Steel Leaf Paladin"))
{
@@ -15280,8 +15352,87 @@ public class CardFactory_Creatures {
card.addSpellAbility(ability);
card.addSpellAbility(ability2);
}//*************** END ************ END **************************
//*************** START *********** START **************************
if(cardName.equals("Frontline Sage"))
{
final SpellAbility ability = new Ability_Tap(card, "U")
{
private static final long serialVersionUID = 4999015283563842050L;
public boolean canPlayAI() {return false;}
public void resolve()
{
AllZone.GameAction.drawCard(card.getController());
AllZone.InputControl.setInput(CardFactoryUtil.input_discard());
}
};//SpellAbility
card.addSpellAbility(ability);
ability.setDescription("U, tap: Draw a card, then discard a card.");
ability.setStackDescription("Frontline Sage - draw a card, then discard a card.");
}//*************** END ************ END **************************
//*************** START *********** START **************************
if (cardName.equals("Thornscape Apprentice"))
{
final SpellAbility ability = new Ability_Tap(card, "W")
{
private static final long serialVersionUID = 7296467409302755815L;
public void resolve()
{
Card c = getTargetCard();
c.tap();
}
public boolean canPlayAI() {return false;}
};//SpellAbility
card.addSpellAbility(ability);
ability.setDescription("W, tap: Tap target creature.");
ability.setBeforePayMana(CardFactoryUtil.input_targetCreature(ability));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Covetous Dragon"))
{
SpellAbility spell = new Spell_Permanent(card)
{
private static final long serialVersionUID = -1446713295855849195L;
public boolean canPlayAI()
{
CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer).getCards());
list = list.getType("Artifact");
return super.canPlay() && list.size() > 0;
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}
//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Tethered Griffin"))
{
SpellAbility spell = new Spell_Permanent(card)
{
private static final long serialVersionUID = -7872917651421012893L;
public boolean canPlayAI()
{
CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer).getCards());
list = list.getType("Enchantment");
return super.canPlay() && list.size() > 0;
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}
//*************** END ************ END **************************
// Cards with Cycling abilities

View File

@@ -8771,13 +8771,11 @@ public class GameActionUtil
brigadiers.addAll(cPlay.getCards());
brigadiers = brigadiers.getName("Aven Brigadier");
return brigadiers.size()-1;
}
public void execute()
{
CardList creature = new CardList();
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
@@ -8788,8 +8786,13 @@ public class GameActionUtil
{
Card c = creature.get(i);
otherBrigadiers = countOtherBrigadiers();
c.setOtherAttackBoost(2*otherBrigadiers);
c.setOtherDefenseBoost(2*otherBrigadiers);
int boost = 0;
if (c.getType().contains("Bird"))
boost++;
if (c.getType().contains("Soldier"))
boost++;
c.setOtherAttackBoost(boost*otherBrigadiers);
c.setOtherDefenseBoost(boost*otherBrigadiers);
}// for inner
}// execute()
@@ -8851,8 +8854,7 @@ public class GameActionUtil
private int countOtherScions(Card c)
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c
.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
CardList scions = new CardList(play.getCards());
scions = scions.getName("Scion of Oona");
return scions.size()-1;
@@ -8873,10 +8875,19 @@ public class GameActionUtil
{
Card c = creature.get(i);
otherScions = countOtherScions(c);
c.setOtherAttackBoost(otherScions);
c.setOtherDefenseBoost(otherScions);
if (!c.getExtrinsicKeyword().contains("Shroud") && otherScions > 0)
c.addExtrinsicKeyword("Shroud");
if (c.getType().equals("Faerie") || c.getKeyword().contains("Changeling"))
{
c.setOtherAttackBoost(otherScions);
c.setOtherDefenseBoost(otherScions);
if (!c.getExtrinsicKeyword().contains("Shroud") && otherScions > 0)
c.addExtrinsicKeyword("Shroud");
}
else
{
c.setOtherAttackBoost(0);
c.setOtherDefenseBoost(0);
c.removeExtrinsicKeyword("Shroud");
}
}// for inner
}// execute()

View File

@@ -48,7 +48,9 @@ import forge.properties.NewConstants.LANG;
* @author Clemens Koza
*/
public class Gui_DeckEditorNew extends JFrame implements CardDetail, NewConstants.GUI.GuiDeckEditor {
public static void main(String[] args) {
private static final long serialVersionUID = 680850452718332565L;
public static void main(String[] args) {
// JFrame jf = new JFrame();
Gui_DeckEditorNew jf = new Gui_DeckEditorNew();
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);