mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
* Cryptoplasm - Fixed that the copied creature did not have the triggered ability (fixes #1367).
This commit is contained in:
parent
684cb2d472
commit
b30a6c4b15
3 changed files with 25 additions and 7 deletions
|
|
@ -112,7 +112,7 @@ class TheMimeoplasmEffect extends OneShotEffect {
|
|||
Cards cardsToExile = new CardsImpl();
|
||||
cardsToExile.add(cardToCopy);
|
||||
cardsToExile.add(cardForCounters);
|
||||
controller.moveCards(cardsToExile, Zone.GRAVEYARD, Zone.EXILED, source, game);
|
||||
controller.moveCards(cardsToExile, Zone.EXILED, source, game);
|
||||
CopyEffect copyEffect = new CopyEffect(Duration.Custom, cardToCopy, source.getSourceId());
|
||||
game.addEffect(copyEffect, source);
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(cardForCounters.getPower().getValue()), game);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import mage.MageObject;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -102,8 +101,7 @@ class CryptoplasmEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, final Ability source) {
|
||||
Permanent creatureToCopy = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (creatureToCopy != null) {
|
||||
CopyEffect effect = new CopyEffect(creatureToCopy, source.getSourceId());
|
||||
effect.setApplier(new ApplyToPermanent() {
|
||||
ApplyToPermanent applier = new ApplyToPermanent() {
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
Ability upkeepAbility = new BeginningOfUpkeepTriggeredAbility(new CryptoplasmEffect(), TargetController.YOU, true);
|
||||
|
|
@ -120,9 +118,8 @@ class CryptoplasmEffect extends OneShotEffect {
|
|||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
game.addEffect(effect, source);
|
||||
|
||||
};
|
||||
game.copyPermanent(creatureToCopy, source.getSourceId(), source, applier);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue