mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Estrid, the Masked - fixed problems with with first and second ability (fixes #5223).
This commit is contained in:
parent
2f8b8c7f06
commit
9e88d847ed
3 changed files with 15 additions and 7 deletions
|
@ -9,12 +9,12 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterEnchantmentCard;
|
||||
|
@ -107,7 +107,9 @@ class EstridTheMaskedTokenEffect extends OneShotEffect {
|
|||
if (token == null) {
|
||||
continue;
|
||||
}
|
||||
token.attachTo(source.getFirstTarget(), game);
|
||||
token.getAbilities().get(0).getTargets().get(0).add(source.getFirstTarget(), game);
|
||||
token.getAbilities().get(0).getEffects().get(0).apply(game, token.getAbilities().get(0));
|
||||
// token.attachTo(source.getFirstTarget(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1410,7 +1410,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resetControlAfterSpellResolve(UUID topId) {
|
||||
// for Word of Command
|
||||
|
@ -1958,7 +1958,12 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
SpellAbility spellAbility = perm.getSpellAbility();
|
||||
Ability spellAbility = perm.getSpellAbility();
|
||||
if (spellAbility == null) {
|
||||
if (!perm.getAbilities().isEmpty()) {
|
||||
spellAbility = perm.getAbilities().get(0); // Can happen for created tokens (e.g. Estrid, the Masked)
|
||||
}
|
||||
}
|
||||
if (spellAbility.getTargets().isEmpty()) {
|
||||
for (Ability ability : perm.getAbilities(this)) {
|
||||
if ((ability instanceof SpellAbility)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.TotemArmorAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -27,6 +27,7 @@ public final class MaskToken extends TokenImpl {
|
|||
|
||||
TargetPermanent auraTarget = new TargetPermanent();
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
ability.addTarget(auraTarget);
|
||||
ability.addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
Loading…
Reference in a new issue