public ThornwatchScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); this.subtype.add(SubType.SCARECROW); this.power = new MageInt(4); this.toughness = new MageInt(4); // Thornwatch Scarecrow has wither as long as you control a green creature. ContinuousEffect effect = new GainAbilitySourceEffect(WitherAbility.getInstance(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, new PermanentsOnTheBattlefieldCondition(filter), rule))); // Thornwatch Scarecrow has vigilance as long as you control a white creature. ContinuousEffect effect2 = new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect2, new PermanentsOnTheBattlefieldCondition(filter2), rule2))); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (new PermanentsOnTheBattlefieldCondition(filter).apply(game, source)) { controller.drawCards(1, game); } return true; } return false; } }
@Override public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { if (sourceId.equals(source.getSourceId()) && gateCondition.apply(game, source)) { return true; } return false; }
public WatchwingScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(4); // Watchwing Scarecrow has vigilance as long as you control a white creature. ContinuousEffect effect = new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, new PermanentsOnTheBattlefieldCondition(filter), rule))); // Watchwing Scarecrow has flying as long as you control a blue creature. ContinuousEffect effect2 = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect2, new PermanentsOnTheBattlefieldCondition(filter2), rule2))); }
public WingrattleScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); this.subtype.add(SubType.SCARECROW); this.power = new MageInt(2); this.toughness = new MageInt(2); // Wingrattle Scarecrow has flying as long as you control a blue creature. ContinuousEffect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, new PermanentsOnTheBattlefieldCondition(filter), rule))); // Wingrattle Scarecrow has persist as long as you control a black creature. ContinuousEffect effect2 = new GainAbilitySourceEffect(new PersistAbility(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect2, new PermanentsOnTheBattlefieldCondition(filter2), rule2))); }
public RattleblazeScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); this.subtype.add(SubType.SCARECROW); this.power = new MageInt(5); this.toughness = new MageInt(3); // Rattleblaze Scarecrow has persist as long as you control a black creature. ContinuousEffect effect = new GainAbilitySourceEffect(new PersistAbility(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, new PermanentsOnTheBattlefieldCondition(filter), rule))); // Rattleblaze Scarecrow has haste as long as you control a red creature. ContinuousEffect effect2 = new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect2, new PermanentsOnTheBattlefieldCondition(filter2), rule2))); }
public WellOfLife(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // At the beginning of your end step, if you control no untapped lands, you gain 2 life. this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new GainLifeEffect(2), TargetController.YOU, false), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "At the beginning of your end step, if you control no untapped lands, you gain 2 life.")); }
public WellOfDiscovery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); // At the beginning of your end step, if you control no untapped lands, draw a card. this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new DrawCardSourceControllerEffect(1), TargetController.YOU, false), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "At the beginning of your end step, if you control no untapped lands, draw a card.")); }
public HungeringYeti(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); this.subtype.add(SubType.YETI); this.power = new MageInt(4); this.toughness = new MageInt(4); // As long as you control a green or blue permanent, you may cast Hungering Yeti as though it had flash. AsThoughEffect effect = new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame); effect.setText("As long as you control a green or blue permanent, you may cast {this} as though it had flash"); this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalAsThoughEffect(effect, new PermanentsOnTheBattlefieldCondition(filter)))); }
public SkittishKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(1); this.toughness = new MageInt(1); // Skittish Kavu gets +1/+1 as long as no opponent controls a white or blue creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0, false)), "{this} gets +1/+1 as long as no opponent controls a white or blue creature"))); }
public SpurGrappler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(1); // Spur Grappler gets +2/+1 as long as you control no untapped lands. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostSourceEffect(2, 1, Duration.WhileOnBattlefield), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "{this} gets +2/+1 as long as you control no untapped lands"))); }
public ScoriaCat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(3); // Scoria Cat gets +3/+3 as long as you control no untapped lands. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "{this} gets +3/+3 as long as you control no untapped lands"))); }
private static Condition makeAndCondition(ObjectColor color1, ObjectColor color2) { FilterPermanent filter1 = new FilterPermanent(); filter1.add(new ColorPredicate(color1)); Condition condition1 = new PermanentsOnTheBattlefieldCondition(filter1); FilterPermanent filter2 = new FilterPermanent(); filter2.add(new ColorPredicate(color2)); Condition condition2 = new PermanentsOnTheBattlefieldCondition(filter2); return new CompoundCondition(condition1, condition2); }
public TempleOfTheFalseGod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // {tap}: Add {C}{C}. Activate this ability only if you control five or more lands. this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana(2)), new TapSourceCost(), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4))); }
public EpicStruggle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{G}"); // At the beginning of your upkeep, if you control twenty or more creatures, you win the game. this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 19), "At the beginning of your upkeep, if you control twenty or more creatures, you win the game.")); }
public Lifeline(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); // Whenever a creature dies, if another creature is on the battlefield, return the first card to the battlefield under its owner's control at the beginning of the next end step. Ability ability = new ConditionalInterveningIfTriggeredAbility( new DiesCreatureTriggeredAbility( Zone.BATTLEFIELD, new LifelineEffect(), false, StaticFilters.FILTER_PERMANENT_CREATURE, true), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_CREATURE, ComparisonType.MORE_THAN, 0, false), "Whenever a creature dies, if another creature is on the battlefield, return the first card to the battlefield under its owner's control at the beginning of the next end step."); this.addAbility(ability); }
public FenStalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(3); this.toughness = new MageInt(2); // Fen Stalker has fear as long as you control no untapped lands. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FearAbility.getInstance(), Duration.WhileOnBattlefield), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "{this} has fear as long as you control no untapped lands"))); }
public VintaraSnapper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); this.subtype.add(SubType.TURTLE); this.power = new MageInt(2); this.toughness = new MageInt(2); // Vintara Snapper has shroud as long as you control no untapped lands. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "{this} has shroud as long as you control no untapped lands"))); }
public Biovisionary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(3); //At the beginning of the end step, if you control four or more creatures named Biovisionary, you win the game. this.addAbility(new BeginningOfEndStepTriggeredAbility( Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.ANY, new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 3), false)); }
public WizardsLightning(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Wizard's Lightning costs {2} less to cast if you control a Wizard. Ability ability = new SimpleStaticAbility(Zone.STACK, new SpellCostReductionSourceEffect(2, new PermanentsOnTheBattlefieldCondition(filter))); ability.setRuleAtTheTop(true); this.addAbility(ability); // Wizard's Lightning deals 3 damage to any target. this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); }