public RamunapHydraBoostEffect(int power, int toughness) { super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new CardsInControllerGraveCondition(1, filter), Outcome.BoostCreature); this.power = power; this.toughness = toughness; staticText = "{this} gets +1/+1 as long as there is a Desert card in your graveyard"; }
public OathswornVampirePlayEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); staticText = "You may cast {this} from your graveyard if you gained life this turn"; condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0); }
public OgreJailbreakerEffect() { super(AsThoughEffectType.ATTACK, Duration.WhileOnBattlefield, Outcome.Benefit); staticText = "{this} can attack as though it didn't have defender as long as you control a Gate"; gateCondition = new PermanentsOnTheBattlefieldCondition(filter); }
public RushwoodLegate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.DRYAD); this.power = new MageInt(2); this.toughness = new MageInt(1); // If an opponent controls an Island and you control a Forest, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls an Island and you control a Forest", new OpponentControlsPermanentCondition(filterIsland), new PermanentsOnTheBattlefieldCondition(filterForest)); this.addAbility(new AlternativeCostSourceAbility(null, condition)); }
@Override public boolean checkInterveningIfClause(Game game) { return new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0).apply(game, this); }
@Override public boolean checkTrigger(GameEvent event, Game game) { return MyTurnCondition.instance.apply(game, this); }
public SourceHasRemainedInSameZoneCondition getInstance(UUID cardId) { return new SourceHasRemainedInSameZoneCondition(cardId); }
@Override public boolean apply(Game game, Ability source) { if (new CardsInControllerGraveCondition(7).apply(game, source)) { game.addEffect(new GainProtectionFromColorAllEffect( Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES ), source); } return true; } }
@Override public void adjustTargets(Ability ability, Game game) { if (KickedCondition.instance.apply(game, ability)) { ability.addTarget(new TargetPlayerOrPlaneswalker()); } } }
@Override public boolean checkInterveningIfClause(Game game) { return MonstrousCondition.instance.apply(game, this); }
@Override public void adjustCosts(Ability ability, Game game) { if (ability instanceof SpellAbility) { // Prevent adjustment of activated ability if (MorbidCondition.instance.apply(game, ability)) { CardUtil.adjustCost((SpellAbility) ability, 3); } } } }
@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; }
@Override protected boolean selectedByRuntimeData(Permanent permanent, Ability source, Game game) { int correctModResult; if (oddCondition.apply(game, source)) { correctModResult = 1; } else { correctModResult = 0; } return permanent != null && creaturefilter.match(permanent, game) && permanent.getConvertedManaCost() % 2 == correctModResult; }
@Override public boolean apply(Game game, Ability source) { if ( MetalcraftCondition.instance.apply(game, source) ) { return new SacrificeEffect(filter, 2, effectText).apply(game, source); } else { return new SacrificeEffect(filter, 1, effectText).apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { if (AddendumCondition.instance.apply(game, source)) { new PutCardFromHandOntoBattlefieldEffect(filter).apply(game, source); } return ExileSpellEffect.getInstance().apply(game, source); } }
public Massacre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}"); // If an opponent controls a Plains and you control a Swamp, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Plains and you control a Swamp", new OpponentControlsPermanentCondition(filterPlains), new PermanentsOnTheBattlefieldCondition(filterSwamp)); this.addAbility(new AlternativeCostSourceAbility(null, condition)); // All creatures get -2/-2 until end of turn. this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Duration.EndOfTurn)); }
public BoostSourceWhileControlsEffect(FilterPermanent filter, int power, int toughness) { super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new PermanentsOnTheBattlefieldCondition(filter), Outcome.BoostCreature); this.power = power; this.toughness = toughness; this.filterDescription = filter.getMessage(); staticText = "{this} gets " + String.format("%1$+d/%2$+d", power, toughness) + " as long as you control " + (filterDescription.startsWith("an ") ? "":"a ") + filterDescription; }
@Override public void adjustTargets(Ability ability, Game game) { ability.addTarget(new TargetAnyTargetAmount(KickedCondition.instance.apply(game, ability) ? 6 : 3)); } }
@Override public void adjustTargets(Ability ability, Game game) { ability.addTarget(new TargetAnyTarget(KickedCondition.instance.apply(game, ability) ? 2 : 1)); } }
@Override public void adjustTargets(Ability ability, Game game) { if (KickedCondition.instance.apply(game, ability)) { ability.addTarget(new TargetCreaturePermanent()); } }