mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Tamiyo fixes #2078
This commit is contained in:
parent
966de10386
commit
2ecadbc30b
2 changed files with 35 additions and 12 deletions
|
@ -143,7 +143,7 @@ class TamiyoFieldResearcherEffect1 extends OneShotEffect {
|
|||
creatures.add(new MageObjectReference(uuid, game));
|
||||
}
|
||||
if (!creatures.isEmpty()) {
|
||||
DelayedTriggeredAbility delayedAbility = new TamiyoFieldResearcherDelayedTriggeredAbility(creatures);
|
||||
DelayedTriggeredAbility delayedAbility = new TamiyoFieldResearcherDelayedTriggeredAbility(creatures, game.getTurnNum());
|
||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||
}
|
||||
return true;
|
||||
|
@ -154,16 +154,19 @@ class TamiyoFieldResearcherEffect1 extends OneShotEffect {
|
|||
|
||||
class TamiyoFieldResearcherDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
private int startingTurn;
|
||||
private List<MageObjectReference> creatures;
|
||||
|
||||
public TamiyoFieldResearcherDelayedTriggeredAbility(List<MageObjectReference> creatures) {
|
||||
super(new DrawCardSourceControllerEffect(1), Duration.UntilYourNextTurn, false);
|
||||
public TamiyoFieldResearcherDelayedTriggeredAbility(List<MageObjectReference> creatures, int startingTurn) {
|
||||
super(new DrawCardSourceControllerEffect(1), Duration.Custom, false);
|
||||
this.creatures = creatures;
|
||||
}
|
||||
this.startingTurn = startingTurn;
|
||||
}
|
||||
|
||||
public TamiyoFieldResearcherDelayedTriggeredAbility(final TamiyoFieldResearcherDelayedTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.creatures = ability.creatures;
|
||||
this.startingTurn = ability.startingTurn;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -182,6 +185,11 @@ class TamiyoFieldResearcherDelayedTriggeredAbility extends DelayedTriggeredAbili
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInactive(Game game) {
|
||||
return game.getActivePlayerId().equals(getControllerId()) && game.getTurnNum() != startingTurn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TamiyoFieldResearcherDelayedTriggeredAbility copy() {
|
||||
return new TamiyoFieldResearcherDelayedTriggeredAbility(this);
|
||||
|
|
|
@ -89,9 +89,14 @@ public class TamiyoTest extends CardTestPlayerBase {
|
|||
// Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty
|
||||
// +1: Choose up to two target creatures. Until your next turn,
|
||||
// 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
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tamiyo, Field Researcher");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two");
|
||||
addTarget(playerA, "Bronze Sable");
|
||||
|
||||
|
@ -113,10 +118,15 @@ public class TamiyoTest extends CardTestPlayerBase {
|
|||
// Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty
|
||||
// +1: Choose up to two target creatures. Until your next turn,
|
||||
// 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, "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");
|
||||
addTarget(playerA, "Bronze Sable^Sylvan Advocate");
|
||||
|
||||
|
@ -139,10 +149,15 @@ public class TamiyoTest extends CardTestPlayerBase {
|
|||
// Tamiyo, Field Researcher {1}{G}{W}{U} - 4 loyalty
|
||||
// +1: Choose up to two target creatures. Until your next turn,
|
||||
// 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, playerB, "Memnite", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tamiyo, Field Researcher");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Choose up to two");
|
||||
addTarget(playerA, "Sylvan Advocate");
|
||||
|
||||
|
|
Loading…
Reference in a new issue