mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
Слияние
This commit is contained in:
commit
9a8f6e839d
29 changed files with 1444 additions and 69 deletions
|
@ -312,6 +312,7 @@ public class NewTableDialog extends MageDialog {
|
|||
options.getPlayerTypes().add(player.getPlayerType());
|
||||
}
|
||||
options.setDeckType((String) this.cbDeckType.getSelectedItem());
|
||||
options.setLimited(false);
|
||||
options.setAttackOption((MultiplayerAttackOption) this.cbAttackOption.getSelectedItem());
|
||||
options.setRange((RangeOfInfluence) this.cbRange.getSelectedItem());
|
||||
options.setWinsNeeded((Integer)this.spnNumWins.getValue());
|
||||
|
|
|
@ -306,6 +306,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
tOptions.getMatchOptions().setWinsNeeded(2);
|
||||
tOptions.getMatchOptions().setAttackOption(MultiplayerAttackOption.LEFT);
|
||||
tOptions.getMatchOptions().setRange(RangeOfInfluence.ALL);
|
||||
tOptions.getMatchOptions().setLimited(true);
|
||||
table = session.createTournamentTable(roomId, tOptions);
|
||||
if (table == null) {
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Error creating table.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
|
|
|
@ -209,7 +209,10 @@ public class CallbackClientImpl implements CallbackClient {
|
|||
TableClientMessage message = (TableClientMessage) callback.getData();
|
||||
DeckView deckView = message.getDeck();
|
||||
Deck deck = DeckUtil.construct(deckView);
|
||||
sideboard(deck, message.getTableId(), message.getTime());
|
||||
if (message.getFlag())
|
||||
construct(deck, message.getTableId(), message.getTime());
|
||||
else
|
||||
sideboard(deck, message.getTableId(), message.getTime());
|
||||
}
|
||||
else if (callback.getMethod().equals("construct")) {
|
||||
TableClientMessage message = (TableClientMessage) callback.getData();
|
||||
|
|
|
@ -514,7 +514,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
options.setWinsNeeded(1);
|
||||
table = session.createTable(roomId, options);
|
||||
session.joinTable(roomId, table.getTableId(), "Human", "Human", 1, Sets.loadDeck("test.dck"));
|
||||
session.joinTable(roomId, table.getTableId(), "Computer", "Computer - minimax", 1, Sets.loadDeck("test.dck"));
|
||||
session.joinTable(roomId, table.getTableId(), "Computer", "Computer - minimax", 5, Sets.loadDeck("test.dck"));
|
||||
session.startGame(roomId, table.getTableId());
|
||||
} catch (Exception ex) {
|
||||
handleError(ex);
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TableClientMessage implements Serializable {
|
|||
private UUID gameId;
|
||||
private UUID playerId;
|
||||
private int time;
|
||||
private boolean flag;
|
||||
private boolean flag = false;
|
||||
|
||||
public TableClientMessage(Deck deck, UUID tableId, int time) {
|
||||
this.deck = new DeckView(deck);
|
||||
|
@ -54,6 +54,13 @@ public class TableClientMessage implements Serializable {
|
|||
this.time = time;
|
||||
}
|
||||
|
||||
public TableClientMessage(Deck deck, UUID tableId, int time, boolean flag) {
|
||||
this.deck = new DeckView(deck);
|
||||
this.tableId = tableId;
|
||||
this.time = time;
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public TableClientMessage(UUID gameId, UUID playerId) {
|
||||
this.gameId = gameId;
|
||||
this.playerId = playerId;
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
NAME:UW Control
|
||||
2 [ROE:236] Island
|
||||
1 [ROE:235] Island
|
||||
1 [ROE:234] Island
|
||||
2 [ROE:233] Island
|
||||
2 [CON:15] Path to Exile
|
||||
3 [ROE:21] Gideon Jura
|
||||
1 [CON:11] Martial Coup
|
||||
2 [ZEN:9] Day of Judgment
|
||||
1 [ZEN:216] Kabira Crossroads
|
||||
4 [WWK:31] Jace, the Mind Sculptor
|
||||
3 [M10:64] Mind Spring
|
||||
3 [WWK:123] Everflowing Chalice
|
||||
1 [ROE:232] Plains
|
||||
4 [ROE:53] Wall of Omens
|
||||
1 [ROE:229] Plains
|
||||
1 [ROE:230] Plains
|
||||
1 [ROE:231] Plains
|
||||
3 [ALA:20] Oblivion Ring
|
||||
4 [ZEN:70] Spreading Seas
|
||||
4 [WWK:145] Tectonic Edge
|
||||
1 [ALA:9] Elspeth, Knight-Errant
|
||||
2 [ROE:59] Deprive
|
||||
1 [ZEN:220] Misty Rainforest
|
||||
4 [WWK:133] Celestial Colonnade
|
||||
1 [ZEN:211] Arid Mesa
|
||||
4 [M10:226] Glacial Fortress
|
||||
1 [WWK:142] Sejiri Steppe
|
||||
2 [M10:65] Negate
|
|
@ -381,7 +381,7 @@ public class TableController {
|
|||
User user = UserManager.getInstance().getUser(entry.getKey());
|
||||
int remaining = (int) futureTimeout.getDelay(TimeUnit.SECONDS);
|
||||
if (user != null)
|
||||
user.sideboard(deck, table.getId(), remaining);
|
||||
user.sideboard(deck, table.getId(), remaining, options.isLimited());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -394,6 +394,10 @@ public class TableController {
|
|||
public void construct() {
|
||||
table.construct();
|
||||
}
|
||||
|
||||
public MatchOptions getOptions() {
|
||||
return options;
|
||||
}
|
||||
|
||||
public void endGame() {
|
||||
UUID choosingPlayerId = match.getChooser();
|
||||
|
|
|
@ -139,8 +139,8 @@ public class User {
|
|||
fireCallback(new ClientCallback("startTournament", tournamentId, new TableClientMessage(tournamentId, playerId)));
|
||||
}
|
||||
|
||||
public void sideboard(final Deck deck, final UUID tableId, final int time) {
|
||||
fireCallback(new ClientCallback("sideboard", tableId, new TableClientMessage(deck, tableId, time)));
|
||||
public void sideboard(final Deck deck, final UUID tableId, final int time, boolean limited) {
|
||||
fireCallback(new ClientCallback("sideboard", tableId, new TableClientMessage(deck, tableId, time, limited)));
|
||||
sideboarding.put(tableId, deck);
|
||||
}
|
||||
|
||||
|
@ -203,8 +203,8 @@ public class User {
|
|||
entry.getValue().construct(0);
|
||||
}
|
||||
for (Entry<UUID, Deck> entry: sideboarding.entrySet()) {
|
||||
int remaining = TableManager.getInstance().getController(entry.getKey()).getRemainingTime();
|
||||
sideboard(entry.getValue(), entry.getKey(), remaining);
|
||||
TableController controller = TableManager.getInstance().getController(entry.getKey());
|
||||
sideboard(entry.getValue(), entry.getKey(), controller.getRemainingTime(), controller.getOptions().isLimited());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
|
@ -83,14 +83,3 @@ public class SiegeGangCommander extends CardImpl<SiegeGangCommander> {
|
|||
return new SiegeGangCommander(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoblinToken extends Token {
|
||||
public GoblinToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Goblin");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
||||
|
|
52
Mage.Sets/src/mage/sets/mirrodin/Terror.java
Normal file
52
Mage.Sets/src/mage/sets/mirrodin/Terror.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.mirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Terror extends mage.sets.tenth.Terror {
|
||||
|
||||
public Terror(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 79;
|
||||
this.expansionSetCode = "MRD";
|
||||
}
|
||||
|
||||
public Terror(final Terror card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Terror copy() {
|
||||
return new Terror(this);
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/sets/planechase/Blaze.java
Normal file
63
Mage.Sets/src/mage/sets/planechase/Blaze.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.planechase;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Blaze extends CardImpl<Blaze> {
|
||||
|
||||
public Blaze(UUID ownerId) {
|
||||
super(ownerId, 47, "Blaze", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{R}");
|
||||
this.expansionSetCode = "HOP";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// Blaze deals X damage to target creature or player.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
|
||||
}
|
||||
|
||||
public Blaze(final Blaze card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Blaze copy() {
|
||||
return new Blaze(this);
|
||||
}
|
||||
}
|
129
Mage.Sets/src/mage/sets/riseoftheeldrazi/SplinterTwin.java
Normal file
129
Mage.Sets/src/mage/sets/riseoftheeldrazi/SplinterTwin.java
Normal file
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* 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.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.AttachmentType;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.sets.tokens.EmptyToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class SplinterTwin extends CardImpl<SplinterTwin> {
|
||||
|
||||
public SplinterTwin(UUID ownerId) {
|
||||
super(ownerId, 165, "Splinter Twin", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}");
|
||||
this.expansionSetCode = "ROE";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
// Enchanted creature has "{tap}: Put a token that's a copy of this creature onto the battlefield. That token has haste. Exile it at the beginning of the next end step."
|
||||
SimpleActivatedAbility gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SplinterTwinEffect(), new TapSourceCost());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA)));
|
||||
}
|
||||
|
||||
public SplinterTwin(final SplinterTwin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SplinterTwin copy() {
|
||||
return new SplinterTwin(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SplinterTwinEffect extends OneShotEffect<SplinterTwinEffect> {
|
||||
|
||||
public SplinterTwinEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Put a token that's a copy of this creature onto the battlefield. That token has haste. Exile it at the beginning of the next end step";
|
||||
}
|
||||
|
||||
public SplinterTwinEffect(final SplinterTwinEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SplinterTwinEffect copy() {
|
||||
return new SplinterTwinEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null) {
|
||||
EmptyToken token = new EmptyToken();
|
||||
CardUtil.copyTo(token).from(card);
|
||||
|
||||
token.addAbility(HasteAbility.getInstance());
|
||||
token.putOntoBattlefield(game, source.getSourceId(), source.getControllerId());
|
||||
|
||||
ExileTargetEffect exileEffect = new ExileTargetEffect();
|
||||
exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
|
||||
DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -30,14 +30,12 @@ package mage.sets.scarsofmirrodin;
|
|||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -47,7 +45,7 @@ import java.util.UUID;
|
|||
* @author Loki
|
||||
*/
|
||||
public class KuldothaRebirth extends CardImpl<KuldothaRebirth> {
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
|
@ -71,15 +69,4 @@ public class KuldothaRebirth extends CardImpl<KuldothaRebirth> {
|
|||
return new KuldothaRebirth(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class GoblinToken extends Token {
|
||||
public GoblinToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color = ObjectColor.RED;
|
||||
subtype.add("Goblin");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
106
Mage.Sets/src/mage/sets/shardsofalara/AgonyWarp.java
Normal file
106
Mage.Sets/src/mage/sets/shardsofalara/AgonyWarp.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Layer;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class AgonyWarp extends CardImpl<AgonyWarp> {
|
||||
|
||||
public AgonyWarp(UUID ownerId) {
|
||||
super(ownerId, 153, "Agony Warp", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}{B}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Target creature gets -3/-0 until end of turn.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to get -3/-0")));
|
||||
// Target creature gets -0/-3 until end of turn.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to get -0/-3")));
|
||||
this.getSpellAbility().addEffect(new AgonyWarpEffect());
|
||||
}
|
||||
|
||||
public AgonyWarp(final AgonyWarp card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgonyWarp copy() {
|
||||
return new AgonyWarp(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AgonyWarpEffect extends ContinuousEffectImpl<AgonyWarpEffect> {
|
||||
|
||||
public AgonyWarpEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.UnboostCreature);
|
||||
this.staticText = "Target creature gets -0/-3 until end of turn";
|
||||
}
|
||||
|
||||
public AgonyWarpEffect(final AgonyWarpEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgonyWarpEffect copy() {
|
||||
return new AgonyWarpEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int affectedTargets = 0;
|
||||
Permanent target1 = game.getPermanent(source.getFirstTarget());
|
||||
Permanent target2 = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (target1 != null) {
|
||||
target1.addPower(-3);
|
||||
affectedTargets++;
|
||||
}
|
||||
if (target2 != null) {
|
||||
target2.addToughness(-3);
|
||||
affectedTargets++;
|
||||
}
|
||||
return affectedTargets > 0;
|
||||
}
|
||||
}
|
100
Mage.Sets/src/mage/sets/shardsofalara/AngelicBenediction.java
Normal file
100
Mage.Sets/src/mage/sets/shardsofalara/AngelicBenediction.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.ExaltedAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class AngelicBenediction extends CardImpl<AngelicBenediction> {
|
||||
|
||||
public AngelicBenediction(UUID ownerId) {
|
||||
super(ownerId, 3, "Angelic Benediction", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setWhite(true);
|
||||
|
||||
this.addAbility(new ExaltedAbility());
|
||||
// Whenever a creature you control attacks alone, you may tap target creature.
|
||||
this.addAbility(new AngelicBenedictionTriggeredAbility());
|
||||
}
|
||||
|
||||
public AngelicBenediction(final AngelicBenediction card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelicBenediction copy() {
|
||||
return new AngelicBenediction(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AngelicBenedictionTriggeredAbility extends TriggeredAbilityImpl<AngelicBenedictionTriggeredAbility> {
|
||||
|
||||
public AngelicBenedictionTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new TapTargetEffect(), true);
|
||||
this.addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public AngelicBenedictionTriggeredAbility(final AngelicBenedictionTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelicBenedictionTriggeredAbility copy() {
|
||||
return new AngelicBenedictionTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DECLARED_ATTACKERS && game.getActivePlayerId().equals(this.controllerId)) {
|
||||
if (game.getCombat().attacksAlone()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a creature you control attacks alone, you may tap target creature";
|
||||
}
|
||||
}
|
66
Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java
Normal file
66
Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class BoneSplinters extends CardImpl<BoneSplinters> {
|
||||
|
||||
public BoneSplinters(UUID ownerId) {
|
||||
super(ownerId, 67, "Bone Splinters", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// As an additional cost to cast Bone Splinters, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
||||
// Destroy target creature.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
public BoneSplinters(final BoneSplinters card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoneSplinters copy() {
|
||||
return new BoneSplinters(this);
|
||||
}
|
||||
}
|
142
Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java
Normal file
142
Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class ClarionUltimatum extends CardImpl<ClarionUltimatum> {
|
||||
|
||||
public ClarionUltimatum(UUID ownerId) {
|
||||
super(ownerId, 163, "Clarion Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{G}{G}{W}{W}{W}{U}{U}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setGreen(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Choose five permanents you control. For each of those permanents, you may search your library for a card with the same name as that permanent. Put those cards onto the battlefield tapped, then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new ClarionUltimatumEffect());
|
||||
}
|
||||
|
||||
public ClarionUltimatum(final ClarionUltimatum card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClarionUltimatum copy() {
|
||||
return new ClarionUltimatum(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ClarionUltimatumEffect extends OneShotEffect<ClarionUltimatumEffect> {
|
||||
|
||||
public ClarionUltimatumEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Choose five permanents you control. For each of those permanents, you may search your library for a card with the same name as that permanent. Put those cards onto the battlefield tapped, then shuffle your library";
|
||||
}
|
||||
|
||||
public ClarionUltimatumEffect(final ClarionUltimatumEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClarionUltimatumEffect copy() {
|
||||
return new ClarionUltimatumEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
int permanentsCount = game.getBattlefield().getAllActivePermanents(source.getControllerId()).size();
|
||||
if (player == null || permanentsCount < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TargetControlledPermanent permanentsTarget = new TargetControlledPermanent(Math.min(permanentsCount, 5));
|
||||
permanentsTarget.setRequired(true);
|
||||
player.choose(Outcome.Benefit, permanentsTarget, game);
|
||||
|
||||
List<Card> chosenCards = new ArrayList<Card>();
|
||||
List<String> namesFiltered = new ArrayList<String>();
|
||||
List<UUID> permanents = permanentsTarget.getTargets();
|
||||
for (UUID permanentId : permanents) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
final String cardName = permanent.getName();
|
||||
if (!namesFiltered.contains(cardName)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Search for ").append(cardName).append(" in your library?");
|
||||
|
||||
if (player.chooseUse(Outcome.PutCardInPlay, sb.toString(), game)) {
|
||||
FilterCard filter = new FilterCard("card named" + cardName);
|
||||
filter.getName().add(cardName);
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
|
||||
if (player.searchLibrary(target, game)) {
|
||||
Card card = player.getLibrary().remove(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
chosenCards.add(card);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
namesFiltered.add(cardName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Card card : chosenCards) {
|
||||
card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
permanent.setTapped(true);
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
}
|
109
Mage.Sets/src/mage/sets/shardsofalara/CruelUltimatum.java
Normal file
109
Mage.Sets/src/mage/sets/shardsofalara/CruelUltimatum.java
Normal file
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DiscardTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class CruelUltimatum extends CardImpl<CruelUltimatum> {
|
||||
|
||||
public CruelUltimatum(UUID ownerId) {
|
||||
super(ownerId, 164, "Cruel Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{U}{U}{B}{B}{B}{R}{R}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Target opponent sacrifices a creature, discards three cards, then loses 5 life. You return a creature card from your graveyard to your hand, draw three cards, then gain 5 life.
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
this.getSpellAbility().addEffect(new SacrificeEffect(FilterCreaturePermanent.getDefault(), 1, "a creature"));
|
||||
this.getSpellAbility().addEffect(new DiscardTargetEffect(3));
|
||||
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(5));
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
|
||||
this.getSpellAbility().addEffect(new CruelUltimatumEffect());
|
||||
this.getSpellAbility().addEffect(new DrawCardEffect(3));
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(5));
|
||||
}
|
||||
|
||||
public CruelUltimatum(final CruelUltimatum card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CruelUltimatum copy() {
|
||||
return new CruelUltimatum(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CruelUltimatumEffect extends OneShotEffect<CruelUltimatumEffect> {
|
||||
|
||||
public CruelUltimatumEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
}
|
||||
|
||||
public CruelUltimatumEffect(final CruelUltimatumEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CruelUltimatumEffect copy() {
|
||||
return new CruelUltimatumEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getTargets().get(1).getFirstTarget());
|
||||
if (card != null) {
|
||||
return card.moveToZone(Zone.HAND, source.getId(), game, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
61
Mage.Sets/src/mage/sets/shardsofalara/DragonFodder.java
Normal file
61
Mage.Sets/src/mage/sets/shardsofalara/DragonFodder.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class DragonFodder extends CardImpl<DragonFodder> {
|
||||
|
||||
public DragonFodder(UUID ownerId) {
|
||||
super(ownerId, 97, "Dragon Fodder", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// Put two 1/1 red Goblin creature tokens onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), 2));
|
||||
}
|
||||
|
||||
public DragonFodder(final DragonFodder card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DragonFodder copy() {
|
||||
return new DragonFodder(this);
|
||||
}
|
||||
}
|
162
Mage.Sets/src/mage/sets/shardsofalara/GiftOfTheGargantuan.java
Normal file
162
Mage.Sets/src/mage/sets/shardsofalara/GiftOfTheGargantuan.java
Normal file
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class GiftOfTheGargantuan extends CardImpl<GiftOfTheGargantuan> {
|
||||
|
||||
public GiftOfTheGargantuan(UUID ownerId) {
|
||||
super(ownerId, 132, "Gift of the Gargantuan", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Look at the top four cards of your library. You may reveal a creature card and/or a land card from among them and put the revealed cards into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new GiftOfTheGargantuanEffect());
|
||||
}
|
||||
|
||||
public GiftOfTheGargantuan(final GiftOfTheGargantuan card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GiftOfTheGargantuan copy() {
|
||||
return new GiftOfTheGargantuan(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GiftOfTheGargantuanEffect extends OneShotEffect<GiftOfTheGargantuanEffect> {
|
||||
|
||||
public GiftOfTheGargantuanEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top four cards of your library. You may reveal a creature card and/or a land card from among them and put the revealed cards into your hand. Put the rest on the bottom of your library in any order";
|
||||
}
|
||||
|
||||
public GiftOfTheGargantuanEffect(final GiftOfTheGargantuanEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GiftOfTheGargantuanEffect copy() {
|
||||
return new GiftOfTheGargantuanEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl(Zone.PICK);
|
||||
boolean creatureCardFound = false;
|
||||
boolean landCardFound = false;
|
||||
int count = Math.min(player.getLibrary().size(), 4);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
game.setZone(card.getId(), Zone.PICK);
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
creatureCardFound = true;
|
||||
}
|
||||
if (card.getCardType().contains(CardType.LAND)) {
|
||||
landCardFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
player.lookAtCards("Gift of the Gargantuan", cards, game);
|
||||
|
||||
if ((creatureCardFound || landCardFound) && player.chooseUse(Outcome.DrawCard, "Do you wish to reveal a creature card and/or a land card and put them into your hand?", game)) {
|
||||
Cards revealedCards = new CardsImpl();
|
||||
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCreatureCard("creature card to reveal and put into your hand"));
|
||||
if (creatureCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, false);
|
||||
revealedCards.add(card);
|
||||
}
|
||||
}
|
||||
|
||||
target = new TargetCard(Zone.PICK, new FilterLandCard("land card to reveal and put into your hand"));
|
||||
if (landCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, false);
|
||||
revealedCards.add(card);
|
||||
}
|
||||
}
|
||||
|
||||
if (!revealedCards.isEmpty()) {
|
||||
player.revealCards("Gift of the Gargantuan", revealedCards, game);
|
||||
}
|
||||
}
|
||||
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
|
||||
target.setRequired(true);
|
||||
while (cards.size() > 1) {
|
||||
player.choose(Outcome.Neutral, cards, target, game);
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||
}
|
||||
target.clearChosen();
|
||||
}
|
||||
if (cards.size() == 1) {
|
||||
Card card = cards.get(cards.iterator().next(), game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
65
Mage.Sets/src/mage/sets/shardsofalara/KissOfTheAmesha.java
Normal file
65
Mage.Sets/src/mage/sets/shardsofalara/KissOfTheAmesha.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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class KissOfTheAmesha extends CardImpl<KissOfTheAmesha> {
|
||||
|
||||
public KissOfTheAmesha(UUID ownerId) {
|
||||
super(ownerId, 177, "Kiss of the Amesha", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{W}{U}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Target player gains 7 life and draws two cards.
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addEffect(new GainLifeTargetEffect(7));
|
||||
this.getSpellAbility().addEffect(new DrawCardTargetEffect(2));
|
||||
}
|
||||
|
||||
public KissOfTheAmesha(final KissOfTheAmesha card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KissOfTheAmesha copy() {
|
||||
return new KissOfTheAmesha(this);
|
||||
}
|
||||
}
|
70
Mage.Sets/src/mage/sets/shardsofalara/TitanicUltimatum.java
Normal file
70
Mage.Sets/src/mage/sets/shardsofalara/TitanicUltimatum.java
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class TitanicUltimatum extends CardImpl<TitanicUltimatum> {
|
||||
|
||||
public TitanicUltimatum(UUID ownerId) {
|
||||
super(ownerId, 204, "Titanic Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{R}{R}{G}{G}{G}{W}{W}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Until end of turn, creatures you control get +5/+5 and gain first strike, lifelink, and trample.
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(5, 5, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
|
||||
}
|
||||
|
||||
public TitanicUltimatum(final TitanicUltimatum card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TitanicUltimatum copy() {
|
||||
return new TitanicUltimatum(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/tenth/Blaze.java
Normal file
52
Mage.Sets/src/mage/sets/tenth/Blaze.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.tenth;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Blaze extends mage.sets.planechase.Blaze {
|
||||
|
||||
public Blaze(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 190;
|
||||
this.expansionSetCode = "10E";
|
||||
}
|
||||
|
||||
public Blaze(final Blaze card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Blaze copy() {
|
||||
return new Blaze(this);
|
||||
}
|
||||
}
|
72
Mage.Sets/src/mage/sets/tenth/Terror.java
Normal file
72
Mage.Sets/src/mage/sets/tenth/Terror.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.tenth;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Terror extends CardImpl<Terror> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonartifact, nonblack creature");
|
||||
|
||||
static {
|
||||
filter.getNotCardType().add(CardType.ARTIFACT);
|
||||
filter.setNotCardType(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setNotColor(true);
|
||||
}
|
||||
|
||||
public Terror(UUID ownerId) {
|
||||
super(ownerId, 182, "Terror", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
this.expansionSetCode = "10E";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Destroy target nonartifact, nonblack creature. It can't be regenerated.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
}
|
||||
|
||||
public Terror(final Terror card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Terror copy() {
|
||||
return new Terror(this);
|
||||
}
|
||||
}
|
108
Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java
Normal file
108
Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* 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.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class RuinousMinotaur extends CardImpl<RuinousMinotaur> {
|
||||
|
||||
public RuinousMinotaur(UUID ownerId) {
|
||||
super(ownerId, 145, "Ruinous Minotaur", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.subtype.add("Minotaur");
|
||||
this.subtype.add("Warrior");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever Ruinous Minotaur deals damage to an opponent, sacrifice a land.
|
||||
this.addAbility(new RuinousMinotaurTriggeredAbility());
|
||||
}
|
||||
|
||||
public RuinousMinotaur(final RuinousMinotaur card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuinousMinotaur copy() {
|
||||
return new RuinousMinotaur(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RuinousMinotaurTriggeredAbility extends TriggeredAbilityImpl<RuinousMinotaurTriggeredAbility> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
}
|
||||
|
||||
public RuinousMinotaurTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new SacrificeTargetEffect(), true);
|
||||
this.addTarget(new TargetControlledPermanent(filter));
|
||||
}
|
||||
|
||||
public RuinousMinotaurTriggeredAbility(final RuinousMinotaurTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuinousMinotaurTriggeredAbility copy() {
|
||||
return new RuinousMinotaurTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)
|
||||
&& game.getOpponents(this.getControllerId()).contains(event.getTargetId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} deals damage to an opponent, sacrifice a land.";
|
||||
}
|
||||
}
|
|
@ -41,7 +41,7 @@ import mage.game.Game;
|
|||
* Affinity for artifacts
|
||||
*/
|
||||
public class AffinityForArtifactsAbility extends SimpleStaticAbility implements AdjustingSourceCosts {
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
static {
|
||||
filter.getCardType().add(Constants.CardType.ARTIFACT);
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -60,9 +60,7 @@ public class ExaltedAbility extends TriggeredAbilityImpl<ExaltedAbility> {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DECLARED_ATTACKERS && game.getActivePlayerId().equals(this.controllerId) ) {
|
||||
if (game.getCombat().attacksAlone()) {
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent();
|
||||
this.addTarget(target);
|
||||
this.getTargets().get(0).add(game.getCombat().getAttackers().get(0),game);
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(game.getCombat().getAttackers().get(0)));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public class MatchOptions implements Serializable {
|
|||
protected int winsNeeded;
|
||||
protected String gameType;
|
||||
protected String deckType;
|
||||
protected boolean limited;
|
||||
protected List<String> playerTypes = new ArrayList<String>();
|
||||
|
||||
public MatchOptions(String name, String gameType) {
|
||||
|
@ -100,5 +101,12 @@ public class MatchOptions implements Serializable {
|
|||
public List<String> getPlayerTypes() {
|
||||
return playerTypes;
|
||||
}
|
||||
|
||||
public boolean isLimited() {
|
||||
return limited;
|
||||
}
|
||||
|
||||
public void setLimited(boolean limited) {
|
||||
this.limited = limited;
|
||||
}
|
||||
}
|
||||
|
|
49
Mage/src/mage/game/permanent/token/GoblinToken.java
Normal file
49
Mage/src/mage/game/permanent/token/GoblinToken.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* 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.game.permanent.token;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class GoblinToken extends Token {
|
||||
|
||||
public GoblinToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Goblin");
|
||||
|
||||
color = ObjectColor.RED;
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue