mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
- refactoring related to #8375 "A" cards
This commit is contained in:
parent
8b36c70507
commit
8e3d4aed7e
10 changed files with 10 additions and 10 deletions
|
@ -67,7 +67,7 @@ class AetherRiftEffect extends OneShotEffect {
|
|||
Card card = controller.discardOne(true, false, source, game);
|
||||
if (card != null && card.isCreature(game)) {
|
||||
Effect returnEffect = new ReturnFromGraveyardToBattlefieldTargetEffect();
|
||||
returnEffect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
returnEffect.setTargetPointer(new FixedTarget(card.getId(), game));
|
||||
Effect doEffect = new DoUnlessAnyPlayerPaysEffect(returnEffect, new PayLifeCost(5),
|
||||
"Pay 5 life to prevent " + card.getLogName() + " to return from graveyard to battlefield?");
|
||||
return doEffect.apply(game, source);
|
||||
|
|
|
@ -77,7 +77,7 @@ class AkroanHorseChangeControlEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||
ContinuousEffect effect = new AkroanHorseGainControlEffect(Duration.Custom, target.getFirstTarget());
|
||||
effect.setTargetPointer(new FixedTarget(source.getSourceId()));
|
||||
effect.setTargetPointer(new FixedTarget(source.getSourceId(), game));
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ class AkromaVisionOfIxidorEffect extends OneShotEffect {
|
|||
.sum();
|
||||
if (count > 0) {
|
||||
ContinuousEffect effect = new BoostTargetEffect(count, count, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId(), game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class AmuletOfVigorTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (permanent != null && permanent.isTapped() && permanent.isControlledBy(this.getControllerId())) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(
|
||||
new FixedTarget(event.getTargetId())
|
||||
new FixedTarget(event.getTargetId(), game)
|
||||
.withData("triggeredName", GameLog.getColoredObjectIdNameForTooltip(permanent))
|
||||
);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class BoostEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
ContinuousEffect effect = new BoostTargetEffect(amount, amount, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class AngelicExaltationAbility extends TriggeredAbilityImpl {
|
|||
if (game.isActivePlayer(this.controllerId)) {
|
||||
if (game.getCombat().attacksAlone()) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackers().get(0)));
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackers().get(0), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ class AssaultSuitGainControlEffect extends OneShotEffect {
|
|||
"Let have " + activePlayer.getLogName() + " gain control of " + equippedCreature.getLogName() + '?', source, game)) {
|
||||
equippedCreature.untap(game);
|
||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn, activePlayer.getId());
|
||||
effect.setTargetPointer(new FixedTarget(equipment.getAttachedTo()));
|
||||
effect.setTargetPointer(new FixedTarget(equipment.getAttachedTo(), game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ class AtarkaWorldRenderEffect extends TriggeredAbilityImpl {
|
|||
if (attacker != null
|
||||
&& filter.match(attacker, sourceId, controllerId, game)) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(attacker.getId()));
|
||||
effect.setTargetPointer(new FixedTarget(attacker.getId(), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ class AuraThiefDiesTriggeredEffect extends OneShotEffect {
|
|||
boolean ret = false;
|
||||
for(Permanent enchantment : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getControllerId(), game)) {
|
||||
ContinuousEffect gainControl = new GainControlTargetEffect(Duration.EndOfGame);
|
||||
gainControl.setTargetPointer(new FixedTarget(enchantment.getId()));
|
||||
gainControl.setTargetPointer(new FixedTarget(enchantment.getId(), game));
|
||||
game.addEffect(gainControl, source);
|
||||
ret = true;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public final class Aurification extends CardImpl {
|
|||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
if (permanent != null && permanent.isCreature(game)) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getSourceId()));
|
||||
effect.setTargetPointer(new FixedTarget(event.getSourceId(), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue