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 checkInterveningIfClause(Game game) { return new InvertCondition(SourceTappedCondition.instance).apply(game, this); }
public VeteranBodyguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(5); // As long as Veteran Bodyguard is untapped, all damage that would be dealt to you by unblocked creatures is dealt to Veteran Bodyguard instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new VeteranBodyguardEffect(), new InvertCondition(SourceTappedCondition.instance), "As long as {this} is untapped, all damage that would be dealt to you by unblocked creatures is dealt to {this} instead."))); }
public MartyrsOfKorlis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(6); // As long as Martyrs of Korlis is untapped, all damage that would be dealt to you by artifacts is dealt to Martyrs of Korlis instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new RedirectArtifactDamageFromPlayerToSourceEffect(Duration.WhileOnBattlefield), new InvertCondition(SourceTappedCondition.instance), "{this} redirects artifact damage from controller as long as it's untapped"))); }
public GiantTortoise(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.TURTLE); this.power = new MageInt(1); this.toughness = new MageInt(1); // Giant Tortoise gets +0/+3 as long as it's untapped. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostSourceEffect(0,3, Duration.WhileOnBattlefield), new InvertCondition(SourceTappedCondition.instance), "{this} gets +0/+3 as long as it's untapped"))); }
public SeeTheUnwritten(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}"); // Reveal the top eight cards of your library. You may put a creature card from among them onto the battlefield. Put the rest into your graveyard. // <i>Ferocious</i> — If you control a creature with power 4 or greater, you may put two creature cards onto the battlefield instead of one. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new SeeTheUnwrittenEffect(1), new SeeTheUnwrittenEffect(2), new InvertCondition(FerociousCondition.instance), "Reveal the top eight cards of your library. You may put a creature card from among them onto the battlefield. Put the rest into your graveyard." + "<br/><i>Ferocious</i> — If you control a creature with power 4 or greater, you may put two creature cards onto the battlefield instead of one")); }
public SpectralGuardian(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(3); // As long as Spectral Guardian is untapped, noncreature artifacts have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new GainAbilityAllEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filter, false), new InvertCondition(SourceTappedCondition.instance), "as long as {this} is untapped, noncreature artifacts have shroud."))); }
public JuniperOrderAdvocate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.KNIGHT); this.power = new MageInt(1); this.toughness = new MageInt(2); // As long as Juniper Order Advocate is untapped, green creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false), new InvertCondition(SourceTappedCondition.instance), "As long as {this} is untapped, green creatures you control get +1/+1."))); }
public GhostTown(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // {tap}: Add {C}. this.addAbility(new ColorlessManaAbility()); // {0}: Return Ghost Town to its owner's hand. Activate this ability only if it's not your turn. this.addAbility(new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new GenericManaCost(0), new InvertCondition(MyTurnCondition.instance))); }
public CastleRaptors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // As long as Castle Raptors is untapped, it gets +0/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostSourceEffect(0, 2, Duration.WhileOnBattlefield), new InvertCondition(SourceTappedCondition.instance), "As long as {this} is untapped, it gets +0/+2."))); }
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 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 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"))); }
public BatheInBacta(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // You gain 6 life. If you lost life from a source other than combat damage this turn, you gain 9 life instead. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new GainLifeEffect(6), new GainLifeEffect(9), new InvertCondition(HateCondition.instance), "You gain 6 life. If you lost life from a source other than combat damage this turn, you gain 9 life instead")); this.getSpellAbility().addWatcher(new LifeLossOtherFromCombatWatcher()); }
@Override public boolean apply(Game game, Ability source) { DestroyTargetEffect effect = new DestroyTargetEffect(); effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.ALL, effect, TargetController.ANY, new InvertCondition(TargetAttackedThisTurnCondition.instance)); delayedAbility.getDuration(); delayedAbility.getTargets().addAll(source.getTargets()); game.addDelayedTriggeredAbility(delayedAbility, source); return true; } }
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 VampireLacerator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); this.subtype.add(SubType.VAMPIRE); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new BeginningOfUpkeepTriggeredAbility( new ConditionalOneShotEffect( new LoseLifeSourceControllerEffect(1), new InvertCondition( new XorLessLifeCondition(XorLessLifeCondition.CheckType.AN_OPPONENT, 10) ), "you lose 1 life unless an opponent has 10 or less life"), TargetController.YOU, false)); }
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"))); }