diff --git a/res/cardsfolder/b/body_snatcher.txt b/res/cardsfolder/b/body_snatcher.txt index fc7d1812377..68239b98088 100644 --- a/res/cardsfolder/b/body_snatcher.txt +++ b/res/cardsfolder/b/body_snatcher.txt @@ -10,6 +10,8 @@ SVar:DBBodySnatcherCleanup:DB$ Cleanup | ClearRemembered$ True T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigBodySnatcherExileMe | TriggerDescription$ When CARDNAME dies, exile CARDNAME and return target creature card from your graveyard to the battlefield. SVar:TrigBodySnatcherExileMe:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Graveyard | Destination$ Exile | SubAbility$ DBBodySnatcherReturnCreature SVar:DBBodySnatcherReturnCreature:DB$ ChangeZone | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature from your graveyard | Origin$ Graveyard | Destination$ Battlefield +SVar:NeedsToPlayVar:Y GE2 +SVar:Y:Count$TypeInYourHand.Creature SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/body_snatcher.jpg End \ No newline at end of file diff --git a/res/cardsfolder/i/impatience.txt b/res/cardsfolder/i/impatience.txt index 20d158303c6..762d5fbbdce 100644 --- a/res/cardsfolder/i/impatience.txt +++ b/res/cardsfolder/i/impatience.txt @@ -8,6 +8,7 @@ T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Opponent | CheckSVar$ OppCast SVar:TrigDamageOpp:AB$ DealDamage | Cost$ 0 | Defined$ Opponent | NumDmg$ 2 SVar:YouCast:Count$ThisTurnCast_Card.YouCtrl SVar:OppCast:Count$ThisTurnCast_Card.YouDontCtrl +SVar:RemRandomDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/impatience.jpg End \ No newline at end of file diff --git a/res/cardsfolder/m/mystic_snake.txt b/res/cardsfolder/m/mystic_snake.txt index f2c7ebbefee..e25235e38a0 100644 --- a/res/cardsfolder/m/mystic_snake.txt +++ b/res/cardsfolder/m/mystic_snake.txt @@ -5,8 +5,7 @@ Text:no text PT:2/2 K:Flash T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters the battlefield, counter target spell. -SVar:TrigCounter:AB$Counter | Cost$ 0 | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Select target spell -SVar:RemAIDeck:True +SVar:TrigCounter:DB$Counter | Cost$ 0 | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Select target spell SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/mystic_snake.jpg SetInfo:APC|Rare|http://magiccards.info/scans/en/ap/112.jpg diff --git a/res/cardsfolder/s/scent_of_nightshade.txt b/res/cardsfolder/s/scent_of_nightshade.txt index 1ba4077e9cb..335171a663c 100644 --- a/res/cardsfolder/s/scent_of_nightshade.txt +++ b/res/cardsfolder/s/scent_of_nightshade.txt @@ -7,7 +7,6 @@ SVar:DBScentOfNightshadePump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select SVar:DBScentOfNightshadeCleanup:DB$ Cleanup | ClearRemembered$ True SVar:ScentOfNightshadeX:Remembered$Amount.Negative SVar:RemAIDeck:True -SVar:RemRandomDeck:True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/scent_of_nightshade.jpg End \ No newline at end of file diff --git a/res/cardsfolder/v/voidmage_husher.txt b/res/cardsfolder/v/voidmage_husher.txt index 780ed3fe844..5a109001ae2 100644 --- a/res/cardsfolder/v/voidmage_husher.txt +++ b/res/cardsfolder/v/voidmage_husher.txt @@ -6,7 +6,7 @@ PT:2/2 K:Flash T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters the battlefield, counter target activated ability. T:Mode$ SpellCast | ValidCard$ Card.YouCtrl | Execute$ TrigBounce | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever you cast a spell, you may return CARDNAME to its owner's hand. -SVar:TrigCounter:AB$Counter | Cost$ 0 | TargetType$ Activated | TgtPrompt$ Select target ability | ValidTgts$ Permanent +SVar:TrigCounter:DB$Counter | Cost$ 0 | TargetType$ Activated | TgtPrompt$ Select target ability | ValidTgts$ Permanent SVar:TrigBounce:AB$ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Hand SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/voidmage_husher.jpg diff --git a/src/main/java/forge/ComputerAIGeneral.java b/src/main/java/forge/ComputerAIGeneral.java index 511d142a446..d022dba44da 100644 --- a/src/main/java/forge/ComputerAIGeneral.java +++ b/src/main/java/forge/ComputerAIGeneral.java @@ -27,6 +27,7 @@ import forge.card.abilityfactory.AbilityFactory; import forge.card.cardfactory.CardFactoryUtil; import forge.card.spellability.SpellAbility; import forge.card.spellability.SpellPermanent; +import forge.card.trigger.Trigger; /** *
@@ -110,7 +111,7 @@ public class ComputerAIGeneral implements Computer { final boolean hasACardGivingHaste = this.hasACardGivingHaste(); - // Why is the computer checking if their mana pool is empty? + // If mana pool is not empty try to play anything if (AllZone.getComputerPlayer().getManaPool().isEmpty()) { hand = hand.filter(new CardListFilter() { @Override @@ -299,6 +300,7 @@ public class ComputerAIGeneral implements Computer { public boolean addCard(final Card c) { if (c.isPermanent() && c.hasKeyword("Flash") + && !hasETBTrigger(c) && (AllZone.getPhaseHandler().isPlayerTurn(AllZone.getComputerPlayer()) || AllZone.getPhaseHandler() .isBefore(Constant.Phase.COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY))) { return false; @@ -320,6 +322,35 @@ public class ComputerAIGeneral implements Computer { return all; } + /** + *
+ * hasETBTrigger. + *
+ * + * @param card + * a {@link forge.Card} object. + * @return a boolean. + */ + public boolean hasETBTrigger(final Card card) { + final ArrayList* getOtherPhases.