mirror of
https://github.com/correl/mage.git
synced 2025-04-06 17:00:12 -09:00
* Teferi, Temporal Archmage - Fixed that Loyality abilities could be used at instant timing.
This commit is contained in:
parent
f6a05208f2
commit
5dc314c68a
3 changed files with 13 additions and 8 deletions
Mage.Sets/src/mage/sets/commander2014
Mage/src/mage/abilities
|
@ -107,7 +107,7 @@ class TeferiTemporalArchmageEmblem extends Emblem {
|
||||||
class TeferiTemporalArchmageAsThoughEffect extends AsThoughEffectImpl {
|
class TeferiTemporalArchmageAsThoughEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
public TeferiTemporalArchmageAsThoughEffect() {
|
public TeferiTemporalArchmageAsThoughEffect() {
|
||||||
super(AsThoughEffectType.CAST_AS_INSTANT, Duration.EndOfGame, Outcome.Benefit);
|
super(AsThoughEffectType.ACTIVATE_AS_INSTANT, Duration.EndOfGame, Outcome.Benefit);
|
||||||
staticText = "You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant";
|
staticText = "You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,14 +126,17 @@ class TeferiTemporalArchmageAsThoughEffect extends AsThoughEffectImpl {
|
||||||
return new TeferiTemporalArchmageAsThoughEffect(this);
|
return new TeferiTemporalArchmageAsThoughEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game) {
|
||||||
Permanent permanent= game.getPermanent(objectId);
|
if (affectedAbility.getControllerId().equals(source.getControllerId()) && affectedAbility instanceof LoyaltyAbility) {
|
||||||
if (permanent != null && permanent.getCardType().contains(CardType.PLANESWALKER) && permanent.getControllerId().equals(source.getControllerId())) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
|
return false; // Not used
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.costs.mana.PhyrexianManaCost;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.Effects;
|
import mage.abilities.effects.Effects;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
|
import mage.constants.AsThoughEffectType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
||||||
|
@ -182,7 +183,8 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//20091005 - 602.5d/602.5e
|
//20091005 - 602.5d/602.5e
|
||||||
if (timing == TimingRule.INSTANT || game.canPlaySorcery(playerId)) {
|
if (timing == TimingRule.INSTANT || game.canPlaySorcery(playerId) ||
|
||||||
|
game.getContinuousEffects().asThough(sourceId, AsThoughEffectType.ACTIVATE_AS_INSTANT, this, controllerId, game)) {
|
||||||
if (costs.canPay(this, sourceId, controllerId, game) && canChooseTarget(game)) {
|
if (costs.canPay(this, sourceId, controllerId, game) && canChooseTarget(game)) {
|
||||||
this.activatorId = playerId;
|
this.activatorId = playerId;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -56,8 +56,8 @@ public abstract class AsThoughEffectImpl extends ContinuousEffectImpl implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(UUID sourceId, Ability affectedAbility, Ability source, Game game) {
|
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game) {
|
||||||
return applies(sourceId, source, affectedAbility.getControllerId(), game);
|
return applies(objectId, source, affectedAbility.getControllerId(), game);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue