mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Fixed a bug were copied abilites (e.g. by Progenitor Mimic) did not use the correct controller after the control of the copying permanent changed (e.g. by Capitivating Vampire).
This commit is contained in:
parent
3184252d54
commit
4b0d027847
3 changed files with 9 additions and 2 deletions
|
@ -77,9 +77,9 @@ public class ProgenitorMimic extends CardImpl {
|
|||
new SourceMatchesFilterCondition(filter),
|
||||
"At the beginning of your upkeep, if this creature isn't a token, put a token onto the battlefield that's a copy of this creature.")
|
||||
);
|
||||
effect = new CopyPermanentEffect();
|
||||
effect = new CopyPermanentEffect(applier);
|
||||
effect.setText("as a copy of any creature on the battlefield except it gains \"At the beginning of your upkeep, if this creature isn't a token, put a token onto the battlefield that's a copy of this creature.\"");
|
||||
this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(applier), true));
|
||||
this.addAbility(new EntersBattlefieldAbility(effect, true));
|
||||
}
|
||||
|
||||
public ProgenitorMimic(final ProgenitorMimic card) {
|
||||
|
|
|
@ -162,6 +162,7 @@ public class ProgenitorMimicTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerB, "Progenitor Mimic", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Bloodrage Vampire", 1); // 3/1
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Progenitor Mimic");
|
||||
setChoice(playerB, "Captivating Vampire");
|
||||
|
@ -177,6 +178,9 @@ public class ProgenitorMimicTest extends CardTestPlayerBase {
|
|||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Captivating Vampire", 2);
|
||||
|
||||
assertPowerToughness(playerB, "Bloodrage Vampire", 3, 1); // +0 because all Captivating Vampire are controlled by playerB
|
||||
|
||||
assertPowerToughness(playerA, "Captivating Vampire", 3, 3, Filter.ComparisonScope.All); // +1 from the other Captivating Vampire
|
||||
assertPowerToughness(playerA, "Child of Night", 4, 3, Filter.ComparisonScope.All); // +2 from the two Captivating Vampire
|
||||
|
||||
|
|
|
@ -632,6 +632,9 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
game.fireEvent(new GameEvent(EventType.GAINED_CONTROL, objectId, objectId, controllerId));
|
||||
|
||||
return true;
|
||||
} else if (isCopy()) {// Because the previous copied abilities can be from another controller chnage controller in any case for abilities
|
||||
this.getAbilities(game).setControllerId(controllerId);
|
||||
game.getContinuousEffects().setController(objectId, controllerId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue