mirror of
https://github.com/correl/mage.git
synced 2025-02-18 03:00:15 +00:00
* Fixed some wrong rule text of Oubliette and Tawnos's Coffin.
This commit is contained in:
parent
213107f835
commit
e81f5cbb32
2 changed files with 83 additions and 76 deletions
|
@ -29,7 +29,6 @@ package mage.sets.antiquities;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
|
||||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||||
|
@ -64,24 +63,21 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public class TawnossCoffin extends CardImpl {
|
public class TawnossCoffin extends CardImpl {
|
||||||
|
|
||||||
public Counters godHelpMe=null;
|
public Counters godHelpMe = null;
|
||||||
|
|
||||||
public TawnossCoffin(UUID ownerId) {
|
public TawnossCoffin(UUID ownerId) {
|
||||||
super(ownerId, 33, "Tawnos's Coffin", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
|
super(ownerId, 33, "Tawnos's Coffin", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||||
this.expansionSetCode = "ATQ";
|
this.expansionSetCode = "ATQ";
|
||||||
|
|
||||||
// You may choose not to untap Tawnos's Coffin during your untap step.
|
// You may choose not to untap Tawnos's Coffin during your untap step.
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
// {3}, {tap}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature.
|
// {3}, {tap}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TawnossCoffinEffect(), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TawnossCoffinEffect(), new TapSourceCost());
|
||||||
ability.addCost(new ManaCostsImpl("{3}"));
|
ability.addCost(new ManaCostsImpl("{3}"));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
//When Tawnos's Coffin leaves the battlefield...
|
//When Tawnos's Coffin leaves the battlefield or becomes untapped, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it, and if you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.
|
||||||
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new TawnossCoffinReturnEffect(), false);
|
Ability ability3 = new TawnossCoffinTriggeredAbility(new TawnossCoffinReturnEffect(), false);
|
||||||
this.addAbility(ability2);
|
|
||||||
//or becomes untapped, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it, and if you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.
|
|
||||||
Ability ability3 = new BecomesUnTappedSourceTriggeredAbility(new TawnossCoffinReturnEffect(), false);
|
|
||||||
this.addAbility(ability3);
|
this.addAbility(ability3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,42 +90,42 @@ public class TawnossCoffin extends CardImpl {
|
||||||
return new TawnossCoffin(this);
|
return new TawnossCoffin(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class BecomesUnTappedSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|
||||||
|
|
||||||
public BecomesUnTappedSourceTriggeredAbility(Effect effect, boolean isOptional) {
|
class TawnossCoffinTriggeredAbility extends LeavesBattlefieldTriggeredAbility {
|
||||||
super(Zone.BATTLEFIELD, effect, isOptional);
|
|
||||||
|
public TawnossCoffinTriggeredAbility(Effect effect, boolean isOptional) {
|
||||||
|
super(effect, isOptional);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BecomesUnTappedSourceTriggeredAbility(Effect effect) {
|
public TawnossCoffinTriggeredAbility(final TawnossCoffinTriggeredAbility ability) {
|
||||||
super(Zone.BATTLEFIELD, effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BecomesUnTappedSourceTriggeredAbility(final BecomesUnTappedSourceTriggeredAbility ability) {
|
|
||||||
super(ability);
|
super(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BecomesUnTappedSourceTriggeredAbility copy() {
|
public TawnossCoffinTriggeredAbility copy() {
|
||||||
return new BecomesUnTappedSourceTriggeredAbility(this);
|
return new TawnossCoffinTriggeredAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == GameEvent.EventType.UNTAPPED;
|
return super.checkEventType(event, game) || event.getType().equals(GameEvent.EventType.UNTAPPED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
return event.getTargetId().equals(sourceId);
|
if (event.getType().equals(GameEvent.EventType.UNTAPPED)) {
|
||||||
|
return event.getTargetId().equals(sourceId);
|
||||||
|
} else {
|
||||||
|
return super.checkTrigger(event, game);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "When {this} becomes untapped, " + super.getRule();
|
return "When {this} leaves the battlefield or becomes untapped, " + super.getRule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class TawnossCoffinEffect extends OneShotEffect {
|
class TawnossCoffinEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
|
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
|
||||||
|
@ -140,7 +136,7 @@ class TawnossCoffinEffect extends OneShotEffect {
|
||||||
|
|
||||||
public TawnossCoffinEffect() {
|
public TawnossCoffinEffect() {
|
||||||
super(Outcome.Detriment);
|
super(Outcome.Detriment);
|
||||||
this.staticText = "Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. When TawnossCoffin leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
this.staticText = "exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature";
|
||||||
}
|
}
|
||||||
|
|
||||||
public TawnossCoffinEffect(final TawnossCoffinEffect effect) {
|
public TawnossCoffinEffect(final TawnossCoffinEffect effect) {
|
||||||
|
@ -158,11 +154,12 @@ class TawnossCoffinEffect extends OneShotEffect {
|
||||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||||
if (enchantment == null) {
|
if (enchantment == null) {
|
||||||
enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||||
}
|
}
|
||||||
UUID targetId=source.getFirstTarget();
|
UUID targetId = source.getFirstTarget();
|
||||||
|
|
||||||
if (targetId==null) return false; // if previous scan somehow failed, simply quit
|
if (targetId == null) {
|
||||||
|
return false; // if previous scan somehow failed, simply quit
|
||||||
|
}
|
||||||
if (enchantment != null) { //back to code (mostly) copied from Flickerform
|
if (enchantment != null) { //back to code (mostly) copied from Flickerform
|
||||||
Permanent enchantedCreature = game.getPermanent(targetId);
|
Permanent enchantedCreature = game.getPermanent(targetId);
|
||||||
if (enchantedCreature != null) {
|
if (enchantedCreature != null) {
|
||||||
|
@ -174,17 +171,17 @@ class TawnossCoffinEffect extends OneShotEffect {
|
||||||
attachment.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game);
|
attachment.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//((TawnossCoffin)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no?
|
//((TawnossCoffin)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no?
|
||||||
((TawnossCoffin)game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
|
((TawnossCoffin) game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
|
||||||
|
|
||||||
if (!(enchantedCreature instanceof Token)) {
|
if (!(enchantedCreature instanceof Token)) {
|
||||||
|
|
||||||
// If you do, return the other cards exiled this way to the battlefield under their owners' control attached to that creature
|
// If you do, return the other cards exiled this way to the battlefield under their owners' control attached to that creature
|
||||||
/*LeavesBattlefieldTriggeredAbility triggeredAbility = new LeavesBattlefieldTriggeredAbility(
|
/*LeavesBattlefieldTriggeredAbility triggeredAbility = new LeavesBattlefieldTriggeredAbility(
|
||||||
new TawnossCoffinReturnEffect(), false);
|
new TawnossCoffinReturnEffect(), false);
|
||||||
enchantment.addAbility(triggeredAbility, source.getSourceId(), game);
|
enchantment.addAbility(triggeredAbility, source.getSourceId(), game);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -203,11 +200,10 @@ class TawnossCoffinReturnEffect extends OneShotEffect {
|
||||||
filterAura.add(new SubtypePredicate("Aura"));
|
filterAura.add(new SubtypePredicate("Aura"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TawnossCoffinReturnEffect() {
|
public TawnossCoffinReturnEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
this.staticText = "return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TawnossCoffinReturnEffect(final TawnossCoffinReturnEffect effect) {
|
public TawnossCoffinReturnEffect(final TawnossCoffinReturnEffect effect) {
|
||||||
|
@ -222,12 +218,14 @@ class TawnossCoffinReturnEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
|
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
|
||||||
|
|
||||||
FilterCard filter = new FilterCard();
|
FilterCard filter = new FilterCard();
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
//There should be only 1 there, but the for each loop seems the most practical to get to it
|
//There should be only 1 there, but the for each loop seems the most practical to get to it
|
||||||
for (Card enchantedCard : exileZone.getCards(filter, game)){
|
for (Card enchantedCard : exileZone.getCards(filter, game)) {
|
||||||
if (enchantedCard == null) continue;
|
if (enchantedCard == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId());
|
enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId());
|
||||||
Permanent newPermanent = game.getPermanent(enchantedCard.getId());
|
Permanent newPermanent = game.getPermanent(enchantedCard.getId());
|
||||||
if (newPermanent != null) {
|
if (newPermanent != null) {
|
||||||
|
@ -255,15 +253,19 @@ class TawnossCoffinReturnEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Card oubliette = game.getCard(source.getSourceId());
|
Card oubliette = game.getCard(source.getSourceId());
|
||||||
if (oubliette == null) return false;//1st stab at getting those counters back
|
if (oubliette == null) {
|
||||||
for(Counter c : ((TawnossCoffin)oubliette).godHelpMe.values()){ //would be nice if could just use that copy function to set the whole field
|
return false;//1st stab at getting those counters back
|
||||||
if(c!=null) newPermanent.getCounters(game).addCounter(c);
|
|
||||||
}
|
}
|
||||||
|
for (Counter c : ((TawnossCoffin) oubliette).godHelpMe.values()) { //would be nice if could just use that copy function to set the whole field
|
||||||
|
if (c != null) {
|
||||||
|
newPermanent.getCounters(game).addCounter(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,14 +54,14 @@ import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author MarcoMarin
|
* @author MarcoMarin
|
||||||
*/
|
*/
|
||||||
public class Oubliette extends CardImpl {
|
public class Oubliette extends CardImpl {
|
||||||
|
|
||||||
public Counters godHelpMe=null;
|
public Counters godHelpMe = null;
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature");
|
||||||
|
|
||||||
public Oubliette(UUID ownerId) {
|
public Oubliette(UUID ownerId) {
|
||||||
super(ownerId, 11, "Oubliette", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
|
super(ownerId, 11, "Oubliette", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
|
||||||
this.expansionSetCode = "ARN";
|
this.expansionSetCode = "ARN";
|
||||||
|
@ -71,7 +71,7 @@ public class Oubliette extends CardImpl {
|
||||||
Target target = new TargetPermanent(filter);
|
Target target = new TargetPermanent(filter);
|
||||||
ability1.addTarget(target);
|
ability1.addTarget(target);
|
||||||
this.addAbility(ability1);
|
this.addAbility(ability1);
|
||||||
|
|
||||||
// When Oubliette leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.
|
// When Oubliette leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.
|
||||||
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new OublietteReturnEffect(), false);
|
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new OublietteReturnEffect(), false);
|
||||||
this.addAbility(ability2);
|
this.addAbility(ability2);
|
||||||
|
@ -87,7 +87,6 @@ public class Oubliette extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class OublietteEffect extends OneShotEffect {
|
class OublietteEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
|
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
|
||||||
|
@ -98,7 +97,7 @@ class OublietteEffect extends OneShotEffect {
|
||||||
|
|
||||||
public OublietteEffect() {
|
public OublietteEffect() {
|
||||||
super(Outcome.Detriment);
|
super(Outcome.Detriment);
|
||||||
this.staticText = "Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. When Oubliette leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
this.staticText = "exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature";
|
||||||
}
|
}
|
||||||
|
|
||||||
public OublietteEffect(final OublietteEffect effect) {
|
public OublietteEffect(final OublietteEffect effect) {
|
||||||
|
@ -116,11 +115,12 @@ class OublietteEffect extends OneShotEffect {
|
||||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||||
if (enchantment == null) {
|
if (enchantment == null) {
|
||||||
enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||||
}
|
}
|
||||||
UUID targetId=source.getFirstTarget();
|
UUID targetId = source.getFirstTarget();
|
||||||
|
|
||||||
if (targetId==null) return false; // if previous scan somehow failed, simply quit
|
if (targetId == null) {
|
||||||
|
return false; // if previous scan somehow failed, simply quit
|
||||||
|
}
|
||||||
if (enchantment != null) { //back to code (mostly) copied from Flickerform
|
if (enchantment != null) { //back to code (mostly) copied from Flickerform
|
||||||
Permanent enchantedCreature = game.getPermanent(targetId);
|
Permanent enchantedCreature = game.getPermanent(targetId);
|
||||||
if (enchantedCreature != null) {
|
if (enchantedCreature != null) {
|
||||||
|
@ -132,20 +132,20 @@ class OublietteEffect extends OneShotEffect {
|
||||||
attachment.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game);
|
attachment.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//((Oubliette)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no?
|
//((Oubliette)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no?
|
||||||
((Oubliette)game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
|
((Oubliette) game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
|
||||||
/*
|
/*
|
||||||
if (!(enchantedCreature instanceof Token)) {
|
if (!(enchantedCreature instanceof Token)) {
|
||||||
|
|
||||||
// If you do, return the other cards exiled this way to the battlefield under their owners' control attached to that creature
|
// If you do, return the other cards exiled this way to the battlefield under their owners' control attached to that creature
|
||||||
LeavesBattlefieldTriggeredAbility triggeredAbility = new LeavesBattlefieldTriggeredAbility(
|
LeavesBattlefieldTriggeredAbility triggeredAbility = new LeavesBattlefieldTriggeredAbility(
|
||||||
new OublietteReturnEffect(), false);
|
new OublietteReturnEffect(), false);
|
||||||
//enchantment.addAbility(triggeredAbility, source.getSourceId(), game, false);
|
//enchantment.addAbility(triggeredAbility, source.getSourceId(), game, false);
|
||||||
//Card card = game.getCard(source.getSourceId());
|
//Card card = game.getCard(source.getSourceId());
|
||||||
//game.getState().addOtherAbility(card, triggeredAbility);
|
//game.getState().addOtherAbility(card, triggeredAbility);
|
||||||
|
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -164,11 +164,10 @@ class OublietteReturnEffect extends OneShotEffect {
|
||||||
filterAura.add(new SubtypePredicate("Aura"));
|
filterAura.add(new SubtypePredicate("Aura"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public OublietteReturnEffect() {
|
public OublietteReturnEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
this.staticText = "return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public OublietteReturnEffect(final OublietteReturnEffect effect) {
|
public OublietteReturnEffect(final OublietteReturnEffect effect) {
|
||||||
|
@ -183,12 +182,14 @@ class OublietteReturnEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
|
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
|
||||||
|
|
||||||
FilterCard filter = new FilterCard();
|
FilterCard filter = new FilterCard();
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
//There should be only 1 there, but the for each loop seems the most practical to get to it
|
//There should be only 1 there, but the for each loop seems the most practical to get to it
|
||||||
for (Card enchantedCard : exileZone.getCards(filter, game)){
|
for (Card enchantedCard : exileZone.getCards(filter, game)) {
|
||||||
if (enchantedCard == null) continue;
|
if (enchantedCard == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId());
|
enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId());
|
||||||
Permanent newPermanent = game.getPermanent(enchantedCard.getId());
|
Permanent newPermanent = game.getPermanent(enchantedCard.getId());
|
||||||
if (newPermanent != null) {
|
if (newPermanent != null) {
|
||||||
|
@ -216,15 +217,19 @@ class OublietteReturnEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Card oubliette = game.getCard(source.getSourceId());
|
Card oubliette = game.getCard(source.getSourceId());
|
||||||
if (oubliette == null) return false;//1st stab at getting those counters back
|
if (oubliette == null) {
|
||||||
for(Counter c : ((Oubliette)oubliette).godHelpMe.values()){ //would be nice if could just use that copy function to set the whole field
|
return false;//1st stab at getting those counters back
|
||||||
if(c!=null) newPermanent.getCounters(game).addCounter(c);
|
|
||||||
}
|
}
|
||||||
|
for (Counter c : ((Oubliette) oubliette).godHelpMe.values()) { //would be nice if could just use that copy function to set the whole field
|
||||||
|
if (c != null) {
|
||||||
|
newPermanent.getCounters(game).addCounter(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue