@Override public ConditionalRequirementEffect copy() { return new ConditionalRequirementEffect(this); }
public MaraudingMaulhorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(3); // Marauding Maulhorn attacks each combat if able unless you control a creature named Advocate of the Beast. Effect effect = new ConditionalRequirementEffect( new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 1)); effect.setText("{this} attacks each combat if able unless you control a creature named Advocate of the Beast"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public RecklessCohort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.ALLY); this.power = new MageInt(2); this.toughness = new MageInt(2); // Reckless Cohort attacks each combat if able unless you control another Ally. Effect effect = new ConditionalRequirementEffect( new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 1)); effect.setText("{this} attacks each combat if able unless you control another Ally"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public SetonsDesire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); 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); // Enchanted creature gets +2/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); // Threshold - As long as seven or more cards are in your graveyard, all creatures able to block enchanted creature do so. Effect effect = new ConditionalRequirementEffect(new MustBeBlockedByAllAttachedEffect(AttachmentType.AURA), new CardsInControllerGraveCondition(7)); effect.setText("As long as seven or more cards are in your graveyard, all creatures able to block enchanted creature do so"); ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); ability.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(ability); }
public GiftOfTheDeity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B/G}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // As long as enchanted creature is black, it gets +1/+1 and has deathtouch. SimpleStaticAbility blackAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(1, 1), new EnchantedCreatureColorCondition(ObjectColor.BLACK), "As long as enchanted creature is black, it gets +1/+1")); blackAbility.addEffect(new ConditionalContinuousEffect(new GainAbilityAttachedEffect(DeathtouchAbility.getInstance(), AttachmentType.AURA), new EnchantedCreatureColorCondition(ObjectColor.BLACK), "and has deathtouch")); this.addAbility(blackAbility); // As long as enchanted creature is green, it gets +1/+1 and all creatures able to block it do so. SimpleStaticAbility greenAbility; greenAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(1, 1), new EnchantedCreatureColorCondition(ObjectColor.GREEN), "As long as enchanted creature is green, it gets +1/+1")); Effect effect = new ConditionalRequirementEffect(new MustBeBlockedByAllAttachedEffect(AttachmentType.AURA), new EnchantedCreatureColorCondition(ObjectColor.GREEN)); effect.setText("and all creatures able to block it do so"); greenAbility.addEffect(effect); this.addAbility(greenAbility); }