mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
7805d22de6
38 changed files with 2636 additions and 354 deletions
|
@ -13,6 +13,9 @@ import javax.swing.JMenuItem;
|
|||
import javax.swing.JPopupMenu;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.sets.avacynrestored.GuiseOfFire;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.mage.card.arcane.CardRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -140,10 +143,14 @@ public class GUISizeHelper {
|
|||
|
||||
int otherZonesCardSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_OTHER_ZONES_SIZE, 14);
|
||||
otherZonesCardDimension = new Dimension(CARD_IMAGE_WIDTH * otherZonesCardSize / 42, CARD_IMAGE_HEIGHT * otherZonesCardSize / 42);
|
||||
if (otherZonesCardSize > 29) {
|
||||
otherZonesCardVerticalOffset = otherZonesCardDimension.height / 8;
|
||||
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_FALLBACK, "false").equals("false")) {
|
||||
otherZonesCardVerticalOffset = CardRenderer.getCardTopHeight(otherZonesCardDimension.width);
|
||||
} else {
|
||||
otherZonesCardVerticalOffset = otherZonesCardDimension.height / 10;
|
||||
if (otherZonesCardSize > 29) {
|
||||
otherZonesCardVerticalOffset = otherZonesCardDimension.height / 8;
|
||||
} else {
|
||||
otherZonesCardVerticalOffset = otherZonesCardDimension.height / 10;
|
||||
}
|
||||
}
|
||||
|
||||
int battlefieldCardMinSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_BATTLEFIELD_MIN_SIZE, 10);
|
||||
|
@ -153,7 +160,11 @@ public class GUISizeHelper {
|
|||
|
||||
int editorCardSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_EDITOR_SIZE, 14);
|
||||
editorCardDimension = new Dimension(CARD_IMAGE_WIDTH * editorCardSize / 42, CARD_IMAGE_HEIGHT * editorCardSize / 42);
|
||||
editorCardOffsetSize = 2 * PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_OFFSET_SIZE, 14) - 10;
|
||||
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_FALLBACK, "false").equals("false")) {
|
||||
editorCardOffsetSize = CardRenderer.getCardTopHeight(editorCardDimension.width);
|
||||
} else {
|
||||
editorCardOffsetSize = 2 * PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_OFFSET_SIZE, 14) - 10;
|
||||
}
|
||||
|
||||
enlargedImageHeight = 25 * PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_ENLARGED_IMAGE_SIZE, 20);
|
||||
}
|
||||
|
|
|
@ -398,8 +398,9 @@ public class CardPanelRenderImpl extends CardPanel {
|
|||
public void setSelected(boolean selected) {
|
||||
if (selected != isSelected()) {
|
||||
super.setSelected(selected);
|
||||
// Invalidate our render
|
||||
// Invalidate our render and trigger a repaint
|
||||
cardImage = null;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,8 +408,9 @@ public class CardPanelRenderImpl extends CardPanel {
|
|||
public void setChoosable(boolean choosable) {
|
||||
if (choosable != isChoosable()) {
|
||||
super.setChoosable(choosable);
|
||||
// Invalidate our render
|
||||
// Invalidate our render and trigger a repaint
|
||||
cardImage = null;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -149,6 +149,12 @@ public abstract class CardRenderer {
|
|||
}
|
||||
}
|
||||
|
||||
private static int getBorderWidth(int cardWidth) {
|
||||
return (int) Math.max(
|
||||
BORDER_WIDTH_MIN,
|
||||
BORDER_WIDTH_FRAC * cardWidth);
|
||||
}
|
||||
|
||||
// Layout operation
|
||||
// Calculate common layout metrics that will be used by several
|
||||
// of the operations in the template method.
|
||||
|
@ -162,9 +168,26 @@ public abstract class CardRenderer {
|
|||
CORNER_RADIUS_MIN,
|
||||
CORNER_RADIUS_FRAC * cardWidth);
|
||||
|
||||
borderWidth = (int) Math.max(
|
||||
BORDER_WIDTH_MIN,
|
||||
BORDER_WIDTH_FRAC * cardWidth);
|
||||
borderWidth = getBorderWidth(cardWidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* How far does a card have to be spaced down from
|
||||
* a rendered card to show it's entire name line?
|
||||
* This function is a bit of a hack, as different card faces need
|
||||
* slightly different spacing, but we need it in a static context
|
||||
* so that spacing is consistent in GY / deck views etc.
|
||||
* @return
|
||||
*/
|
||||
public static int getCardTopHeight(int cardWidth) {
|
||||
// Constants copied over from ModernCardRenderer and tweaked
|
||||
float BOX_HEIGHT_FRAC = 0.065f; // x cardHeight
|
||||
int BOX_HEIGHT_MIN = 16;
|
||||
int boxHeight = (int) Math.max(
|
||||
BOX_HEIGHT_MIN,
|
||||
BOX_HEIGHT_FRAC * cardWidth * 1.4f);
|
||||
int borderWidth = getBorderWidth(cardWidth);
|
||||
return 2*borderWidth + boxHeight;
|
||||
}
|
||||
|
||||
// The Draw Method
|
||||
|
|
|
@ -156,123 +156,123 @@ public class GameController implements GameCallback {
|
|||
private void init() {
|
||||
game.addTableEventListener(
|
||||
new Listener<TableEvent>() {
|
||||
@Override
|
||||
public void event(TableEvent event) {
|
||||
try {
|
||||
PriorityTimer timer;
|
||||
UUID playerId;
|
||||
switch (event.getEventType()) {
|
||||
case UPDATE:
|
||||
updateGame();
|
||||
break;
|
||||
case INFO:
|
||||
ChatManager.getInstance().broadcast(chatId, "", event.getMessage(), MessageColor.BLACK, true, ChatMessage.MessageType.GAME);
|
||||
logger.trace(game.getId() + " " + event.getMessage());
|
||||
break;
|
||||
case STATUS:
|
||||
ChatManager.getInstance().broadcast(chatId, "", event.getMessage(), MessageColor.ORANGE, event.getWithTime(), ChatMessage.MessageType.GAME);
|
||||
logger.trace(game.getId() + " " + event.getMessage());
|
||||
break;
|
||||
case ERROR:
|
||||
error(event.getMessage(), event.getException());
|
||||
break;
|
||||
case END_GAME_INFO:
|
||||
endGameInfo();
|
||||
break;
|
||||
case INIT_TIMER:
|
||||
final UUID initPlayerId = event.getPlayerId();
|
||||
if (initPlayerId == null) {
|
||||
throw new MageException("INIT_TIMER: playerId can't be null");
|
||||
}
|
||||
createPlayerTimer(event.getPlayerId(), game.getPriorityTime());
|
||||
break;
|
||||
case RESUME_TIMER:
|
||||
playerId = event.getPlayerId();
|
||||
if (playerId == null) {
|
||||
throw new MageException("RESUME_TIMER: playerId can't be null");
|
||||
}
|
||||
timer = timers.get(playerId);
|
||||
if (timer == null) {
|
||||
Player player = game.getState().getPlayer(playerId);
|
||||
if (player != null) {
|
||||
timer = createPlayerTimer(event.getPlayerId(), player.getPriorityTimeLeft());
|
||||
} else {
|
||||
throw new MageException("RESUME_TIMER: player can't be null");
|
||||
}
|
||||
}
|
||||
timer.resume();
|
||||
break;
|
||||
case PAUSE_TIMER:
|
||||
playerId = event.getPlayerId();
|
||||
if (playerId == null) {
|
||||
throw new MageException("PAUSE_TIMER: playerId can't be null");
|
||||
}
|
||||
timer = timers.get(playerId);
|
||||
if (timer == null) {
|
||||
throw new MageException("PAUSE_TIMER: couldn't find timer for player: " + playerId);
|
||||
}
|
||||
timer.pause();
|
||||
break;
|
||||
@Override
|
||||
public void event(TableEvent event) {
|
||||
try {
|
||||
PriorityTimer timer;
|
||||
UUID playerId;
|
||||
switch (event.getEventType()) {
|
||||
case UPDATE:
|
||||
updateGame();
|
||||
break;
|
||||
case INFO:
|
||||
ChatManager.getInstance().broadcast(chatId, "", event.getMessage(), MessageColor.BLACK, true, ChatMessage.MessageType.GAME);
|
||||
logger.trace(game.getId() + " " + event.getMessage());
|
||||
break;
|
||||
case STATUS:
|
||||
ChatManager.getInstance().broadcast(chatId, "", event.getMessage(), MessageColor.ORANGE, event.getWithTime(), ChatMessage.MessageType.GAME);
|
||||
logger.trace(game.getId() + " " + event.getMessage());
|
||||
break;
|
||||
case ERROR:
|
||||
error(event.getMessage(), event.getException());
|
||||
break;
|
||||
case END_GAME_INFO:
|
||||
endGameInfo();
|
||||
break;
|
||||
case INIT_TIMER:
|
||||
final UUID initPlayerId = event.getPlayerId();
|
||||
if (initPlayerId == null) {
|
||||
throw new MageException("INIT_TIMER: playerId can't be null");
|
||||
}
|
||||
} catch (MageException ex) {
|
||||
logger.fatal("Table event listener error ", ex);
|
||||
}
|
||||
createPlayerTimer(event.getPlayerId(), game.getPriorityTime());
|
||||
break;
|
||||
case RESUME_TIMER:
|
||||
playerId = event.getPlayerId();
|
||||
if (playerId == null) {
|
||||
throw new MageException("RESUME_TIMER: playerId can't be null");
|
||||
}
|
||||
timer = timers.get(playerId);
|
||||
if (timer == null) {
|
||||
Player player = game.getState().getPlayer(playerId);
|
||||
if (player != null) {
|
||||
timer = createPlayerTimer(event.getPlayerId(), player.getPriorityTimeLeft());
|
||||
} else {
|
||||
throw new MageException("RESUME_TIMER: player can't be null");
|
||||
}
|
||||
}
|
||||
timer.resume();
|
||||
break;
|
||||
case PAUSE_TIMER:
|
||||
playerId = event.getPlayerId();
|
||||
if (playerId == null) {
|
||||
throw new MageException("PAUSE_TIMER: playerId can't be null");
|
||||
}
|
||||
timer = timers.get(playerId);
|
||||
if (timer == null) {
|
||||
throw new MageException("PAUSE_TIMER: couldn't find timer for player: " + playerId);
|
||||
}
|
||||
timer.pause();
|
||||
break;
|
||||
}
|
||||
} catch (MageException ex) {
|
||||
logger.fatal("Table event listener error ", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
game.addPlayerQueryEventListener(
|
||||
new Listener<PlayerQueryEvent>() {
|
||||
@Override
|
||||
public void event(PlayerQueryEvent event) {
|
||||
logger.trace(new StringBuilder(event.getPlayerId().toString()).append("--").append(event.getQueryType()).append("--").append(event.getMessage()).toString());
|
||||
try {
|
||||
switch (event.getQueryType()) {
|
||||
case ASK:
|
||||
ask(event.getPlayerId(), event.getMessage(), event.getOptions());
|
||||
break;
|
||||
case PICK_TARGET:
|
||||
target(event.getPlayerId(), event.getMessage(), event.getCards(), event.getPerms(), event.getTargets(), event.isRequired(), event.getOptions());
|
||||
break;
|
||||
case PICK_ABILITY:
|
||||
target(event.getPlayerId(), event.getMessage(), event.getAbilities(), event.isRequired(), event.getOptions());
|
||||
break;
|
||||
case SELECT:
|
||||
select(event.getPlayerId(), event.getMessage(), event.getOptions());
|
||||
break;
|
||||
case PLAY_MANA:
|
||||
playMana(event.getPlayerId(), event.getMessage(), event.getOptions());
|
||||
break;
|
||||
case PLAY_X_MANA:
|
||||
playXMana(event.getPlayerId(), event.getMessage());
|
||||
break;
|
||||
case CHOOSE_ABILITY:
|
||||
String objectName = null;
|
||||
if (event.getChoices() != null && event.getChoices().size() > 0) {
|
||||
objectName = event.getChoices().iterator().next();
|
||||
}
|
||||
chooseAbility(event.getPlayerId(), objectName, event.getAbilities());
|
||||
break;
|
||||
case CHOOSE_PILE:
|
||||
choosePile(event.getPlayerId(), event.getMessage(), event.getPile1(), event.getPile2());
|
||||
break;
|
||||
case CHOOSE_MODE:
|
||||
chooseMode(event.getPlayerId(), event.getModes());
|
||||
break;
|
||||
case CHOOSE_CHOICE:
|
||||
chooseChoice(event.getPlayerId(), event.getChoice());
|
||||
break;
|
||||
case AMOUNT:
|
||||
amount(event.getPlayerId(), event.getMessage(), event.getMin(), event.getMax());
|
||||
break;
|
||||
case PERSONAL_MESSAGE:
|
||||
informPersonal(event.getPlayerId(), event.getMessage());
|
||||
break;
|
||||
@Override
|
||||
public void event(PlayerQueryEvent event) {
|
||||
logger.trace(new StringBuilder(event.getPlayerId().toString()).append("--").append(event.getQueryType()).append("--").append(event.getMessage()).toString());
|
||||
try {
|
||||
switch (event.getQueryType()) {
|
||||
case ASK:
|
||||
ask(event.getPlayerId(), event.getMessage(), event.getOptions());
|
||||
break;
|
||||
case PICK_TARGET:
|
||||
target(event.getPlayerId(), event.getMessage(), event.getCards(), event.getPerms(), event.getTargets(), event.isRequired(), event.getOptions());
|
||||
break;
|
||||
case PICK_ABILITY:
|
||||
target(event.getPlayerId(), event.getMessage(), event.getAbilities(), event.isRequired(), event.getOptions());
|
||||
break;
|
||||
case SELECT:
|
||||
select(event.getPlayerId(), event.getMessage(), event.getOptions());
|
||||
break;
|
||||
case PLAY_MANA:
|
||||
playMana(event.getPlayerId(), event.getMessage(), event.getOptions());
|
||||
break;
|
||||
case PLAY_X_MANA:
|
||||
playXMana(event.getPlayerId(), event.getMessage());
|
||||
break;
|
||||
case CHOOSE_ABILITY:
|
||||
String objectName = null;
|
||||
if (event.getChoices() != null && event.getChoices().size() > 0) {
|
||||
objectName = event.getChoices().iterator().next();
|
||||
}
|
||||
} catch (MageException ex) {
|
||||
logger.fatal("Player event listener error ", ex);
|
||||
}
|
||||
chooseAbility(event.getPlayerId(), objectName, event.getAbilities());
|
||||
break;
|
||||
case CHOOSE_PILE:
|
||||
choosePile(event.getPlayerId(), event.getMessage(), event.getPile1(), event.getPile2());
|
||||
break;
|
||||
case CHOOSE_MODE:
|
||||
chooseMode(event.getPlayerId(), event.getModes());
|
||||
break;
|
||||
case CHOOSE_CHOICE:
|
||||
chooseChoice(event.getPlayerId(), event.getChoice());
|
||||
break;
|
||||
case AMOUNT:
|
||||
amount(event.getPlayerId(), event.getMessage(), event.getMin(), event.getMax());
|
||||
break;
|
||||
case PERSONAL_MESSAGE:
|
||||
informPersonal(event.getPlayerId(), event.getMessage());
|
||||
break;
|
||||
}
|
||||
} catch (MageException ex) {
|
||||
logger.fatal("Player event listener error ", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
joinWaitingExecutor.scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
|
@ -380,11 +380,9 @@ public class GameController implements GameCallback {
|
|||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
if (!player.hasLeft()) {
|
||||
logger.debug("Player " + player.getName() + " canceled game (no user) gameId: " + game.getId());
|
||||
player.leave();
|
||||
}
|
||||
} else if (!player.hasLeft()) {
|
||||
logger.debug("Player " + player.getName() + " canceled game (no user) gameId: " + game.getId());
|
||||
player.leave();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -405,11 +403,11 @@ public class GameController implements GameCallback {
|
|||
joinWaitingExecutor.shutdownNow();
|
||||
ThreadExecutor.getInstance().getCallExecutor().execute(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
startGame();
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void run() {
|
||||
startGame();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1077,11 +1075,11 @@ public class GameController implements GameCallback {
|
|||
cancelTimeout();
|
||||
futureTimeout = timeoutIdleExecutor.schedule(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
idleTimeout(playerId);
|
||||
}
|
||||
},
|
||||
@Override
|
||||
public void run() {
|
||||
idleTimeout(playerId);
|
||||
}
|
||||
},
|
||||
Main.isTestMode() ? 3600 : ConfigSettings.getInstance().getMaxSecondsIdle(),
|
||||
TimeUnit.SECONDS
|
||||
);
|
||||
|
|
62
Mage.Sets/src/mage/sets/kaladesh/AccomplishedAutomaton.java
Normal file
62
Mage.Sets/src/mage/sets/kaladesh/AccomplishedAutomaton.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AccomplishedAutomaton extends CardImpl {
|
||||
|
||||
public AccomplishedAutomaton(UUID ownerId) {
|
||||
super(ownerId, 191, "Accomplished Automaton", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Construct");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Fabricate 1
|
||||
this.addAbility(new FabricateAbility(1));
|
||||
}
|
||||
|
||||
public AccomplishedAutomaton(final AccomplishedAutomaton card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccomplishedAutomaton copy() {
|
||||
return new AccomplishedAutomaton(this);
|
||||
}
|
||||
}
|
94
Mage.Sets/src/mage/sets/kaladesh/AetherMeltdown.java
Normal file
94
Mage.Sets/src/mage/sets/kaladesh/AetherMeltdown.java
Normal file
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AetherMeltdown extends CardImpl {
|
||||
|
||||
private final static FilterPermanent filter = new FilterPermanent("creature or vehicle");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new SubtypePredicate("Vehicle")));
|
||||
}
|
||||
|
||||
public AetherMeltdown(UUID ownerId) {
|
||||
super(ownerId, 36, "Aether Meltdown", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
// Enchant creature or vehicle.
|
||||
TargetPermanent auraTarget = new TargetPermanent(filter);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// When Aether Meltdown enters the battlefield, you get {E}{E}.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2)));
|
||||
// Enchanted permanent gets -4/-0.
|
||||
Effect effect = new BoostEnchantedEffect(-4, 0, Duration.WhileOnBattlefield);
|
||||
effect.setText("Enchanted permanent gets -4/-0");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public AetherMeltdown(final AetherMeltdown card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AetherMeltdown copy() {
|
||||
return new AetherMeltdown(this);
|
||||
}
|
||||
}
|
75
Mage.Sets/src/mage/sets/kaladesh/AetherTheorist.java
Normal file
75
Mage.Sets/src/mage/sets/kaladesh/AetherTheorist.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.PayEnergyCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AetherTheorist extends CardImpl {
|
||||
|
||||
public AetherTheorist(UUID ownerId) {
|
||||
super(ownerId, 37, "Aether Theorist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Vedelkan");
|
||||
this.subtype.add("Rogue");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Aether Theorist enters the battlefield, you get {E}{E}{E}.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(3)));
|
||||
|
||||
// Tap, Pay {E}: Scry 1.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new TapSourceCost());
|
||||
ability.addCost(new PayEnergyCost(1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public AetherTheorist(final AetherTheorist card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AetherTheorist copy() {
|
||||
return new AetherTheorist(this);
|
||||
}
|
||||
}
|
69
Mage.Sets/src/mage/sets/kaladesh/BuiltToLast.java
Normal file
69
Mage.Sets/src/mage/sets/kaladesh/BuiltToLast.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.condition.common.TargetHasCardTypeCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BuiltToLast extends CardImpl {
|
||||
|
||||
public BuiltToLast(UUID ownerId) {
|
||||
super(ownerId, 7, "Built to Last", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Target creature gets +2/+2 until end of turn. If its an artifact creature, it gains indestructible until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(
|
||||
new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), new TargetHasCardTypeCondition(CardType.ARTIFACT),
|
||||
"If its an artifact creature, it gains indestructible until end of turn"));
|
||||
|
||||
}
|
||||
|
||||
public BuiltToLast(final BuiltToLast card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuiltToLast copy() {
|
||||
return new BuiltToLast(this);
|
||||
}
|
||||
}
|
125
Mage.Sets/src/mage/sets/kaladesh/ConfiscationCoup.java
Normal file
125
Mage.Sets/src/mage/sets/kaladesh/ConfiscationCoup.java
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.PayEnergyCost;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ConfiscationCoup extends CardImpl {
|
||||
|
||||
private final static FilterPermanent filter = new FilterPermanent("creature or artifact");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.ARTIFACT)));
|
||||
}
|
||||
|
||||
public ConfiscationCoup(UUID ownerId) {
|
||||
super(ownerId, 41, "Confiscation Coup", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}{U}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Choose target creature or artifact. You get {E}{E}{E}{E}, then you may pay an amount of {E} equal to that permanent's converted mana cost. If you do, gain control of it.
|
||||
this.getSpellAbility().addEffect(new ConfiscationCoupEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
public ConfiscationCoup(final ConfiscationCoup card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfiscationCoup copy() {
|
||||
return new ConfiscationCoup(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ConfiscationCoupEffect extends OneShotEffect {
|
||||
|
||||
public ConfiscationCoupEffect() {
|
||||
super(Outcome.GainControl);
|
||||
this.staticText = "Choose target creature or artifact. You get {E}{E}{E}{E}, then you may pay an amount of {E} equal to that permanent's converted mana cost. If you do, gain control of it";
|
||||
}
|
||||
|
||||
public ConfiscationCoupEffect(final ConfiscationCoupEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfiscationCoupEffect copy() {
|
||||
return new ConfiscationCoupEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
new GetEnergyCountersControllerEffect(4).apply(game, source);
|
||||
Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (targetPermanent != null) {
|
||||
Cost cost = new PayEnergyCost(targetPermanent.getManaCost().convertedManaCost());
|
||||
if (cost.canPay(source, source.getSourceId(), source.getControllerId(), game)) {
|
||||
String energy = "";
|
||||
for (int i = 0; i < targetPermanent.getManaCost().convertedManaCost(); i++) {
|
||||
energy += "{E}";
|
||||
}
|
||||
if (controller.chooseUse(outcome, "Pay " + energy + " to get control of " + targetPermanent.getLogName() + "?", source, game)) {
|
||||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) {
|
||||
ContinuousEffect controllEffect = new GainControlTargetEffect(Duration.Custom);
|
||||
controllEffect.setTargetPointer(new FixedTarget(targetPermanent, game));
|
||||
game.addEffect(controllEffect, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/kaladesh/ConsulateSkygate.java
Normal file
65
Mage.Sets/src/mage/sets/kaladesh/ConsulateSkygate.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ConsulateSkygate extends CardImpl {
|
||||
|
||||
public ConsulateSkygate(UUID ownerId) {
|
||||
super(ownerId, 202, "Consulate Skygate", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Wall");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
}
|
||||
|
||||
public ConsulateSkygate(final ConsulateSkygate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsulateSkygate copy() {
|
||||
return new ConsulateSkygate(this);
|
||||
}
|
||||
}
|
88
Mage.Sets/src/mage/sets/kaladesh/ConsulsShieldguard.java
Normal file
88
Mage.Sets/src/mage/sets/kaladesh/ConsulsShieldguard.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.PayEnergyCost;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ConsulsShieldguard extends CardImpl {
|
||||
|
||||
private final static FilterAttackingCreature filter = new FilterAttackingCreature();
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public ConsulsShieldguard(UUID ownerId) {
|
||||
super(ownerId, 11, "Consul's Shieldguard", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Dwarf");
|
||||
this.subtype.add("Soldier");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// When Consul's Shieldguard enters the battlefield, you get {E}{E}.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2)));
|
||||
|
||||
// Whenever Consul's Shiedguard attacks, you may pay {E}. If you do, another target attacking creature gets indestructible until end of turn.
|
||||
DoIfCostPaid doIfCostPaidEffect = new DoIfCostPaid(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), new PayEnergyCost(1));
|
||||
Ability ability = new AttacksTriggeredAbility(doIfCostPaidEffect, false,
|
||||
"Whenever {this} attacks you may pay {E}. If you do, another target attacking creature gets indestructible until end of turn.");
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public ConsulsShieldguard(final ConsulsShieldguard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsulsShieldguard copy() {
|
||||
return new ConsulsShieldguard(this);
|
||||
}
|
||||
}
|
58
Mage.Sets/src/mage/sets/kaladesh/CowlProwler.java
Normal file
58
Mage.Sets/src/mage/sets/kaladesh/CowlProwler.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CowlProwler extends CardImpl {
|
||||
|
||||
public CowlProwler(UUID ownerId) {
|
||||
super(ownerId, 149, "Cowl Prowler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Wurm");
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
}
|
||||
|
||||
public CowlProwler(final CowlProwler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CowlProwler copy() {
|
||||
return new CowlProwler(this);
|
||||
}
|
||||
}
|
67
Mage.Sets/src/mage/sets/kaladesh/DramaticReversal.java
Normal file
67
Mage.Sets/src/mage/sets/kaladesh/DramaticReversal.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DramaticReversal extends CardImpl {
|
||||
|
||||
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanents");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public DramaticReversal(UUID ownerId) {
|
||||
super(ownerId, 44, "Dramatic Reversal", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Untap all nonland permanents you control.
|
||||
this.getSpellAbility().addEffect(new UntapAllControllerEffect(filter));
|
||||
}
|
||||
|
||||
public DramaticReversal(final DramaticReversal card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DramaticReversal copy() {
|
||||
return new DramaticReversal(this);
|
||||
}
|
||||
}
|
88
Mage.Sets/src/mage/sets/kaladesh/EddytrailHawk.java
Normal file
88
Mage.Sets/src/mage/sets/kaladesh/EddytrailHawk.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.PayEnergyCost;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class EddytrailHawk extends CardImpl {
|
||||
|
||||
private final static FilterAttackingCreature filter = new FilterAttackingCreature();
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public EddytrailHawk(UUID ownerId) {
|
||||
super(ownerId, 12, "Eddytrail Hawk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Bird");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Eddytail Hawk enters the battlefield, you get {E}{E}.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2)));
|
||||
// When Eddytail Hawk attacks you pay {E}. If you do, another target attacking creature gains flying until end of turn.
|
||||
DoIfCostPaid doIfCostPaidEffect = new DoIfCostPaid(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), new PayEnergyCost(1), null, false);
|
||||
Ability ability = new AttacksTriggeredAbility(doIfCostPaidEffect, false,
|
||||
"Whenever {this} attacks you pay {E}. If you do, another target attacking creature gets indestructible until end of turn.");
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public EddytrailHawk(final EddytrailHawk card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EddytrailHawk copy() {
|
||||
return new EddytrailHawk(this);
|
||||
}
|
||||
}
|
62
Mage.Sets/src/mage/sets/kaladesh/FailedInspection.java
Normal file
62
Mage.Sets/src/mage/sets/kaladesh/FailedInspection.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class FailedInspection extends CardImpl {
|
||||
|
||||
public FailedInspection(UUID ownerId) {
|
||||
super(ownerId, 47, "Failed Inspection", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Counter target spell. Draw a card, then discard a card.
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(1, 1));
|
||||
}
|
||||
|
||||
public FailedInspection(final FailedInspection card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FailedInspection copy() {
|
||||
return new FailedInspection(this);
|
||||
}
|
||||
}
|
118
Mage.Sets/src/mage/sets/kaladesh/GearseekerSerpent.java
Normal file
118
Mage.Sets/src/mage/sets/kaladesh/GearseekerSerpent.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.CostModificationType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class GearseekerSerpent extends CardImpl {
|
||||
|
||||
public GearseekerSerpent(UUID ownerId) {
|
||||
super(ownerId, 48, "Gearseeker Serpent", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Serpent");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Gearseeker Serpent costs {1} less to cast for each artifact you control
|
||||
this.addAbility(new SimpleStaticAbility(Zone.STACK, new GearseekerSerpentCostReductionEffect()));
|
||||
|
||||
// 5U: Gearseeker Serpent can't be blocked this turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new CantBeBlockedSourceEffect(Duration.EndOfTurn),
|
||||
new ManaCostsImpl<>("{5}{U}")));
|
||||
}
|
||||
|
||||
public GearseekerSerpent(final GearseekerSerpent card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GearseekerSerpent copy() {
|
||||
return new GearseekerSerpent(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GearseekerSerpentCostReductionEffect extends CostModificationEffectImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public GearseekerSerpentCostReductionEffect() {
|
||||
super(Duration.WhileOnStack, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "{this} costs {1} less to cast for each artifact you control";
|
||||
}
|
||||
|
||||
protected GearseekerSerpentCostReductionEffect(final GearseekerSerpentCostReductionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||
int count = game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game).size();
|
||||
if (count > 0) {
|
||||
CardUtil.reduceCost(abilityToModify, count);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
return abilityToModify.getSourceId().equals(source.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public GearseekerSerpentCostReductionEffect copy() {
|
||||
return new GearseekerSerpentCostReductionEffect(this);
|
||||
}
|
||||
}
|
112
Mage.Sets/src/mage/sets/kaladesh/GearshiftAce.java
Normal file
112
Mage.Sets/src/mage/sets/kaladesh/GearshiftAce.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class GearshiftAce extends CardImpl {
|
||||
|
||||
public GearshiftAce(UUID ownerId) {
|
||||
super(ownerId, 16, "Gearshift Ace", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Dwarf");
|
||||
this.subtype.add("Pilot");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// First Strike
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
// Whenever Gearshift Ace crews a Vehicle, that Vehicle gains first strike until the end of turn.
|
||||
this.addAbility(new CrewsVehicleSourceTriggeredAbility(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn,
|
||||
"that Vehicle gains first strike until end of turn")));
|
||||
}
|
||||
|
||||
public GearshiftAce(final GearshiftAce card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GearshiftAce copy() {
|
||||
return new GearshiftAce(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GearshiftAceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public GearshiftAceTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
}
|
||||
|
||||
public GearshiftAceTriggeredAbility(final GearshiftAceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GearshiftAceTriggeredAbility copy() {
|
||||
return new GearshiftAceTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CREWED_VEHICLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getTargetId().equals(getSourceId())) {
|
||||
for (Effect effect : getEffects()) {
|
||||
// set the vehicle id as target
|
||||
effect.setTargetPointer(new FixedTarget(event.getSourceId()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When {this} crews a Vehicle, " + super.getRule();
|
||||
}
|
||||
}
|
69
Mage.Sets/src/mage/sets/kaladesh/HeraldOfTheFair.java
Normal file
69
Mage.Sets/src/mage/sets/kaladesh/HeraldOfTheFair.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class HeraldOfTheFair extends CardImpl {
|
||||
|
||||
public HeraldOfTheFair(UUID ownerId) {
|
||||
super(ownerId, 18, "Herald of the Fair", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Human");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Herald of the Fair enters the battlefield, target creature you control gets +1/+1 until end of turn.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(1, 1, Duration.EndOfTurn), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public HeraldOfTheFair(final HeraldOfTheFair card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeraldOfTheFair copy() {
|
||||
return new HeraldOfTheFair(this);
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/kaladesh/IncendiarySabotage.java
Normal file
65
Mage.Sets/src/mage/sets/kaladesh/IncendiarySabotage.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cg5
|
||||
*/
|
||||
public class IncendiarySabotage extends CardImpl {
|
||||
|
||||
public IncendiarySabotage(UUID ownerId) {
|
||||
super(ownerId, 119, "Incendiary Sabotage", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{R}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// As an additional cost to cast Incendiary Sabotage, sacrifice an artifact.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
|
||||
|
||||
// Incendiary Sabotage deals 3 damage to each creature.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(3, new FilterCreaturePermanent()));
|
||||
}
|
||||
|
||||
public IncendiarySabotage(final IncendiarySabotage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncendiarySabotage copy() {
|
||||
return new IncendiarySabotage(this);
|
||||
}
|
||||
}
|
73
Mage.Sets/src/mage/sets/kaladesh/InventorsApprentice.java
Normal file
73
Mage.Sets/src/mage/sets/kaladesh/InventorsApprentice.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cg5
|
||||
*/
|
||||
public class InventorsApprentice extends CardImpl {
|
||||
|
||||
private static final String rule = "{this} gets +1/+1 as long as you control an artifact";
|
||||
|
||||
public InventorsApprentice(UUID ownerId) {
|
||||
super(ownerId, 120, "Inventor's Apprentice", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Artificer");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Inventor's Apprentice gets +1/+1 as long as you control an artifact.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield),
|
||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()), rule)));
|
||||
}
|
||||
|
||||
public InventorsApprentice(final InventorsApprentice card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventorsApprentice copy() {
|
||||
return new InventorsApprentice(this);
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/kaladesh/IronLeagueSteed.java
Normal file
65
Mage.Sets/src/mage/sets/kaladesh/IronLeagueSteed.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class IronLeagueSteed extends CardImpl {
|
||||
|
||||
public IronLeagueSteed(UUID ownerId) {
|
||||
super(ownerId, 219, "Iron League Steed", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Construct");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
// Fabricate 1
|
||||
this.addAbility(new FabricateAbility(1));
|
||||
}
|
||||
|
||||
public IronLeagueSteed(final IronLeagueSteed card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IronLeagueSteed copy() {
|
||||
return new IronLeagueSteed(this);
|
||||
}
|
||||
}
|
79
Mage.Sets/src/mage/sets/kaladesh/LathnuHellion.java
Normal file
79
Mage.Sets/src/mage/sets/kaladesh/LathnuHellion.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.PayEnergyCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cg5
|
||||
*/
|
||||
public class LathnuHellion extends CardImpl {
|
||||
|
||||
public LathnuHellion(UUID ownerId) {
|
||||
super(ownerId, 121, "Lathnu Hellion", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Hellion");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// When Lathnu Hellion enters the battlefield, you get {E}{E}.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2)));
|
||||
|
||||
// At the beginning of your end step, sacrifice Lathnu Hellion unless you pay {E}{E}.
|
||||
Cost cost = new PayEnergyCost(2);
|
||||
cost.setText("{E}{E}");
|
||||
Effect effect = new SacrificeSourceUnlessPaysEffect(cost);
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(effect, TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public LathnuHellion(final LathnuHellion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LathnuHellion copy() {
|
||||
return new LathnuHellion(this);
|
||||
}
|
||||
}
|
31
Mage.Sets/src/mage/sets/kaladesh/MakeObsolete.java
Normal file
31
Mage.Sets/src/mage/sets/kaladesh/MakeObsolete.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.continuous.BoostOpponentsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
* @author royk
|
||||
*/
|
||||
public class MakeObsolete extends CardImpl {
|
||||
|
||||
public MakeObsolete(UUID ownerId) {
|
||||
super(ownerId, 89, "Make Obsolete", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Creatures your opponents control get -1/-1 until end of turn
|
||||
this.getSpellAbility().addEffect(new BoostOpponentsEffect(-1, -1, Duration.EndOfTurn));
|
||||
}
|
||||
|
||||
public MakeObsolete(final MakeObsolete card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MakeObsolete copy() {
|
||||
return new MakeObsolete(this);
|
||||
}
|
||||
}
|
77
Mage.Sets/src/mage/sets/kaladesh/NinthBridgePatrol.java
Normal file
77
Mage.Sets/src/mage/sets/kaladesh/NinthBridgePatrol.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.ZoneChangeAllTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class NinthBridgePatrol extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public NinthBridgePatrol(UUID ownerId) {
|
||||
super(ownerId, 22, "Ninth Bridge Patrol", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Dwarf");
|
||||
this.subtype.add("Soldier");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever another creature you control leaves the battlefield, put a +1/+1 counter on Ninth Bridge Patrol.
|
||||
this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter,
|
||||
"Whenever another creature you control leaves the battlefield, ", false));
|
||||
}
|
||||
|
||||
public NinthBridgePatrol(final NinthBridgePatrol card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NinthBridgePatrol copy() {
|
||||
return new NinthBridgePatrol(this);
|
||||
}
|
||||
}
|
66
Mage.Sets/src/mage/sets/kaladesh/PeemaOutrider.java
Normal file
66
Mage.Sets/src/mage/sets/kaladesh/PeemaOutrider.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PeemaOutrider extends CardImpl {
|
||||
|
||||
public PeemaOutrider(UUID ownerId) {
|
||||
super(ownerId, 166, "Peema Outrider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Artificer");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// Fabricate 1
|
||||
this.addAbility(new FabricateAbility(1));
|
||||
}
|
||||
|
||||
public PeemaOutrider(final PeemaOutrider card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PeemaOutrider copy() {
|
||||
return new PeemaOutrider(this);
|
||||
}
|
||||
}
|
125
Mage.Sets/src/mage/sets/kaladesh/RevokePrivilege.java
Normal file
125
Mage.Sets/src/mage/sets/kaladesh/RevokePrivilege.java
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class RevokePrivilege extends CardImpl {
|
||||
|
||||
public RevokePrivilege(UUID ownerId) {
|
||||
super(ownerId, 26, "Revoke Privilege", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant creature.
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature can't attack, block, or crew Vehicles.
|
||||
Effect effect = new CantAttackBlockAttachedEffect(AttachmentType.AURA);
|
||||
effect.setText("Enchanted creature can't attack, block");
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
ability.addEffect(new RevokePrivilegeCantCrewEffect());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public RevokePrivilege(final RevokePrivilege card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevokePrivilege copy() {
|
||||
return new RevokePrivilege(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RevokePrivilegeCantCrewEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public RevokePrivilegeCantCrewEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = ", or crew Vehicles";
|
||||
}
|
||||
|
||||
public RevokePrivilegeCantCrewEffect(final RevokePrivilegeCantCrewEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevokePrivilegeCantCrewEffect copy() {
|
||||
return new RevokePrivilegeCantCrewEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInfoMessage(Ability source, GameEvent event, Game game) {
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (mageObject != null) {
|
||||
return "The creature enchanted by " + mageObject.getIdName() + " can't crew vehicles.";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.CREW_VEHICLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
return enchantment != null && event.getTargetId().equals(enchantment.getAttachedTo());
|
||||
}
|
||||
}
|
62
Mage.Sets/src/mage/sets/kaladesh/ServoExhibition.java
Normal file
62
Mage.Sets/src/mage/sets/kaladesh/ServoExhibition.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.ServoToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ServoExhibition extends CardImpl {
|
||||
|
||||
public ServoExhibition(UUID ownerId) {
|
||||
super(ownerId, 27, "Servo Exhibition", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Create two 1/1 colorless Servo artifact creature tokens.
|
||||
Effect effect = new CreateTokenEffect(new ServoToken(), 2);
|
||||
effect.setText("Create two 1/1 colorless Servo artifact creature tokens");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
public ServoExhibition(final ServoExhibition card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServoExhibition copy() {
|
||||
return new ServoExhibition(this);
|
||||
}
|
||||
}
|
62
Mage.Sets/src/mage/sets/kaladesh/SkyswirlHarrier.java
Normal file
62
Mage.Sets/src/mage/sets/kaladesh/SkyswirlHarrier.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SkyswirlHarrier extends CardImpl {
|
||||
|
||||
public SkyswirlHarrier(UUID ownerId) {
|
||||
super(ownerId, 28, "Skyswirl Harrier", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Bird");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
public SkyswirlHarrier(final SkyswirlHarrier card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkyswirlHarrier copy() {
|
||||
return new SkyswirlHarrier(this);
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/kaladesh/SnareThopter.java
Normal file
65
Mage.Sets/src/mage/sets/kaladesh/SnareThopter.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SnareThopter extends CardImpl {
|
||||
|
||||
public SnareThopter(UUID ownerId) {
|
||||
super(ownerId, 236, "Snare Thopter", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Thopter");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
public SnareThopter(final SnareThopter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SnareThopter copy() {
|
||||
return new SnareThopter(this);
|
||||
}
|
||||
}
|
155
Mage.Sets/src/mage/sets/kaladesh/SparkOfCreativity.java
Normal file
155
Mage.Sets/src/mage/sets/kaladesh/SparkOfCreativity.java
Normal file
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SparkOfCreativity extends CardImpl {
|
||||
|
||||
public SparkOfCreativity(UUID ownerId) {
|
||||
super(ownerId, 131, "Spark of Creativity", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
|
||||
// Choose target creature. Exile the top card of your library. You may have Spark of Creativity deal damage to that creature equal to the converted mana cost of the exiled card. If you don't, you may play that card until end of turn.
|
||||
this.getSpellAbility().addEffect(new SparkOfCreativityEffect());
|
||||
}
|
||||
|
||||
public SparkOfCreativity(final SparkOfCreativity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SparkOfCreativity copy() {
|
||||
return new SparkOfCreativity(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SparkOfCreativityEffect extends OneShotEffect {
|
||||
|
||||
public SparkOfCreativityEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Choose target creature. Exile the top card of your library. You may have Spark of Creativity deal damage to that creature equal to the converted mana cost of the exiled card. If you don't, you may play that card until end of turn";
|
||||
}
|
||||
|
||||
public SparkOfCreativityEffect(final SparkOfCreativityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SparkOfCreativityEffect copy() {
|
||||
return new SparkOfCreativityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null) {
|
||||
Card card = controller.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.EXILED, source, game);
|
||||
// You may have Spark of Creativity deal damage to that creature equal to the converted mana cost of the exiled card.
|
||||
Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (targetCreature != null) {
|
||||
int cmc = card.getManaCost().convertedManaCost();
|
||||
if (controller.chooseUse(outcome, "Let " + sourceObject.getLogName() + " deal " + cmc + " damage to " + targetCreature.getLogName() + "?", source, game)) {
|
||||
targetCreature.damage(cmc, source.getSourceId(), game, false, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// If you don't, you may play that card until end of turn
|
||||
game.addEffect(new SparkOfCreativityPlayEffect(new MageObjectReference(card, game)), source);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class SparkOfCreativityPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
private final MageObjectReference objectReference;
|
||||
|
||||
public SparkOfCreativityPlayEffect(MageObjectReference objectReference) {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
this.objectReference = objectReference;
|
||||
staticText = "you may play that card until end of turn";
|
||||
}
|
||||
|
||||
public SparkOfCreativityPlayEffect(final SparkOfCreativityPlayEffect effect) {
|
||||
super(effect);
|
||||
this.objectReference = effect.objectReference;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SparkOfCreativityPlayEffect copy() {
|
||||
return new SparkOfCreativityPlayEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (objectReference.refersTo(objectId, game) && affectedControllerId.equals(source.getControllerId())) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller.chooseUse(outcome, "Play the exiled card?", source, game)) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
discard();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
65
Mage.Sets/src/mage/sets/kaladesh/TrustyCompanion.java
Normal file
65
Mage.Sets/src/mage/sets/kaladesh/TrustyCompanion.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.CantAttackAloneAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TrustyCompanion extends CardImpl {
|
||||
|
||||
public TrustyCompanion(UUID ownerId) {
|
||||
super(ownerId, 33, "Trusty Companion", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Hyena");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
// Trusty Companion can't attack alone.
|
||||
this.addAbility(new CantAttackAloneAbility());
|
||||
}
|
||||
|
||||
public TrustyCompanion(final TrustyCompanion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrustyCompanion copy() {
|
||||
return new TrustyCompanion(this);
|
||||
}
|
||||
}
|
62
Mage.Sets/src/mage/sets/kaladesh/WaywardGiant.java
Normal file
62
Mage.Sets/src/mage/sets/kaladesh/WaywardGiant.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.kaladesh;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class WaywardGiant extends CardImpl {
|
||||
|
||||
public WaywardGiant(UUID ownerId) {
|
||||
super(ownerId, 139, "Wayward Giant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
this.expansionSetCode = "KLD";
|
||||
this.subtype.add("Giant");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Menace
|
||||
this.addAbility(new MenaceAbility());
|
||||
}
|
||||
|
||||
public WaywardGiant(final WaywardGiant card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaywardGiant copy() {
|
||||
return new WaywardGiant(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TargetHasCardTypeCondition implements Condition {
|
||||
|
||||
private final CardType cardType;
|
||||
|
||||
public TargetHasCardTypeCondition(CardType cardType) {
|
||||
this.cardType = cardType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (!source.getTargets().isEmpty()) {
|
||||
MageObject mageObject = game.getObject(source.getFirstTarget());
|
||||
if (mageObject != null) {
|
||||
return mageObject.getCardType().contains(cardType);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,85 +1,84 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class PayEnergyCost extends CostImpl {
|
||||
|
||||
private final int amount;
|
||||
|
||||
public PayEnergyCost(int amount) {
|
||||
this.amount = amount;
|
||||
setText();
|
||||
}
|
||||
|
||||
public PayEnergyCost(PayEnergyCost cost) {
|
||||
super(cost);
|
||||
this.amount = cost.amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
return player != null && player.getCounters().getCount(CounterType.ENERGY) >= amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
if (player != null) {
|
||||
player.getCounters().removeCounter(CounterType.ENERGY, amount);
|
||||
paid = true;
|
||||
}
|
||||
return paid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PayEnergyCost copy() {
|
||||
return new PayEnergyCost(this);
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder("Pay ");
|
||||
for (int i = 0; i < amount; i++) {
|
||||
sb.append("{E}");
|
||||
}
|
||||
this.text = sb.toString();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class PayEnergyCost extends CostImpl {
|
||||
|
||||
private final int amount;
|
||||
|
||||
public PayEnergyCost(int amount) {
|
||||
this.amount = amount;
|
||||
setText();
|
||||
}
|
||||
|
||||
public PayEnergyCost(PayEnergyCost cost) {
|
||||
super(cost);
|
||||
this.amount = cost.amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
return player != null && player.getCounters().getCount(CounterType.ENERGY) >= amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
if (player != null && player.getCounters().getCount(CounterType.ENERGY) >= amount) {
|
||||
player.getCounters().removeCounter(CounterType.ENERGY, amount);
|
||||
paid = true;
|
||||
}
|
||||
return paid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PayEnergyCost copy() {
|
||||
return new PayEnergyCost(this);
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder("Pay ");
|
||||
for (int i = 0; i < amount; i++) {
|
||||
sb.append("{E}");
|
||||
}
|
||||
this.text = sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,134 +1,137 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeSourceEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author emerald000
|
||||
*/
|
||||
public class CrewAbility extends SimpleActivatedAbility {
|
||||
|
||||
private final int value;
|
||||
|
||||
public CrewAbility(int value) {
|
||||
super(Zone.BATTLEFIELD, new AddCardTypeSourceEffect(CardType.ARTIFACT, Duration.EndOfTurn), new CrewCost(value));
|
||||
this.addEffect(new AddCardTypeSourceEffect(CardType.CREATURE, Duration.EndOfTurn));
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public CrewAbility(final CrewAbility ability) {
|
||||
super(ability);
|
||||
this.value = ability.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrewAbility copy() {
|
||||
return new CrewAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Crew " + value + " <i>(Tap any number of creatures you control with total power " + value + " or more: This Vehicle becomes an artifact creature until end of turn.)</i>";
|
||||
}
|
||||
}
|
||||
|
||||
class CrewCost extends CostImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new TappedPredicate()));
|
||||
}
|
||||
|
||||
private final int value;
|
||||
|
||||
CrewCost(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
CrewCost(final CrewCost cost) {
|
||||
super(cost);
|
||||
this.value = cost.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
Target target = new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, true);
|
||||
if (target.choose(Outcome.Tap, controllerId, sourceId, game)) {
|
||||
int sumPower = 0;
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null && permanent.tap(game)) {
|
||||
sumPower += permanent.getPower().getValue();
|
||||
}
|
||||
}
|
||||
paid = sumPower >= value;
|
||||
if (paid) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREWED_VEHICLE, targetId, sourceId, controllerId));
|
||||
}
|
||||
}
|
||||
}
|
||||
return paid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||
int sumPower = 0;
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, controllerId, game)) {
|
||||
sumPower += permanent.getPower().getValue();
|
||||
if (sumPower >= value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrewCost copy() {
|
||||
return new CrewCost(this);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeSourceEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author emerald000
|
||||
*/
|
||||
public class CrewAbility extends SimpleActivatedAbility {
|
||||
|
||||
private final int value;
|
||||
|
||||
public CrewAbility(int value) {
|
||||
super(Zone.BATTLEFIELD, new AddCardTypeSourceEffect(CardType.ARTIFACT, Duration.EndOfTurn), new CrewCost(value));
|
||||
this.addEffect(new AddCardTypeSourceEffect(CardType.CREATURE, Duration.EndOfTurn));
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public CrewAbility(final CrewAbility ability) {
|
||||
super(ability);
|
||||
this.value = ability.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrewAbility copy() {
|
||||
return new CrewAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Crew " + value + " <i>(Tap any number of creatures you control with total power " + value + " or more: This Vehicle becomes an artifact creature until end of turn.)</i>";
|
||||
}
|
||||
}
|
||||
|
||||
class CrewCost extends CostImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new TappedPredicate()));
|
||||
}
|
||||
|
||||
private final int value;
|
||||
|
||||
CrewCost(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
CrewCost(final CrewCost cost) {
|
||||
super(cost);
|
||||
this.value = cost.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
Target target = new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, true);
|
||||
if (target.choose(Outcome.Tap, controllerId, sourceId, game)) {
|
||||
int sumPower = 0;
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.CREW_VEHICLE, targetId, sourceId, controllerId);
|
||||
if (!game.replaceEvent(event)) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null && permanent.tap(game)) {
|
||||
sumPower += permanent.getPower().getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
paid = sumPower >= value;
|
||||
if (paid) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREWED_VEHICLE, targetId, sourceId, controllerId));
|
||||
}
|
||||
}
|
||||
}
|
||||
return paid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||
int sumPower = 0;
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, controllerId, game)) {
|
||||
sumPower += permanent.getPower().getValue();
|
||||
if (sumPower >= value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrewCost copy() {
|
||||
return new CrewCost(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,6 +109,12 @@ public class GameEvent implements Serializable {
|
|||
GAIN_LIFE, GAINED_LIFE,
|
||||
LOSE_LIFE, LOST_LIFE,
|
||||
PLAY_LAND, LAND_PLAYED,
|
||||
CREW_VEHICLE,
|
||||
/* CREW_VEHICLE
|
||||
targetId the id of the creature that crewed a vehicle
|
||||
sourceId sourceId of the vehicle
|
||||
playerId the id of the controlling player
|
||||
*/
|
||||
CREWED_VEHICLE,
|
||||
/* CREWED_VEHICLE
|
||||
targetId the id of the creature that crewed a vehicle
|
||||
|
|
|
@ -82,8 +82,8 @@ public class CardUtil {
|
|||
// Land subtypes
|
||||
"Desert", "Gate", "Lair", "Locus", "Urza's", "Mine", "Power-Plant", "Tower",
|
||||
// Planeswalker subtypes
|
||||
"Ajani", "Arlinn", "Ashiok", "Bolas", "Chandra", "Dack", "Daretti", "Domri", "Elspeth", "Freyalise", "Garruk", "Gideon", "Jace",
|
||||
"Karn", "Kiora", "Koth", "Liliana", "Nahiri", "Nissa", "Narset", "Nixilis", "Ral", "Sarkhan", "Sorin", "Tamiyo", "Teferi",
|
||||
"Ajani", "Arlinn", "Ashiok", "Bolas", "Chandra", "Dack", "Daretti", "Domri", "Dovin", "Elspeth", "Freyalise", "Garruk", "Gideon", "Jace",
|
||||
"Karn", "Kiora", "Koth", "Liliana", "Nahiri", "Nissa", "Narset", "Nixilis", "Ral", "Saheeli", "Sarkhan", "Sorin", "Tamiyo", "Teferi",
|
||||
"Tezzeret", "Tibalt", "Ugin", "Venser", "Vraska", "Xenagos",
|
||||
// Instant sorcery subtypes
|
||||
"Trap", "Arcane"};
|
||||
|
|
|
@ -52,7 +52,7 @@ public class GameLog {
|
|||
static final String LOG_TT_COLOR_GREEN = "Green"; // LightGreen
|
||||
static final String LOG_TT_COLOR_BLUE = "Blue";
|
||||
static final String LOG_TT_COLOR_BLACK = "Black";
|
||||
static final String LOG_TT_COLOR_WHITE = "#CCDB00";
|
||||
static final String LOG_TT_COLOR_WHITE = "#FDFFE6";
|
||||
static final String LOG_TT_COLOR_MULTI = "#FFAC40";
|
||||
static final String LOG_TT_COLOR_COLORLESS = "#94A4BA";
|
||||
static final String LOG_COLOR_NEUTRAL = "#F0F8FF"; // AliceBlue
|
||||
|
|
Loading…
Reference in a new issue