@Override public CantBeBlockedTargetEffect copy() { return new CantBeBlockedTargetEffect(this); }
@Override public boolean applies(Permanent permanent, Ability source, Game game) { return getTargetPointer().getTargets(game, source).contains(permanent.getId()); }
@Override public boolean apply(Game game, Ability source) { for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { CantBeBlockedTargetEffect effect = new CantBeBlockedTargetEffect(); effect.setTargetPointer(new FixedTarget(creature.getId())); game.addEffect(effect, source); } return true; }
public RunedArch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Runed Arch enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // {X}, {tap}, Sacrifice Runed Arch: X target creatures with power 2 or less are unblockable this turn. Ability ability = new SimpleActivatedAbility( new CantBeBlockedTargetEffect(Duration.EndOfGame) .setText("X target creatures with power 2 or less can't be blocked this turn."), new ManaCostsImpl("{X}") ); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetPermanent(filter)); ability.setTargetAdjuster(XTargetsAdjuster.instance); this.addAbility(ability); }
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); }
public WhitewaterNaiads(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}{U}"); this.subtype.add(SubType.NYMPH); this.power = new MageInt(4); this.toughness = new MageInt(4); // Constellation - Whenever Whitewater Naiads or another enchantment enters the battlefield under your control, target creature can't be blocked this turn. Ability ability = new ConstellationAbility(new CantBeBlockedTargetEffect(Duration.EndOfTurn), false); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public TawnossWand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {2}, {tap}: Target creature with power 2 or less is unblockable this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{2}")); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public SubterraneanScout(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.SCOUT); this.power = new MageInt(2); this.toughness = new MageInt(1); // When Subterranean Scout enters the battlefield, target creature with power 2 or less can't be blocked this turn. Ability ability = new EntersBattlefieldTriggeredAbility(new CantBeBlockedTargetEffect(), false); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public PathmakerInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); // {T}: Target creature with power 2 or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public Ghostform(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}"); // Up to two target creatures can't be blocked this turn.. this.getSpellAbility().addEffect(new CantBeBlockedTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); }
public KeyToTheCity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // {T}, Discard a card: Up to one target creature can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); ability.addCost(new DiscardCardCost()); ability.addTarget(new TargetCreaturePermanent(0, 1)); this.addAbility(ability); // Whenever Key to the City becomes untapped, you may pay {2}. If you do, draw a card. this.addAbility(new KeyToTheCityTriggeredAbility()); }
public AmphinPathmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); this.subtype.add(SubType.SALAMANDER); this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); // {2}{U}: Target creature can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{2}{U}")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public DwarvenNomad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.DWARF); this.subtype.add(SubType.NOMAD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {T}: Target creature with power 2 or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public DwarvenWarriors(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.DWARF); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); // {T}: Target creature with power 2 or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public GoblinTunneler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Target creature with power 2 or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public ZhugeJinWuStrategist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN, SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Target creature can't be blocked this turn. Activate this ability only during your turn, before attackers are declared. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public Trailblazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}{G}"); // Target creature is unblockable this turn. this.getSpellAbility().addEffect(new CantBeBlockedTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public Infiltrate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); // Target creature is unblockable this turn. this.getSpellAbility().addEffect(new CantBeBlockedTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public CraftyPathmage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Target creature with power 2 or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public NeurokInvisimancer (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); // Neurok Invisimancer can't be blocked. this.addAbility(new CantBeBlockedSourceAbility()); // When Neurok Invisimancer enters the battlefield, target creature can't be blocked this turn. Ability ability = new EntersBattlefieldTriggeredAbility(new CantBeBlockedTargetEffect()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }