mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Raid - Fixed 6 cards with "Raid" and "enters the battlefield triggered ability" not handling the "intervening 'if' clause" rule correctly.
This commit is contained in:
parent
737b8a4cdc
commit
8567c1cd38
6 changed files with 19 additions and 16 deletions
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -57,8 +57,8 @@ public class MarduHeartPiercer extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// <em>Raid</em> - When Mardu Heart-Piercer enters the battlefield, if you attacked with a creature this turn, Mardu Heart-Piercer deals 2 damage to target creature or player.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DamageTargetEffect(2), RaidCondition.getInstance(),
|
||||
"if you attacked with a creature this turn, {this} deals 2 damage to target creature or player"), false, "<i>Raid</i> - ");
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.getInstance(),
|
||||
"<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to target creature or player.", false);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new PlayerAttackedWatcher());
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -56,7 +56,9 @@ public class MarduHordechief extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// <i>Raid</i> - When Mardu Hordechief enters the battlefield, if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new CreateTokenEffect(new MarduHordechiefToken()), RaidCondition.getInstance(), "if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield"), false, "<em>Raid</em> - "));
|
||||
this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MarduHordechiefToken())), RaidCondition.getInstance(),
|
||||
"<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield.", false));
|
||||
|
||||
this.addWatcher(new PlayerAttackedWatcher());
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -61,9 +61,8 @@ public class MarduSkullhunter extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// <em>Raid</em> - When Mardu Skullhunter enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new DiscardTargetEffect(1), RaidCondition.getInstance(), "if you attacked with a creature this turn, target opponent discards a card"),
|
||||
false,"<i>Raid</i> - ");
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.getInstance(),
|
||||
"<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.", false);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new PlayerAttackedWatcher());
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.Mana;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.AddManaToControllersManaPoolEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -56,7 +56,8 @@ public class MarduWarshrieker extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// <em>Raid</em> - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new AddManaToControllersManaPoolEffect(new Mana(1,0,0,1,1,0,0)), RaidCondition.getInstance(), "if you attacked with a creature this turn, add {R}{W}{B} to your mana pool")));
|
||||
this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToControllersManaPoolEffect(new Mana(1,0,0,1,1,0,0))), RaidCondition.getInstance(),
|
||||
"<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool.", false));
|
||||
this.addWatcher(new PlayerAttackedWatcher());
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -66,8 +66,8 @@ public class TimelyHordemate extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Raid</i> - When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(), RaidCondition.getInstance(),
|
||||
"if you attacked with a creature this turn, {this} deals 2 damage to target creature or player"), false, "<i>Raid</i> - ");
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.getInstance(),
|
||||
"<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to target creature or player.", false);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new PlayerAttackedWatcher());
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.AttackingCreatureCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
@ -63,7 +63,8 @@ public class WingmateRoc extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// <em>Raid</em> - When Wingmate Roc enters the battlefield, if you attacked with a creature this turn, put a 3/4 white Bird creature token with flying onto the battlefield.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new CreateTokenEffect(new WingmateRocToken()), RaidCondition.getInstance(), "if you attacked with a creature this turn, put a 3/4 white Bird creature token with flying onto the battlefield"), false, "<em>Raid</em> - "));
|
||||
this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WingmateRocToken())), RaidCondition.getInstance(),
|
||||
"<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, put a 3/4 white Bird creature token with flying onto the battlefield.", false));
|
||||
this.addWatcher(new PlayerAttackedWatcher());
|
||||
|
||||
// Whenever Wingmate Roc attacks, you gain 1 life for each attacking creature.
|
||||
|
|
Loading…
Reference in a new issue