mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
[AVR] 32 cards. Tests. Common effects. Fixes.
This commit is contained in:
parent
38fc180ed4
commit
275142a143
61 changed files with 3773 additions and 212 deletions
|
|
@ -5,6 +5,7 @@ import mage.abilities.Abilities;
|
|||
import mage.abilities.AbilitiesImpl;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.filter.Filter;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -348,4 +349,9 @@ public class SoulbondKeywordTest extends CardTestPlayerBase {
|
|||
assertAbilities(playerA, "Nearheath Pilgrim", abilities);
|
||||
assertAbilities(playerA, "Elite Vanguard", abilities);
|
||||
}
|
||||
|
||||
public void testExileAndReturnBack() {
|
||||
//TODO: Soulbond + Soulshift
|
||||
Assert.assertTrue(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package org.mage.test.cards.control;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* Tests the effect:
|
||||
* - Target opponent gains control of {this}
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class TargetOpponentGainsControlTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testPermanentControlEffect() {
|
||||
addCard(Constants.Zone.HAND, playerA, "Lightning Bolt", 3);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Treacherous Pit-Dweller");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Treacherous Pit-Dweller");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
// under opponent's control
|
||||
assertPermanentCount(playerB, "Treacherous Pit-Dweller", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChangeControlEffectFromTwoCards() {
|
||||
addCard(Constants.Zone.HAND, playerA, "Lightning Bolt", 3);
|
||||
addCard(Constants.Zone.HAND, playerA, "Unhallowed Pact", 3);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Treacherous Pit-Dweller");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Treacherous Pit-Dweller");
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Unhallowed Pact", "Treacherous Pit-Dweller");
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Treacherous Pit-Dweller");
|
||||
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Treacherous Pit-Dweller");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
// went to graveyard
|
||||
assertGraveyardCount(playerA, "Unhallowed Pact", 1);
|
||||
|
||||
// returned back
|
||||
assertPermanentCount(playerA, "Treacherous Pit-Dweller", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package org.mage.test.cards.single;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class ExquisiteBloodTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testCard() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
|
||||
// card we test
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Exquisite Blood", 1);
|
||||
|
||||
addCard(Constants.Zone.HAND, playerA, "Lightning Bolt");
|
||||
addCard(Constants.Zone.HAND, playerA, "Bump in the Night");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Raging Goblin", 2);
|
||||
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Mountain", 1);
|
||||
addCard(Constants.Zone.HAND, playerB, "Shock");
|
||||
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Bump in the Night", playerB);
|
||||
|
||||
attack(1, playerA, "Raging Goblin");
|
||||
attack(1, playerA, "Raging Goblin");
|
||||
|
||||
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerB, "Shock", playerA);
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 12);
|
||||
assertLife(playerA, 26);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue