mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Arashin Sovereign - Fixed that the player had no option to let the card go to the graveyard.
This commit is contained in:
parent
5dc6f1a7c4
commit
dbb9be6703
173 changed files with 873 additions and 506 deletions
|
@ -101,7 +101,7 @@ class SlaveOfBolasEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,8 +63,8 @@ public class DeadeyeNavigator extends CardImpl {
|
||||||
this.addAbility(SoulbondAbility.getInstance());
|
this.addAbility(SoulbondAbility.getInstance());
|
||||||
|
|
||||||
// As long as Deadeye Navigator is paired with another creature, each of those creatures has "{1}{U}: Exile this creature, then return it to the battlefield under your control."
|
// As long as Deadeye Navigator is paired with another creature, each of those creatures has "{1}{U}: Exile this creature, then return it to the battlefield under your control."
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(Zone.BATTLEFIELD), new ManaCostsImpl("{1}{U}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(true), new ManaCostsImpl("{1}{U}"));
|
||||||
ability.addEffect(new ReturnToBattlefieldUnderYourControlSourceEffect(Zone.EXILED));
|
ability.addEffect(new ReturnToBattlefieldUnderYourControlSourceEffect());
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityPairedEffect(ability, ruleText)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityPairedEffect(ability, ruleText)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ public class HarvesterOfSouls extends CardImpl {
|
||||||
this.expansionSetCode = "AVR";
|
this.expansionSetCode = "AVR";
|
||||||
this.subtype.add("Demon");
|
this.subtype.add("Demon");
|
||||||
|
|
||||||
this.color.setBlack(true);
|
|
||||||
this.power = new MageInt(5);
|
this.power = new MageInt(5);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ class ThatcherRevoltEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -125,7 +125,7 @@ class GoryosVengeanceEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ class KaijinOfTheVanishingTouchEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new ReturnToHandTargetEffect());
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new ReturnToHandTargetEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -151,7 +151,7 @@ class ShireiShizosCaretakerEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -115,7 +115,7 @@ class FelhideSpiritbinderEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -95,7 +95,7 @@ class SearingBloodEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new SearingBloodDelayedTriggeredAbility(source.getFirstTarget());
|
DelayedTriggeredAbility delayedAbility = new SearingBloodDelayedTriggeredAbility(source.getFirstTarget());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
return new DamageTargetEffect(2).apply(game, source);
|
return new DamageTargetEffect(2).apply(game, source);
|
||||||
|
|
|
@ -103,7 +103,7 @@ class HikariTwilightGuardianEffect extends OneShotEffect {
|
||||||
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ class InameLifeAspectEffect extends OneShotEffect {
|
||||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
if (controller != null && sourceObject != null) {
|
if (controller != null && sourceObject != null) {
|
||||||
if (controller.chooseUse(outcome, "Exile " + sourceObject.getLogName() + " to return Spirit cards?", game)) {
|
if (controller.chooseUse(outcome, "Exile " + sourceObject.getLogName() + " to return Spirit cards?", game)) {
|
||||||
new ExileSourceEffect(Zone.GRAVEYARD).apply(game, source);
|
new ExileSourceEffect().apply(game, source);
|
||||||
return new ReturnToHandTargetEffect().apply(game, source);
|
return new ReturnToHandTargetEffect().apply(game, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -103,7 +103,7 @@ private class JunkyoBellSacrificeEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ class KikiJikiMirrorBreakerEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ class OtherworldlyJourneyEffect extends OneShotEffect {
|
||||||
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, "return that card to the battlefield under its owner's control with a +1/+1 counter on it"));
|
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, "return that card to the battlefield under its owner's control with a +1/+1 counter on it"));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
AddCountersTargetEffect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
|
AddCountersTargetEffect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
|
||||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||||
delayedAbility.addEffect(effect);
|
delayedAbility.addEffect(effect);
|
||||||
|
|
|
@ -141,7 +141,7 @@ class SosukeSonOfSeshiroEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class TatsumasaTheDragonsFang extends CardImpl {
|
||||||
|
|
||||||
// {6}, Exile Tatsumasa, the Dragon's Fang: Put a 5/5 blue Dragon Spirit creature token with flying onto the battlefield. Return Tatsumasa to the battlefield under its owner's control when that token dies.
|
// {6}, Exile Tatsumasa, the Dragon's Fang: Put a 5/5 blue Dragon Spirit creature token with flying onto the battlefield. Return Tatsumasa to the battlefield under its owner's control when that token dies.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TatsumaTheDragonsFangEffect(), new GenericManaCost(6));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TatsumaTheDragonsFangEffect(), new GenericManaCost(6));
|
||||||
ability.addCost(new ExileSourceCost());
|
ability.addCost(new ExileSourceCost(true));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Equip {3}
|
// Equip {3}
|
||||||
|
@ -111,7 +111,7 @@ class TatsumaTheDragonsFangEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new TatsumaTheDragonsFangTriggeredAbility(fixedTarget);
|
DelayedTriggeredAbility delayedAbility = new TatsumaTheDragonsFangTriggeredAbility(fixedTarget);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -123,7 +123,7 @@ class TatsumaTheDragonsFangTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
protected FixedTarget fixedTarget;
|
protected FixedTarget fixedTarget;
|
||||||
|
|
||||||
public TatsumaTheDragonsFangTriggeredAbility(FixedTarget fixedTarget) {
|
public TatsumaTheDragonsFangTriggeredAbility(FixedTarget fixedTarget) {
|
||||||
super(new ReturnToBattlefieldUnderYourControlSourceEffect(Zone.EXILED), Duration.OneUse);
|
super(new ReturnToBattlefieldUnderYourControlSourceEffect(), Duration.OneUse);
|
||||||
this.fixedTarget = fixedTarget;
|
this.fixedTarget = fixedTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ThroughTheBreachEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ class AdarkarValkyrieEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AdarkarValkyrieDelayedTriggeredAbility(new FixedTarget(this.getTargetPointer().getFirst(game, source)));
|
DelayedTriggeredAbility delayedAbility = new AdarkarValkyrieDelayedTriggeredAbility(new FixedTarget(this.getTargetPointer().getFirst(game, source)));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ class ScatteringStrokeEffect extends OneShotEffect {
|
||||||
new AtTheBeginOMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN);
|
new AtTheBeginOMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -136,7 +136,7 @@ class FlickerformEffect extends OneShotEffect {
|
||||||
new FlickerformReturnEffect(enchantedCreature.getId(), exileZoneId));
|
new FlickerformReturnEffect(enchantedCreature.getId(), exileZoneId));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -98,7 +98,7 @@ class ReincarnationEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new ReincarnationDelayedTriggeredAbility(targetPointer.getFirst(game, source));
|
DelayedTriggeredAbility delayedAbility = new ReincarnationDelayedTriggeredAbility(targetPointer.getFirst(game, source));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ class RoonOfTheHiddenRealmEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(card.getOwnerId());
|
delayedAbility.setControllerId(card.getOwnerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,7 @@ class DarettiScrapSavantEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.COMMAND, effect, TargetController.ANY);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.COMMAND, effect, TargetController.ANY);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ class FeldonOfTheThirdPathEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ class WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEff
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ class BrackwaterElementalSacrificeEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -96,7 +96,7 @@ class QuenchableFireEffect extends OneShotEffect {
|
||||||
QuenchableFireDelayedTriggeredAbility delayedAbility = new QuenchableFireDelayedTriggeredAbility();
|
QuenchableFireDelayedTriggeredAbility delayedAbility = new QuenchableFireDelayedTriggeredAbility();
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getTargets().addAll(source.getTargets());
|
delayedAbility.getTargets().addAll(source.getTargets());
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ public class BeguilerOfWills extends CardImpl {
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Wizard");
|
this.subtype.add("Wizard");
|
||||||
|
|
||||||
this.color.setBlue(true);
|
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ class LoyalCatharEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnLoyalCatharEffect(source.getSourceId()));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnLoyalCatharEffect(source.getSourceId()));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ class SeanceEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ class SuddenDisappearanceEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ class RakdosGuildmageEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ class AEherlingRemovingEffect extends OneShotEffect {
|
||||||
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ class LegionsInitiativeExileEffect extends OneShotEffect {
|
||||||
AtTheBeginOfCombatDelayedTriggeredAbility delayedAbility = new AtTheBeginOfCombatDelayedTriggeredAbility(new LegionsInitiativeReturnFromExileEffect());
|
AtTheBeginOfCombatDelayedTriggeredAbility delayedAbility = new AtTheBeginOfCombatDelayedTriggeredAbility(new LegionsInitiativeReturnFromExileEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ class PlasmCaptureCounterEffect extends OneShotEffect {
|
||||||
new AtTheBeginOMainPhaseDelayedTriggeredAbility(new PlasmCaptureManaEffect(mana), false, TargetController.YOU, PhaseSelection.NEXT_PRECOMBAT_MAIN);
|
new AtTheBeginOMainPhaseDelayedTriggeredAbility(new PlasmCaptureManaEffect(mana), false, TargetController.YOU, PhaseSelection.NEXT_PRECOMBAT_MAIN);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ class HedonistsTroveExileEffect extends OneShotEffect {
|
||||||
Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (controller != null && targetPlayer != null && sourceObject != null) {
|
if (controller != null && targetPlayer != null && sourceObject != null) {
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
ArrayList<UUID> graveyard = new ArrayList<>(targetPlayer.getGraveyard());
|
ArrayList<UUID> graveyard = new ArrayList<>(targetPlayer.getGraveyard());
|
||||||
for (UUID cardId : graveyard) {
|
for (UUID cardId : graveyard) {
|
||||||
Card card = game.getCard(cardId);
|
Card card = game.getCard(cardId);
|
||||||
|
@ -141,7 +141,7 @@ class HedonistsTrovePlayLandEffect extends AsThoughEffectImpl {
|
||||||
Card card = game.getCard(objectId);
|
Card card = game.getCard(objectId);
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (card != null && card.getCardType().contains(CardType.LAND) && sourceObject != null) {
|
if (card != null && card.getCardType().contains(CardType.LAND) && sourceObject != null) {
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
if (exileId != null) {
|
if (exileId != null) {
|
||||||
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
|
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
|
||||||
return exileZone != null && exileZone.contains(objectId);
|
return exileZone != null && exileZone.contains(objectId);
|
||||||
|
@ -182,7 +182,7 @@ class HedonistsTroveCastNonlandCardsEffect extends AsThoughEffectImpl {
|
||||||
Card card = game.getCard(objectId);
|
Card card = game.getCard(objectId);
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (card != null && !card.getCardType().contains(CardType.LAND) && sourceObject != null) {
|
if (card != null && !card.getCardType().contains(CardType.LAND) && sourceObject != null) {
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
if (exileId != null) {
|
if (exileId != null) {
|
||||||
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
|
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
|
||||||
if (exileZone != null && exileZone.contains(objectId)) {
|
if (exileZone != null && exileZone.contains(objectId)) {
|
||||||
|
|
|
@ -110,7 +110,7 @@ class LivingLoreExileEffect extends OneShotEffect {
|
||||||
if (sourceObject != null && controller != null){
|
if (sourceObject != null && controller != null){
|
||||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"));
|
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"));
|
||||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
Card card = controller.getGraveyard().get(target.getFirstTarget(), game);
|
Card card = controller.getGraveyard().get(target.getFirstTarget(), game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.moveCardToExileWithInfo(card, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.GRAVEYARD);
|
controller.moveCardToExileWithInfo(card, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.GRAVEYARD);
|
||||||
|
@ -147,7 +147,7 @@ class LivingLoreSetPowerToughnessSourceEffect extends ContinuousEffectImpl {
|
||||||
discard();
|
discard();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, mageObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
if (exileId != null) {
|
if (exileId != null) {
|
||||||
ExileZone exileZone = game.getExile().getExileZone(exileId);
|
ExileZone exileZone = game.getExile().getExileZone(exileId);
|
||||||
if (exileZone == null) {
|
if (exileZone == null) {
|
||||||
|
@ -192,7 +192,7 @@ class LivingLoreSacrificeEffect extends OneShotEffect {
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
if (permanent != null && mageObject != null && new MageObjectReference(permanent, game).refersTo(mageObject, game)) {
|
if (permanent != null && mageObject != null && new MageObjectReference(permanent, game).refersTo(mageObject, game)) {
|
||||||
if (permanent.sacrifice(source.getSourceId(), game)) {
|
if (permanent.sacrifice(source.getSourceId(), game)) {
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, mageObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
if (exileId != null) {
|
if (exileId != null) {
|
||||||
ExileZone exileZone = game.getExile().getExileZone(exileId);
|
ExileZone exileZone = game.getExile().getExileZone(exileId);
|
||||||
Card exiledCard = null;
|
Card exiledCard = null;
|
||||||
|
|
|
@ -120,7 +120,7 @@ class MirrorMockeryEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ class SwiftWarkiteEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect2);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect2);
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ class SwiftWarkiteEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect2);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect2);
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ class FlickerwispEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, false));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, false));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ class RallyTheAncestorsEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.game.combat.CombatGroup;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
@ -53,13 +54,18 @@ import mage.watchers.common.BlockedAttackerWatcher;
|
||||||
*
|
*
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*
|
*
|
||||||
5/1/2009 The ability grants you control of all creatures that are blocking it as the ability resolves. This will include any creatures that were put onto the battlefield blocking it.
|
5/1/2009 The ability grants you control of all creatures that are blocking it as the ability resolves. This will include
|
||||||
5/1/2009 Any blocking creatures that regenerated during combat will have been removed from combat. Since such creatures are no longer in combat, they cannot be blocking The Wretched, which means you won't be able to gain control of them.
|
* any creatures that were put onto the battlefield blocking it.
|
||||||
5/1/2009 If The Wretched itself regenerated during combat, then it will have been removed from combat. Since it is no longer in combat, there cannot be any creatures blocking it, which means you won't be able to gain control of any creatures.
|
5/1/2009 Any blocking creatures that regenerated during combat will have been removed from combat. Since such creatures
|
||||||
10/1/2009 The Wretched's ability triggers only if it's still on the battlefield when the end of combat step begins (after the combat damage step). For example, if it's blocked by a 7/7 creature and is destroyed, its ability won't trigger at all.
|
* are no longer in combat, they cannot be blocking The Wretched, which means you won't be able to gain control of them.
|
||||||
|
5/1/2009 If The Wretched itself regenerated during combat, then it will have been removed from combat. Since it is no longer
|
||||||
|
* in combat, there cannot be any creatures blocking it, which means you won't be able to gain control of any creatures.
|
||||||
|
10/1/2009 The Wretched's ability triggers only if it's still on the battlefield when the end of combat step begins (after the
|
||||||
|
* combat damage step). For example, if it's blocked by a 7/7 creature and is destroyed, its ability won't trigger at all.
|
||||||
10/1/2009 If The Wretched leaves the battlefield, you no longer control it, so the duration of its control-change effect ends.
|
10/1/2009 If The Wretched leaves the battlefield, you no longer control it, so the duration of its control-change effect ends.
|
||||||
10/1/2009 If you lose control of The Wretched before its ability resolves, you won't gain control of the creatures blocking it at all.
|
10/1/2009 If you lose control of The Wretched before its ability resolves, you won't gain control of the creatures blocking it at all.
|
||||||
10/1/2009 Once the ability resolves, it doesn't care whether the permanents you gained control of remain creatures, only that they remain on the battlefield.
|
10/1/2009 Once the ability resolves, it doesn't care whether the permanents you gained control of remain creatures, only that
|
||||||
|
* they remain on the battlefield.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class TheWretched extends CardImpl {
|
public class TheWretched extends CardImpl {
|
||||||
|
@ -100,10 +106,15 @@ class EndOfAnyCombatTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
public EndOfAnyCombatTriggeredAbility copy() {
|
public EndOfAnyCombatTriggeredAbility copy() {
|
||||||
return new EndOfAnyCombatTriggeredAbility(this);
|
return new EndOfAnyCombatTriggeredAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.END_COMBAT_STEP_PRE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
return (event.getType() == GameEvent.EventType.END_COMBAT_STEP_PRE);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -124,29 +135,44 @@ class TheWretchedEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent theWretched = game.getPermanent(source.getSourceId());
|
Permanent theWretched = (Permanent) source.getSourceObjectIfItStillExists(game);
|
||||||
if (theWretched == null) {
|
if (theWretched == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (theWretched.isRemovedFromCombat()) {
|
if (theWretched.isRemovedFromCombat() || !theWretched.isAttacking()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!new SourceOnBattlefieldControlUnchangedCondition().apply(game, source)) {
|
if (!new SourceOnBattlefieldControlUnchangedCondition().apply(game, source)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
BlockedAttackerWatcher watcher = (BlockedAttackerWatcher) game.getState().getWatchers().get("BlockedAttackerWatcher");
|
|
||||||
if (watcher != null) {
|
for (CombatGroup combatGroup :game.getCombat().getGroups()) {
|
||||||
for (Permanent creature : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), game)) {
|
if (combatGroup.getAttackers().contains(source.getSourceId())) {
|
||||||
if (watcher.creatureHasBlockedAttacker(theWretched, creature, game)
|
for(UUID creatureId: combatGroup.getBlockers()) {
|
||||||
&& !creature.isRemovedFromCombat()) {
|
Permanent blocker = game.getPermanent(creatureId);
|
||||||
ContinuousEffect effect = new ConditionalContinuousEffect(new GainControlTargetEffect(Duration.Custom, source.getControllerId()), new SourceOnBattlefieldControlUnchangedCondition(), "test");
|
if (blocker != null && blocker.getBlocking() > 0) {
|
||||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
ContinuousEffect effect = new ConditionalContinuousEffect(new GainControlTargetEffect(Duration.Custom, source.getControllerId()), new SourceOnBattlefieldControlUnchangedCondition(), "");
|
||||||
game.addEffect(effect, source);
|
effect.setTargetPointer(new FixedTarget(blocker.getId()));
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
|
// BlockedAttackerWatcher watcher = (BlockedAttackerWatcher) game.getState().getWatchers().get("BlockedAttackerWatcher");
|
||||||
|
// if (watcher != null) {
|
||||||
|
// for (Permanent creature : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), game)) {
|
||||||
|
// if (watcher.creatureHasBlockedAttacker(theWretched, creature, game)
|
||||||
|
// && !creature.isRemovedFromCombat()) {
|
||||||
|
// ContinuousEffect effect = new ConditionalContinuousEffect(new GainControlTargetEffect(Duration.Custom, source.getControllerId()), new SourceOnBattlefieldControlUnchangedCondition(), "test");
|
||||||
|
// effect.setTargetPointer(new FixedTarget(creature.getId()));
|
||||||
|
// game.addEffect(effect, source);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -69,8 +69,6 @@ public class BridgeFromBelow extends CardImpl {
|
||||||
super(ownerId, 81, "Bridge from Below", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}");
|
super(ownerId, 81, "Bridge from Below", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}");
|
||||||
this.expansionSetCode = "FUT";
|
this.expansionSetCode = "FUT";
|
||||||
|
|
||||||
this.color.setBlack(true);
|
|
||||||
|
|
||||||
// Whenever a nontoken creature is put into your graveyard from the battlefield, if Bridge from Below is in your graveyard, put a 2/2 black Zombie creature token onto the battlefield.
|
// Whenever a nontoken creature is put into your graveyard from the battlefield, if Bridge from Below is in your graveyard, put a 2/2 black Zombie creature token onto the battlefield.
|
||||||
this.addAbility(new BridgeFromBelowAbility(new CreateTokenEffect(new ZombieToken()), filter1));
|
this.addAbility(new BridgeFromBelowAbility(new CreateTokenEffect(new ZombieToken()), filter1));
|
||||||
// When a creature is put into an opponent's graveyard from the battlefield, if Bridge from Below is in your graveyard, exile Bridge from Below.
|
// When a creature is put into an opponent's graveyard from the battlefield, if Bridge from Below is in your graveyard, exile Bridge from Below.
|
||||||
|
@ -106,15 +104,18 @@ class BridgeFromBelowAbility extends TriggeredAbilityImpl {
|
||||||
return new BridgeFromBelowAbility(this);
|
return new BridgeFromBelowAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||||
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
|
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||||
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
|
||||||
if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -123,16 +124,11 @@ class BridgeFromBelowAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkInterveningIfClause(Game game) {
|
public boolean checkInterveningIfClause(Game game) {
|
||||||
Player controller = game.getPlayer(this.getControllerId());
|
Player controller = game.getPlayer(this.getControllerId());
|
||||||
if(controller != null && controller.getGraveyard().contains(this.getSourceId())) {
|
return controller != null && controller.getGraveyard().contains(this.getSourceId());
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return filter.getMessage() +", if Bridge from Below is in your graveyard, " + super.getRule();
|
return filter.getMessage() +", if {this} is in your graveyard, " + super.getRule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ class VoidwalkEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(card.getOwnerId());
|
delayedAbility.setControllerId(card.getOwnerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ class GhostCouncilOfOrzhovaRemovingEffect extends OneShotEffect {
|
||||||
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ class GhostwayEffect extends OneShotEffect {
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (sourceObject != null && controller != null) {
|
if (sourceObject != null && controller != null) {
|
||||||
int numberCreatures = 0;
|
int numberCreatures = 0;
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||||
if (creature != null) {
|
if (creature != null) {
|
||||||
controller.moveCardToExileWithInfo(creature, exileId,sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD);
|
controller.moveCardToExileWithInfo(creature, exileId,sourceObject.getLogName(), source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||||
|
@ -107,7 +107,7 @@ class GhostwayEffect extends OneShotEffect {
|
||||||
new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD, false));
|
new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD, false));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class IcyPrison extends CardImpl {
|
||||||
new DoUnlessAnyPlayerPaysEffect(new SacrificeSourceEffect(), new GenericManaCost(3)), TargetController.YOU, false));
|
new DoUnlessAnyPlayerPaysEffect(new SacrificeSourceEffect(), new GenericManaCost(3)), TargetController.YOU, false));
|
||||||
|
|
||||||
// When Icy Prison leaves the battlefield, return the exiled card to the battlefield under its owner's control.
|
// When Icy Prison leaves the battlefield, return the exiled card to the battlefield under its owner's control.
|
||||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false));
|
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD, false, true), false));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ class NecropotenceEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(returnToHandeffect, TargetController.YOU);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(returnToHandeffect, TargetController.YOU);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ class SpinalEmbraceAddDelayedEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ package mage.sets.journeyintonyx;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.DelayedTriggeredAbility;
|
import mage.abilities.DelayedTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
@ -49,6 +50,7 @@ import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.PermanentToken;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
@ -117,7 +119,7 @@ class BrainMaggotExileEffect extends OneShotEffect {
|
||||||
Card card = opponent.getHand().get(target.getFirstTarget(), game);
|
Card card = opponent.getHand().get(target.getFirstTarget(), game);
|
||||||
// If source permanent leaves the battlefield before its triggered ability resolves, the target card won't be exiled.
|
// If source permanent leaves the battlefield before its triggered ability resolves, the target card won't be exiled.
|
||||||
if (card != null && game.getState().getZone(source.getSourceId()) == Zone.BATTLEFIELD) {
|
if (card != null && game.getState().getZone(source.getSourceId()) == Zone.BATTLEFIELD) {
|
||||||
controller.moveCardToExileWithInfo(card, CardUtil.getObjectExileZoneId(game, sourcePermanent), sourcePermanent.getName(), source.getSourceId(), game, Zone.HAND);
|
controller.moveCardToExileWithInfo(card, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), sourcePermanent.getName(), source.getSourceId(), game, Zone.HAND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,9 +153,14 @@ class BrainMaggotReturnExiledCreatureAbility extends DelayedTriggeredAbility {
|
||||||
return new BrainMaggotReturnExiledCreatureAbility(this);
|
return new BrainMaggotReturnExiledCreatureAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(this.getSourceId())) {
|
if (event.getTargetId().equals(this.getSourceId())) {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
|
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -182,8 +189,10 @@ class BrainMaggotReturnExiledCreatureEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
ExileZone exile = game.getExile().getExileZone(CardUtil.getObjectExileZoneId(game, source.getSourceObject(game)));
|
if (sourceObject != null && controller != null) {
|
||||||
|
int zoneChangeCounter = (sourceObject instanceof PermanentToken) ? source.getSourceObjectZoneChangeCounter() : source.getSourceObjectZoneChangeCounter() -1;
|
||||||
|
ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), zoneChangeCounter));
|
||||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (exile != null && sourcePermanent != null) {
|
if (exile != null && sourcePermanent != null) {
|
||||||
LinkedList<UUID> cards = new LinkedList<>(exile);
|
LinkedList<UUID> cards = new LinkedList<>(exile);
|
||||||
|
|
|
@ -100,7 +100,7 @@ class SkybindEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ class TwinflameCopyEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ class WormfangDrakeExileCost extends CostImpl {
|
||||||
MageObject sourceObject = ability.getSourceObject(game);
|
MageObject sourceObject = ability.getSourceObject(game);
|
||||||
if (controller != null && sourceObject != null) {
|
if (controller != null && sourceObject != null) {
|
||||||
if (targets.choose(Outcome.Exile, controllerId, sourceId, game)) {
|
if (targets.choose(Outcome.Exile, controllerId, sourceId, game)) {
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
UUID exileId = CardUtil.getExileZoneId(game, ability.getSourceId(), ability.getSourceObjectZoneChangeCounter());
|
||||||
for (UUID targetId: targets.get(0).getTargets()) {
|
for (UUID targetId: targets.get(0).getTargets()) {
|
||||||
Permanent permanent = game.getPermanent(targetId);
|
Permanent permanent = game.getPermanent(targetId);
|
||||||
if (permanent == null) {
|
if (permanent == null) {
|
||||||
|
|
|
@ -72,9 +72,6 @@ public class AnafenzaTheForemost extends CardImpl {
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Soldier");
|
this.subtype.add("Soldier");
|
||||||
|
|
||||||
this.color.setGreen(true);
|
|
||||||
this.color.setBlack(true);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ class KheruLichLordEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
KheruLichLordReplacementEffect replacementEffect = new KheruLichLordReplacementEffect();
|
KheruLichLordReplacementEffect replacementEffect = new KheruLichLordReplacementEffect();
|
||||||
|
|
|
@ -118,7 +118,7 @@ class MeanderingTowershellEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtBeginningNextDeclareAttackersStepNextTurnDelayedTriggeredAbility();
|
DelayedTriggeredAbility delayedAbility = new AtBeginningNextDeclareAttackersStepNextTurnDelayedTriggeredAbility();
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ class AbominationEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
||||||
delayedAbility.setSourceId(permanent.getId());
|
delayedAbility.setSourceId(permanent.getId());
|
||||||
delayedAbility.setControllerId(event.getControllerId());
|
delayedAbility.setControllerId(event.getControllerId());
|
||||||
delayedAbility.setSourceObject(event.getSourceObject(game));
|
delayedAbility.setSourceObject(event.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -117,7 +117,7 @@ class HazezonTamarEntersEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(effect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(effect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ class BerserkDestroyEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ class CockatriceEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -133,7 +133,7 @@ class ThicketBasiliskEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -103,7 +103,7 @@ class DragonWhelpEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new DragonWhelpDelayedEffect());
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new DragonWhelpDelayedEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
amount++;
|
amount++;
|
||||||
|
|
|
@ -134,7 +134,7 @@ class StoneGiantEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ class MystifyingMazeEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, true));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, true));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class PrimevalTitan extends CardImpl {
|
||||||
super(ownerId, 192, "Primeval Titan", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
super(ownerId, 192, "Primeval Titan", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
||||||
this.expansionSetCode = "M11";
|
this.expansionSetCode = "M11";
|
||||||
this.subtype.add("Giant");
|
this.subtype.add("Giant");
|
||||||
this.color.setGreen(true);
|
|
||||||
this.power = new MageInt(6);
|
this.power = new MageInt(6);
|
||||||
this.toughness = new MageInt(6);
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
|
@ -90,15 +90,17 @@ class PrimevalTitanAbility extends TriggeredAbilityImpl {
|
||||||
return new PrimevalTitanAbility(this);
|
return new PrimevalTitanAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == EventType.ATTACKER_DECLARED || event.getType() == EventType.ENTERS_THE_BATTLEFIELD;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) {
|
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId()) ) {
|
return event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId());
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -103,11 +103,11 @@ class BanisherPriestExileEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game);
|
||||||
// If Banisher Priest leaves the battlefield before its triggered ability resolves,
|
// If Banisher Priest leaves the battlefield before its triggered ability resolves,
|
||||||
// the target creature won't be exiled.
|
// the target creature won't be exiled.
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getObjectExileZoneId(game, permanent), permanent.getLogName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), permanent.getLogName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ class PhytotitanEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(effect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(effect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ class RockBasiliskEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -113,7 +113,7 @@ class ShallowGraveEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ class GruesomeEncoreEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -97,7 +97,7 @@ class VirulentWoundEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new VirulentWoundDelayedTriggeredAbility(source.getFirstTarget());
|
DelayedTriggeredAbility delayedAbility = new VirulentWoundDelayedTriggeredAbility(source.getFirstTarget());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.game.ExileZone;
|
import mage.game.ExileZone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.PermanentToken;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
@ -104,7 +105,8 @@ class ParallaxWaveEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (sourceObject != null) {
|
if (sourceObject != null) {
|
||||||
UUID exileZoneId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
int zoneChangeCounter = (sourceObject instanceof PermanentToken) ? source.getSourceObjectZoneChangeCounter() : source.getSourceObjectZoneChangeCounter() -1;
|
||||||
|
UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), zoneChangeCounter);
|
||||||
if (exileZoneId != null) {
|
if (exileZoneId != null) {
|
||||||
ExileZone exileZone = game.getExile().getExileZone(exileZoneId);
|
ExileZone exileZone = game.getExile().getExileZone(exileZoneId);
|
||||||
if (exileZone != null) {
|
if (exileZone != null) {
|
||||||
|
|
|
@ -149,7 +149,7 @@ class KarnLiberatedEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new KarnLiberatedDelayedTriggeredAbility(exileId);
|
DelayedTriggeredAbility delayedAbility = new KarnLiberatedDelayedTriggeredAbility(exileId);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
game.start(null);
|
game.start(null);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -30,6 +30,8 @@ package mage.sets.newphyrexia;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.StaticAbility;
|
import mage.abilities.StaticAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.InfoEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
|
@ -53,7 +55,7 @@ public class MyrSuperion extends CardImpl {
|
||||||
this.toughness = new MageInt(6);
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
// Spend only mana produced by creatures to cast Myr Superion.
|
// Spend only mana produced by creatures to cast Myr Superion.
|
||||||
this.addAbility(new MyrSuperionStaticAbility());
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Spend only mana produced by creatures to cast {this}")));
|
||||||
this.getSpellAbility().getManaCostsToPay().setSourceFilter(filter);
|
this.getSpellAbility().getManaCostsToPay().setSourceFilter(filter);
|
||||||
this.getSpellAbility().getManaCosts().setSourceFilter(filter);
|
this.getSpellAbility().getManaCosts().setSourceFilter(filter);
|
||||||
}
|
}
|
||||||
|
@ -67,25 +69,3 @@ public class MyrSuperion extends CardImpl {
|
||||||
return new MyrSuperion(this);
|
return new MyrSuperion(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyrSuperionStaticAbility extends StaticAbility {
|
|
||||||
|
|
||||||
public MyrSuperionStaticAbility() {
|
|
||||||
super(Zone.STACK, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MyrSuperionStaticAbility(MyrSuperionStaticAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public MyrSuperionStaticAbility copy() {
|
|
||||||
return new MyrSuperionStaticAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "Spend only mana produced by creatures to cast {this}.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ class PostmortemLungeEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -103,7 +103,7 @@ class PraetorsGraspEffect extends OneShotEffect {
|
||||||
if (controller.searchLibrary(target, game, opponent.getId())) {
|
if (controller.searchLibrary(target, game, opponent.getId())) {
|
||||||
UUID targetId = target.getFirstTarget();
|
UUID targetId = target.getFirstTarget();
|
||||||
Card card = opponent.getLibrary().getCard(targetId, game);
|
Card card = opponent.getLibrary().getCard(targetId, game);
|
||||||
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
|
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||||
if (card != null && exileId != null) {
|
if (card != null && exileId != null) {
|
||||||
game.informPlayers(controller.getName() + " moves the searched card face down to exile");
|
game.informPlayers(controller.getName() + " moves the searched card face down to exile");
|
||||||
card.moveToExile(exileId, sourceObject.getName(), source.getSourceId(), game);
|
card.moveToExile(exileId, sourceObject.getName(), source.getSourceId(), game);
|
||||||
|
|
|
@ -97,7 +97,7 @@ class AstralSlideEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD, false));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD, false));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ class HornetCannonEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(destroyEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(destroyEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ class FatalFrenzyEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ class SkyshipWeatherlightEffect2 extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (sourceObject != null && controller != null) {
|
if (sourceObject != null && controller != null) {
|
||||||
ExileZone exZone = game.getExile().getExileZone(CardUtil.getObjectExileZoneId(game, sourceObject));
|
ExileZone exZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()));
|
||||||
if (exZone != null) {
|
if (exZone != null) {
|
||||||
Card card = exZone.getRandom(game);
|
Card card = exZone.getRandom(game);
|
||||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
|
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
|
||||||
|
|
|
@ -114,7 +114,7 @@ class GraveBetrayalTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect);
|
||||||
delayedAbility.setSourceId(this.getSourceId());
|
delayedAbility.setSourceId(this.getSourceId());
|
||||||
delayedAbility.setControllerId(this.getControllerId());
|
delayedAbility.setControllerId(this.getControllerId());
|
||||||
delayedAbility.setSourceObject(this.getSourceObject(game));
|
delayedAbility.setSourceObject(this.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
package mage.sets.returntoravnica;
|
package mage.sets.returntoravnica;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import static javax.xml.bind.JAXBIntrospector.getValue;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
@ -47,8 +49,6 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
@ -60,8 +60,7 @@ public class TrostaniSelesnyasVoice extends CardImpl {
|
||||||
this.expansionSetCode = "RTR";
|
this.expansionSetCode = "RTR";
|
||||||
this.supertype.add("Legendary");
|
this.supertype.add("Legendary");
|
||||||
this.subtype.add("Dryad");
|
this.subtype.add("Dryad");
|
||||||
this.color.setGreen(true);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
@ -102,6 +101,7 @@ class TrostaniSelesnyasVoiceTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
&& permanent.getControllerId().equals(this.controllerId)
|
&& permanent.getControllerId().equals(this.controllerId)
|
||||||
&& event.getTargetId() != this.getSourceId()) {
|
&& event.getTargetId() != this.getSourceId()) {
|
||||||
Effect effect = this.getEffects().get(0);
|
Effect effect = this.getEffects().get(0);
|
||||||
|
// life is determined during resolution so it has to be retrieved there (e.g. Giant Growth before resolution)
|
||||||
effect.setValue("lifeSource", event.getTargetId());
|
effect.setValue("lifeSource", event.getTargetId());
|
||||||
effect.setValue("zoneChangeCounter", permanent.getZoneChangeCounter(game));
|
effect.setValue("zoneChangeCounter", permanent.getZoneChangeCounter(game));
|
||||||
return true;
|
return true;
|
||||||
|
@ -112,7 +112,7 @@ class TrostaniSelesnyasVoiceTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Whenever another creature enters the battlefield under your control, you gain life equal to that creature's toughness.";
|
return "Whenever another creature enters the battlefield under your control, " + super.getRule();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -125,7 +125,7 @@ class TrostaniSelesnyasVoiceEffect extends OneShotEffect {
|
||||||
|
|
||||||
public TrostaniSelesnyasVoiceEffect() {
|
public TrostaniSelesnyasVoiceEffect() {
|
||||||
super(Outcome.GainLife);
|
super(Outcome.GainLife);
|
||||||
staticText = "you gain life equal to its toughness";
|
staticText = "you gain life equal to that creature's toughness";
|
||||||
}
|
}
|
||||||
|
|
||||||
public TrostaniSelesnyasVoiceEffect(final TrostaniSelesnyasVoiceEffect effect) {
|
public TrostaniSelesnyasVoiceEffect(final TrostaniSelesnyasVoiceEffect effect) {
|
||||||
|
@ -155,4 +155,4 @@ class TrostaniSelesnyasVoiceEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,22 +89,24 @@ class ArrogantBloodlordTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
return new ArrogantBloodlordTriggeredAbility(this);
|
return new ArrogantBloodlordTriggeredAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.BLOCKER_DECLARED;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) {
|
Permanent blocker = game.getPermanent(event.getSourceId());
|
||||||
Permanent blocker = game.getPermanent(event.getSourceId());
|
Permanent blocked = game.getPermanent(event.getTargetId());
|
||||||
Permanent blocked = game.getPermanent(event.getTargetId());
|
Permanent arrogantBloodlord = game.getPermanent(sourceId);
|
||||||
Permanent arrogantBloodlord = game.getPermanent(sourceId);
|
if (blocker != null && blocker != arrogantBloodlord
|
||||||
if (blocker != null && blocker != arrogantBloodlord
|
&& blocker.getPower().getValue() < 2
|
||||||
&& blocker.getPower().getValue() < 2
|
&& blocked == arrogantBloodlord) {
|
||||||
&& blocked == arrogantBloodlord) {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
if (blocker != null && blocker == arrogantBloodlord
|
||||||
if (blocker != null && blocker == arrogantBloodlord
|
&& game.getPermanent(event.getTargetId()).getPower().getValue() < 2) {
|
||||||
&& game.getPermanent(event.getTargetId()).getPower().getValue() < 2) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -133,7 +135,7 @@ class ArrogantBloodlordEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(source.getSourceId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(source.getSourceId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -119,7 +119,7 @@ class SplinterTwinEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ class FeralLightningEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -110,7 +110,7 @@ class FootstepsOfTheGoryoEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ class InameAsOneEffect extends OneShotEffect {
|
||||||
// exile it, not that it actually gets to the exile zone. This is similar to how destroying a creature
|
// exile it, not that it actually gets to the exile zone. This is similar to how destroying a creature
|
||||||
// (with, for example, Rest in Peace) doesn't necessarily ensure that creature will end up in the graveyard;
|
// (with, for example, Rest in Peace) doesn't necessarily ensure that creature will end up in the graveyard;
|
||||||
// it just so happens that the action of exiling something and the exile zone both use the same word: "exile".
|
// it just so happens that the action of exiling something and the exile zone both use the same word: "exile".
|
||||||
new ExileSourceEffect(Zone.GRAVEYARD).apply(game, source);
|
new ExileSourceEffect().apply(game, source);
|
||||||
return new ReturnFromGraveyardToBattlefieldTargetEffect().apply(game, source);
|
return new ReturnFromGraveyardToBattlefieldTargetEffect().apply(game, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -100,7 +100,7 @@ class WineOfBloodAndIronEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ class ArgentSphinxEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ class GlimmerpointStagEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ class MimicVatCreateTokenEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -111,7 +111,7 @@ class OgreGeargrabberEffect1 extends OneShotEffect {
|
||||||
OgreGeargrabberDelayedTriggeredAbility delayedAbility = new OgreGeargrabberDelayedTriggeredAbility(equipmentId);
|
OgreGeargrabberDelayedTriggeredAbility delayedAbility = new OgreGeargrabberDelayedTriggeredAbility(equipmentId);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
Permanent equipment = game.getPermanent(equipmentId);
|
Permanent equipment = game.getPermanent(equipmentId);
|
||||||
if (equipment != null) {
|
if (equipment != null) {
|
||||||
|
|
|
@ -136,7 +136,7 @@ class VenserTheSojournerEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ElementalMasteryEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getId());
|
delayedAbility.setSourceId(source.getId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -97,7 +97,7 @@ class GiantbaitingEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ class ImpromptuRaidEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ class MistmeadowWitchEffect extends OneShotEffect {
|
||||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ class PuppeteerCliqueEffect extends OneShotEffect {
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect, TargetController.YOU);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect, TargetController.YOU);
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ class WickerWarcrawlerEffect extends OneShotEffect {
|
||||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()));
|
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()));
|
||||||
delayedAbility.setSourceId(source.getSourceId());
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
delayedAbility.setControllerId(source.getControllerId());
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(source.getSourceId()));
|
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(source.getSourceId()));
|
||||||
game.addDelayedTriggeredAbility(delayedAbility);
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -90,15 +90,6 @@ class GatherSpecimensReplacementEffect extends ReplacementEffectImpl {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
|
||||||
if (controller != null) {
|
|
||||||
event.setPlayerId(controller.getId());
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checksEventType(GameEvent event, Game game) {
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == GameEvent.EventType.ZONE_CHANGE || event.getType() == GameEvent.EventType.CREATE_TOKEN;
|
return event.getType() == GameEvent.EventType.ZONE_CHANGE || event.getType() == GameEvent.EventType.CREATE_TOKEN;
|
||||||
|
@ -107,7 +98,7 @@ class GatherSpecimensReplacementEffect extends ReplacementEffectImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE
|
if (event.getType() == GameEvent.EventType.ZONE_CHANGE
|
||||||
&& ((ZoneChangeEvent) event).getToZone() == Zone.BATTLEFIELD) {
|
&& ((ZoneChangeEvent) event).getToZone().match(Zone.BATTLEFIELD)) {
|
||||||
Card card = game.getCard(event.getTargetId());
|
Card card = game.getCard(event.getTargetId());
|
||||||
if (card.getCardType().contains(CardType.CREATURE)) { // TODO: Bestow Card cast as Enchantment probably not handled correctly
|
if (card.getCardType().contains(CardType.CREATURE)) { // TODO: Bestow Card cast as Enchantment probably not handled correctly
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
@ -124,4 +115,13 @@ class GatherSpecimensReplacementEffect extends ReplacementEffectImpl {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
event.setPlayerId(controller.getId());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue