diff --git a/forge-ai/src/main/java/forge/ai/ability/AnimateAi.java b/forge-ai/src/main/java/forge/ai/ability/AnimateAi.java index 39fe78a51ef..f98cd81fc78 100644 --- a/forge-ai/src/main/java/forge/ai/ability/AnimateAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/AnimateAi.java @@ -1,28 +1,15 @@ package forge.ai.ability; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import forge.ai.AiCardMemory; -import forge.ai.ComputerUtil; -import forge.ai.ComputerUtilCard; -import forge.ai.ComputerUtilCost; -import forge.ai.SpellAbilityAi; +import forge.ai.*; import forge.card.CardType; import forge.game.Game; import forge.game.ability.AbilityFactory; import forge.game.ability.AbilityUtils; import forge.game.ability.ApiType; -import forge.game.card.Card; -import forge.game.card.CardCollection; -import forge.game.card.CardCollectionView; -import forge.game.card.CardLists; -import forge.game.card.CardPredicates; -import forge.game.card.CardUtil; +import forge.game.card.*; import forge.game.phase.PhaseHandler; import forge.game.phase.PhaseType; import forge.game.player.Player; @@ -38,6 +25,10 @@ import forge.game.trigger.TriggerHandler; import forge.game.zone.ZoneType; import forge.util.collect.FCollectionView; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + /** *
@@ -186,9 +177,19 @@ public class AnimateAi extends SpellAbilityAi { && !ComputerUtilCard.doesSpecifiedCreatureBlock(aiPlayer, animatedCopy)) { return false; } - this.rememberAnimatedThisTurn(aiPlayer, c); + // also check if maybe there are static effects applied to the animated copy that would matter + // (e.g. Myth Realized) + if (animatedCopy.getCurrentPower() + animatedCopy.getCurrentToughness() > + c.getCurrentPower() + c.getCurrentToughness()) { + if (!isAnimatedThisTurn(aiPlayer, sa.getHostCard())) { + bFlag = true; + } + } } } + if (bFlag) { + this.rememberAnimatedThisTurn(aiPlayer, sa.getHostCard()); + } return bFlag; // All of the defined stuff is animated, not very useful } else { sa.resetTargets(); diff --git a/forge-gui/res/cardsfolder/m/myth_realized.txt b/forge-gui/res/cardsfolder/m/myth_realized.txt index 495585952b2..0ff4f4d70b7 100644 --- a/forge-gui/res/cardsfolder/m/myth_realized.txt +++ b/forge-gui/res/cardsfolder/m/myth_realized.txt @@ -5,7 +5,7 @@ T:Mode$ SpellCast | ValidCard$ Card.nonCreature | ValidActivatingPlayer$ You | E SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ LORE | CounterNum$ 1 A:AB$ PutCounter | Cost$ 2 W | CounterType$ LORE | CounterNum$ 1 | SpellDescription$ Put a lore counter on CARDNAME. A:AB$ Animate | Cost$ W | Defined$ Self | Types$ Creature,Monk,Avatar | staticAbilities$ Static | SpellDescription$ Until end of turn, CARDNAME becomes a Monk Avatar creature in addition to its other types and gains "This creature's power and toughness are each equal to the number of lore counters on it." -SVar:Static:Mode$ Continuous | EffectZone$ Battlefield | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ This creature's power and toughness are each equal to the number of charge counters on it. +SVar:Static:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Card.Self | SetPower$ X | SetToughness$ X | Description$ This creature's power and toughness are each equal to the number of lore counters on it. SVar:X:Count$CardCounters.LORE SVar:Picture:http://www.wizards.com/global/images/magic/general/myth_realized.jpg Oracle:Whenever you cast a noncreature spell, put a lore counter on Myth Realized.\n{2}{W}: Put a lore counter on Myth Realized.\n{W}: Until end of turn, Myth Realized becomes a Monk Avatar creature in addition to its other types and gains "This creature's power and toughness are each equal to the number of lore counters on it."