mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
Update BloodMoonTest and some updates to Tooltiptexts.
This commit is contained in:
parent
177a4faf10
commit
8c6893a8e8
3 changed files with 47 additions and 13 deletions
|
@ -29,10 +29,6 @@
|
|||
package mage.sets.magic2011;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
|
@ -42,11 +38,17 @@ import mage.abilities.effects.common.ReturnFromExileEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -83,12 +85,12 @@ public class HoardingDragon extends CardImpl {
|
|||
|
||||
class HoardingDragonEffect extends OneShotEffect {
|
||||
|
||||
private UUID exileId;
|
||||
private final UUID exileId;
|
||||
|
||||
public HoardingDragonEffect(UUID exileId) {
|
||||
super(Outcome.Exile);
|
||||
this.exileId = exileId;
|
||||
this.staticText = "When {this} enters the battlefield, you may search your library for an artifact card, exile it, then shuffle your library";
|
||||
this.staticText = "you may search your library for an artifact card, exile it, then shuffle your library";
|
||||
}
|
||||
|
||||
public HoardingDragonEffect(final HoardingDragonEffect effect) {
|
||||
|
@ -105,14 +107,13 @@ class HoardingDragonEffect extends OneShotEffect {
|
|||
if (target.getTargets().size() > 0) {
|
||||
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
card.moveToExile(exileId, "Hoarding Dragon exile", source.getSourceId(), game);
|
||||
card.moveToExile(exileId, "Hoarding Dragon", source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.target.TargetPermanent;
|
|||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
@ -63,8 +64,10 @@ public class Rancor extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature gets +2/+0 and has trample.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA)));
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0));
|
||||
Effect effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA);
|
||||
effect.setText("and has trample");
|
||||
this.addAbility(ability);
|
||||
|
||||
// When Rancor is put into a graveyard from the battlefield, return Rancor to its owner's hand.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new ReturnToHandSourceEffect()));
|
||||
|
|
|
@ -53,10 +53,40 @@ public class BloodMoonTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
// check that the +1/+1 counter was added to the token
|
||||
// Check that the land is tapped
|
||||
Permanent grassland = getPermanent("Grasslands", playerA.getId());
|
||||
|
||||
Assert.assertEquals("Grasslands is not tapped but is has to be from ETB replacement effect", true, grassland.isTapped());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBloodMoonDoesNotPreventETBReplacementButPreventsTriggeredEffects() {
|
||||
// Blood Moon 2R
|
||||
// Enchantment
|
||||
// Nonbasic lands are Mountains
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Blood Moon");
|
||||
|
||||
/**
|
||||
* Kabira Crossroads
|
||||
* Land
|
||||
* Kabira Crossroads enters the battlefield tapped.
|
||||
* When Kabira Crossroads enters the battlefield, you gain 2 life.
|
||||
* {W}: Add to your mana pool.
|
||||
*
|
||||
*/
|
||||
addCard(Zone.HAND, playerA, "Kabira Crossroads");
|
||||
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kabira Crossroads");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
// Check that the land is tapped
|
||||
Permanent grassland = getPermanent("Kabira Crossroads", playerA.getId());
|
||||
Assert.assertEquals("Kabira Crossroads is not tapped but is has to be from ETB replacement effect", true, grassland.isTapped());
|
||||
|
||||
assertLife(playerA, 20); // Trigger may not trigger because of Blood Moon so the 2 life were not added
|
||||
assertLife(playerB, 20);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue