*Added ThisTurnCast to xCount to complement ThisTurnEntered. Count$ThisTurnCast <Valid> lets you count how many <Valid> cards were cast so far this turn. StormCount remains, but is now functionally equivalent to ThisTurnCast Card.

*Converted to script
	Ichneumon Druid
	Predatory Advantage
	Storm Entity
	Vengevine
*Added
	Ethersworn Canonist
This commit is contained in:
Hellfish
2011-10-17 20:56:14 +00:00
parent 87d0160488
commit f6d1e11559
14 changed files with 94 additions and 412 deletions

1
.gitattributes vendored
View File

@@ -2498,6 +2498,7 @@ res/cardsfolder/e/etherium_abomination.txt svneol=native#text/plain
res/cardsfolder/e/etherium_astrolabe.txt svneol=native#text/plain res/cardsfolder/e/etherium_astrolabe.txt svneol=native#text/plain
res/cardsfolder/e/etherium_sculptor.txt svneol=native#text/plain res/cardsfolder/e/etherium_sculptor.txt svneol=native#text/plain
res/cardsfolder/e/ethersworn_adjudicator.txt svneol=native#text/plain res/cardsfolder/e/ethersworn_adjudicator.txt svneol=native#text/plain
res/cardsfolder/e/ethersworn_canonist.txt -text
res/cardsfolder/e/ethersworn_shieldmage.txt -text res/cardsfolder/e/ethersworn_shieldmage.txt -text
res/cardsfolder/e/evacuation.txt svneol=native#text/plain res/cardsfolder/e/evacuation.txt svneol=native#text/plain
res/cardsfolder/e/evaporate.txt svneol=native#text/plain res/cardsfolder/e/evaporate.txt svneol=native#text/plain

View File

@@ -0,0 +1,14 @@
Name:Ethersworn Canonist
ManaCost:1 W
Types:Artifact Creature Human Cleric
Text:no text
PT:2/2
S:Mode$ CantBeCast | ValidCard$ Card.nonArtifact | Caster$ You | CheckSVar$ X | Description$ Each player who has cast a nonartifact spell this turn can't cast additional nonartifact spells.
S:Mode$ CantBeCast | ValidCard$ Card.nonArtifact | Caster$ Opponent | CheckSVar$ Y
SVar:X:Count$ThisTurnCast Card.nonArtifact+YouCtrl
SVar:Y:Count$ThisTurnCast Card.nonArtifact+YouDontCtrl
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ethersworn_canonist.jpg
Oracle:Each player who has cast a nonartifact spell this turn can't cast additional nonartifact spells.
End

View File

@@ -1,8 +1,11 @@
Name:Ichneumon Druid Name:Ichneumon Druid
ManaCost:1 G G ManaCost:1 G G
Types:Creature Human Druid Types:Creature Human Druid
Text:Whenever an opponent casts an instant spell other than the first instant spell that player casts each turn, CARDNAME deals 4 damage to him or her. Text:no text
PT:1/1 PT:1/1
T:Mode$ SpellCast | ValidCard$ Instant | ValidControllingPlayer$ Opponent | CheckSVar$ X | SVarCompare$ GT1 | TriggerZones$ Battlefield | Execute$ TrigDmg | TriggerDescription$ Whenever an opponent casts an instant spell other than the first instant spell that player casts each turn, CARDNAME deals 4 damage to him or her.
SVar:TrigDmg:AB$DealDamage | Cost$ 0 | Defined$ TriggeredPlayer | NumDmg$ 4
SVar:X:Count$ThisTurnCast Instant
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/ichneumon_druid.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/ichneumon_druid.jpg

View File

