@Override public ReturnToLibraryPermanentEffect copy() { return new ReturnToLibraryPermanentEffect(this); } }
public PulmonicSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); // All Sliver creatures have flying. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter, "All Sliver creatures have flying."))); // All Slivers have "If this permanent would be put into a graveyard, you may put it on top of its owner's library instead." this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( new PutIntoGraveFromAnywhereSourceAbility(new ReturnToLibraryPermanentEffect(true), null, null, false, true), Duration.WhileOnBattlefield, filterSlivers, "All Slivers have \"If this permanent would be put into a graveyard, you may put it on top of its owner's library instead.\""))); }
public SithManipulator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SITH); this.power = new MageInt(2); this.toughness = new MageInt(2); // When Sith Manipulator enters the battlefield, return target creature to its owner's hand. Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), new InvertCondition(HateCondition.instance), "When Sith Manipulator enters the battlefield, return target creature to its owner's hand"); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); // <i>Hate</i> — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead. ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnToLibraryPermanentEffect(true)), HateCondition.instance, "<i>Hate</i> — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead"); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); }