@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't cast a spell with that name (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "During combat, players can't cast instant spells or activate abilities that aren't mana abilities (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You may not cast a card named " + cardName + " (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't cast spells with even converted mana costs (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't cast spells with converted mana cost 3 or less (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null) { return "This spell can't be countered (" + sourceObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't play lands this turn (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't activate loyalty abilities of planeswalkers (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't cast creature spells this turn (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't cast a noncreature card with that converted mana cost (" + mageObject.getIdName() + " in play)."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't play lands this turn (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't cast instant or sorcery spells or activate abilities " + "that aren't mana abilities this turn (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can cast spells only any time you could cast a sorcery (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You can't cast spells this turn (" + mageObject.getIdName() + ")."; } return null; }
public ChoiceCreatureType(boolean required, String chooseMessage, MageObject source){ super(required); this.setChoices(SubType.getCreatureTypes(false).stream().map(SubType::toString).collect(Collectors.toCollection(LinkedHashSet::new))); this.setMessage(chooseMessage); if(source != null) { this.setSubMessage(source.getIdName()); } this.setSearchEnabled(true); }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { return "You must choose at least " + this.filter.getMessage() + " on the battlefield as target if able (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); return "You may not cast a card named " + cardName + " (" + mageObject.getIdName() + ")."; } return null; }
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); Player player = game.getPlayer(event.getPlayerId()); if (mageObject != null && player != null) { return player.getLogName() + " can't get " + event.getAmount() + " life (" + mageObject.getIdName() + ")."; } return null; }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null && sourceObject != null) { player.revealCards(sourceObject.getIdName(), player.getHand(), game); return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player you = game.getPlayer(source.getControllerId()); Player targetPlayer = game.getPlayer(source.getFirstTarget()); MageObject sourceObject = game.getObject(source.getSourceId()); if (you != null && targetPlayer != null) { you.lookAtCards("Hand of " + targetPlayer.getName() + " (" + (sourceObject != null ? sourceObject.getIdName() : null) + ')', targetPlayer.getHand(), game); return true; } return false; }