Replace checktype enum for Cardtype enum

This commit is contained in:
ingmargoudt 2017-03-05 20:04:09 +01:00
parent 59d0262943
commit 80580d69e9
3 changed files with 13 additions and 20 deletions

View file

@ -48,10 +48,7 @@ import mage.players.Player;
import java.util.UUID;
import static mage.abilities.condition.common.TopLibraryCardTypeCondition.CheckType.CREATURE;
/**
*
* @author jeffwadsworth
*/
public class CrownOfConvergence extends CardImpl {
@ -65,7 +62,7 @@ public class CrownOfConvergence extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect()));
// As long as the top card of your library is a creature card, creatures you control that share a color with that card get +1/+1.
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new CrownOfConvergenceColorBoostEffect(), new TopLibraryCardTypeCondition(CREATURE), rule1);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new CrownOfConvergenceColorBoostEffect(), new TopLibraryCardTypeCondition(CardType.CREATURE), rule1);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// {G}{W}: Put the top card of your library on the bottom of your library.

View file

@ -72,13 +72,13 @@ public class MulDayaChannelers extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect()));
// As long as the top card of your library is a creature card, Mul Daya Channelers gets +3/+3.
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new TopLibraryCardTypeCondition(TopLibraryCardTypeCondition.CheckType.CREATURE), rule1);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new TopLibraryCardTypeCondition(CardType.CREATURE), rule1);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// As long as the top card of your library is a land card, Mul Daya Channelers has "T: Add two mana of any one color to your mana pool."
SimpleManaAbility manaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost());
effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(manaAbility, Duration.WhileOnBattlefield),
new TopLibraryCardTypeCondition(TopLibraryCardTypeCondition.CheckType.LAND),
new TopLibraryCardTypeCondition(CardType.LAND),
"As long as the top card of your library is a land card, Mul Daya Channelers has \"{T}: Add two mana of any one color to your mana pool.\"");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

View file

@ -39,13 +39,9 @@ import mage.players.Player;
*/
public class TopLibraryCardTypeCondition implements Condition {
public enum CheckType {
CREATURE, LAND, SORCERY, INSTANT
}
private CardType type;
private CheckType type;
public TopLibraryCardTypeCondition(CheckType type) {
public TopLibraryCardTypeCondition(CardType type) {
this.type = type;
}