diff --git a/forge-ai/src/main/java/forge/ai/ability/TokenAi.java b/forge-ai/src/main/java/forge/ai/ability/TokenAi.java index 92290632239..56d88681c72 100644 --- a/forge-ai/src/main/java/forge/ai/ability/TokenAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/TokenAi.java @@ -311,6 +311,18 @@ public class TokenAi extends SpellAbilityAi { } } + if (mandatory) { + // Necessary because the AI goes into this method twice, first to set up targets (with mandatory=true) + // and then the second time to confirm the trigger (where mandatory may be set to false). + return true; + } + + if ("OnlyOnAlliedAttack".equals(sa.getParam("AILogic"))) { + Combat combat = ai.getGame().getCombat(); + return combat != null && combat.getAttackingPlayer() != null + && !combat.getAttackingPlayer().isOpponentOf(ai); + } + return true; } /* (non-Javadoc) diff --git a/forge-gui/res/cardsfolder/n/najeela_the_blade_blossom.txt b/forge-gui/res/cardsfolder/n/najeela_the_blade_blossom.txt new file mode 100644 index 00000000000..873d0619519 --- /dev/null +++ b/forge-gui/res/cardsfolder/n/najeela_the_blade_blossom.txt @@ -0,0 +1,14 @@ +Name:Najeela, the Blade-Blossom +ManaCost:2 R +Types:Legendary Creature Human Warrior +PT:3/2 +T:Mode$ Attacks | ValidCard$ Warrior | TriggerZones$ Battlefield | Execute$ TrigToken | OptionalDecider$ You | TriggerController$ You | TriggerDescription$ Whenever a Warrior attacks, you may have its controller create a 1/1 white Warrior creature token that's tapped and attacking. +SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenName$ Warrior | TokenTypes$ Creature,Warrior | TokenOwner$ TriggeredAttackerController | TokenColors$ White | TokenPower$ 1 | TokenToughness$ 1 | TokenTapped$ True | TokenAttacking$ True | TokenImage$ w 1 1 warrior | AILogic$ OnlyOnAlliedAttack +A:AB$ UntapAll | Cost$ W U B R G | ValidCards$ Creature.attacking | ActivationPhases$ BeginCombat->EndCombat | SubAbility$ DBAddCombat | SpellDescription$ Untap all attacking creatures. They gain trample, lifelink, and haste until end of turn. After this phase, there is an additional combat phase. Activate this ability only during combat. +SVar:DBAddCombat:DB$ AddPhase | ExtraPhase$ BeginCombat | AfterPhase$ EndCombat | SubAbility$ DBPumpAll +SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.attacking | KW$ Trample & Lifelink & Haste +SVar:PlayMain1:TRUE +DeckHints:Type$Warrior +DeckHas:Ability$Token +SVar:Picture:http://www.wizards.com/global/images/magic/general/najeela_the_blade_blossom.jpg +Oracle:Whenever a Warrior attacks, you may have its controller create a 1/1 white Warrior creature token that's tapped and attacking.\n{W}{U}{B}{R}{G}: Untap all attacking creatures. They gain trample, lifelink, and haste until end of turn. After this phase, there is an additional combat phase. Activate this ability only during combat. \ No newline at end of file