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

GatekeeperOfMalakir kicker test. Fails.

This commit is contained in:
magenoxx 2012-05-03 18:21:30 +04:00
parent 03da0bb557
commit 80a25377b5
6 changed files with 46 additions and 10 deletions
Mage.Client/src/main/resources
Mage.Sets/src/mage/sets/zendikar
Mage.Tests/src/test/java/org/mage/test
Mage/src/mage
abilities/decorator
game/permanent/token

View file

@ -1,3 +1,14 @@
|Generate|TOK:AVR|Angel|
|Generate|TOK:AVR|Human|
|Generate|TOK:AVR|Spirit 1|
|Generate|TOK:AVR|Spirit 2|
|Generate|TOK:AVR|Demon|
|Generate|TOK:AVR|Zombie|
|Generate|TOK:AVR|Human 2|
|Generate|TOK:DKA|Human|
|Generate|TOK:DKA|Vampire|
|Generate|TOK:ISD|Angel|
|Generate|TOK:ISD|Spirit|
|Generate|TOK:ISD|Homunculus|

View file

@ -27,24 +27,21 @@
*/
package mage.sets.zendikar;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.costs.mana.KickerManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author maurer.it_at_gmail.com

View file

@ -1,4 +1,4 @@
package org.mage.test.cards.usedbyai;
package org.mage.test.ai;
import junit.framework.Assert;
import mage.Constants;

View file

@ -0,0 +1,32 @@
package org.mage.test.cards.cost.kicker;
import mage.Constants;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* @author noxx
*/
public class GatekeeperOfMalakirTest extends CardTestPlayerBase {
@Test
public void testCard() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Swamp", 3);
addCard(Constants.Zone.HAND, playerA, "Gatekeeper of Malakir");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Gatekeeper of Malakir");
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertPermanentCount(playerA, "Gatekeeper of Malakir", 1);
assertPermanentCount(playerB, "Llanowar Elves", 0);
assertGraveyardCount(playerB, 1);
}
}

View file

@ -3,7 +3,6 @@ package mage.abilities.decorator;
import mage.abilities.TriggeredAbility;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.condition.Condition;
import mage.abilities.effects.ContinuousEffect;
import mage.game.Game;
import mage.game.events.GameEvent;
@ -44,8 +43,6 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
ability.setControllerId(this.getControllerId());
if (ability.checkTrigger(event, game)) {
if (condition.apply(game, this)) {
getTargets().clear();
getTargets().addAll(ability.getTargets());
return true;
}
}

View file

@ -41,5 +41,4 @@ public class SpiritToken extends Token {
power = new MageInt(1);
toughness = new MageInt(1);
}
}