mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Clean up (#1978)
This commit is contained in:
@@ -1708,7 +1708,7 @@ public class ComputerUtilCard {
|
|||||||
pumped.addPTBoost(power + berserkPower, toughness, timestamp, 0);
|
pumped.addPTBoost(power + berserkPower, toughness, timestamp, 0);
|
||||||
|
|
||||||
if (!kws.isEmpty()) {
|
if (!kws.isEmpty()) {
|
||||||
pumped.addChangedCardKeywords(kws, null, false, timestamp, 0);
|
pumped.addChangedCardKeywords(kws, null, false, timestamp, 0, false);
|
||||||
}
|
}
|
||||||
if (!hiddenKws.isEmpty()) {
|
if (!hiddenKws.isEmpty()) {
|
||||||
pumped.addHiddenExtrinsicKeywords(timestamp, 0, hiddenKws);
|
pumped.addHiddenExtrinsicKeywords(timestamp, 0, hiddenKws);
|
||||||
@@ -1729,7 +1729,7 @@ public class ComputerUtilCard {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
final long timestamp2 = c.getGame().getNextTimestamp(); //is this necessary or can the timestamp be re-used?
|
final long timestamp2 = c.getGame().getNextTimestamp(); //is this necessary or can the timestamp be re-used?
|
||||||
pumped.addChangedCardKeywordsInternal(toCopy, null, false, timestamp2, 0, true);
|
pumped.addChangedCardKeywordsInternal(toCopy, null, false, timestamp2, 0, false);
|
||||||
applyStaticContPT(ai.getGame(), pumped, new CardCollection(c));
|
applyStaticContPT(ai.getGame(), pumped, new CardCollection(c));
|
||||||
return pumped;
|
return pumped;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ public class ManaCostBeingPaidTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void runConvokeTest(String initialCost, byte[] colorsToPay, String[] expectedRemainder) {
|
private void runConvokeTest(String initialCost, byte[] colorsToPay, String[] expectedRemainder) {
|
||||||
|
|
||||||
ManaCostBeingPaid costBeingPaid = createManaCostBeingPaid(initialCost);
|
ManaCostBeingPaid costBeingPaid = createManaCostBeingPaid(initialCost);
|
||||||
|
|
||||||
for (int i = 0; i < colorsToPay.length; i++) {
|
for (int i = 0; i < colorsToPay.length; i++) {
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ public class SimulationTest {
|
|||||||
private static boolean initialized = false;
|
private static boolean initialized = false;
|
||||||
|
|
||||||
protected Game initAndCreateGame() {
|
protected Game initAndCreateGame() {
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
GuiBase.setInterface(new GuiDesktop());
|
GuiBase.setInterface(new GuiDesktop());
|
||||||
FModel.initialize(null, new Function<ForgePreferences, Void>() {
|
FModel.initialize(null, new Function<ForgePreferences, Void>() {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class ComprehensiveRulesSection103 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_103_7a_first_player_skips_draw_step_of_first_turn() {
|
public void test_103_7a_first_player_skips_draw_step_of_first_turn() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 3 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_2b_effect_may_state_that_player_wins() {
|
public void test_104_2b_effect_may_state_that_player_wins() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
@@ -47,7 +47,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 2 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3b_player_with_zero_life_loses_the_game() {
|
public void test_104_3b_player_with_zero_life_loses_the_game() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
@@ -58,7 +58,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3b_player_with_less_than_zero_life_loses_the_game() {
|
public void test_104_3b_player_with_less_than_zero_life_loses_the_game() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
@@ -69,7 +69,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3b_player_with_less_than_zero_life_loses_the_game_only_when_a_player_receives_priority() {
|
public void test_104_3b_player_with_less_than_zero_life_loses_the_game_only_when_a_player_receives_priority() {
|
||||||
//The Lightning Helix targeting himself theoretically drops him to -1, but he's back up to 2 before he could lose
|
//The Lightning Helix targeting himself theoretically drops him to -1, but he's back up to 2 before he could lose
|
||||||
@@ -88,7 +88,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3b_player_with_less_than_zero_life_loses_the_game_only_when_a_player_receives_priority_variant_with_combat() {
|
public void test_104_3b_player_with_less_than_zero_life_loses_the_game_only_when_a_player_receives_priority_variant_with_combat() {
|
||||||
//Player 2 has 2 life, then takes 3 combat damage but also gains 2 life from lifelink
|
//Player 2 has 2 life, then takes 3 combat damage but also gains 2 life from lifelink
|
||||||
@@ -113,13 +113,13 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3c_player_who_draws_card_with_empty_library_loses() {
|
public void test_104_3c_player_who_draws_card_with_empty_library_loses() {
|
||||||
GameWrapper gameWrapper = new GameWrapper( null, null );
|
GameWrapper gameWrapper = new GameWrapper( null, null );
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 2 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3c_player_who_draws_more_cards_than_library_contains_draw_as_much_as_possible_and_loses() {
|
public void test_104_3c_player_who_draws_more_cards_than_library_contains_draw_as_much_as_possible_and_loses() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
@@ -137,7 +137,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
new CardAssertAction( new CardSpecificationBuilder( "Mountain" ).owner( PlayerSpecification.PLAYER_1 ).hand() )
|
new CardAssertAction( new CardSpecificationBuilder( "Mountain" ).owner( PlayerSpecification.PLAYER_1 ).hand() )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3d_player_with_ten_poison_counters_loses() {
|
public void test_104_3d_player_with_ten_poison_counters_loses() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
@@ -148,7 +148,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3d_player_with_more_than_ten_poison_counters_loses() {
|
public void test_104_3d_player_with_more_than_ten_poison_counters_loses() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
@@ -159,7 +159,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_104_3e_effect_may_state_that_player_loses() {
|
public void test_104_3e_effect_may_state_that_player_loses() {
|
||||||
GameWrapper gameWrapper = new GameWrapper(
|
GameWrapper gameWrapper = new GameWrapper(
|
||||||
@@ -176,7 +176,7 @@ public class ComprehensiveRulesSection104 extends BaseGameSimulationTest {
|
|||||||
);
|
);
|
||||||
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 2 );
|
runGame( gameWrapper, PlayerSpecification.PLAYER_2, 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test( enabled = false )//TODO fails, so disable for now. Note that it seems to really be an issue with Forge and this rule, as commenting out the Laboratory Maniac line below (so there's just a loss, not a win), correctly triggers the loss
|
@Test( enabled = false )//TODO fails, so disable for now. Note that it seems to really be an issue with Forge and this rule, as commenting out the Laboratory Maniac line below (so there's just a loss, not a win), correctly triggers the loss
|
||||||
public void test_104_3f_if_a_player_would_win_and_lose_simultaneously_he_loses() {
|
public void test_104_3f_if_a_player_would_win_and_lose_simultaneously_he_loses() {
|
||||||
/* http://community.wizards.com/content/forum-topic/3199056
|
/* http://community.wizards.com/content/forum-topic/3199056
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class CardSpecification implements Specification<Card> {
|
|||||||
private final PlayerSpecification owner;
|
private final PlayerSpecification owner;
|
||||||
private final PlayerSpecification controller;
|
private final PlayerSpecification controller;
|
||||||
private final CardSpecification target;
|
private final CardSpecification target;
|
||||||
|
|
||||||
/*package-local*/ CardSpecification( final String name, final ZoneType zoneType, final PlayerSpecification owner, final PlayerSpecification controller, final CardSpecification target ) {
|
/*package-local*/ CardSpecification( final String name, final ZoneType zoneType, final PlayerSpecification owner, final PlayerSpecification controller, final CardSpecification target ) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.zoneType = zoneType;
|
this.zoneType = zoneType;
|
||||||
@@ -22,23 +22,23 @@ public class CardSpecification implements Specification<Card> {
|
|||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ZoneType getZoneType() {
|
public ZoneType getZoneType() {
|
||||||
return zoneType;
|
return zoneType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerSpecification getOwner() {
|
public PlayerSpecification getOwner() {
|
||||||
return owner;
|
return owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerSpecification getController() {
|
public PlayerSpecification getController() {
|
||||||
return controller;
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecification getTarget() {
|
public CardSpecification getTarget() {
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,47 +11,47 @@ public class CardSpecificationBuilder {
|
|||||||
private PlayerSpecification owner;
|
private PlayerSpecification owner;
|
||||||
private PlayerSpecification controller;
|
private PlayerSpecification controller;
|
||||||
private CardSpecification target;
|
private CardSpecification target;
|
||||||
|
|
||||||
public CardSpecificationBuilder( final String name ) {
|
public CardSpecificationBuilder( final String name ) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder zone( final ZoneType zoneType ) {
|
public CardSpecificationBuilder zone( final ZoneType zoneType ) {
|
||||||
this.zoneType = zoneType;
|
this.zoneType = zoneType;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder hand() {
|
public CardSpecificationBuilder hand() {
|
||||||
return zone( ZoneType.Hand );
|
return zone( ZoneType.Hand );
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder battlefield() {
|
public CardSpecificationBuilder battlefield() {
|
||||||
return zone( ZoneType.Battlefield );
|
return zone( ZoneType.Battlefield );
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder library() {
|
public CardSpecificationBuilder library() {
|
||||||
return zone( ZoneType.Library );
|
return zone( ZoneType.Library );
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder graveyard() {
|
public CardSpecificationBuilder graveyard() {
|
||||||
return zone( ZoneType.Graveyard );
|
return zone( ZoneType.Graveyard );
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder owner( final PlayerSpecification owner ) {
|
public CardSpecificationBuilder owner( final PlayerSpecification owner ) {
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder controller( final PlayerSpecification controller ) {
|
public CardSpecificationBuilder controller( final PlayerSpecification controller ) {
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecificationBuilder target( final CardSpecification target ) {
|
public CardSpecificationBuilder target( final CardSpecification target ) {
|
||||||
this.target = target;
|
this.target = target;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardSpecification build() {
|
public CardSpecification build() {
|
||||||
if( StringUtils.isBlank( name ) ) {
|
if( StringUtils.isBlank( name ) ) {
|
||||||
throw new IllegalStateException( "Must have a name [" + name + "]" );
|
throw new IllegalStateException( "Must have a name [" + name + "]" );
|
||||||
|
|||||||
@@ -10,16 +10,16 @@ import forge.gamesimulationtests.util.player.PlayerSpecification;
|
|||||||
public class GameStateSpecification {
|
public class GameStateSpecification {
|
||||||
private final List<CardSpecification> cards;
|
private final List<CardSpecification> cards;
|
||||||
private final Map<String,PlayerSpecification> playerFacts;
|
private final Map<String,PlayerSpecification> playerFacts;
|
||||||
|
|
||||||
/*package*protected*/ GameStateSpecification( final List<CardSpecification> cards, final Map<String,PlayerSpecification> playerFacts ) {
|
/*package*protected*/ GameStateSpecification( final List<CardSpecification> cards, final Map<String,PlayerSpecification> playerFacts ) {
|
||||||
this.cards = cards;
|
this.cards = cards;
|
||||||
this.playerFacts = playerFacts;
|
this.playerFacts = playerFacts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<CardSpecification> getCards() {
|
public List<CardSpecification> getCards() {
|
||||||
return cards;
|
return cards;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<PlayerSpecification> getPlayerFacts() {
|
public Collection<PlayerSpecification> getPlayerFacts() {
|
||||||
return playerFacts.values();
|
return playerFacts.values();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,21 +14,21 @@ import forge.gamesimulationtests.util.player.PlayerSpecificationBuilder;
|
|||||||
public class GameStateSpecificationBuilder {
|
public class GameStateSpecificationBuilder {
|
||||||
private final List<CardSpecification> cards;
|
private final List<CardSpecification> cards;
|
||||||
private final Map<String,PlayerSpecification> playerFacts;
|
private final Map<String,PlayerSpecification> playerFacts;
|
||||||
|
|
||||||
public GameStateSpecificationBuilder() {
|
public GameStateSpecificationBuilder() {
|
||||||
cards = new ArrayList<>();
|
cards = new ArrayList<>();
|
||||||
playerFacts = new HashMap<>();
|
playerFacts = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameStateSpecificationBuilder addCard( final CardSpecification cardSpecification ) {
|
public GameStateSpecificationBuilder addCard( final CardSpecification cardSpecification ) {
|
||||||
cards.add( cardSpecification );
|
cards.add( cardSpecification );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameStateSpecificationBuilder addCard( final CardSpecificationBuilder cardSpecification ) {
|
public GameStateSpecificationBuilder addCard( final CardSpecificationBuilder cardSpecification ) {
|
||||||
return addCard( cardSpecification.build() );
|
return addCard( cardSpecification.build() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameStateSpecificationBuilder addPlayerFact( final PlayerSpecification playerSpecification ) {
|
public GameStateSpecificationBuilder addPlayerFact( final PlayerSpecification playerSpecification ) {
|
||||||
if( playerFacts.containsKey( playerSpecification.getName() ) ) {
|
if( playerFacts.containsKey( playerSpecification.getName() ) ) {
|
||||||
throw new IllegalStateException( "If you want to specify multiple things about the same player, do it in 1 call" );
|
throw new IllegalStateException( "If you want to specify multiple things about the same player, do it in 1 call" );
|
||||||
@@ -36,11 +36,11 @@ public class GameStateSpecificationBuilder {
|
|||||||
playerFacts.put( playerSpecification.getName(), playerSpecification );
|
playerFacts.put( playerSpecification.getName(), playerSpecification );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameStateSpecificationBuilder addPlayerFact( final PlayerSpecificationBuilder playerSpecification ) {
|
public GameStateSpecificationBuilder addPlayerFact( final PlayerSpecificationBuilder playerSpecification ) {
|
||||||
return addPlayerFact( playerSpecification.build() );
|
return addPlayerFact( playerSpecification.build() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameStateSpecification build() {
|
public GameStateSpecification build() {
|
||||||
return new GameStateSpecification( Collections.unmodifiableList( cards ), Collections.unmodifiableMap( playerFacts ) );
|
return new GameStateSpecification( Collections.unmodifiableList( cards ), Collections.unmodifiableMap( playerFacts ) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,25 +9,25 @@ public class PlayerSpecification implements Specification<Player> {
|
|||||||
public static final String PLAYER_2_NAME = "Player 2";
|
public static final String PLAYER_2_NAME = "Player 2";
|
||||||
public static final PlayerSpecification PLAYER_1 = PlayerSpecificationBuilder.player1().build();
|
public static final PlayerSpecification PLAYER_1 = PlayerSpecificationBuilder.player1().build();
|
||||||
public static final PlayerSpecification PLAYER_2 = PlayerSpecificationBuilder.player2().build();
|
public static final PlayerSpecification PLAYER_2 = PlayerSpecificationBuilder.player2().build();
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Integer life;
|
private final Integer life;
|
||||||
private final Integer poison;
|
private final Integer poison;
|
||||||
|
|
||||||
/*package-local*/ PlayerSpecification( final String name, final Integer life, final Integer poison ) {
|
/*package-local*/ PlayerSpecification( final String name, final Integer life, final Integer poison ) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.life = life;
|
this.life = life;
|
||||||
this.poison = poison;
|
this.poison = poison;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getLife() {
|
public Integer getLife() {
|
||||||
return life;
|
return life;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getPoison() {
|
public Integer getPoison() {
|
||||||
return poison;
|
return poison;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,29 +6,29 @@ public class PlayerSpecificationBuilder {
|
|||||||
private final String name;
|
private final String name;
|
||||||
private Integer life;
|
private Integer life;
|
||||||
private Integer poison;
|
private Integer poison;
|
||||||
|
|
||||||
public PlayerSpecificationBuilder( final String name ) {
|
public PlayerSpecificationBuilder( final String name ) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlayerSpecificationBuilder player1() {
|
public static PlayerSpecificationBuilder player1() {
|
||||||
return new PlayerSpecificationBuilder( PlayerSpecification.PLAYER_1_NAME );
|
return new PlayerSpecificationBuilder( PlayerSpecification.PLAYER_1_NAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlayerSpecificationBuilder player2() {
|
public static PlayerSpecificationBuilder player2() {
|
||||||
return new PlayerSpecificationBuilder( PlayerSpecification.PLAYER_2_NAME );
|
return new PlayerSpecificationBuilder( PlayerSpecification.PLAYER_2_NAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerSpecificationBuilder life( final Integer life ) {
|
public PlayerSpecificationBuilder life( final Integer life ) {
|
||||||
this.life = life;
|
this.life = life;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerSpecificationBuilder poison( final Integer poison ) {
|
public PlayerSpecificationBuilder poison( final Integer poison ) {
|
||||||
this.poison = poison;
|
this.poison = poison;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerSpecification build() {
|
public PlayerSpecification build() {
|
||||||
if( StringUtils.isBlank( name ) ) {
|
if( StringUtils.isBlank( name ) ) {
|
||||||
throw new IllegalStateException( "Must have a name [" + name + "]" );
|
throw new IllegalStateException( "Must have a name [" + name + "]" );
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import forge.game.phase.PhaseType;
|
|||||||
public class ActionPreCondition {
|
public class ActionPreCondition {
|
||||||
private Integer requiredTurn;
|
private Integer requiredTurn;
|
||||||
private PhaseType requiredPhaseType;
|
private PhaseType requiredPhaseType;
|
||||||
|
|
||||||
public boolean isApplicable( Game game ) {
|
public boolean isApplicable( Game game ) {
|
||||||
if( requiredTurn != null ) {
|
if( requiredTurn != null ) {
|
||||||
if( requiredTurn != game.getPhaseHandler().getTurn() ) {
|
if( requiredTurn != game.getPhaseHandler().getTurn() ) {
|
||||||
@@ -21,12 +21,12 @@ public class ActionPreCondition {
|
|||||||
|
|
||||||
return requiredPhaseType == null || requiredPhaseType == game.getPhaseHandler().getPhase();
|
return requiredPhaseType == null || requiredPhaseType == game.getPhaseHandler().getPhase();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionPreCondition turn( int turn ) {
|
public ActionPreCondition turn( int turn ) {
|
||||||
requiredTurn = turn;
|
requiredTurn = turn;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionPreCondition phase( PhaseType phaseType ) {
|
public ActionPreCondition phase( PhaseType phaseType ) {
|
||||||
requiredPhaseType = phaseType;
|
requiredPhaseType = phaseType;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class ActivateAbilityAction extends BasePlayerAction {
|
|||||||
if( abilities.size() > 1 ) {
|
if( abilities.size() > 1 ) {
|
||||||
throw new IllegalStateException( "Multiple abilities found for " + actualCardWithAbility );
|
throw new IllegalStateException( "Multiple abilities found for " + actualCardWithAbility );
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellAbility ability = abilities.get( 0 );
|
SpellAbility ability = abilities.get( 0 );
|
||||||
game.getStack().add( ability );
|
game.getStack().add( ability );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,19 +6,19 @@ import forge.gamesimulationtests.util.player.PlayerSpecification;
|
|||||||
public abstract class BasePlayerAction {
|
public abstract class BasePlayerAction {
|
||||||
private final PlayerSpecification player;
|
private final PlayerSpecification player;
|
||||||
private ActionPreCondition preCondition;
|
private ActionPreCondition preCondition;
|
||||||
|
|
||||||
protected BasePlayerAction( PlayerSpecification player ) {
|
protected BasePlayerAction( PlayerSpecification player ) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerSpecification getPlayer() {
|
public PlayerSpecification getPlayer() {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isApplicable( Game game ) {
|
public boolean isApplicable( Game game ) {
|
||||||
return preCondition == null || preCondition.isApplicable( game );
|
return preCondition == null || preCondition.isApplicable( game );
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasePlayerAction when( ActionPreCondition preCondition ) {
|
public BasePlayerAction when( ActionPreCondition preCondition ) {
|
||||||
this.preCondition = preCondition;
|
this.preCondition = preCondition;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ import forge.gamesimulationtests.util.player.PlayerSpecification;
|
|||||||
public class DeclareAttackersAction extends BasePlayerAction {
|
public class DeclareAttackersAction extends BasePlayerAction {
|
||||||
private final Map<CardSpecification, PlayerSpecification> playerAttackAssignments;
|
private final Map<CardSpecification, PlayerSpecification> playerAttackAssignments;
|
||||||
private final Map<CardSpecification, CardSpecification> planeswalkerAttackAssignments;
|
private final Map<CardSpecification, CardSpecification> planeswalkerAttackAssignments;
|
||||||
|
|
||||||
public DeclareAttackersAction( PlayerSpecification player ) {
|
public DeclareAttackersAction( PlayerSpecification player ) {
|
||||||
super( player );
|
super( player );
|
||||||
playerAttackAssignments = new HashMap<>();
|
playerAttackAssignments = new HashMap<>();
|
||||||
planeswalkerAttackAssignments = new HashMap<>();
|
planeswalkerAttackAssignments = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attack the only opponent
|
* Attack the only opponent
|
||||||
*/
|
*/
|
||||||
@@ -23,12 +23,12 @@ public class DeclareAttackersAction extends BasePlayerAction {
|
|||||||
playerAttackAssignments.put( attacker, null );
|
playerAttackAssignments.put( attacker, null );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeclareAttackersAction attack( CardSpecification attacker, PlayerSpecification player ) {
|
public DeclareAttackersAction attack( CardSpecification attacker, PlayerSpecification player ) {
|
||||||
playerAttackAssignments.put( attacker, player );
|
playerAttackAssignments.put( attacker, player );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeclareAttackersAction attack( CardSpecification attacker, CardSpecification planeswalker ) {
|
public DeclareAttackersAction attack( CardSpecification attacker, CardSpecification planeswalker ) {
|
||||||
planeswalkerAttackAssignments.put( attacker, planeswalker );
|
planeswalkerAttackAssignments.put( attacker, planeswalker );
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -8,17 +8,17 @@ import forge.gamesimulationtests.util.player.PlayerSpecification;
|
|||||||
|
|
||||||
public class DeclareBlockersAction extends BasePlayerAction {
|
public class DeclareBlockersAction extends BasePlayerAction {
|
||||||
private final Multimap<CardSpecification, CardSpecification> blockingAssignments;
|
private final Multimap<CardSpecification, CardSpecification> blockingAssignments;
|
||||||
|
|
||||||
public DeclareBlockersAction( PlayerSpecification player ) {
|
public DeclareBlockersAction( PlayerSpecification player ) {
|
||||||
super( player );
|
super( player );
|
||||||
blockingAssignments = ArrayListMultimap.create();
|
blockingAssignments = ArrayListMultimap.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeclareBlockersAction block( CardSpecification attacker, CardSpecification blocker ) {
|
public DeclareBlockersAction block( CardSpecification attacker, CardSpecification blocker ) {
|
||||||
blockingAssignments.put( attacker, blocker );
|
blockingAssignments.put( attacker, blocker );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Multimap<CardSpecification, CardSpecification> getBlockingAssignments() {
|
public Multimap<CardSpecification, CardSpecification> getBlockingAssignments() {
|
||||||
return blockingAssignments;
|
return blockingAssignments;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,48 +13,48 @@ import forge.gamesimulationtests.util.playeractions.testactions.TestAction;
|
|||||||
|
|
||||||
public class PlayerActions {
|
public class PlayerActions {
|
||||||
private final List<BasePlayerAction> playerActions;
|
private final List<BasePlayerAction> playerActions;
|
||||||
|
|
||||||
public PlayerActions( List<? extends BasePlayerAction> playerActions ) {
|
public PlayerActions( List<? extends BasePlayerAction> playerActions ) {
|
||||||
this.playerActions = new LinkedList<>(playerActions);
|
this.playerActions = new LinkedList<>(playerActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerActions( BasePlayerAction... basePlayerActions ) {
|
public PlayerActions( BasePlayerAction... basePlayerActions ) {
|
||||||
this( Arrays.asList( basePlayerActions ) );
|
this( Arrays.asList( basePlayerActions ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T> T getNextActionIfApplicable( Player player, Game game, Class<T> actionType ) {
|
public <T> T getNextActionIfApplicable( Player player, Game game, Class<T> actionType ) {
|
||||||
if( playerActions.isEmpty() ) {
|
if( playerActions.isEmpty() ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final BasePlayerAction nextAction = playerActions.get( 0 );
|
final BasePlayerAction nextAction = playerActions.get( 0 );
|
||||||
|
|
||||||
if( nextAction instanceof TestAction && isRightPlayer( player, game, nextAction ) && isApplicable( nextAction, game ) ) {
|
if( nextAction instanceof TestAction && isRightPlayer( player, game, nextAction ) && isApplicable( nextAction, game ) ) {
|
||||||
playerActions.remove( 0 );
|
playerActions.remove( 0 );
|
||||||
( ( TestAction ) nextAction ).perform( game, player );
|
( ( TestAction ) nextAction ).perform( game, player );
|
||||||
return getNextActionIfApplicable( player, game, actionType );
|
return getNextActionIfApplicable( player, game, actionType );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( actionType.isAssignableFrom( nextAction.getClass() ) && isRightPlayer( player, game, nextAction ) && isApplicable( nextAction, game ) ) {
|
if( actionType.isAssignableFrom( nextAction.getClass() ) && isRightPlayer( player, game, nextAction ) && isApplicable( nextAction, game ) ) {
|
||||||
playerActions.remove( 0 );
|
playerActions.remove( 0 );
|
||||||
return ( T ) nextAction;
|
return ( T ) nextAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isApplicable( BasePlayerAction action, Game game ) {
|
private boolean isApplicable( BasePlayerAction action, Game game ) {
|
||||||
return action != null && action.isApplicable( game );
|
return action != null && action.isApplicable( game );
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isRightPlayer( Player player, Game game, BasePlayerAction action ) {
|
private boolean isRightPlayer( Player player, Game game, BasePlayerAction action ) {
|
||||||
return action.getPlayer() == null || player.equals( PlayerSpecificationHandler.INSTANCE.find( game, action.getPlayer() ) );
|
return action.getPlayer() == null || player.equals( PlayerSpecificationHandler.INSTANCE.find( game, action.getPlayer() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return playerActions.isEmpty();
|
return playerActions.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PlayerActions : [" + StringUtils.join( playerActions, ", " ) + "]";
|
return "PlayerActions : [" + StringUtils.join( playerActions, ", " ) + "]";
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ public abstract class AssertAction extends TestAction {
|
|||||||
public AssertAction() {
|
public AssertAction() {
|
||||||
super( null );//AssertActions may be about a player, but they're not really actions taken by a player...
|
super( null );//AssertActions may be about a player, but they're not really actions taken by a player...
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void performAssertion( Game game );
|
public abstract void performAssertion( Game game );
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform( Game game, Player player ) {
|
public void perform( Game game, Player player ) {
|
||||||
performAssertion( game );
|
performAssertion( game );
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import forge.gamesimulationtests.util.card.CardSpecificationHandler;
|
|||||||
|
|
||||||
public class CardAssertAction extends AssertAction {
|
public class CardAssertAction extends AssertAction {
|
||||||
private final CardSpecification cardRequirements;
|
private final CardSpecification cardRequirements;
|
||||||
|
|
||||||
public CardAssertAction( final CardSpecification cardRequirements ) {
|
public CardAssertAction( final CardSpecification cardRequirements ) {
|
||||||
this.cardRequirements = cardRequirements;
|
this.cardRequirements = cardRequirements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardAssertAction( final CardSpecificationBuilder cardRequirements ) {
|
public CardAssertAction( final CardSpecificationBuilder cardRequirements ) {
|
||||||
this( cardRequirements.build() );
|
this( cardRequirements.build() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class EndTestAction extends TestAction {
|
|||||||
public EndTestAction( PlayerSpecification player ) {
|
public EndTestAction( PlayerSpecification player ) {
|
||||||
super( player );
|
super( player );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void endTest( Player player ) {
|
public void endTest( Player player ) {
|
||||||
player.concede();
|
player.concede();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import forge.gamesimulationtests.util.player.PlayerSpecificationHandler;
|
|||||||
|
|
||||||
public class PlayerAssertAction extends AssertAction {
|
public class PlayerAssertAction extends AssertAction {
|
||||||
private final PlayerSpecification playerRequirements;
|
private final PlayerSpecification playerRequirements;
|
||||||
|
|
||||||
public PlayerAssertAction( final PlayerSpecification playerRequirements ) {
|
public PlayerAssertAction( final PlayerSpecification playerRequirements ) {
|
||||||
this.playerRequirements = playerRequirements;
|
this.playerRequirements = playerRequirements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerAssertAction( final PlayerSpecificationBuilder playerRequirements ) {
|
public PlayerAssertAction( final PlayerSpecificationBuilder playerRequirements ) {
|
||||||
this( playerRequirements.build() );
|
this( playerRequirements.build() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ public abstract class TestAction extends BasePlayerAction {
|
|||||||
public TestAction( PlayerSpecification player ) {
|
public TestAction( PlayerSpecification player ) {
|
||||||
super( player );
|
super( player );
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void perform( Game game, Player player );
|
public abstract void perform( Game game, Player player );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class DeckHintsTest {
|
|||||||
void setupTest() {
|
void setupTest() {
|
||||||
GuiBase.setInterface(new GuiDesktop());
|
GuiBase.setInterface(new GuiDesktop());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card test.
|
* Card test.
|
||||||
*/
|
*/
|
||||||
@@ -153,7 +153,6 @@ public class DeckHintsTest {
|
|||||||
Assert.assertEquals(1, hints.filter(list).size());
|
Assert.assertEquals(1, hints.filter(list).size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a CardPrinted from the given filename.
|
* Create a CardPrinted from the given filename.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ Types:Artifact Equipment
|
|||||||
K:Equip:2
|
K:Equip:2
|
||||||
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddToughness$ 2 | AddKeyword$ Infect | Description$ Equipped creature gets +2/+2 and has infect. (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
|
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddToughness$ 2 | AddKeyword$ Infect | Description$ Equipped creature gets +2/+2 and has infect. (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
|
||||||
T:Mode$ Unattach | ValidAttachment$ Card.Self | ValidObject$ Permanent | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME becomes unattached from a permanent, sacrifice that permanent.
|
T:Mode$ Unattach | ValidAttachment$ Card.Self | ValidObject$ Permanent | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME becomes unattached from a permanent, sacrifice that permanent.
|
||||||
SVar:TrigSac:DB$ Sacrifice | Defined$ You | SacValid$ TriggeredObject
|
SVar:TrigSac:DB$ SacrificeAll | Defined$ TriggeredObjectLKICopy | Controller$ You
|
||||||
Oracle:Equipped creature gets +2/+2 and has infect. (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)\nWhenever Grafted Exoskeleton becomes unattached from a permanent, sacrifice that permanent.\nEquip {2}
|
Oracle:Equipped creature gets +2/+2 and has infect. (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)\nWhenever Grafted Exoskeleton becomes unattached from a permanent, sacrifice that permanent.\nEquip {2}
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ Types:Artifact Equipment
|
|||||||
K:Equip:0
|
K:Equip:0
|
||||||
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 3 | AddToughness$ 2 | Description$ Equipped creature gets +3/+2.
|
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 3 | AddToughness$ 2 | Description$ Equipped creature gets +3/+2.
|
||||||
T:Mode$ Unattach | ValidAttachment$ Card.Self | ValidObject$ Permanent | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME becomes unattached from a permanent, sacrifice that permanent.
|
T:Mode$ Unattach | ValidAttachment$ Card.Self | ValidObject$ Permanent | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME becomes unattached from a permanent, sacrifice that permanent.
|
||||||
SVar:TrigSac:DB$ Sacrifice | Defined$ You | SacValid$ TriggeredObject | SacMessage$ equipped permanent
|
SVar:TrigSac:DB$ SacrificeAll | Defined$ TriggeredObjectLKICopy | Controller$ You
|
||||||
Oracle:Equipped creature gets +3/+2.\nWhenever Grafted Wargear becomes unattached from a permanent, sacrifice that permanent.\nEquip {0} ({0}: Attach to target creature you control. Equip only as a sorcery.)
|
Oracle:Equipped creature gets +3/+2.\nWhenever Grafted Wargear becomes unattached from a permanent, sacrifice that permanent.\nEquip {0} ({0}: Attach to target creature you control. Equip only as a sorcery.)
|
||||||
|
|||||||
@@ -7,12 +7,11 @@ SVar:TrigPump:DB$ Pump | RememberObjects$ TriggeredCard
|
|||||||
T:Mode$ ChangesZone | Origin$ Graveyard | Destination$ Any | ValidCard$ Card.IsRemembered | TriggerZones$ Battlefield | Execute$ LoseTrack | Static$ True
|
T:Mode$ ChangesZone | Origin$ Graveyard | Destination$ Any | ValidCard$ Card.IsRemembered | TriggerZones$ Battlefield | Execute$ LoseTrack | Static$ True
|
||||||
SVar:LoseTrack:DB$ Pump | ForgetObjects$ TriggeredCard
|
SVar:LoseTrack:DB$ Pump | ForgetObjects$ TriggeredCard
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ DBCleanup | Static$ True
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ DBCleanup | Static$ True
|
||||||
T:Mode$ ChangesController | ValidCard$ Card.Self | Execute$ DBCleanup | Static$ True
|
|
||||||
T:Mode$ TurnBegin | Execute$ DBCleanup2 | Static$ True
|
T:Mode$ TurnBegin | Execute$ DBCleanup2 | Static$ True
|
||||||
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ GE1 | IsPresent$ Card.Self | Execute$ TrigChange | TriggerDescription$ At the beginning of each end step, if a creature dealt damage by CARDNAME this turn died, put that card onto the battlefield under your control. Sacrifice it when you lose control of CARDNAME.
|
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ GE1 | IsPresent$ Card.Self | Execute$ TrigChange | TriggerDescription$ At the beginning of each end step, if a creature dealt damage by CARDNAME this turn died, put that card onto the battlefield under your control. Sacrifice it when you lose control of CARDNAME.
|
||||||
SVar:TrigChange:DB$ ChangeZoneAll | ChangeType$ Creature.IsRemembered+ThisTurnEnteredFrom_Battlefield | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | RememberChanged$ True | ForgetOtherRemembered$ True | SubAbility$ TrigDelay
|
SVar:TrigChange:DB$ ChangeZoneAll | ChangeType$ Creature.IsRemembered+ThisTurnEnteredFrom_Battlefield | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | RememberChanged$ True | ForgetOtherRemembered$ True | SubAbility$ TrigDelay
|
||||||
SVar:TrigDelay:DB$ DelayedTrigger | Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | RememberObjects$ Remembered | Execute$ TrigSac | Secondary$ True | SubAbility$ TrigDelay2 | SpellDescription$ Sacrifice it when you lose control of CARDNAME.
|
SVar:TrigDelay:DB$ DelayedTrigger | Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.StrictlySelf | RememberObjects$ RememberedLKI | Execute$ TrigSac | SubAbility$ TrigDelay2 | SpellDescription$ Sacrifice it when you lose control of CARDNAME.
|
||||||
SVar:TrigDelay2:DB$ DelayedTrigger | Mode$ ChangesController | ValidCard$ Card.Self | RememberObjects$ Remembered | Execute$ TrigSac | Secondary$ True | SubAbility$ DBCleanup2 | SpellDescription$ Sacrifice it when you lose control of CARDNAME.
|
SVar:TrigDelay2:DB$ DelayedTrigger | Mode$ ChangesController | ValidCard$ Card.StrictlySelf | ValidOriginalController$ You | RememberObjects$ RememberedLKI | Execute$ TrigSac | SubAbility$ DBCleanup2 | SpellDescription$ Sacrifice it when you lose control of CARDNAME.
|
||||||
SVar:TrigSac:DB$ SacrificeAll | Defined$ DelayTriggerRememberedLKI | Controller$ You
|
SVar:TrigSac:DB$ SacrificeAll | Defined$ DelayTriggerRememberedLKI | Controller$ You
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearTriggered$ True | SubAbility$ DBCleanup2
|
SVar:DBCleanup:DB$ Cleanup | ClearTriggered$ True | SubAbility$ DBCleanup2
|
||||||
SVar:DBCleanup2:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup2:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ ManaCost:6 W
|
|||||||
Types:Creature Angel
|
Types:Creature Angel
|
||||||
PT:4/4
|
PT:4/4
|
||||||
K:Flying
|
K:Flying
|
||||||
T:Mode$ ChangesZone | ValidCard$ Creature.DamagedBy | Origin$ Battlefield | Destination$ Graveyard | Execute$ DelTrigReturn | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature dealt damage by CARDNAME this turn dies, put that card onto the battlefield under your control at the beginning of the next end step.
|
T:Mode$ ChangesZone | ValidCard$ Creature.DamagedBy | Origin$ Battlefield | Destination$ Graveyard | Execute$ DelTrigReturn | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature dealt damage by CARDNAME this turn dies, put that card onto the battlefield under your control at the beginning of the next end step. Sacrifice the creature when you lose control of CARDNAME.
|
||||||
SVar:DelTrigReturn:DB$ DelayedTrigger | Mode$ Phase | Phase$ End Of Turn | Execute$ DBReturn | RememberObjects$ TriggeredNewCardLKICopy | TriggerDescription$ Return that card to the battlefield at the beginning of the next end step.
|
SVar:DelTrigReturn:DB$ DelayedTrigger | Mode$ Phase | Phase$ End Of Turn | Execute$ DBReturn | RememberObjects$ TriggeredNewCardLKICopy | TriggerDescription$ Return that card to the battlefield at the beginning of the next end step.
|
||||||
SVar:DBReturn:DB$ ChangeZone | Defined$ DelayTriggerRememberedLKI | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | RememberChanged$ True
|
SVar:DBReturn:DB$ ChangeZone | Defined$ DelayTriggerRememberedLKI | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | RememberChanged$ True | SubAbility$ TrigDelay
|
||||||
#TODO make the sacrifice part as another delayed Trigger
|
SVar:TrigDelay:DB$ DelayedTrigger | Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.StrictlySelf | RememberObjects$ RememberedLKI | Execute$ TrigSac | SubAbility$ TrigDelay2 | SpellDescription$ Sacrifice the creature when you lose control of CARDNAME.
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered | Execute$ DBForget
|
SVar:TrigDelay2:DB$ DelayedTrigger | Mode$ ChangesController | ValidCard$ Card.StrictlySelf | ValidOriginalController$ You | RememberObjects$ RememberedLKI | Execute$ TrigSac | SubAbility$ DBCleanup | SpellDescription$ Sacrifice the creature when you lose control of CARDNAME.
|
||||||
SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
|
SVar:TrigSac:DB$ SacrificeAll | Defined$ DelayTriggerRememberedLKI | Controller$ You | SubAbility$ DBCleanup2
|
||||||
T:Mode$ ChangesController | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ Sacrifice | TriggerDescription$ Sacrifice the creature when you lose control of CARDNAME.
|
|
||||||
SVar:Sacrifice:DB$ SacrificeAll | ValidCards$ Card.IsRemembered | Controller$ You | SubAbility$ DBCleanup
|
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
SVar:DBCleanup2:DB$ Cleanup | ClearTriggered$ True
|
||||||
Oracle:Flying\nWhenever a creature dealt damage by Seraph this turn dies, put that card onto the battlefield under your control at the beginning of the next end step. Sacrifice the creature when you lose control of Seraph.
|
Oracle:Flying\nWhenever a creature dealt damage by Seraph this turn dies, put that card onto the battlefield under your control at the beginning of the next end step. Sacrifice the creature when you lose control of Seraph.
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 3 | AddToughness$
|
|||||||
T:Mode$ Attacks | ValidCard$ Card.EquippedBy | Execute$ StayTapped | TriggerDescription$ Whenever equipped creature attacks, it doesn't untap during its controller's next untap step.
|
T:Mode$ Attacks | ValidCard$ Card.EquippedBy | Execute$ StayTapped | TriggerDescription$ Whenever equipped creature attacks, it doesn't untap during its controller's next untap step.
|
||||||
SVar:StayTapped:DB$ Pump | KW$ HIDDEN This card doesn't untap during your next untap step. | Defined$ TriggeredAttackerLKICopy | Duration$ Permanent
|
SVar:StayTapped:DB$ Pump | KW$ HIDDEN This card doesn't untap during your next untap step. | Defined$ TriggeredAttackerLKICopy | Duration$ Permanent
|
||||||
T:Mode$ Unattach | ValidAttachment$ Card.Self | ValidObject$ Permanent | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME becomes unattached from a permanent, sacrifice that permanent.
|
T:Mode$ Unattach | ValidAttachment$ Card.Self | ValidObject$ Permanent | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME becomes unattached from a permanent, sacrifice that permanent.
|
||||||
SVar:TrigSac:DB$ Sacrifice | Defined$ You | SacValid$ TriggeredObject
|
SVar:TrigSac:DB$ SacrificeAll | Defined$ TriggeredObjectLKICopy | Controller$ You
|
||||||
K:Equip:2
|
K:Equip:2
|
||||||
Oracle:Equipped creature gets +3/+3.\nWhenever equipped creature attacks, it doesn't untap during its controller's next untap step.\nWhenever Stitcher's Graft becomes unattached from a permanent, sacrifice that permanent.\nEquip {2}
|
Oracle:Equipped creature gets +3/+3.\nWhenever equipped creature attacks, it doesn't untap during its controller's next untap step.\nWhenever Stitcher's Graft becomes unattached from a permanent, sacrifice that permanent.\nEquip {2}
|
||||||
|
|||||||
Reference in New Issue
Block a user