mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Merge origin/master
This commit is contained in:
commit
aa73fd15bd
2 changed files with 10 additions and 6 deletions
|
@ -56,8 +56,6 @@ public class DryadMilitant extends CardImpl {
|
|||
this.subtype.add("Dryad");
|
||||
this.subtype.add("Soldier");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
|
@ -108,9 +106,14 @@ class DryadMilitantReplacementEffect extends ReplacementEffectImpl {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD) {
|
||||
if (((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null && (card.getCardType().contains(CardType.SORCERY) || card.getCardType().contains(CardType.INSTANT))) {
|
||||
return true;
|
||||
|
|
|
@ -80,12 +80,12 @@ public class DryadMilitantTest extends CardTestPlayerBase {
|
|||
|
||||
/**
|
||||
* Tests if Dryad Militant dies by damage spell, the
|
||||
* spell don't gets exiled
|
||||
* spell don't get exiled
|
||||
*/
|
||||
@Test
|
||||
public void testDiesByDestroy() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
addCard(Zone.HAND, playerA, "Terminate");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Dryad Militant");
|
||||
|
||||
|
@ -95,7 +95,8 @@ public class DryadMilitantTest extends CardTestPlayerBase {
|
|||
execute();
|
||||
|
||||
assertLife(playerB, 20);
|
||||
|
||||
|
||||
assertHandCount(playerA, "Terminate", 0);
|
||||
assertGraveyardCount(playerB, "Terminate", 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue