@Override public SearchLibraryPutInHandOrOnBattlefieldEffect copy() { return new SearchLibraryPutInHandOrOnBattlefieldEffect(this); }
public SearchLibraryPutInHandOrOnBattlefieldEffect(TargetCardInLibrary target, boolean revealCards, boolean forceShuffle, String rulePrefix, String nameToPutOnBattlefield) { super(target, Outcome.DrawCard); this.revealCards = revealCards; this.forceShuffle = forceShuffle; this.rulePrefix = rulePrefix; this.nameToPutOnBattlefield = nameToPutOnBattlefield; setText(); }
public NazahnReveredBladesmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CAT); this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(5); this.toughness = new MageInt(4); // When Nazahn, Revered Bladesmith enters the battlefield, search your library for an Equipment card and reveal it. If you reveal a card named Hammer of Nazahn this way, put it onto the battlefield. Otherwise, put that card into your hand. Then shuffle your library. TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter); this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandOrOnBattlefieldEffect(target, true, true, "Hammer of Nazahn"), true)); // Whenever an equipped creature you control attacks, you may tap target creature defending player controls. Ability ability = new AttacksCreatureYouControlTriggeredAbility(new NazahnTapEffect(), true, equippedFilter, true); ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls"))); ability.setTargetAdjuster(NazahnReveredBladesmithAdjuster.instance); this.addAbility(ability); }