mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
fc06e31cda
2 changed files with 10 additions and 11 deletions
|
|
@ -88,9 +88,9 @@ class PermeatingMassEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability ability) {
|
public boolean apply(Game game, Ability ability) {
|
||||||
Permanent copyTo = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, ability));
|
Permanent copyTo = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, ability));
|
||||||
if (copyTo != null) {
|
if (copyTo != null) {
|
||||||
Permanent copyFrom = game.getPermanent(ability.getSourceId());
|
Permanent copyFrom = (Permanent) ability.getSourceObject(game);
|
||||||
if (copyFrom != null) {
|
if (copyFrom != null) {
|
||||||
game.copyPermanent(Duration.WhileOnBattlefield, copyFrom, copyTo.getId(), ability, new EmptyApplyToPermanent());
|
game.copyPermanent(Duration.Custom, copyFrom, copyTo.getId(), ability, new EmptyApplyToPermanent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ package org.mage.test.cards.single.emn;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
|
@ -16,24 +15,24 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
*/
|
*/
|
||||||
public class PermeatingMassTest extends CardTestPlayerBase {
|
public class PermeatingMassTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWhenDiesInCombatMakesCopyStill() {
|
public void testWhenDiesInCombatMakesCopyStill() {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Hill Giant"); // 3/3
|
addCard(Zone.BATTLEFIELD, playerA, "Hill Giant"); // 3/3
|
||||||
|
|
||||||
// Whenever Permeating Mass deals combat damage to a creature, that creature becomes a copy of Permeating Mass.
|
// Whenever Permeating Mass deals combat damage to a creature, that creature becomes a copy of Permeating Mass.
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Permeating Mass"); // 1/3
|
addCard(Zone.BATTLEFIELD, playerB, "Permeating Mass"); // 1/3
|
||||||
|
|
||||||
attack(1, playerA, "Hill Giant");
|
attack(1, playerA, "Hill Giant");
|
||||||
block(1, playerB, "Permeating Mass", "Hill Giant");
|
block(1, playerB, "Permeating Mass", "Hill Giant");
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.END_COMBAT);
|
setStopAt(1, PhaseStep.END_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertLife(playerB, 20);
|
assertLife(playerB, 20);
|
||||||
assertGraveyardCount(playerB, "Permeating Mass", 1);
|
assertGraveyardCount(playerB, "Permeating Mass", 1);
|
||||||
Permanent hilly = getPermanent("Hill Giant", playerA);
|
assertPermanentCount(playerA, "Permeating Mass", 1);
|
||||||
assertPowerToughness(playerA, "Hill Giant", 1, 3);
|
assertPowerToughness(playerA, "Permeating Mass", 1, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue