private static TriggeredAbility makeTrigger(OneShotEffect effect1, OneShotEffect effect2, ObjectColor color1, ObjectColor color2) { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility( new ConditionalOneShotEffect(effect1, new InvertCondition(makeAndCondition(color1, color2))), TargetController.YOU, false ); ability.addEffect(new ConditionalOneShotEffect(effect2, makeAndCondition(color1, color2))); return ability; }
@Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { // 11/4/2015: If Grasp of Fate leaves the battlefield before its triggered ability resolves, no nonland permanents will be exiled. return new ConditionalOneShotEffect(new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName(), Zone.BATTLEFIELD, true), SourceOnBattlefieldCondition.instance).apply(game, source); } return false; } }
public Antagonism(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); // At the beginning of each player's end step, Antagonism deals 2 damage to that player unless one of his or her opponents was dealt damage this turn. this.addAbility(new BeginningOfEndStepTriggeredAbility(new ConditionalOneShotEffect(new DamageTargetEffect(2), new OpponentWasNotDealtDamageCondition(), rule), TargetController.ANY, false)); }
public KumenasAwakening(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); // Ascend (If you control ten or more permenants, you get the city's blessing for the rest of the game.) this.addAbility(new AscendAbility()); // At the beginning of your upkeep, each player draws a card. If you have the city's blessing, instead only you draw a card. this.addAbility(new BeginningOfUpkeepTriggeredAbility( new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), new DrawCardAllEffect(1), CitysBlessingCondition.instance, "each player draws a card. If you have the city's blessing, instead only you draw a card"), TargetController.YOU, false)); }
public ResoluteArchangel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // When Resolute Angel enters the battlefield, if your life total is lower than your starting life total, it becomes equal to your starting life total. this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new ResoluteArchangelEffect(), ControllerLifeLowerThanStrtingLife.instance, "if your life total is lower than your starting life total, it becomes equal to your starting life total"))); }
public FesterhideBoar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); this.subtype.add(SubType.BOAR); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(TrampleAbility.getInstance()); // <i>Morbid</i> — Festerhide Boar enters the battlefield with two +1/+1 counters on it if a creature died this turn. this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), MorbidCondition.instance, ""), "with two +1/+1 counters on it if a creature died this turn")); }
public GlacialFortress(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = " tapped unless you control a Plains or an Island"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); this.addAbility(new WhiteManaAbility()); }
public BlackcleaveCliffs(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3)); String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); }
public CoalitionVictory(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{U}{B}{R}{G}"); // You win the game if you control a land of each basic land type and a creature of each color. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new WinGameSourceControllerEffect(), new CoalitionVictoryCondition(), "You win the game if you control a land of each basic land type and a creature of each color.")); }
public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = " tapped unless you control a Island or a Swamp"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new BlueManaAbility()); }
public ConcealedCourtyard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // Concealed Courtyard enters the battlefield tapped unless you control two or fewer other lands. Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); // {T}: Add {W} or {B}.this.addAbility(new BlackManaAbility()); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlackManaAbility()); }
public SulfurFalls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = " tapped unless you control a Island or a Mountain"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); this.addAbility(new RedManaAbility()); }
public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = " tapped unless you control a Forest or an Island"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); this.addAbility(new BlueManaAbility()); }
public IsolatedChapel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = " tapped unless you control a Plains or a Swamp"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlackManaAbility()); }
public ClifftopRetreat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = " tapped unless you control a Mountain or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); this.addAbility(new WhiteManaAbility()); }
public RazorvergeThicket(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); String abilityText = " tapped unless you control two or fewer other lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); }
public FeedTheClan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // You gain 5 life. // Ferocious - You gain 10 life instead if you control a creature with power 4 or greater this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new GainLifeEffect(10), new GainLifeEffect(5), FerociousCondition.instance, "You gain 5 life. <br><i>Ferocious</i> — You gain 10 life instead if you control a creature with power 4 or greater")); }
public WoodlandCemetery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = " tapped unless you control a Swamp or a Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); this.addAbility(new GreenManaAbility()); }
public DesolationGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); this.subtype.add(SubType.GIANT); this.power = new MageInt(3); this.toughness = new MageInt(3); // Kicker {W}{W} this.addAbility(new KickerAbility("{W}{W}")); // When Desolation Giant enters the battlefield, destroy all other creatures you control. If it was kicked, destroy all other creatures instead. this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyAllEffect(filter), new DestroyAllEffect(filter2), KickedCondition.instance, "destroy all other creatures you control. If it was kicked, destroy all other creatures instead."))); }
public FatedRetribution(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{W}{W}{W}"); // Destroy all creatures and planeswalkers. If it's your turn, scry 2. this.getSpellAbility().addEffect(new DestroyAllEffect(filter, false)); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, "If it's your turn, scry 2")); }