public Lurker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(3); // Lurker can't be the target of spells unless it attacked or blocked this turn. Effect effect = new ConditionalContinuousRuleModifyingEffect( new CantBeTargetedSourceEffect(new FilterSpell(), Duration.WhileOnBattlefield), new InvertCondition(new OrCondition(AttackedThisTurnSourceCondition.instance, BlockedThisTurnSourceCondition.instance))); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect.setText("{this} can't be the target of spells unless it attacked or blocked this turn")); ability.addWatcher(new AttackedThisTurnWatcher()); ability.addWatcher(new BlockedThisTurnWatcher()); this.addAbility(ability); }
public SolitaryCamel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.subtype.add(SubType.CAMEL); this.power = new MageInt(3); this.toughness = new MageInt(2); // Solitary Camel has lifelink as long as you control a desert or there is a desert card in your graveyard. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new GainAbilitySourceEffect(LifelinkAbility.getInstance()), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), new CardsInControllerGraveCondition(1, filterDesertCard)), "{this} has lifelink as long as you control a desert or there is a desert card in your graveyard.")); this.addAbility(ability); }
public EssenceLeak(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); this.subtype.add(SubType.AURA); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // As long as enchanted permanent is red or green, it has "At the beginning of your upkeep, sacrifice this permanent unless you pay its mana cost." Ability sacAbility =new BeginningOfUpkeepTriggeredAbility(new EssenceLeakEffect(), TargetController.YOU, false); ContinuousEffect isRedOrGreenAbility = new GainAbilityAttachedEffect(sacAbility, AttachmentType.AURA); SimpleStaticAbility ifRedOrGreenAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(isRedOrGreenAbility, new OrCondition(new EnchantedCreatureColorCondition(ObjectColor.RED), new EnchantedCreatureColorCondition(ObjectColor.GREEN)), "As long as enchanted permanent is red or green, it has \"At the beginning of your upkeep, sacrifice this permanent unless you pay its mana cost.\"")); this.addAbility(ifRedOrGreenAbility); }
public SandStrangler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); // When Sand Strangler enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you may have Sand Strangler deal 3 damage to target creature. Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3), true), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), new CardsInControllerGraveCondition(1, filterDesertCard)), "When {this} enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you may have {this} deal 3 damage to target creature."); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public WretchedCamel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.CAMEL); this.power = new MageInt(2); this.toughness = new MageInt(1); // When Wretched Camel dies, if you control a Desert or there is a Desert card in your graveyard, target player discards a card. Ability ability = new ConditionalInterveningIfTriggeredAbility( new DiesTriggeredAbility(new DiscardTargetEffect(1)), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), new CardsInControllerGraveCondition(1, filterDesertCard)), "When {this} dies, if you control a Desert or there is a Desert card in your graveyard, target player discards a card."); ability.addTarget(new TargetPlayer()); this.addAbility(ability); }
public WallOfForgottenPharaohs(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); // Defender this.addAbility(DefenderAbility.getInstance()); // {T}: Wall of Forgotten Pharaohs deals 1 damage to target player. Activate this ability only if you control a Desert or there is a Desert card in your graveyard. Ability ability = new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), new OrCondition( "only if you control a Desert or there is a Desert card in your graveyard", new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), new CardsInControllerGraveCondition(1, filterDesertCard) ) ); ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); }
public UnquenchableThirst(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Unquenchable Thirst enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, tap enchanted creature. Ability ability2 = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), new CardsInControllerGraveCondition(1, filterDesertCard)), "When {this} enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, tap enchanted creature."); this.addAbility(ability2); // Enchanted creature doesn't untap during its controller's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); }
public DesertsHold(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Removal)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Desert's Hold enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you gain 3 life. this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), new CardsInControllerGraveCondition(1, filterDesertCard)), "When {this} enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you gain 3 life.")); // Enchanted creature can't attack or block, and its activated abilities can't be activated. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect())); }