@Override public CantBeBlockedByAllSourceEffect copy() { return new CantBeBlockedByAllSourceEffect(this); } }
public ShroudedSerpent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}{U}"); this.subtype.add(SubType.SERPENT); this.power = new MageInt(4); this.toughness = new MageInt(4); // Whenever Shrouded Serpent attacks, defending player may pay {4}. If he or she doesn't, Shrouded Serpent can't be blocked this turn. this.addAbility(new AttacksTriggeredAbility( new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(new CantBeBlockedByAllSourceEffect(new FilterCreaturePermanent(), Duration.EndOfCombat), new ManaCostsImpl("{4}")), false, "Whenever {this} attacks, defending player may pay {4}. If he or she doesn't, {this} can't be blocked this turn.", SetTargetPointer.PLAYER)); }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { Card card = player.getLibrary().getFromTop(game); if (card != null) { player.moveCards(card, Zone.GRAVEYARD, source, game); if (card.isLand()) { game.addEffect(new CantBeBlockedByAllSourceEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.EndOfTurn), source); } } return true; } return false; } }
public RhonassStalwart(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); // You may exert Rhonas's Stalwart as it attacks. When you do, it gets +1/+1 until end of turn and can't be blocked by creatures with power 2 or less this turn. Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); effect.setText("it gets +1/+1"); BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect); effect = new CantBeBlockedByAllSourceEffect(filter, Duration.EndOfTurn); effect.setText("and can't be blocked by creatures with power 2 or less this turn"); ability.addEffect(effect); this.addAbility(new ExertAbility(ability)); }