mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge origin/master
This commit is contained in:
commit
ba6cbd7f70
5 changed files with 205 additions and 22 deletions
68
Mage.Sets/src/mage/sets/mirage/FetidHorror.java
Normal file
68
Mage.Sets/src/mage/sets/mirage/FetidHorror.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.mirage;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author djbrez
|
||||
*/
|
||||
public class FetidHorror extends CardImpl {
|
||||
|
||||
public FetidHorror(UUID ownerId) {
|
||||
super(ownerId, 21, "Fetid Horror", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.expansionSetCode = "MIR";
|
||||
this.subtype.add("Shade");
|
||||
this.subtype.add("Horror");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {B}: Fetid Horror gets +1/+1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.B)));
|
||||
}
|
||||
|
||||
public FetidHorror(final FetidHorror card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FetidHorror copy() {
|
||||
return new FetidHorror(this);
|
||||
}
|
||||
}
|
67
Mage.Sets/src/mage/sets/onslaught/ScreechingBuzzard.java
Normal file
67
Mage.Sets/src/mage/sets/onslaught/ScreechingBuzzard.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.onslaught;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author djbrez
|
||||
*/
|
||||
public class ScreechingBuzzard extends CardImpl {
|
||||
|
||||
public ScreechingBuzzard(UUID ownerId) {
|
||||
super(ownerId, 165, "Screeching Buzzard", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.expansionSetCode = "ONS";
|
||||
this.subtype.add("Bird");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Screeching Buzzard dies, each opponent discards a card.
|
||||
this.addAbility(new DiesTriggeredAbility(new DiscardEachPlayerEffect(TargetController.OPPONENT), false));
|
||||
}
|
||||
|
||||
public ScreechingBuzzard(final ScreechingBuzzard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScreechingBuzzard copy() {
|
||||
return new ScreechingBuzzard(this);
|
||||
}
|
||||
}
|
|
@ -186,4 +186,36 @@ public class ProgenitorMimicTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Deadbridge Chant returns the battlefield Progenitor Mimic, but it's copy
|
||||
* effect doesn't applied. It's 0/0, game put it into graveyard.
|
||||
*/
|
||||
@Test
|
||||
public void testDeadbridgeChant() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
// When Deadbridge Chant enters the battlefield, put the top ten cards of your library into your graveyard.
|
||||
// At the beginning of your upkeep, choose a card at random in your graveyard. If it's a creature card, put it onto the battlefield. Otherwise, put it into your hand.
|
||||
addCard(Zone.HAND, playerA, "Deadbridge Chant", 1); // {4}{B}{G}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
|
||||
|
||||
// You may have Progenitor Mimic enter the battlefield 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."
|
||||
addCard(Zone.LIBRARY, playerA, "Progenitor Mimic", 10);
|
||||
skipInitShuffling();
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Deadbridge Chant");
|
||||
setChoice(playerA, "Silvercoat Lion"); // Copied by Progenitor Mimic returned by Deadbridge Chant on upkeep of turn 3
|
||||
|
||||
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Deadbridge Chant", 1);
|
||||
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 2);
|
||||
assertPowerToughness(playerA, "Silvercoat Lion", 2, 2);
|
||||
|
||||
assertGraveyardCount(playerA, "Progenitor Mimic", 9);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,56 +36,73 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class AttackRequirementTest extends CardTestPlayerBase {
|
||||
|
||||
|
||||
@Test
|
||||
public void testSimpleAttackRequirement() {
|
||||
// Defender
|
||||
// {G}: Wall of Tanglecord gains reach until end of turn. (It can block creatures with flying.)
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Wall of Tanglecord"); // 0/6
|
||||
|
||||
|
||||
// Juggernaut attacks each turn if able.
|
||||
// Juggernaut can't be blocked by Walls
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Juggernaut"); // 5/3
|
||||
|
||||
// Juggernaut should be forced to ttack
|
||||
|
||||
// Juggernaut should be forced to ttack
|
||||
block(2, playerA, "Wall of Tanglecord", "Juggernaut"); // this block should'nt work because of Juggernauts restriction
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 15);
|
||||
assertLife(playerA, 15);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testAttackRequirementWithAttackRestriction() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
|
||||
// Defender
|
||||
// {G}: Wall of Tanglecord gains reach until end of turn. (It can block creatures with flying.)
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Wall of Tanglecord"); // 0/6
|
||||
|
||||
|
||||
// Creatures can't attack you unless their controller pays {2} for each creature he or she controls that's attacking you
|
||||
addCard(Zone.HAND, playerA, "Ghostly Prison");
|
||||
|
||||
|
||||
// Juggernaut attacks each turn if able.
|
||||
// Juggernaut can't be blocked by Walls
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Juggernaut"); // 5/3
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ghostly Prison");
|
||||
|
||||
|
||||
// Juggernaut is forced to attack but can't without paying the Ghostly Prison cost and don't has to pay the costs so no attack
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Goblin Rabblemaster isn't forcing Goblins to attack.
|
||||
*/
|
||||
@Test
|
||||
public void testAttackRequirementGoblinRabblemaster() {
|
||||
// Other Goblin creatures you control attack each turn if able.
|
||||
// At the beginning of combat on your turn, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||
// When Goblin Rabblemaster attacks, it gets +1/+0 until end of turn for each other attacking Goblin.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Goblin Rabblemaster"); // 2/2
|
||||
// Menace (This creature can't be blocked except by two or more creatures.)
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Boggart Brute"); // 3/2
|
||||
|
||||
attack(2, playerB, "Goblin Rabblemaster");
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerA, 12); // got damage 1 from Token, 3 from Boggart Brute + 2 + 2 from Goblin Rabblemaster = 9
|
||||
assertLife(playerB, 20);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package org.mage.test.sets;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.repository.CardScanner;
|
||||
import mage.sets.FateReforged;
|
||||
import mage.sets.MastersEditionII;
|
||||
import mage.sets.MastersEditionIV;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.MageTestBase;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nigelzor
|
||||
|
@ -38,8 +36,9 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
"Bloodstained Mire", "Flooded Strand", "Polluted Delta", "Windswept Heath", "Wooded Foothills");
|
||||
|
||||
List<Card> booster = FateReforged.getInstance().createBooster();
|
||||
assertTrue(str(booster), contains(booster, tapland, "FRF") || contains(booster, fetchland, "KTK"));
|
||||
assertFalse(str(booster), contains(booster, basics, null));
|
||||
assertTrue(str(booster), contains(booster, tapland, "FRF") || contains(booster, fetchland, "KTK")
|
||||
|| contains(booster, basics, null));
|
||||
// assertFalse(str(booster), contains(booster, basics, null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue