mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Some cleanup (#2242)
This commit is contained in:
@@ -179,7 +179,7 @@ public class AiAttackController {
|
||||
|
||||
List<Player> opps = Lists.newArrayList(ai.getOpponents());
|
||||
if (forCombatDmg) {
|
||||
for (Player p : ai.getOpponents().threadSafeIterable()) {
|
||||
for (Player p : ai.getOpponents()) {
|
||||
if (p.isMonarch() && ai.canBecomeMonarch()) {
|
||||
// just increase the odds for now instead of being fully predictable
|
||||
// as it could lead to other too complex factors giving this reasoning negative impact
|
||||
|
||||
@@ -45,6 +45,7 @@ import forge.game.combat.CombatUtil;
|
||||
import forge.game.cost.Cost;
|
||||
import forge.game.cost.CostPayEnergy;
|
||||
import forge.game.cost.CostRemoveCounter;
|
||||
import forge.game.cost.CostUntap;
|
||||
import forge.game.keyword.Keyword;
|
||||
import forge.game.keyword.KeywordCollection;
|
||||
import forge.game.keyword.KeywordInterface;
|
||||
@@ -1417,12 +1418,14 @@ public class ComputerUtilCard {
|
||||
double nonCombatChance = 0.0f;
|
||||
double combatChance = 0.0f;
|
||||
// non-combat Haste: has an activated ability with tap cost
|
||||
for (SpellAbility ab : c.getSpellAbilities()) {
|
||||
Cost abCost = ab.getPayCosts();
|
||||
if (abCost != null && abCost.hasTapCost()
|
||||
&& (!abCost.hasManaCost() || ComputerUtilMana.canPayManaCost(ab, ai, 0, false))) {
|
||||
nonCombatChance += 0.5f;
|
||||
break;
|
||||
if (c.isAbilitySick()) {
|
||||
for (SpellAbility ab : c.getSpellAbilities()) {
|
||||
Cost abCost = ab.getPayCosts();
|
||||
if (abCost != null && (abCost.hasTapCost() || abCost.hasSpecificCostType(CostUntap.class))
|
||||
&& (!abCost.hasManaCost() || ComputerUtilMana.canPayManaCost(ab, ai, sa.getPayCosts().getTotalMana().getCMC(), false))) {
|
||||
nonCombatChance += 0.5f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// combat Haste: only grant it if the creature will attack
|
||||
@@ -1917,7 +1920,7 @@ public class ComputerUtilCard {
|
||||
}
|
||||
}
|
||||
if (!canBeBlocked) {
|
||||
boolean threat = atk.getNetCombatDamage() >= ai.getLife() - lifeInDanger;
|
||||
boolean threat = ComputerUtilCombat.getAttack(atk) >= ai.getLife() - lifeInDanger;
|
||||
if (!priorityRemovalOnlyInDanger || threat) {
|
||||
priorityCards.add(atk);
|
||||
}
|
||||
|
||||
@@ -2054,7 +2054,6 @@ public class ComputerUtilCombat {
|
||||
if (block.size() == 1) {
|
||||
final Card blocker = block.getFirst();
|
||||
|
||||
// trample
|
||||
if (hasTrample) {
|
||||
int dmgToKill = getEnoughDamageToKill(blocker, dmgCanDeal, attacker, true);
|
||||
|
||||
@@ -2110,7 +2109,7 @@ public class ComputerUtilCombat {
|
||||
}
|
||||
}
|
||||
return damageMap;
|
||||
} // setAssignedDamage()
|
||||
}
|
||||
|
||||
// how much damage is enough to kill the creature (for AI)
|
||||
/**
|
||||
|
||||
@@ -206,12 +206,7 @@ public class GameCopier {
|
||||
Card newCard = map.map(origHostCard);
|
||||
SpellAbility newSa = null;
|
||||
if (origSa.isSpell()) {
|
||||
for (SpellAbility sa : newCard.getAllSpellAbilities()) {
|
||||
if (sa.getDescription().equals(origSa.getDescription())) {
|
||||
newSa = sa;
|
||||
break;
|
||||
}
|
||||
}
|
||||
newSa = findSAInCard(origSa, newCard);
|
||||
}
|
||||
if (newSa != null) {
|
||||
newSa.setActivatingPlayer(map.map(origSa.getActivatingPlayer()), true);
|
||||
|
||||
@@ -768,7 +768,7 @@ public final class GameActionUtil {
|
||||
final Game game = sourceCard.getGame();
|
||||
final Card eff = new Card(game.nextCardId(), game);
|
||||
eff.setTimestamp(game.getNextTimestamp());
|
||||
eff.setName(sourceCard.getName() + "'s Effect");
|
||||
eff.setName(sourceCard + "'s Effect");
|
||||
eff.setOwner(controller);
|
||||
|
||||
eff.setImageKey(sourceCard.getImageKey());
|
||||
|
||||
@@ -2843,11 +2843,7 @@ public class AbilityUtils {
|
||||
if (sq[0].startsWith("ColorsCtrl")) {
|
||||
final String restriction = l[0].substring(11);
|
||||
final CardCollection list = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb);
|
||||
byte n = 0;
|
||||
for (final Card card : list) {
|
||||
n |= card.getColor().getColor();
|
||||
}
|
||||
return doXMath(ColorSet.fromMask(n).countColors(), expr, c, ctb);
|
||||
return doXMath(CardUtil.getColorsFromCards(list).countColors(), expr, c, ctb);
|
||||
}
|
||||
|
||||
// TODO move below to handlePaid
|
||||
|
||||
@@ -7294,4 +7294,11 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
public boolean attackVigilance() {
|
||||
return StaticAbilityAttackVigilance.attackVigilance(this);
|
||||
}
|
||||
|
||||
public boolean isAbilitySick() {
|
||||
if (!isSick()) {
|
||||
return false;
|
||||
}
|
||||
return !StaticAbilityActivateAbilityAsIfHaste.canActivate(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,9 +356,9 @@ public final class CardUtil {
|
||||
return res;
|
||||
}
|
||||
|
||||
public static ColorSet getColorsYouCtrl(final Player p) {
|
||||
public static ColorSet getColorsFromCards(Iterable<Card> list) {
|
||||
byte b = 0;
|
||||
for (Card c : p.getCardsIn(ZoneType.Battlefield)) {
|
||||
for (Card c : list) {
|
||||
b |= c.getColor().getColor();
|
||||
}
|
||||
return ColorSet.fromMask(b);
|
||||
|
||||
@@ -20,7 +20,6 @@ package forge.game.cost;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.staticability.StaticAbilityActivateAbilityAsIfHaste;
|
||||
|
||||
/**
|
||||
* The Class CostTap.
|
||||
@@ -62,7 +61,7 @@ public class CostTap extends CostPart {
|
||||
@Override
|
||||
public final boolean canPay(final SpellAbility ability, final Player payer, final boolean effect) {
|
||||
final Card source = ability.getHostCard();
|
||||
return source.isUntapped() && !isAbilitySick(source);
|
||||
return source.isUntapped() && !source.isAbilitySick();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,11 +73,4 @@ public class CostTap extends CostPart {
|
||||
public <T> T accept(ICostVisitor<T> visitor) {
|
||||
return visitor.visit(this);
|
||||
}
|
||||
|
||||
public boolean isAbilitySick(final Card source) {
|
||||
if (!source.isSick()) {
|
||||
return false;
|
||||
}
|
||||
return !StaticAbilityActivateAbilityAsIfHaste.canActivate(source);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ package forge.game.cost;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.staticability.StaticAbilityActivateAbilityAsIfHaste;
|
||||
|
||||
/**
|
||||
* The Class CostUntap.
|
||||
@@ -73,7 +72,7 @@ public class CostUntap extends CostPart {
|
||||
@Override
|
||||
public final boolean canPay(final SpellAbility ability, final Player payer, final boolean effect) {
|
||||
final Card source = ability.getHostCard();
|
||||
return source.isTapped() && !isAbilitySick(source);
|
||||
return source.isTapped() && !source.isAbilitySick();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,11 +84,4 @@ public class CostUntap extends CostPart {
|
||||
public <T> T accept(ICostVisitor<T> visitor) {
|
||||
return visitor.visit(this);
|
||||
}
|
||||
|
||||
public boolean isAbilitySick(final Card source) {
|
||||
if (!source.isSick()) {
|
||||
return false;
|
||||
}
|
||||
return !StaticAbilityActivateAbilityAsIfHaste.canActivate(source);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
return;
|
||||
|
||||
TriggerHandler handler = card.getGame().getTriggerHandler();
|
||||
Trigger trig = TriggerHandler.parseTrigger(sVarHolder.getSVar(this.triggersWhenSpent), sourceCard, false);
|
||||
Trigger trig = TriggerHandler.parseTrigger(sVarHolder.getSVar(this.triggersWhenSpent), sourceCard, false, sVarHolder);
|
||||
handler.registerOneTrigger(trig);
|
||||
}
|
||||
|
||||
|
||||
@@ -1119,7 +1119,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
|
||||
clone.setPayCosts(getPayCosts().copy());
|
||||
if (manaPart != null) {
|
||||
clone.manaPart = new AbilityManaPart(this, mapParams);
|
||||
clone.manaPart = new AbilityManaPart(clone, mapParams);
|
||||
}
|
||||
|
||||
// need to copy the damage tables
|
||||
|
||||
@@ -249,7 +249,7 @@ public final class StaticAbilityContinuous {
|
||||
}
|
||||
// two variants for Red vs. red in keyword
|
||||
if (input.contains("ColorsYouCtrl") || input.contains("colorsYouCtrl")) {
|
||||
final ColorSet colorsYouCtrl = CardUtil.getColorsYouCtrl(controller);
|
||||
final ColorSet colorsYouCtrl = CardUtil.getColorsFromCards(controller.getCardsIn(ZoneType.Battlefield));
|
||||
|
||||
for (byte color : colorsYouCtrl) {
|
||||
final String colorWord = MagicColor.toLongString(color);
|
||||
|
||||
@@ -28,9 +28,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Game game = initAndCreateGame();
|
||||
Player p = game.getPlayers().get(1);
|
||||
|
||||
addCard("Plains", p);
|
||||
addCard("Plains", p);
|
||||
addCard("Plains", p);
|
||||
addCards("Plains", 3, p);
|
||||
String heraldCardName = "Herald of Anafenza";
|
||||
Card herald = addCard(heraldCardName, p);
|
||||
herald.setSickness(false);
|
||||
@@ -69,9 +67,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
sliver.setSickness(false);
|
||||
Card herald = addCard(heraldCardName, p);
|
||||
herald.setSickness(false);
|
||||
addCard("Plains", p);
|
||||
addCard("Plains", p);
|
||||
addCard("Plains", p);
|
||||
addCards("Plains", 3, p);
|
||||
addCard("Spear of Heliod", p);
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
@@ -160,8 +156,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Game game = initAndCreateGame();
|
||||
Player p = game.getPlayers().get(1);
|
||||
addCard("Black Knight", p);
|
||||
for (int i = 0; i < 5; i++)
|
||||
addCard("Swamp", p);
|
||||
addCards("Swamp", 5, p);
|
||||
|
||||
String merchantCardName = "Gray Merchant of Asphodel";
|
||||
Card c = addCardToZone(merchantCardName, p, ZoneType.Hand);
|
||||
@@ -614,9 +609,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Game game = initAndCreateGame();
|
||||
Player p = game.getPlayers().get(1);
|
||||
|
||||
addCard("Forest", p);
|
||||
addCard("Forest", p);
|
||||
addCard("Forest", p);
|
||||
addCards("Forest", 3, p);
|
||||
Card callTheScionsCard = addCardToZone("Call the Scions", p, ZoneType.Hand);
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
@@ -692,9 +685,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String broodName = "Brood Monitor";
|
||||
|
||||
// enough to cast Chandra's Ignition
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
addCard("Mountain", p1);
|
||||
}
|
||||
addCards("Mountain", 5, p1);
|
||||
|
||||
Card kalitas = addCard(kalitasName, p1);
|
||||
Card pridemate = addCard(pridemateName, p1);
|
||||
@@ -749,9 +740,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String broodName = "Brood Monitor";
|
||||
|
||||
// enough to cast Chandra's Ignition
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
addCard("Mountain", p1);
|
||||
}
|
||||
addCards("Mountain", 5, p1);
|
||||
|
||||
Card kalitas = addCard(kalitasName, p1);
|
||||
addCard(pridemateName, p1);
|
||||
@@ -808,9 +797,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String palisadeName = "Palisade Giant";
|
||||
|
||||
// enough to cast Chandra's Ignition
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
addCard("Mountain", p1);
|
||||
}
|
||||
addCards("Mountain", 5, p1);
|
||||
|
||||
Card kalitas = addCard(kalitasName, p1);
|
||||
Card pridemate = addCard(pridemateName, p1);
|
||||
@@ -875,9 +862,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String meliraName = "Melira, Sylvok Outcast";
|
||||
|
||||
// enough to cast Cone of Flame
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
addCard("Mountain", p1);
|
||||
}
|
||||
addCards("Mountain", 5, p1);
|
||||
|
||||
addCard(soulfireName, p1);
|
||||
addCard(pridemateName, p1);
|
||||
@@ -890,10 +875,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
|
||||
coneSA.setTargetCard(bearCard); // one damage to bear
|
||||
coneSA.getSubAbility().setTargetCard(giantCard); // two damage to giant
|
||||
coneSA.getSubAbility().getSubAbility().getTargets().add(p2); // three
|
||||
// damage
|
||||
// to
|
||||
// player
|
||||
coneSA.getSubAbility().getSubAbility().getTargets().add(p2); // three damage to player
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p1);
|
||||
game.getAction().checkStateEffects(true);
|
||||
@@ -906,8 +888,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Card simGiant = findCardWithName(simGame, giantCardName);
|
||||
Card simPridemate = findCardWithName(simGame, pridemateName);
|
||||
|
||||
// spell deals multiple damages to multiple targets, only one cause of
|
||||
// lifegain
|
||||
// spell deals multiple damages to multiple targets, only one cause of lifegain
|
||||
AssertJUnit.assertNotNull(simPridemate);
|
||||
AssertJUnit.assertTrue(simPridemate.hasCounters());
|
||||
AssertJUnit.assertEquals(1, simPridemate.getCounters(CounterEnumType.P1P1));
|
||||
@@ -1178,9 +1159,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String bearName = "Runeclaw Bear";
|
||||
String greetingName = "Alchemist's Greeting";
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
addCard("Mountain", p);
|
||||
}
|
||||
addCards("Mountain", 5, p);
|
||||
|
||||
addCard(soulfireName, p);
|
||||
addCard(pridemateName, p);
|
||||
@@ -1243,9 +1222,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String elementalName = "Air Elemental";
|
||||
String shockName = "Shock";
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
addCard("Mountain", p);
|
||||
}
|
||||
addCards("Mountain", 3, p);
|
||||
|
||||
addCard(soulfireName, p);
|
||||
addCard(pridemateName, p);
|
||||
@@ -1340,9 +1317,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
addCardToZone("Kalitas, Traitor of Ghet", p, ZoneType.Battlefield);
|
||||
addCardToZone("Anointed Procession", p, ZoneType.Battlefield);
|
||||
addCardToZone("Swamp", p, ZoneType.Battlefield);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
addCardToZone("Mountain", p, ZoneType.Battlefield);
|
||||
}
|
||||
addCards("Mountain", 4, p);
|
||||
|
||||
Card goblin = addCardToZone("Raging Goblin", opp, ZoneType.Battlefield);
|
||||
Card goblin2 = addCardToZone("Raging Goblin", opp, ZoneType.Battlefield);
|
||||
@@ -1599,9 +1574,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
addCard("Teysa Karlov", p);
|
||||
addCard("Xathrid Necromancer", p);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
addCardToZone("Plains", p, ZoneType.Battlefield);
|
||||
}
|
||||
addCards("Plains", 4, p);
|
||||
|
||||
Card wrathOfGod = addCardToZone("Wrath of God", p, ZoneType.Hand);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p);
|
||||
@@ -1780,10 +1753,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
AssertJUnit.assertFalse(giant.isDoubleFaced());
|
||||
AssertJUnit.assertFalse(giant.canTransform(null));
|
||||
|
||||
addCard("Forest", p);
|
||||
addCard("Forest", p);
|
||||
addCard("Forest", p);
|
||||
addCard("Forest", p);
|
||||
addCards("Forest", 4, p);
|
||||
addCard("Island", p);
|
||||
|
||||
Card cytoCard = addCardToZone("Cytoshape", p, ZoneType.Hand);
|
||||
@@ -1895,12 +1865,8 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Player p = game.getPlayers().get(0);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Plains", p, ZoneType.Battlefield);
|
||||
}
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Island", p, ZoneType.Battlefield);
|
||||
}
|
||||
addCards("Plains", 7, p);
|
||||
addCards("Island", 7, p);
|
||||
|
||||
Card gideon = addCardToZone("Gideon Blackblade", p, ZoneType.Hand);
|
||||
Card sparkDouble = addCardToZone("Spark Double", p, ZoneType.Hand);
|
||||
@@ -1926,15 +1892,9 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Player p = game.getPlayers().get(0);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Plains", p, ZoneType.Battlefield);
|
||||
}
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Island", p, ZoneType.Battlefield);
|
||||
}
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Forest", p, ZoneType.Battlefield);
|
||||
}
|
||||
addCards("Plains", 7, p);
|
||||
addCards("Island", 7, p);
|
||||
addCards("Forest", 7, p);
|
||||
|
||||
Card tgtLand = addCardToZone("Wastes", p, ZoneType.Battlefield);
|
||||
|
||||
@@ -1967,12 +1927,8 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Player p = game.getPlayers().get(0);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Swamp", p, ZoneType.Battlefield);
|
||||
}
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Forest", p, ZoneType.Battlefield);
|
||||
}
|
||||
addCards("Swamp", 7, p);
|
||||
addCards("Forest", 7, p);
|
||||
|
||||
addCardToZone("Basking Rootwalla", p, ZoneType.Graveyard);
|
||||
Card ooze = addCardToZone("Necrotic Ooze", p, ZoneType.Hand);
|
||||
@@ -1996,9 +1952,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Player p = game.getPlayers().get(0);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p);
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
addCardToZone("Swamp", p, ZoneType.Battlefield);
|
||||
}
|
||||
addCards("Swamp", 7, p);
|
||||
|
||||
Card epo = addCardToZone("Epochrasite", p, ZoneType.Graveyard);
|
||||
Card animate = addCardToZone("Animate Dead", p, ZoneType.Hand);
|
||||
@@ -2145,9 +2099,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Card serraAngel = addCardToZone("Serra Angel", p1, ZoneType.Battlefield);
|
||||
Card actOfTreason = addCardToZone("Act of Treason", p0, ZoneType.Hand);
|
||||
Card pathToExile = addCardToZone("Path to Exile", p0, ZoneType.Hand);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
addCardToZone("Plateau", p0, ZoneType.Battlefield);
|
||||
}
|
||||
addCards("Plateau", 4, p0);
|
||||
addCardToZone("Island", p1, ZoneType.Library);
|
||||
addCardToZone("Forest", p0, ZoneType.Library);
|
||||
|
||||
@@ -2182,8 +2134,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
Player p = game.getPlayers().get(0);
|
||||
String WCname = "Woodland Champion";
|
||||
addCard(WCname, p);
|
||||
for (int i = 0; i < 5; i++)
|
||||
addCard("Island", p);
|
||||
addCards("Island", 5, p);
|
||||
|
||||
String CardName = "Eternal Skylord";
|
||||
Card c = addCardToZone(CardName, p, ZoneType.Hand);
|
||||
@@ -2214,8 +2165,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String waywardServant = "Wayward Servant";
|
||||
String goblin = "Raging Goblin";
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
addCard("Swamp", p);
|
||||
addCards("Swamp", 8, p);
|
||||
|
||||
Card cardEverAfter = addCardToZone(everAfter, p, ZoneType.Hand);
|
||||
Card cardWaywardServant = addCardToZone(waywardServant, p, ZoneType.Graveyard);
|
||||
@@ -2296,9 +2246,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
String alphaBrawlName = "Alpha Brawl";
|
||||
|
||||
// enough to cast Alpha Brawl
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
addCard("Mountain", p2);
|
||||
}
|
||||
addCards("Mountain", 8, p2);
|
||||
|
||||
Card nishoba = addCard(nishobaName, p1);
|
||||
nishoba.addCounterInternal(CounterEnumType.P1P1, 7, p1, false, null, null);
|
||||
@@ -2366,10 +2314,9 @@ public class GameSimulationTest extends SimulationTest {
|
||||
|
||||
Card glarecaster = addCard(glarecasterName, p);
|
||||
// enough to activate Glarecaster and cast Inferno
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
addCard("Plains", p);
|
||||
addCard("Mountain", p);
|
||||
}
|
||||
addCards("Plains", 7, p);
|
||||
addCards("Mountain", 7, p);
|
||||
|
||||
Card infernoCard = addCardToZone("Inferno", p, ZoneType.Hand);
|
||||
SpellAbility infernoSA = infernoCard.getFirstSpellAbility();
|
||||
|
||||
@@ -2407,9 +2354,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
addCard(grumName, p);
|
||||
Card mowu = addCardToZone(mowuName, p, ZoneType.Hand);
|
||||
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
addCard("Forest", p);
|
||||
}
|
||||
addCards("Forest", 7, p);
|
||||
SpellAbility mowuSA = mowu.getFirstSpellAbility();
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p);
|
||||
@@ -2437,10 +2382,8 @@ public class GameSimulationTest extends SimulationTest {
|
||||
addCard(grumName, p);
|
||||
Card corpsejack = addCardToZone(corpsejackName, p, ZoneType.Hand);
|
||||
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
addCard("Forest", p);
|
||||
addCard("Swamp", p);
|
||||
}
|
||||
addCards("Forest", 7, p);
|
||||
addCards("Swamp", 7, p);
|
||||
SpellAbility corpsejackSA = corpsejack.getFirstSpellAbility();
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p);
|
||||
@@ -2473,9 +2416,7 @@ public class GameSimulationTest extends SimulationTest {
|
||||
|
||||
Card everAfter = addCardToZone(everAfterName, p, ZoneType.Hand);
|
||||
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
addCard("Swamp", p);
|
||||
}
|
||||
addCards("Swamp", 7, p);
|
||||
SpellAbility everSA = everAfter.getFirstSpellAbility();
|
||||
everSA.getTargets().add(corpsejack);
|
||||
everSA.getTargets().add(mentor);
|
||||
|
||||
@@ -140,7 +140,7 @@ public class SimulationTest {
|
||||
|
||||
protected void addCards(String name, int count, Player p) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
addCardToZone(name, p, ZoneType.Battlefield);
|
||||
addCard(name, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user