@@ -1,7 +1,10 @@
Name:Predatory Advantage Name:Predatory Advantage
ManaCost:3 R G ManaCost:3 R G
Types:Enchantment Types:Enchantment
Text:At the beginning of each opponent's end step, if that player didn't cast a creature spell this turn, put a 2/2 green Lizard creature token onto the battlefield. Text:no text
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Opponent | CheckSVar$ X | SVarCompare$ EQ0 | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of each opponent's end step, if that player didn't cast a creature spell this turn, put a 2/2 green Lizard creature token onto the battlefield.
SVar:TrigToken:AB$Token | Cost$ 0 | TokenName$ Lizard | TokenTypes$ Creature,Lizard | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 2 | TokenAmount$ 1 | TokenOwner$ You
SVar:X:Count$ThisTurnCast Creature.YouDontCtrl
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/predatory_advantage.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/predatory_advantage.jpg
SetInfo:ARB|Rare|http://magiccards.info/scans/en/arb/58.jpg SetInfo:ARB|Rare|http://magiccards.info/scans/en/arb/58.jpg

View File

@@ -1,9 +1,11 @@
Name:Storm Entity Name:Storm Entity
ManaCost:1 R ManaCost:1 R
Types:Creature Elemental Types:Creature Elemental
Text:CARDNAME enters the battlefield with a +1/+1 counter on it for each other spell cast this turn. Text:no text
PT:1/1 PT:1/1
K:Haste K:Haste
K:etbCounter:P1P1:X
SVar:X:Count$ThisTurnCast Card.Other
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/storm_entity.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/storm_entity.jpg
SetInfo:FUT|Uncommon|http://magiccards.info/scans/en/fut/122.jpg SetInfo:FUT|Uncommon|http://magiccards.info/scans/en/fut/122.jpg

View File

@@ -1,9 +1,12 @@
Name:Vengevine Name:Vengevine
ManaCost:2 G G ManaCost:2 G G
Types:Creature Elemental Types:Creature Elemental
Text:Whenever you cast a spell, if it's the second creature spell you cast this turn, you may return Vengevine from your graveyard to the battlefield. Text:no text
PT:4/3 PT:4/3
K:Haste K:Haste
T:Mode$ SpellCast | ValidCard$ Creature | ValidControllingPlayer$ You | CheckSVar$ X | SVarCompare$ EQ2 | TriggerZones$ Graveyard | Execute$ TrigReturn | OptionalDecider$ You | TriggerDescription$ Whenever you cast a spell, if it's the second creature spell you cast this turn, you may return CARDNAME from your graveyard to the battlefield.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Graveyard | Destination$ Battlefield
SVar:X:Count$ThisTurnCast Creature.YouCtrl
SVar:Rarity:Mythic SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/vengevine.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/vengevine.jpg
SetInfo:ROE|Mythic|http://magiccards.info/scans/en/roe/212.jpg SetInfo:ROE|Mythic|http://magiccards.info/scans/en/roe/212.jpg

View File

@@ -678,7 +678,7 @@ public final class CardUtil {
* @param from zone coming from * @param from zone coming from
* @param valid a isValid expression * @param valid a isValid expression
* @param src a Card object * @param src a Card object
* @return a CardList that matches then given criteria * @return a CardList that matches the given criteria
*/ */
public static CardList getThisTurnEntered(final Constant.Zone to, final Constant.Zone from, final String valid, final Card src) { public static CardList getThisTurnEntered(final Constant.Zone to, final Constant.Zone from, final String valid, final Card src) {
CardList res = new CardList(); CardList res = new CardList();
@@ -695,6 +695,23 @@ public final class CardUtil {
return res; return res;
} }
/**
* getThisTurnCast.
*
* @param valid a String object
* @param src a Card object
* @return a CardList that matches the given criteria
*/
public static CardList getThisTurnCast(final String valid, final Card src) {
CardList res = new CardList();
res.addAll(AllZone.getStack().getCardsCastThisTurn());
res = res.getValidCards(valid, src.getController(), src);
return res;
}
/** /**
* getLKICopy. * getLKICopy.
* @param c a Card. * @param c a Card.

View File

@@ -134,7 +134,7 @@ public class ComputerAI_General implements Computer {
creatures2.add(creatures.get(i)); creatures2.add(creatures.get(i));
} }
} }
if (creatures2.size() + Phase.getComputerStartingCardspellCount() > 1 if (creatures2.size() + CardUtil.getThisTurnCast("Creature.YouCtrl", vengevines.get(0)).size() > 1
&& c.isCreature() && c.isCreature()
&& CardUtil.getConvertedManaCost(c.getManaCost()) <= 3) { && CardUtil.getConvertedManaCost(c.getManaCost()) <= 3) {
return true; return true;

View File

@@ -54,7 +54,6 @@ public class EndOfTurn implements java.io.Serializable {
//Pyrohemia and Pestilence //Pyrohemia and Pestilence
CardList all = AllZoneUtil.getCardsIn(Zone.Battlefield); CardList all = AllZoneUtil.getCardsIn(Zone.Battlefield);
GameActionUtil.endOfTurn_Predatory_Advantage();
GameActionUtil.endOfTurn_Wall_Of_Reverence(); GameActionUtil.endOfTurn_Wall_Of_Reverence();
GameActionUtil.endOfTurn_Lighthouse_Chronologist(); GameActionUtil.endOfTurn_Lighthouse_Chronologist();

View File

@@ -49,11 +49,8 @@ public final class GameActionUtil {
playCard_Cascade(c); playCard_Cascade(c);
playCard_Ripple(c); playCard_Ripple(c);
//playCard_Storm(sa);
playCard_Vengevine(c);
playCard_Venser_Emblem(c); playCard_Venser_Emblem(c);
playCard_Ichneumon_Druid(c);
} }
@@ -68,19 +65,17 @@ public final class GameActionUtil {
public void execute() { public void execute() {
if(!c.isCopiedSpell()) {
CardList humanNexus = AllZone.getHumanPlayer().getCardsIn(Zone.Battlefield, "Maelstrom Nexus"); CardList humanNexus = AllZone.getHumanPlayer().getCardsIn(Zone.Battlefield, "Maelstrom Nexus");
CardList computerNexus = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield, "Maelstrom Nexus"); CardList computerNexus = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield, "Maelstrom Nexus");
if (humanNexus.size() > 0) { CardList maelstromNexii = new CardList();
if (Phase.getPlayerSpellCount() == 1 && !c.isCopiedSpell()) { maelstromNexii.addAll(humanNexus);
for (int i = 0; i < humanNexus.size(); i++) { maelstromNexii.addAll(computerNexus);
doCascade(c);
}
} for(Card nexus : maelstromNexii) {
} if(CardUtil.getThisTurnCast("Card.YouCtrl", nexus).size() == 1) {
if (computerNexus.size() > 0) {
if (Phase.getComputerSpellCount() == 1 && !c.isCopiedSpell()) {
for (int i = 0; i < computerNexus.size(); i++) {
doCascade(c); doCascade(c);
} }
} }
@@ -287,90 +282,6 @@ public final class GameActionUtil {
ripple.execute(); ripple.execute();
} //playCard_Ripple() } //playCard_Ripple()
/**
* <p>playCard_Storm.</p>
*
* @param sa a {@link forge.card.spellability.SpellAbility} object.
*/ /*
public static void playCard_Storm(SpellAbility sa) {
Card source = sa.getSourceCard();
if (!source.isCopiedSpell()
&& source.hasKeyword("Storm")) {
int StormNumber = Phase.getStormCount() - 1;
for (int i = 0; i < StormNumber; i++)
AllZone.getCardFactory().copySpellontoStack(source, source, sa, true);
}
}//playCard_Storm()
*/
/**
* <p>playCard_Vengevine.</p>
*
* @param c a {@link forge.Card} object.
*/
public static void playCard_Vengevine(final Card c) {
if (c.isCreature() == true
&& (Phase.getPlayerCreatureSpellCount() == 2 || Phase.getComputerStartingCardspellCount() == 2))
{
final Player controller = c.getController();
final PlayerZone play = controller.getZone(Constant.Zone.Battlefield);
CardList list = controller.getCardsIn(Zone.Graveyard);
list = list.getName("Vengevine");
if (list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
final Card card = list.get(i);
Ability ability = new Ability(card, "0") {
@Override
public void resolve() {
if (controller.isComputer()
|| GameActionUtil.showYesNoDialog(card, "Return Vengevine from the graveyard?"))
{
if (controller.getZone(Zone.Graveyard).contains(card)) {
AllZone.getGameAction().moveTo(play, card);
}
}
}
}; // ability
StringBuilder sb = new StringBuilder();
sb.append(card).append(" - ").append("Whenever you cast a spell, if it's the second creature ");
sb.append("spell you cast this turn, you may return Vengevine from your graveyard to the battlefield.");
ability.setStackDescription(sb.toString());
AllZone.getStack().addSimultaneousStackEntry(ability);
}
} //if
}
} //playCard_Vengevine()
/**
* <p>playCard_Ichneumon_Druid.</p>
*
* @param c a {@link forge.Card} object.
*/
public static void playCard_Ichneumon_Druid(final Card c) {
if (c.isInstant() && (Phase.getPlayerInstantSpellCount() >= 2 || Phase.getComputerInstantSpellCount() >= 2)) {
final Player player = c.getController();
final Player opp = player.getOpponent();
CardList list = opp.getCardsIn(Zone.Battlefield, "Ichneumon Druid");
for (int i = 0; i < list.size(); i++) {
final Card card = list.get(i);
Ability ability = new Ability(card, "0") {
@Override
public void resolve() {
player.addDamage(4, card);
}
}; // ability
StringBuilder sb = new StringBuilder();
sb.append(card).append(" - ").append("Whenever an opponent casts an instant spell other than the first instant spell that player casts each turn, Ichneumon Druid deals 4 damage to him or her.");
ability.setStackDescription(sb.toString());
AllZone.getStack().addSimultaneousStackEntry(ability);
}
}
} //playCard_Ichneumon_Druid()
/** /**
* <p>playCard_Venser_Emblem.</p> * <p>playCard_Venser_Emblem.</p>
* *
@@ -514,31 +425,6 @@ public final class GameActionUtil {
} }
} //endOfTurn_Wall_Of_Reverence() } //endOfTurn_Wall_Of_Reverence()
/**
* <p>endOfTurn_Predatory_Advantage.</p>
*/
public static void endOfTurn_Predatory_Advantage() {
final Player player = AllZone.getPhase().getPlayerTurn();
CardList list = player.getOpponent().getCardsIn(Zone.Battlefield, "Predatory Advantage");
for (int i = 0; i < list.size(); i++) {
final Player controller = list.get(i).getController();
if ((player.isHuman() && Phase.getPlayerCreatureSpellCount() == 0)
|| (player.isComputer() && Phase.getComputerStartingCardspellCount() == 0))
{
Ability abTrig = new Ability(list.get(i), "0") {
public void resolve() {
CardFactoryUtil.makeToken("Lizard", "G 2 2 Lizard", controller, "G",
new String[]{"Creature", "Lizard"}, 2, 2, new String[]{""});
}
};
abTrig.setTrigger(true);
abTrig.setStackDescription("At the beginning of each opponent's end step, if that player didn't cast a creature spell this turn, put a 2/2 green Lizard creature token onto the battlefield.");
AllZone.getGameAction().playSpellAbility(abTrig);
}
}
}
/** /**
* <p>endOfTurn_Lighthouse_Chronologist.</p> * <p>endOfTurn_Lighthouse_Chronologist.</p>
*/ */

View File

@@ -41,6 +41,8 @@ public class MagicStack extends MyObservable {
private boolean bResolving = false; private boolean bResolving = false;
private int splitSecondOnStack = 0; private int splitSecondOnStack = 0;
private CardList thisTurnCast = new CardList();
/** /**
* <p>isFrozen.</p> * <p>isFrozen.</p>
* *
@@ -746,7 +748,7 @@ public class MagicStack extends MyObservable {
this.updateObservers(); this.updateObservers();
if (sp.isSpell() && !sp.getSourceCard().isCopiedSpell()) { if (sp.isSpell() && !sp.getSourceCard().isCopiedSpell()) {
Phase.increaseSpellCount(sp); thisTurnCast.add(sp.getSourceCard());
GameActionUtil.executePlayCardEffects(sp); GameActionUtil.executePlayCardEffects(sp);
} }
@@ -1210,5 +1212,18 @@ public class MagicStack extends MyObservable {
return frozenStack; return frozenStack;
} }
/**
* Accessor for the field thisTurnCast.
* @return a CardList.
*/
public final CardList getCardsCastThisTurn() {
return thisTurnCast;
}
/**
* clearCardsCastThisTurn.
*/
public void clearCardsCastThisTurn() {
thisTurnCast.clear();
}
} }

View File

@@ -28,20 +28,6 @@ public class Phase extends MyObservable implements java.io.Serializable {
// accessing the following: // accessing the following:
/** Constant <code>GameBegins=0</code> */ /** Constant <code>GameBegins=0</code> */
private static int GameBegins = 0; private static int GameBegins = 0;
/** Constant <code>StormCount=</code> */
private static int StormCount;
/** Constant <code>PlayerSpellCount=</code> */
private static int PlayerSpellCount;
/** Constant <code>PlayerCreatureSpellCount=</code> */
private static int PlayerCreatureSpellCount;
/** Constant <code>PlayerInstantSpellCount=</code> */
private static int PlayerInstantSpellCount;
/** Constant <code>ComputerSpellCount=</code> */
private static int ComputerSpellCount;
/** Constant <code>ComputerCreatureSpellCount=</code> */
private static int ComputerCreatureSpellCount;
/** Constant <code>ComputerInstantSpellCount=</code> */
private static int ComputerInstantSpellCount;
private Stack<Player> extraTurns = new Stack<Player>(); private Stack<Player> extraTurns = new Stack<Player>();
@@ -260,13 +246,6 @@ public class Phase extends MyObservable implements java.io.Serializable {
* <p>turnReset.</p> * <p>turnReset.</p>
*/ */
public void turnReset() { public void turnReset() {
setStormCount(0);
setPlayerSpellCount(0);
setPlayerCreatureSpellCount(0);
setPlayerInstantSpellCount(0);
setComputerSpellCount(0);
setComputerCreatureSpellCount(0);
setComputerInstantSpellCount(0);
playerTurn.setNumLandsPlayed(0); playerTurn.setNumLandsPlayed(0);
} }
@@ -480,6 +459,7 @@ public class Phase extends MyObservable implements java.io.Serializable {
private Player handleNextTurn() { private Player handleNextTurn() {
Player nextTurn = extraTurns.isEmpty() ? getPlayerTurn().getOpponent() : extraTurns.pop(); Player nextTurn = extraTurns.isEmpty() ? getPlayerTurn().getOpponent() : extraTurns.pop();
AllZone.getStack().clearCardsCastThisTurn();
AllZone.resetZoneMoveTracking(); AllZone.resetZoneMoveTracking();
AllZone.getComputerPlayer().resetProwl(); AllZone.getComputerPlayer().resetProwl();
AllZone.getHumanPlayer().resetProwl(); AllZone.getHumanPlayer().resetProwl();
@@ -795,114 +775,6 @@ public class Phase extends MyObservable implements java.io.Serializable {
return sb.toString(); return sb.toString();
} }
/**
* <p>increaseSpellCount.</p>
*
* @param sp a {@link forge.card.spellability.SpellAbility} object.
*/
public static void increaseSpellCount(final SpellAbility sp) {
incrementStormCount();
if (sp.getActivatingPlayer().isHuman()) {
incrementPlayerSpellCount();
if (sp instanceof Spell_Permanent && sp.getSourceCard().isCreature()) {
incrementPlayerCreatureSpellCount();
}
if (sp.getSourceCard().isInstant()) {
incrementPlayerInstantSpellCount();
}
} else {
incrementComputerSpellCount();
if (sp instanceof Spell_Permanent && sp.getSourceCard().isCreature()) {
incrementComputerCreatureSpellCount();
}
if (sp.getSourceCard().isInstant()) {
incrementComputerInstantSpellCount();
}
}
}
/**
* <p>incrementComputerInstantSpellCount.</p>
*
* @since 1.0.15
*/
protected static void incrementComputerInstantSpellCount() {
ComputerInstantSpellCount++;
}
/**
* <p>incrementComputerCreatureSpellCount.</p>
*
* @since 1.0.15
*/
protected static void incrementComputerCreatureSpellCount() {
ComputerCreatureSpellCount++;
}
/**
* <p>incrementComputerSpellCount.</p>
*
* @since 1.0.15
*/
protected static void incrementComputerSpellCount() {
ComputerSpellCount++;
}
/**
* <p>incrementPlayerInstantSpellCount.</p>
*
* @since 1.0.15
*/
protected static void incrementPlayerInstantSpellCount() {
PlayerInstantSpellCount++;
}
/**
* <p>incrementPlayerCreatureSpellCount.</p>
*
* @since 1.0.15
*/
protected static void incrementPlayerCreatureSpellCount() {
PlayerCreatureSpellCount++;
}
/**
* <p>incrementPlayerSpellCount.</p>
*
* @since 1.0.15
*/
protected static void incrementPlayerSpellCount() {
PlayerSpellCount++;
}
/**
* <p>incrementStormCount.</p>
*
* @since 1.0.15
*/
protected static void incrementStormCount() {
StormCount++;
}
/**
* <p>setStormCount.</p>
*
* @param stormCount a int.
*/
public static void setStormCount(final int stormCount) {
StormCount = stormCount;
}
/**
* <p>getStormCount.</p>
*
* @return a int.
*/
public static int getStormCount() {
return StormCount;
}
/** /**
* <p>setGameBegins.</p> * <p>setGameBegins.</p>
* *
@@ -932,114 +804,6 @@ public class Phase extends MyObservable implements java.io.Serializable {
this.phaseIndex = findIndex(phaseID); this.phaseIndex = findIndex(phaseID);
} }
/**
* <p>getPlayerSpellCount.</p>
*
* @return a int.
*/
static int getPlayerSpellCount() {
return PlayerSpellCount;
}
/**
* <p>setPlayerSpellCount.</p>
*
* @param i a int.
*/
static void setPlayerSpellCount(final int i) {
PlayerSpellCount = (i);
}
/**
* <p>getPlayerCreatureSpellCount.</p>
*
* @return a int.
*/
static int getPlayerCreatureSpellCount() {
return PlayerCreatureSpellCount;
}
/**
* <p>setPlayerCreatureSpellCount.</p>
*
* @param i a int.
*/
static void setPlayerCreatureSpellCount(final int i) {
PlayerCreatureSpellCount = (i);
}
/**
* <p>getPlayerInstantSpellCount.</p>
*
* @return a int.
*/
static int getPlayerInstantSpellCount() {
return PlayerInstantSpellCount;
}
/**
* <p>setPlayerInstantSpellCount.</p>
*
* @param i a int.
*/
static void setPlayerInstantSpellCount(final int i) {
PlayerInstantSpellCount = (i);
}
/**
* <p>getComputerSpellCount.</p>
*
* @return a int.
*/
static int getComputerSpellCount() {
return ComputerSpellCount;
}
/**
* <p>setComputerSpellCount.</p>
*
* @param i a int.
*/
static void setComputerSpellCount(final int i) {
ComputerSpellCount = (i);
}
/**
* <p>getComputerStartingCardspellCount.</p>
*
* @return a int.
*/
static int getComputerStartingCardspellCount() {
return ComputerCreatureSpellCount;
}
/**
* <p>setComputerCreatureSpellCount.</p>
*
* @param i a int.
*/
static void setComputerCreatureSpellCount(final int i) {
ComputerCreatureSpellCount = (i);
}
/**
* <p>getComputerInstantSpellCount.</p>
*
* @return a int.
*/
static int getComputerInstantSpellCount() {
return ComputerInstantSpellCount;
}
/**
* <p>setComputerInstantSpellCount.</p>
*
* @param i a int.
*/
static void setComputerInstantSpellCount(final int i) {
ComputerInstantSpellCount = (i);
}
/** /**
* *
* TODO Write javadoc for this method. * TODO Write javadoc for this method.

View File

@@ -2947,7 +2947,7 @@ public class CardFactoryUtil {
} }
if (sq[0].equals("StormCount")) { if (sq[0].equals("StormCount")) {
return doXMath(Phase.getStormCount() - 1, m, c); return doXMath(AllZone.getStack().getCardsCastThisTurn().size() - 1, m, c);
} }
if(sq[0].equals("DamageDoneThisTurn")) { if(sq[0].equals("DamageDoneThisTurn")) {
@@ -3190,8 +3190,8 @@ public class CardFactoryUtil {
// Count$ThisTurnEntered <ZoneDestination> <ZoneOrigin> <Valid> // Count$ThisTurnEntered <ZoneDestination> <ZoneOrigin> <Valid>
// or // or
// Count$ThisTurnEntered <ZoneDestination <Valid> // Count$ThisTurnEntered <ZoneDestination> <Valid>
if (sq[0].startsWith("ThisTurnEntered")) { if (sq[0].contains("ThisTurnEntered")) {
String[] workingCopy = l[0].split(" "); String[] workingCopy = l[0].split(" ");
Zone destination, origin; Zone destination, origin;
String validFilter; String validFilter;
@@ -3210,6 +3210,18 @@ public class CardFactoryUtil {
return doXMath(res.size(), m, c); return doXMath(res.size(), m, c);
} }
// Count$ThisTurnCast <Valid>
if(sq[0].contains("ThisTurnCast")) {
String[] workingCopy = l[0].split(" ");
String validFilter = workingCopy[1];
CardList res = CardUtil.getThisTurnCast(validFilter, c);
int ret = doXMath(res.size(), m, c);
System.out.println("Requesting ThisTurn Cast \"" + validFilter + "\", returning " + ret);
return ret;
}
// Count$Morbid.<True>.<False> // Count$Morbid.<True>.<False>
if (sq[0].startsWith("Morbid")) { if (sq[0].startsWith("Morbid")) {

View File

@@ -1642,43 +1642,6 @@ public class CardFactory_Creatures {
card.addComesIntoPlayCommand(comesIntoPlay); card.addComesIntoPlayCommand(comesIntoPlay);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if (cardName.equals("Storm Entity")) {
final SpellAbility intoPlay = new Ability(card, "0") {
@Override
public boolean canPlayAI() {
CardList human = AllZoneUtil.getCreaturesInPlay(AllZone.getHumanPlayer());
CardListUtil.sortAttack(human);
return (human.get(0).getNetAttack() < Phase.getStormCount() && Phase.getStormCount() > 1);
}
@Override
public void resolve() {
for (int i = 0; i < Phase.getStormCount() - 1; i++) {
card.addCounter(Counters.P1P1, 1);
}
}
};//SpellAbility
Command comesIntoPlay = new Command() {
private static final long serialVersionUID = -3734151854295L;
public void execute() {
AllZone.getStack().addSimultaneousStackEntry(intoPlay);
}
};
StringBuilder sb = new StringBuilder();
sb.append(cardName).append(" - enters the battlefield with a +1/+1 counter on it for each other spell played this turn.");
intoPlay.setStackDescription(sb.toString());
card.addComesIntoPlayCommand(comesIntoPlay);
}//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if (cardName.equals("Vampire Hexmage")) { else if (cardName.equals("Vampire Hexmage")) {
/* /*