1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-08 09:11:04 -09:00

Changed Declaration in Stone to exile to the generic exile window instead of its own. Added card name identifier to the revealed hand in ExileCardYouChooseTargetOpponentEffect so you can see previously revealed cards when their hand is revealed multiple times.

This commit is contained in:
fireshoes 2016-11-09 11:00:24 -06:00
parent c8bafff7e3
commit 20d09443d5
2 changed files with 10 additions and 9 deletions
Mage.Sets/src/mage/cards/d
Mage/src/main/java/mage/abilities/effects/common

View file

@ -51,14 +51,14 @@ import mage.target.common.TargetCreaturePermanent;
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public class DeclarationInStone extends CardImpl {
public DeclarationInStone(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{W}");
// Exile target creature and all other creatures its controller controls with the same name as that creature.
// That player investigates for each nontoken creature exiled this way.
this.getSpellAbility().addEffect(new DeclarationInStoneEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
public DeclarationInStone(final DeclarationInStone card) {
@ -72,7 +72,7 @@ public class DeclarationInStone extends CardImpl {
}
class DeclarationInStoneEffect extends OneShotEffect {
private static final FilterCreaturePermanent creaturesOnly = new FilterCreaturePermanent();
private static final FilterCreaturePermanent nonTokenFilter = new FilterCreaturePermanent("nontoken creature");
static{
@ -106,20 +106,20 @@ class DeclarationInStoneEffect extends OneShotEffect {
String name = targetPermanent.getName();
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controllerPermanentId)) {
if (permanent != null && permanent.getName().equals(name)) {
// only exile creatures (reported bug on awakened lands targetted exiling all other lands of same name)
if (creaturesOnly.match(permanent, game)) {
you.moveCardToExileWithInfo(permanent, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true);
you.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true);
}
// exiled count only matters for non-tokens
if (nonTokenFilter.match(permanent, game)) {
if (nonTokenFilter.match(permanent, game)) {
exiledCount++;
}
}
}
}
if (exiledCount > 0) {
Token token = new ClueArtifactToken();
token.putOntoBattlefield(exiledCount, game, source.getSourceId(), controllerPermanentId, false, false);

View file

@ -65,9 +65,10 @@ public class ExileCardYouChooseTargetOpponentEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Player opponent = game.getPlayer(source.getFirstTarget());
Card sourceCard = game.getCard(source.getSourceId());
if (controller != null && opponent != null) {
if (!opponent.getHand().isEmpty()) {
opponent.revealCards("Exile " + filter.getMessage(), opponent.getHand(), game);
opponent.revealCards(sourceCard != null ? sourceCard.getIdName() + " (" + sourceCard.getZoneChangeCounter(game) + ")" : "Exile", opponent.getHand(), game);
TargetCard target = new TargetCard(Zone.HAND, filter);
if (controller.choose(Outcome.Exile, opponent.getHand(), target, game)) {
Card card = opponent.getHand().get(target.getFirstTarget(), game);