@Override public AttacksAndIsNotBlockedTriggeredAbility copy() { return new AttacksAndIsNotBlockedTriggeredAbility(this); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(getSourceId()); if (sourcePermanent != null && sourcePermanent.isAttacking()) { for (CombatGroup combatGroup : game.getCombat().getGroups()) { if (combatGroup.getBlockers().isEmpty() && combatGroup.getAttackers().contains(getSourceId())) { if (setTargetPointer) { this.getEffects().setTargetPointer(new FixedTarget(game.getCombat().getDefendingPlayerId(getSourceId(), game))); } return true; } } } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (super.checkTrigger(event, game)){ UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(getSourceId(), game); FilterPermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(defendingPlayerId)); Target target = new TargetPermanent(filter); this.getTargets().clear(); this.addTarget(target); return true; } return false; } }
public CryptCobra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.SNAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); // Whenever Crypt Cobra attacks and isn't blocked, defending player gets a poison counter. Effect effect = new AddPoisonCounterTargetEffect(1); effect.setText("defending player gets a poison counter"); this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); }
public AbyssalNightstalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever Abyssal Nightstalker attacks and isn't blocked, defending player discards a card. Effect effect = new DiscardTargetEffect(1); effect.setText("defending player discards a card"); this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); }
public MurkDwellers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever Murk Dwellers attacks and isn't blocked, it gets +2/+0 until end of combat. this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new BoostSourceEffect(2, 0, Duration.EndOfCombat))); }
public CoralFighters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); // Whenever Coral Fighters attacks and isn't blocked, look at the top card of defending player's library. You may put that card on the bottom of that player's library. this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new CoralFightersEffect(), false, true)); }
public SwampMosquito(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); this.subtype.add(SubType.INSECT); this.power = new MageInt(0); this.toughness = new MageInt(1); // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever Swamp Mosquito attacks and isn't blocked, defending player gets a poison counter. Effect effect = new AddPoisonCounterTargetEffect(1); effect.setText("defending player gets a poison counter"); this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); }
public BoneDancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever Bone Dancer attacks and isn't blocked, you may put the top creature card of defending player's graveyard onto the battlefield under your control. If you do, Bone Dancer assigns no combat damage this turn. Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new BoneDancerEffect(), true, true); ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); this.addAbility(ability); }
public RysorianBadger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.BADGER); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever Rysorian Badger attacks and isn't blocked, you may exile up to two target creature cards from defending player's graveyard. If you do, you gain 1 life for each card exiled this way and Rysorian Badger assigns no combat damage this turn. Ability ability = new AttacksAndIsNotBlockedTriggeredAbility( new RysorianBadgerEffect(), true ); ability.addTarget(new TargetCardInGraveyard(0, 2, filter)); this.addAbility(ability); }
public Ophidian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); this.subtype.add(SubType.SNAKE); this.power = new MageInt(1); this.toughness = new MageInt(3); // Whenever Ophidian attacks and isn't blocked, you may draw a card. If you do, Ophidian assigns no combat damage this turn. Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DrawCardSourceControllerEffect(1), true); ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); this.addAbility(ability); }
public StromgaldSpy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(4); // Whenever Stromgald Spy attacks and isn't blocked, you may have defending player play with their hand revealed for as long as Stromgald Spy remains on the battlefield. If you do, Stromgald Spy assigns no combat damage this turn. Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new StromgaldSpyEffect(), true, true); ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); this.addAbility(ability); }
public EternalOfHarshTruths(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); // Afflict 2 this.addAbility(new AfflictAbility(2)); // Whenever Eternal of Harsh Truths attacks and isn't blocked, draw a card. this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new DrawCardSourceControllerEffect(1))); }
public Guiltfeeder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(4); // Fear this.addAbility(FearAbility.getInstance()); // Whenever Guiltfeeder attacks and isn't blocked, defending player loses 1 life for each card in their graveyard. Effect effect = new LoseLifeTargetEffect(new CardsInTargetPlayersGraveyardCount()); effect.setText("defending player loses 1 life for each card in their graveyard"); this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); }
public SuqAtaAssassin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); // Fear this.addAbility(FearAbility.getInstance()); // Whenever Suq'Ata Assassin attacks and isn't blocked, defending player gets a poison counter. Effect effect = new AddPoisonCounterTargetEffect(1); effect.setText("defending player gets a poison counter"); this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); }
public KeeperOfTresserhorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); this.toughness = new MageInt(6); // Whenever Keeper of Tresserhorn attacks and isn't blocked, it assigns no combat damage this turn and defending player loses 2 life. Effect effect = new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn); effect.setText("it assigns no combat damage this turn"); Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true); effect = new LoseLifeTargetEffect(2); effect.setText("and defending player loses 2 life"); ability.addEffect(effect); this.addAbility(ability); }
public WildfireEternal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.JACKAL); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); // Afflict 4 addAbility(new AfflictAbility(4)); // Whenever Wildfire Eternal attacks and isn't blocked, you may cast an instant or sorcery card from your hand without paying its mana cost. this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new WildfireEternalCastEffect(), false, true)); }
public FarrelsZealot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever Farrel's Zealot attacks and isn't blocked, you may have it deal 3 damage to target creature. If you do, Farrel's Zealot assigns no combat damage this turn. Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DamageTargetEffect(3), true); ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public FloralSpuzzem(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever Floral Spuzzem attacks and isn't blocked, you may destroy target artifact defending player controls. If you do, Floral Spuzzem assigns no combat damage this turn. Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DestroyTargetEffect(), true); ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); }
public MindstabThrull(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.subtype.add(SubType.THRULL); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever Mindstab Thrull attacks and isn't blocked, you may sacrifice it. If you do, defending player discards three cards. Effect effect = new DiscardTargetEffect(3); effect.setText("defending player discards three cards"); this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new DoIfCostPaid(effect, new SacrificeSourceCost()), false, true)); }