Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Test for Unearth bug added
- Loading branch information
|
|
@@ -29,16 +29,16 @@ |
|
|
package mage.sets.shardsofalara; |
|
|
|
|
|
import java.util.UUID; |
|
|
import mage.constants.CardType; |
|
|
import mage.constants.Duration; |
|
|
import mage.constants.Rarity; |
|
|
import mage.constants.Zone; |
|
|
import mage.MageInt; |
|
|
import mage.abilities.common.SimpleActivatedAbility; |
|
|
import mage.abilities.costs.mana.ManaCostsImpl; |
|
|
import mage.abilities.effects.common.continuous.BoostSourceEffect; |
|
|
import mage.abilities.keyword.UnearthAbility; |
|
|
import mage.cards.CardImpl; |
|
|
import mage.constants.CardType; |
|
|
import mage.constants.Duration; |
|
|
import mage.constants.Rarity; |
|
|
import mage.constants.Zone; |
|
|
|
|
|
/** |
|
|
* |
|
|
@@ -54,6 +54,9 @@ public UndeadLeotau (UUID ownerId) { |
|
|
|
|
|
this.power = new MageInt(3); |
|
|
this.toughness = new MageInt(4); |
|
|
|
|
|
// {R}: Undead Leotau gets +1/-1 until end of turn. |
|
|
// Unearth {2}{B} |
|
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(+1, -1, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); |
|
|
this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{B}"))); |
|
|
} |
|
|
|
|
|
@@ -74,5 +74,29 @@ public void testUnearthAttackExile() { |
|
|
assertPermanentCount(playerA, "Hellspark Elemental", 0); |
|
|
assertExileCount("Hellspark Elemental", 1); |
|
|
} |
|
|
|
|
|
/** |
|
|
* Reported bug: Cards with unearth (e.g. Undead Leotau) are currently bugged. When you bring a creature back from the graveyard |
|
|
* with unearth, it [should] get exiled at end of turn normally, [but instead] a copy of the card stays on the battlefield |
|
|
* under your control permanently. |
|
|
*/ |
|
|
@Test |
|
|
public void testUndeadLeotau() { |
|
|
|
|
|
//{R}: Undead Leotau gets +1/-1 until end of turn. |
|
|
// Unearth {2}{B} |
|
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3); |
|
|
addCard(Zone.GRAVEYARD, playerA, "Undead Leotau", 1); // 3/4 |
|
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unearth"); |
|
|
attack(1, playerA, "Undead Leotau"); |
|
|
|
|
|
setStopAt(2, PhaseStep.UNTAP); |
|
|
execute(); |
|
|
|
|
|
assertGraveyardCount(playerA, "Undead Leotau", 0); |
|
|
assertLife(playerB, 17); |
|
|
|
|
|
assertPermanentCount(playerA, "Undead Leotau", 0); |
|
|
assertExileCount("Undead Leotau", 1); |
|
|
} |
|
|
}
|