public SabertoothAlleyCat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); this.subtype.add(SubType.CAT); this.power = new MageInt(2); this.toughness = new MageInt(1); // Sabertooth Alley Cat attacks each turn if able. this.addAbility(new AttacksEachCombatStaticAbility()); // {1}{R}: Creatures without defender can't block Sabertooth Alley Cat this turn. this.addAbility(new SimpleActivatedAbility( Zone.BATTLEFIELD, new CantBeBlockedByCreaturesSourceEffect( (FilterCreaturePermanent) new FilterCreaturePermanent().add(Predicates.not(new AbilityPredicate(DefenderAbility.class))), Duration.EndOfTurn ) .setText("Creatures without defender can't block {this} this turn"), new ManaCostsImpl<>("{1}{R}"))); }
public DepartedDeckhand(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.SPIRIT); this.subtype.add(SubType.PIRATE); this.power = new MageInt(2); this.toughness = new MageInt(2); // When Departed Deckhand becomes the target of a spell, sacrifice it. this.addAbility(new BecomesTargetTriggeredAbility( new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A )); // Departed Deckhand can only be blocked by Spirits. Ability ability = new SimpleStaticAbility( Zone.BATTLEFIELD, new CantBeBlockedByCreaturesSourceEffect( filter, Duration.WhileOnBattlefield ).setText("{this} can't be blocked except by Spirits") ); this.addAbility(ability); // {3}{U}: Target creature you control can only be blocked by Spirits this turn. ability = new SimpleActivatedAbility( new CantBeBlockedTargetEffect( filter, Duration.EndOfTurn ).setText("Another target creature you control can't be blocked this turn except by Spirits"), new ManaCostsImpl("{3}{U}") ); ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)); this.addAbility(ability); }