1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-03 17:00:16 -09:00

Tamiyo fixes

This commit is contained in:
drmDev 2016-07-15 21:15:04 -04:00
parent 966de10386
commit 2ecadbc30b
2 changed files with 35 additions and 12 deletions
Mage.Sets/src/mage/sets/eldritchmoon
Mage.Tests/src/test/java/org/mage/test/cards/planeswalker

View file

@ -143,7 +143,7 @@ class TamiyoFieldResearcherEffect1 extends OneShotEffect {
creatures.add(new MageObjectReference(uuid, game)); creatures.add(new MageObjectReference(uuid, game));
} }
if (!creatures.isEmpty()) { if (!creatures.isEmpty()) {
DelayedTriggeredAbility delayedAbility = new TamiyoFieldResearcherDelayedTriggeredAbility(creatures); DelayedTriggeredAbility delayedAbility = new TamiyoFieldResearcherDelayedTriggeredAbility(creatures, game.getTurnNum());
game.addDelayedTriggeredAbility(delayedAbility, source); game.addDelayedTriggeredAbility(delayedAbility, source);
} }
return true; return true;
@ -153,17 +153,20 @@ class TamiyoFieldResearcherEffect1 extends OneShotEffect {
} }
class TamiyoFieldResearcherDelayedTriggeredAbility extends DelayedTriggeredAbility { class TamiyoFieldResearcherDelayedTriggeredAbility extends DelayedTriggeredAbility {
private int startingTurn;
private List<MageObjectReference> creatures; private List<MageObjectReference> creatures;
public TamiyoFieldResearcherDelayedTriggeredAbility(List<MageObjectReference> creatures) { public TamiyoFieldResearcherDelayedTriggeredAbility(List<MageObjectReference> creatures, int startingTurn) {
super(new DrawCardSourceControllerEffect(1), Duration.UntilYourNextTurn, false); super(new DrawCardSourceControllerEffect(1), Duration.Custom, false);
this.creatures = creatures; this.creatures = creatures;
} this.startingTurn = startingTurn;
}
public TamiyoFieldResearcherDelayedTriggeredAbility(final TamiyoFieldResearcherDelayedTriggeredAbility ability) { public TamiyoFieldResearcherDelayedTriggeredAbility(final TamiyoFieldResearcherDelayedTriggeredAbility ability) {
super(ability); super(ability);
this.creatures = ability.creatures; this.creatures = ability.creatures;
this.startingTurn = ability.startingTurn;
} }
@Override @Override
@ -181,6 +184,11 @@ class TamiyoFieldResearcherDelayedTriggeredAbility extends DelayedTriggeredAbili
} }
return false; return false;
} }
@Override
public boolean isInactive(Game game) {
return game.getActivePlayerId().equals(getControllerId()) && game.getTurnNum() != startingTurn;
}
@Override @Override
public TamiyoFieldResearcherDelayedTriggeredAbility copy() { public TamiyoFieldResearcherDelayedTriggeredAbility copy() {

View file

@ -89,9 +89,14 @@ public class TamiyoTest extends CardTestPlayerBase {
// Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty // Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty
// +1: Choose up to two target creatures. Until your next turn, // +1: Choose up to two target creatures. Until your next turn,
// whenever either of those creatures deals combat damage, you draw a card. // whenever either of those creatures deals combat damage, you draw a card.
addCard(Zone.BATTLEFIELD, playerA, "Tamiyo, Field Researcher", 1); addCard(Zone.HAND, playerA, "Tamiyo, Field Researcher", 1);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
addCard(Zone.BATTLEFIELD, playerA, "Bronze Sable", 1); // 2/1 addCard(Zone.BATTLEFIELD, playerA, "Bronze Sable", 1); // 2/1
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tamiyo, Field Researcher");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two");
addTarget(playerA, "Bronze Sable"); addTarget(playerA, "Bronze Sable");
@ -113,10 +118,15 @@ public class TamiyoTest extends CardTestPlayerBase {
// Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty // Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty
// +1: Choose up to two target creatures. Until your next turn, // +1: Choose up to two target creatures. Until your next turn,
// whenever either of those creatures deals combat damage, you draw a card. // whenever either of those creatures deals combat damage, you draw a card.
addCard(Zone.BATTLEFIELD, playerA, "Tamiyo, Field Researcher", 1); addCard(Zone.HAND, playerA, "Tamiyo, Field Researcher", 1);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
addCard(Zone.BATTLEFIELD, playerA, "Bronze Sable", 1); // 2/1 addCard(Zone.BATTLEFIELD, playerA, "Bronze Sable", 1); // 2/1
addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // 2/3 addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // 2/3
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tamiyo, Field Researcher");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two");
addTarget(playerA, "Bronze Sable^Sylvan Advocate"); addTarget(playerA, "Bronze Sable^Sylvan Advocate");
@ -139,10 +149,15 @@ public class TamiyoTest extends CardTestPlayerBase {
// Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty // Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty
// +1: Choose up to two target creatures. Until your next turn, // +1: Choose up to two target creatures. Until your next turn,
// whenever either of those creatures deals combat damage, you draw a card. // whenever either of those creatures deals combat damage, you draw a card.
addCard(Zone.BATTLEFIELD, playerA, "Tamiyo, Field Researcher", 1); addCard(Zone.HAND, playerA, "Tamiyo, Field Researcher", 1);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // 2/3 addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // 2/3
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1); addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tamiyo, Field Researcher");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two");
addTarget(playerA, "Sylvan Advocate"); addTarget(playerA, "Sylvan Advocate");
@ -172,7 +187,7 @@ public class TamiyoTest extends CardTestPlayerBase {
addCard(Zone.HAND, playerA, "Tamiyo, Field Researcher", 1); addCard(Zone.HAND, playerA, "Tamiyo, Field Researcher", 1);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
addCard(Zone.BATTLEFIELD, playerA, "Island", 2); addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // 2/3 addCard(Zone.BATTLEFIELD, playerA, "Sylvan Advocate", 1); // 2/3
addCard(Zone.HAND, playerB, "Hero's Downfall", 1); addCard(Zone.HAND, playerB, "Hero's Downfall", 1);