default boolean isHistoric() { return getCardType().contains(CardType.ARTIFACT) || getSuperType().contains(SuperType.LEGENDARY) || hasSubtype(SubType.SAGA, null); }
@Override public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); if (object != null && object.hasSubtype(SubType.ELEMENTAL, game)) { return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); return object != null && object.hasSubtype(SubType.ELEMENTAL, game); } }
@Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { if (!mageObject.hasSubtype(subtype, game)) { mageObject.getSubtype(game).add(subtype); } return true; }
@Override public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); if (object != null && object.hasSubtype(SubType.DRAGON, game)) { return true; } return false; } }
@Override public boolean apply(ObjectSourcePlayer<MageObject> input, Game game) { SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(input.getSourceId(), game); return input.getObject().hasSubtype(subType, game); }
@Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); }
@Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); }
@Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); }
@Override public boolean apply(Game game, Ability source, UUID originalId, Cost costToPay) { // check: ... to cast a creature spell if (super.apply(game, source)) { // check: ... of the chosen type MageObject object = game.getObject(source.getSourceId()); if (creatureType != null && object != null && object.hasSubtype(creatureType, game)) { return true; } } return false; } }
@Override public boolean applies(Ability abilityToModify, Ability source, Game game) { MageObject object = game.getObject(abilityToModify.getSourceId()); if (object != null && object.hasSubtype(SubType.ARCANE, game)) { return spliceSpellCanBeActivated(source, game); } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()) && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).hasSubtype(SubType.CLUE, game); }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (super.applies(event, source, game)) { if (game.getObject(event.getSourceId()).hasSubtype(subtype, game)){ if (event.getTargetId().equals(source.getSourceId())) { return true; } } } return false; } }
@Override public boolean apply(Game game, Ability source, UUID manaProducer, Cost costToPay) { if (super.apply(game, source)) { MageObject object = game.getObject(source.getSourceId()); if (object != null && object.hasSubtype(SubType.DRAGON, game) && object.isCreature()) { return true; } } return false; } }
@Override public boolean apply(Game game, Ability source) { MageObject object = game.getObject(source.getSourceId()); return object != null && object.hasSubtype(SubType.ELDRAZI, game) && object.getColor(game).isColorless(); } }
@Override public boolean apply(Game game, Ability source) { if (super.apply(game, source)) { MageObject object = game.getObject(source.getSourceId()); if (object != null && object.hasSubtype(SubType.ELF, game) && object.isCreature()) { return true; } } return false; } }
@Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { MageObject card = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); if (card != null && card.hasSubtype(SubType.ZUBERA, game)) { zuberasDiedThisTurn++; } } }
@Override public boolean apply(ObjectSourcePlayer<MageObject> input, Game game) { MageObject sourceObject = game.getObject(input.getSourceId()); if (sourceObject != null) { for (SubType subType : sourceObject.getSubtype(game)) { if (subType.getSubTypeSet() == SubTypeSet.CreatureType && input.getObject().hasSubtype(subType, game)) { return true; } } } return false; }
@Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { if (!mageObject.hasSubtype(SubType.ILLUSION, game)) { mageObject.getSubtype(game).add(SubType.ILLUSION); } // Add directly because the created permanent is only used to copy from, so there is no need to add the ability to e.g. TriggeredAbilities mageObject.getAbilities().add(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); //permanent.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect()), game); return true; } };
@Override public boolean cantBeAttachedBy(MageObject source, Game game) { for (ProtectionAbility ability : this.getAbilities(game).getProtectionAbilities()) { if (!(source.hasSubtype(SubType.AURA, game) && !ability.removesAuras()) && !source.getId().equals(ability.getAuraIdNotToBeRemoved()) && !ability.canTarget(source, game)) { return true; } } return game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(EventType.STAY_ATTACHED, objectId, source.getId(), null), null, game, false); }