mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Fixed Flailing Drake and test.
This commit is contained in:
parent
c996454486
commit
78cff4d24f
3 changed files with 24 additions and 17 deletions
|
@ -38,6 +38,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -56,7 +57,7 @@ public class FlailingDrake extends CardImpl {
|
|||
// Whenever Flailing Drake blocks or becomes blocked by a creature, that creature gets +1/+1 until end of turn.
|
||||
Effect effect = new BoostTargetEffect(+1, +1, Duration.EndOfTurn);
|
||||
effect.setText("that creature gets +1/+1 until end of turn");
|
||||
Ability ability = new BlocksOrBecomesBlockedTriggeredAbility(effect, false);
|
||||
Ability ability = new BlocksOrBecomesBlockedTriggeredAbility(effect, new FilterCreaturePermanent("a creature"), false, null, true);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,47 +9,52 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author anonymous
|
||||
*
|
||||
* Whenever Flailing Drake blocks or becomes blocked by a creature, that creature gets +1/+1 until end of turn.
|
||||
* Whenever Flailing Drake blocks or becomes blocked by a creature, that
|
||||
* creature gets +1/+1 until end of turn.
|
||||
*/
|
||||
public class FlailingDrakeTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testIncreaseBlocker() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Flailing Drake", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
// Flying
|
||||
// Whenever Flailing Drake blocks or becomes blocked by a creature, that creature gets +1/+1 until end of turn.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Flailing Drake", 1); // Creature {3}{G} 2/3
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Snapping Drake", 1); // Creature {3}{U} 3/2
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flailing Drake");
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Snapping Drake");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Snapping Drake", 1);
|
||||
|
||||
attack(3, playerA, "Flailing Drake");
|
||||
block(3, playerB, "Snapping Drake", "Flailing Drake");
|
||||
|
||||
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
|
||||
assertGraveyardCount(playerA, "Flailing Drake", 1);
|
||||
//Snapping Drake 4/3
|
||||
assertPowerToughness(playerB, "Snapping Drake", 4, 3);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testIncreaseBlocked() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Flailing Drake", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Snapping Drake", 1);
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flailing Drake");
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Snapping Drake");
|
||||
|
||||
attack(4, playerB, "Snapping Drake");
|
||||
block(4, playerA, "Flailing Drake", "Snapping Drake");
|
||||
|
||||
setStopAt(4, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
|
||||
assertGraveyardCount(playerA, "Flailing Drake", 1);
|
||||
//Snapping Drake 4/3
|
||||
assertPowerToughness(playerB, "Snapping Drake", 4, 3);
|
||||
|
|
|
@ -57,6 +57,7 @@ public abstract class Watcher implements Serializable {
|
|||
this.controllerId = watcher.controllerId;
|
||||
this.sourceId = watcher.sourceId;
|
||||
this.scope = watcher.scope;
|
||||
this.basicKey = watcher.basicKey;
|
||||
}
|
||||
|
||||
public UUID getControllerId() {
|
||||
|
|
Loading…
Reference in a new issue