mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
commit
2e31d55049
72 changed files with 1636 additions and 107 deletions
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.mage</groupId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-common</artifactId>
|
||||
|
|
|
@ -40,7 +40,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
|||
*/
|
||||
public final static int MAGE_VERSION_MAJOR = 1;
|
||||
public final static int MAGE_VERSION_MINOR = 4;
|
||||
public final static int MAGE_VERSION_PATCH = 25;
|
||||
public final static int MAGE_VERSION_PATCH = 26;
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "V0";
|
||||
public final static String MAGE_VERSION_INFO = "";
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-counter-plugin</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-plugins</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.mage</groupId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-deck-constructed</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-deck-limited</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-canadianhighlanderduel</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-commanderduel</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-commanderfreeforall</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-freeforall</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-momirduel</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-pennydreadfulcommanderfreeforall</artifactId>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#Generated by Maven
|
||||
#Thu Aug 03 09:40:46 AEST 2017
|
||||
version=1.4.25
|
||||
#Tue Aug 15 00:36:02 CEST 2017
|
||||
version=1.4.26
|
||||
groupId=org.mage
|
||||
artifactId=mage-game-pennydreadfulcommanderfreeforall
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-tinyleadersduel</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-game-twoplayerduel</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-player-ai-draftbot</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-player-ai-ma</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-player-ai</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-player-ai-mcts</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-player-aiminimax</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-player-human</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-tournament-boosterdraft</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-tournament-constructed</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-tournament-sealed</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-server-plugins</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-server</artifactId>
|
||||
|
|
|
@ -613,7 +613,7 @@ public class GameController implements GameCallback {
|
|||
if (viewLimitedDeckPlayer != null) {
|
||||
if (viewLimitedDeckPlayer.isHuman()) {
|
||||
for (MatchPlayer p : TableManager.instance.getTable(tableId).getMatch().getPlayers()) {
|
||||
if (p.getPlayer().getId() == userIdRequester) {
|
||||
if (p.getPlayer().getId().equals(userIdRequester)) {
|
||||
Optional<User> u = UserManager.instance.getUser(origId);
|
||||
if (u != null && u.isPresent() && p.getDeck() != null) {
|
||||
u.get().ccViewLimitedDeck(p.getDeck(), tableId, requestsOpen, true);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.mage</groupId>
|
||||
|
|
|
@ -181,7 +181,7 @@ class AbandonedSarcophagusReplacementEffect extends ReplacementEffectImpl {
|
|||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null
|
||||
&& watcher != null
|
||||
&& card.getOwnerId() == controller.getId()) {
|
||||
&& card.getOwnerId().equals(controller.getId())) {
|
||||
for (Ability ability : card.getAbilities()) {
|
||||
if (ability instanceof CyclingAbility) {
|
||||
cardHasCycling = true;
|
||||
|
@ -224,8 +224,8 @@ class AbandonedSarcophagusWatcher extends Watcher {
|
|||
Card card = game.getCard(event.getSourceId());
|
||||
Player controller = game.getPlayer(event.getPlayerId());
|
||||
if (card != null
|
||||
&& controller != null
|
||||
&& card.getOwnerId() == controller.getId()) {
|
||||
&& controller != null
|
||||
&& card.getOwnerId().equals(controller.getId())) {
|
||||
Cards c = getCardsCycledThisTurn(event.getPlayerId());
|
||||
c.add(card);
|
||||
cycledCardsThisTurn.put(event.getPlayerId(), c);
|
||||
|
|
|
@ -115,7 +115,7 @@ class AzoriusAEthermageAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
if (permanentThatMoved != null
|
||||
&& filter.match(permanentThatMoved, sourceId, controllerId, game)
|
||||
&& zEvent.getPlayerId() == controllerId) { //The controller's hand is where the permanent moved to.
|
||||
&& zEvent.getPlayerId().equals(controllerId)) { //The controller's hand is where the permanent moved to.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
158
Mage.Sets/src/mage/cards/c/CurseOfBounty.java
Normal file
158
Mage.Sets/src/mage/cards/c/CurseOfBounty.java
Normal file
|
@ -0,0 +1,158 @@
|
|||
/*
|
||||
* 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.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
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.TargetPlayer;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Saga
|
||||
*/
|
||||
public class CurseOfBounty extends CardImpl {
|
||||
|
||||
public CurseOfBounty(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
|
||||
this.subtype.add(SubType.AURA, SubType.CURSE);
|
||||
|
||||
// Enchant player
|
||||
TargetPlayer auraTarget = new TargetPlayer();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Whenever enchanted player is attacked, untap all nonland permanents you control.
|
||||
// Each opponent attacking that player untaps all nonland permanents he or she controls.
|
||||
Ability ability = new CurseOfBountyTriggeredAbility();
|
||||
ability.addEffect(new UntapAllControllerEffect(new FilterNonlandPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public CurseOfBounty(final CurseOfBounty card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfBounty copy() {
|
||||
return new CurseOfBounty(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurseOfBountyTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public CurseOfBountyTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new UntapAllNonlandsTargetEffect(), false);
|
||||
}
|
||||
|
||||
public CurseOfBountyTriggeredAbility(final CurseOfBountyTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DECLARED_ATTACKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever enchanted player is attacked, untap all nonland permanents you control. "
|
||||
+ "Each opponent attacking that player untaps all nonland permanents he or she controls.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfBountyTriggeredAbility copy() {
|
||||
return new CurseOfBountyTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UntapAllNonlandsTargetEffect extends OneShotEffect {
|
||||
|
||||
public UntapAllNonlandsTargetEffect() {
|
||||
super(Outcome.Untap);
|
||||
}
|
||||
|
||||
public UntapAllNonlandsTargetEffect(final UntapAllNonlandsTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||
if (player != null) {
|
||||
for (Permanent nonland: game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_NON_LAND, player.getId(), game)) {
|
||||
nonland.untap(game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UntapAllNonlandsTargetEffect copy() {
|
||||
return new UntapAllNonlandsTargetEffect(this);
|
||||
}
|
||||
|
||||
}
|
126
Mage.Sets/src/mage/cards/c/CurseOfDisturbance.java
Normal file
126
Mage.Sets/src/mage/cards/c/CurseOfDisturbance.java
Normal file
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* 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.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
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.TargetPlayer;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.CreateTokenTargetEffect;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Saga
|
||||
*/
|
||||
public class CurseOfDisturbance extends CardImpl {
|
||||
|
||||
public CurseOfDisturbance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}");
|
||||
this.subtype.add(SubType.AURA, SubType.CURSE);
|
||||
|
||||
// Enchant player
|
||||
TargetPlayer auraTarget = new TargetPlayer();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Whenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.
|
||||
Ability ability = new CurseOfDisturbanceTriggeredAbility();
|
||||
ability.addEffect(new CreateTokenEffect(new ZombieToken()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public CurseOfDisturbance(final CurseOfDisturbance card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfDisturbance copy() {
|
||||
return new CurseOfDisturbance(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurseOfDisturbanceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public CurseOfDisturbanceTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenTargetEffect(new ZombieToken()), false);
|
||||
}
|
||||
|
||||
public CurseOfDisturbanceTriggeredAbility(final CurseOfDisturbanceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DECLARED_ATTACKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfDisturbanceTriggeredAbility copy() {
|
||||
return new CurseOfDisturbanceTriggeredAbility(this);
|
||||
}
|
||||
|
||||
}
|
128
Mage.Sets/src/mage/cards/c/CurseOfOpulence.java
Normal file
128
Mage.Sets/src/mage/cards/c/CurseOfOpulence.java
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 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.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
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.TargetPlayer;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.CreateTokenTargetEffect;
|
||||
import mage.game.permanent.token.GoldToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Saga
|
||||
*/
|
||||
public class CurseOfOpulence extends CardImpl {
|
||||
|
||||
public CurseOfOpulence(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}");
|
||||
this.subtype.add(SubType.AURA, SubType.CURSE);
|
||||
|
||||
// Enchant player
|
||||
TargetPlayer auraTarget = new TargetPlayer();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Whenever enchanted player is attacked, create a colorless artifact token named Gold.
|
||||
// It has "sacrifice this artifact: Add one mana of any color to your mana pool." Each opponent attacking that player does the same.
|
||||
Ability ability = new CurseOfOpulenceTriggeredAbility();
|
||||
ability.addEffect(new CreateTokenEffect(new GoldToken()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public CurseOfOpulence(final CurseOfOpulence card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfOpulence copy() {
|
||||
return new CurseOfOpulence(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurseOfOpulenceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public CurseOfOpulenceTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenTargetEffect(new GoldToken()), false);
|
||||
}
|
||||
|
||||
public CurseOfOpulenceTriggeredAbility(final CurseOfOpulenceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DECLARED_ATTACKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever enchanted player is attacked, create a colorless artifact token named Gold. "
|
||||
+ "It has \"sacrifice this artifact: Add one mana of any color to your mana pool.\" Each opponent attacking that player does the same.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfOpulenceTriggeredAbility copy() {
|
||||
return new CurseOfOpulenceTriggeredAbility(this);
|
||||
}
|
||||
|
||||
}
|
125
Mage.Sets/src/mage/cards/c/CurseOfVerbosity.java
Normal file
125
Mage.Sets/src/mage/cards/c/CurseOfVerbosity.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.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
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.TargetPlayer;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Saga
|
||||
*/
|
||||
public class CurseOfVerbosity extends CardImpl {
|
||||
|
||||
public CurseOfVerbosity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
|
||||
this.subtype.add(SubType.AURA, SubType.CURSE);
|
||||
|
||||
// Enchant player
|
||||
TargetPlayer auraTarget = new TargetPlayer();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Whenever enchanted player is attacked, draw a card. Each opponent attacking that player does the same.
|
||||
Ability ability = new CurseOfVerbosityTriggeredAbility();
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public CurseOfVerbosity(final CurseOfVerbosity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfVerbosity copy() {
|
||||
return new CurseOfVerbosity(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurseOfVerbosityTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public CurseOfVerbosityTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardTargetEffect(1), false);
|
||||
}
|
||||
|
||||
public CurseOfVerbosityTriggeredAbility(final CurseOfVerbosityTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DECLARED_ATTACKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever enchanted player is attacked, draw a card. Each opponent attacking that player does the same.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfVerbosityTriggeredAbility copy() {
|
||||
return new CurseOfVerbosityTriggeredAbility(this);
|
||||
}
|
||||
|
||||
}
|
125
Mage.Sets/src/mage/cards/c/CurseOfVitality.java
Normal file
125
Mage.Sets/src/mage/cards/c/CurseOfVitality.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.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
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.TargetPlayer;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Saga
|
||||
*/
|
||||
public class CurseOfVitality extends CardImpl {
|
||||
|
||||
public CurseOfVitality(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
|
||||
this.subtype.add(SubType.AURA, SubType.CURSE);
|
||||
|
||||
// Enchant player
|
||||
TargetPlayer auraTarget = new TargetPlayer();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Whenever enchanted player is attacked, you gain 2 life. Each opponent attacking that player does the same.
|
||||
Ability ability = new CurseOfVitalityTriggeredAbility();
|
||||
ability.addEffect(new GainLifeEffect(2));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public CurseOfVitality(final CurseOfVitality card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfVitality copy() {
|
||||
return new CurseOfVitality(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurseOfVitalityTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public CurseOfVitalityTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new GainLifeTargetEffect(2), false);
|
||||
}
|
||||
|
||||
public CurseOfVitalityTriggeredAbility(final CurseOfVitalityTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DECLARED_ATTACKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever enchanted player is attacked, you gain 2 life. Each opponent attacking that player does the same.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfVitalityTriggeredAbility copy() {
|
||||
return new CurseOfVitalityTriggeredAbility(this);
|
||||
}
|
||||
|
||||
}
|
77
Mage.Sets/src/mage/cards/d/DaruHealer.java
Normal file
77
Mage.Sets/src/mage/cards/d/DaruHealer.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.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DaruHealer extends CardImpl {
|
||||
|
||||
public DaruHealer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Morph {W}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{W}")));
|
||||
|
||||
}
|
||||
|
||||
public DaruHealer(final DaruHealer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaruHealer copy() {
|
||||
return new DaruHealer(this);
|
||||
}
|
||||
}
|
112
Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java
Normal file
112
Mage.Sets/src/mage/cards/d/DaughterOfAutumn.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.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.RedirectionEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DaughterOfAutumn extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creature");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public DaughterOfAutumn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
|
||||
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add("Avatar");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// {W}: The next 1 damage that would be dealt to target white creature this turn is dealt to Daughter of Autumn instead.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DaughterOfAutumnPreventDamageTargetEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("{W}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
}
|
||||
|
||||
public DaughterOfAutumn(final DaughterOfAutumn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaughterOfAutumn copy() {
|
||||
return new DaughterOfAutumn(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DaughterOfAutumnPreventDamageTargetEffect extends RedirectionEffect {
|
||||
|
||||
public DaughterOfAutumnPreventDamageTargetEffect(Duration duration, int amount) {
|
||||
super(duration, amount, true);
|
||||
staticText = "The next " + amount + " damage that would be dealt to target white creature this turn is dealt to {this} instead";
|
||||
}
|
||||
|
||||
public DaughterOfAutumnPreventDamageTargetEffect(final DaughterOfAutumnPreventDamageTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaughterOfAutumnPreventDamageTargetEffect copy() {
|
||||
return new DaughterOfAutumnPreventDamageTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) {
|
||||
TargetPermanent target = new TargetPermanent();
|
||||
target.add(source.getSourceId(), game);
|
||||
redirectTarget = target;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
104
Mage.Sets/src/mage/cards/d/DauntingDefender.java
Normal file
104
Mage.Sets/src/mage/cards/d/DauntingDefender.java
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* 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.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DauntingDefender extends CardImpl {
|
||||
|
||||
public DauntingDefender(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
|
||||
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// If a source would deal damage to a Cleric creature you control, prevent 1 of that damage.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DauntingDefenderEffect(1)));
|
||||
}
|
||||
|
||||
public DauntingDefender(final DauntingDefender card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DauntingDefender copy() {
|
||||
return new DauntingDefender(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DauntingDefenderEffect extends PreventionEffectImpl {
|
||||
|
||||
public DauntingDefenderEffect(int amount) {
|
||||
super(Duration.WhileOnBattlefield, amount, false, false);
|
||||
this.staticText = "If a source would deal damage to a Cleric creature you control, prevent " + amount + " of that damage";
|
||||
}
|
||||
|
||||
public DauntingDefenderEffect(DauntingDefenderEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DAMAGE_CREATURE) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && permanent.getControllerId().equals(source.getControllerId()) && permanent.getSubtype(game).contains(SubType.CLERIC)) {
|
||||
return super.applies(event, source, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DauntingDefenderEffect copy() {
|
||||
return new DauntingDefenderEffect(this);
|
||||
}
|
||||
}
|
78
Mage.Sets/src/mage/cards/d/Delraich.java
Normal file
78
Mage.Sets/src/mage/cards/d/Delraich.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 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.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.AlternativeCostSourceAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Delraich extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("black creature");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public Delraich(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}");
|
||||
|
||||
this.subtype.add("Horror");
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// You may sacrifice three black creatures rather than pay Delraich's mana cost.
|
||||
AlternativeCostSourceAbility alternateCosts = new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, filter, false)));
|
||||
this.addAbility(alternateCosts);
|
||||
}
|
||||
|
||||
public Delraich(final Delraich card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Delraich copy() {
|
||||
return new Delraich(this);
|
||||
}
|
||||
}
|
116
Mage.Sets/src/mage/cards/d/Dermoplasm.java
Normal file
116
Mage.Sets/src/mage/cards/d/Dermoplasm.java
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* 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.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Dermoplasm extends CardImpl {
|
||||
|
||||
public Dermoplasm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
this.subtype.add("Shapeshifter");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Morph {2}{U}{U}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}{U}")));
|
||||
|
||||
// When Dermoplasm is turned face up, you may put a creature card with a morph ability from your hand onto the battlefield face up. If you do, return Dermoplasm to its owner's hand.
|
||||
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new DermoplasmEffect()));
|
||||
}
|
||||
|
||||
public Dermoplasm(final Dermoplasm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dermoplasm copy() {
|
||||
return new Dermoplasm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DermoplasmEffect extends OneShotEffect {
|
||||
|
||||
public DermoplasmEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may put a creature card with a morph ability from your hand onto the battlefield face up. If you do, return {this} to its owner's hand";
|
||||
}
|
||||
|
||||
public DermoplasmEffect(final DermoplasmEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DermoplasmEffect copy() {
|
||||
return new DermoplasmEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent thisCreature = game.getPermanent(source.getId());
|
||||
FilterCreatureCard filter = new FilterCreatureCard("a creature card with a morph ability");
|
||||
filter.add(new AbilityPredicate(MorphAbility.class));
|
||||
Effect effect = new PutPermanentOnBattlefieldEffect(new FilterCreatureCard(filter));
|
||||
if (effect.apply(game, source)) {
|
||||
if (thisCreature != null) {
|
||||
effect = new ReturnToHandTargetEffect();
|
||||
effect.setTargetPointer(new FixedTarget(thisCreature.getId()));
|
||||
effect.apply(game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
60
Mage.Sets/src/mage/cards/d/Disempower.java
Normal file
60
Mage.Sets/src/mage/cards/d/Disempower.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* 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.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class Disempower extends CardImpl {
|
||||
|
||||
public Disempower(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
|
||||
// Put target artifact or enchantment on top of its owner's library.
|
||||
this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
|
||||
}
|
||||
|
||||
public Disempower(final Disempower card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Disempower copy() {
|
||||
return new Disempower(this);
|
||||
}
|
||||
}
|
97
Mage.Sets/src/mage/cards/d/DivineCongregation.java
Normal file
97
Mage.Sets/src/mage/cards/d/DivineCongregation.java
Normal file
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* 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.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.SuspendAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DivineCongregation extends CardImpl {
|
||||
|
||||
public DivineCongregation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}");
|
||||
|
||||
// You gain 2 life for each creature target player controls.
|
||||
this.getSpellAbility().addEffect(new DivineCongregationEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
// Suspend 5-{1}{W}
|
||||
this.addAbility(new SuspendAbility(5, new ManaCostsImpl("{1}{W}"), this));
|
||||
}
|
||||
|
||||
public DivineCongregation(final DivineCongregation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DivineCongregation copy() {
|
||||
return new DivineCongregation(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DivineCongregationEffect extends OneShotEffect {
|
||||
|
||||
public DivineCongregationEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "You gain 2 life for each creature target player controls";
|
||||
}
|
||||
|
||||
public DivineCongregationEffect(final DivineCongregationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DivineCongregationEffect copy() {
|
||||
return new DivineCongregationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (controller != null) {
|
||||
int critters = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game).size();
|
||||
controller.gainLife(2 * critters, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
99
Mage.Sets/src/mage/cards/f/FracturedIdentity.java
Normal file
99
Mage.Sets/src/mage/cards/f/FracturedIdentity.java
Normal file
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* 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.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class FracturedIdentity extends CardImpl {
|
||||
|
||||
public FracturedIdentity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{U}");
|
||||
|
||||
// Exile target nonland permanent. Each player other than its controller creates a token that's a copy of it.
|
||||
this.getSpellAbility().addEffect(new FracturedIdentityEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
|
||||
}
|
||||
|
||||
public FracturedIdentity(final FracturedIdentity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FracturedIdentity copy() {
|
||||
return new FracturedIdentity(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FracturedIdentityEffect extends OneShotEffect {
|
||||
|
||||
public FracturedIdentityEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "Exile target nonland permanent. Each player other than its controller creates a token that's a copy of it";
|
||||
}
|
||||
|
||||
public FracturedIdentityEffect(final FracturedIdentityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FracturedIdentityEffect copy() {
|
||||
return new FracturedIdentityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
permanent.moveToExile(null, null, source.getSourceId(), game);
|
||||
UUID controllerId = permanent.getControllerId();
|
||||
for (UUID opponentId : game.getOpponents(controllerId)) {
|
||||
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(opponentId, null, true);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
effect.apply(game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
101
Mage.Sets/src/mage/cards/k/KindredDominance.java
Normal file
101
Mage.Sets/src/mage/cards/k/KindredDominance.java
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* 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.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caldover
|
||||
*/
|
||||
public class KindredDominance extends CardImpl {
|
||||
|
||||
public KindredDominance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{B}{B}");
|
||||
|
||||
// Choose a creature type. Destroy all creatures that are not the chosen type.
|
||||
this.getSpellAbility().addEffect(new ChooseCreatureTypeEffect(Outcome.DestroyPermanent));
|
||||
this.getSpellAbility().addEffect(new KindredDominanceEffect());
|
||||
}
|
||||
|
||||
public KindredDominance(final KindredDominance card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KindredDominance copy() {
|
||||
return new KindredDominance(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KindredDominanceEffect extends OneShotEffect {
|
||||
|
||||
public KindredDominanceEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "Destroy all creatures that are not the chosen type.";
|
||||
}
|
||||
|
||||
public KindredDominanceEffect(final KindredDominanceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KindredDominanceEffect copy() {
|
||||
return new KindredDominanceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (controller != null & mageObject != null) {
|
||||
String creatureType = game.getState().getValue(mageObject.getId() + "_type").toString();
|
||||
FilterPermanent filter = new FilterCreaturePermanent("creatures");
|
||||
filter.add(Predicates.not(new SubtypePredicate(SubType.byDescription(creatureType))));
|
||||
return new DestroyAllEffect(filter).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -42,6 +42,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
@ -54,7 +55,7 @@ import mage.target.common.TargetCardInLibrary;
|
|||
public class LilianaVess extends CardImpl {
|
||||
|
||||
public LilianaVess(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{B}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}");
|
||||
this.subtype.add("Liliana");
|
||||
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
|
||||
|
@ -96,19 +97,18 @@ class LilianaVessEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
Set<Card> creatureCards = new LinkedHashSet<>();
|
||||
for (Card card : player.getGraveyard().getCards(game)) {
|
||||
if (card.isCreature()) {
|
||||
creatureCards.add(card);
|
||||
}
|
||||
if (controller != null) {
|
||||
Set<Card> creatureCards = new LinkedHashSet<>();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
creatureCards.addAll(player.getGraveyard().getCards(new FilterCreatureCard(), game));
|
||||
}
|
||||
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);
|
||||
}
|
||||
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -42,10 +45,6 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
@ -123,7 +122,7 @@ class MenacingOgreEffect extends OneShotEffect {
|
|||
game.informPlayers(player.getLogName() + " chose number " + numberChosen.get(player));
|
||||
if (numberChosen.get(player) >= highestNumber) {
|
||||
player.loseLife(highestNumber, game, false);
|
||||
if (player.getId() == source.getControllerId()
|
||||
if (player.getId().equals(source.getControllerId())
|
||||
&& menacingOgre != null) {
|
||||
menacingOgre.addCounters(CounterType.P1P1.createInstance(2), source, game);
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ class SpellWasNotCastCondition implements Condition {
|
|||
List<Spell> spells = watcher.getSpellsCastThisTurn(source.getControllerId());
|
||||
if (spells != null) {
|
||||
for (Spell spell : spells) {
|
||||
if (spell.getSourceId() == cardId) {
|
||||
if (spell.getSourceId().equals(cardId)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
@ -39,7 +38,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -54,7 +52,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public class RealitySmasher extends CardImpl {
|
||||
|
||||
public RealitySmasher(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{C}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{C}");
|
||||
this.subtype.add("Eldrazi");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
@ -66,7 +64,7 @@ public class RealitySmasher extends CardImpl {
|
|||
// Whenever Reality Smasher becomes the target of a spell an opponent controls, counter that spell unless its controller discards a card.
|
||||
this.addAbility(new RealitySmasherTriggeredAbility());
|
||||
}
|
||||
|
||||
|
||||
public RealitySmasher(final RealitySmasher card) {
|
||||
super(card);
|
||||
}
|
||||
|
@ -79,8 +77,6 @@ public class RealitySmasher extends CardImpl {
|
|||
|
||||
class RealitySmasherTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterSpell spellCard = new FilterSpell("a spell");
|
||||
|
||||
public RealitySmasherTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new DiscardCardCost()), false);
|
||||
}
|
||||
|
@ -106,11 +102,8 @@ class RealitySmasherTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return false;
|
||||
} else {
|
||||
if (event.getTargetId().equals(this.getSourceId())
|
||||
&& game.getOpponents(this.controllerId).contains(event.getPlayerId())
|
||||
&& spellCard.match(spell, getSourceId(), getControllerId(), game)) {
|
||||
for (Effect effect : getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(spell.getId()));
|
||||
}
|
||||
&& game.getOpponents(this.controllerId).contains(event.getPlayerId())) {
|
||||
getEffects().setTargetPointer(new FixedTarget(spell.getId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,11 +49,10 @@ public class Reparations extends CardImpl {
|
|||
|
||||
public Reparations(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{U}");
|
||||
|
||||
|
||||
// Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card.
|
||||
this.addAbility(new ReparationsTriggeredAbility());
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Reparations(final Reparations card) {
|
||||
|
@ -96,12 +95,12 @@ class ReparationsTriggeredAbility extends TriggeredAbilityImpl {
|
|||
Player targetPlayer = game.getPlayer(stackObject.getStackAbility().getFirstTarget());
|
||||
Permanent targetPermanent = game.getPermanent(stackObject.getStackAbility().getFirstTarget());
|
||||
if (targetPlayer != null
|
||||
&& targetPlayer.getId() == controllerId) {
|
||||
&& targetPlayer.getId().equals(controllerId)) {
|
||||
return true;
|
||||
}
|
||||
if (targetPermanent != null
|
||||
&& targetPermanent.isCreature()
|
||||
&& targetPermanent.getControllerId() == controllerId) {
|
||||
&& targetPermanent.getControllerId().equals(controllerId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ class SpreadingPlagueEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent creature = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
Permanent creature = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source));
|
||||
if (creature != null) {
|
||||
ObjectColor color = creature.getColor(game);
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(FILTER, source.getControllerId(), game)) {
|
||||
|
|
|
@ -49,9 +49,15 @@ public class Commander2017 extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Balan, Wandering Knight", 2, Rarity.RARE, mage.cards.b.BalanWanderingKnight.class));
|
||||
cards.add(new SetCardInfo("Bloodsworn Steward", 22, Rarity.RARE, mage.cards.b.BloodswornSteward.class));
|
||||
cards.add(new SetCardInfo("Curse of Bounty", 30, Rarity.UNCOMMON, mage.cards.c.CurseOfBounty.class));
|
||||
cards.add(new SetCardInfo("Curse of Disturbance", 16, Rarity.UNCOMMON, mage.cards.c.CurseOfDisturbance.class));
|
||||
cards.add(new SetCardInfo("Curse of Opulence", 24, Rarity.UNCOMMON, mage.cards.c.CurseOfOpulence.class));
|
||||
cards.add(new SetCardInfo("Curse of Verbosity", 9, Rarity.UNCOMMON, mage.cards.c.CurseOfVerbosity.class));
|
||||
cards.add(new SetCardInfo("Curse of Vitality", 3, Rarity.UNCOMMON, mage.cards.c.CurseOfVitality.class));
|
||||
cards.add(new SetCardInfo("Herald's Horn", 53, Rarity.UNCOMMON, mage.cards.h.HeraldsHorn.class));
|
||||
cards.add(new SetCardInfo("Hungry Lynx", 31, Rarity.RARE, mage.cards.h.HungryLynx.class));
|
||||
cards.add(new SetCardInfo("Crimson Honor Guard", 23, Rarity.RARE, mage.cards.c.CrimsonHonorGuard.class));
|
||||
cards.add(new SetCardInfo("Fractured Identity", 37, Rarity.RARE, mage.cards.f.FracturedIdentity.class));
|
||||
cards.add(new SetCardInfo("Nazahn, Revered Bladesmith", 44, Rarity.MYTHIC, mage.cards.n.NazahnReveredBladesmith.class));
|
||||
cards.add(new SetCardInfo("O-Kagachi, Vengeful Kami", 45, Rarity.MYTHIC, mage.cards.o.OKagachiVengefulKami.class));
|
||||
cards.add(new SetCardInfo("Patron of the Vein", 20, Rarity.RARE, mage.cards.p.PatronOfTheVein.class));
|
||||
|
@ -63,6 +69,8 @@ public class Commander2017 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Teferi's Protection", 8, Rarity.RARE, mage.cards.t.TeferisProtection.class));
|
||||
cards.add(new SetCardInfo("Traverse the Outlands", 34, Rarity.RARE, mage.cards.t.TraverseTheOutlands.class));
|
||||
cards.add(new SetCardInfo("Wasitora, Nekoru Queen", 49, Rarity.MYTHIC, mage.cards.w.WasitoraNekoruQueen.class));
|
||||
|
||||
cards.add(new SetCardInfo("Kindred Dominance", 18, Rarity.RARE, mage.cards.w.WasitoraNekoruQueen.class));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ public class Homelands extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Clockwork Gnomes", 127, Rarity.COMMON, mage.cards.c.ClockworkGnomes.class));
|
||||
cards.add(new SetCardInfo("Coral Reef", 29, Rarity.COMMON, mage.cards.c.CoralReef.class));
|
||||
cards.add(new SetCardInfo("Dark Maze", 31, Rarity.COMMON, mage.cards.d.DarkMaze.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Daughter of Autumn", 56, Rarity.RARE, mage.cards.d.DaughterOfAutumn.class));
|
||||
cards.add(new SetCardInfo("Death Speakers", 109, Rarity.UNCOMMON, mage.cards.d.DeathSpeakers.class));
|
||||
cards.add(new SetCardInfo("Didgeridoo", 130, Rarity.RARE, mage.cards.d.Didgeridoo.class));
|
||||
cards.add(new SetCardInfo("Drudge Spell", 6, Rarity.UNCOMMON, mage.cards.d.DrudgeSpell.class));
|
||||
|
|
|
@ -86,6 +86,7 @@ public class Legions extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Defender of the Order", 11, Rarity.RARE, mage.cards.d.DefenderOfTheOrder.class));
|
||||
cards.add(new SetCardInfo("Defiant Elf", 123, Rarity.COMMON, mage.cards.d.DefiantElf.class));
|
||||
cards.add(new SetCardInfo("Deftblade Elite", 12, Rarity.COMMON, mage.cards.d.DeftbladeElite.class));
|
||||
cards.add(new SetCardInfo("Dermoplasm", 35, Rarity.RARE, mage.cards.d.Dermoplasm.class));
|
||||
cards.add(new SetCardInfo("Dreamborn Muse", 36, Rarity.RARE, mage.cards.d.DreambornMuse.class));
|
||||
cards.add(new SetCardInfo("Dripping Dead", 67, Rarity.COMMON, mage.cards.d.DrippingDead.class));
|
||||
cards.add(new SetCardInfo("Earthblighter", 68, Rarity.UNCOMMON, mage.cards.e.Earthblighter.class));
|
||||
|
|
|
@ -124,6 +124,7 @@ public class MercadianMasques extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Deepwood Tantiv", 241, Rarity.UNCOMMON, mage.cards.d.DeepwoodTantiv.class));
|
||||
cards.add(new SetCardInfo("Deepwood Wolverine", 242, Rarity.COMMON, mage.cards.d.DeepwoodWolverine.class));
|
||||
cards.add(new SetCardInfo("Dehydration", 73, Rarity.COMMON, mage.cards.d.Dehydration.class));
|
||||
cards.add(new SetCardInfo("Delraich", 133, Rarity.RARE, mage.cards.d.Delraich.class));
|
||||
cards.add(new SetCardInfo("Desert Twister", 243, Rarity.UNCOMMON, mage.cards.d.DesertTwister.class));
|
||||
cards.add(new SetCardInfo("Devout Witness", 17, Rarity.COMMON, mage.cards.d.DevoutWitness.class));
|
||||
cards.add(new SetCardInfo("Diplomatic Escort", 74, Rarity.UNCOMMON, mage.cards.d.DiplomaticEscort.class));
|
||||
|
|
|
@ -104,6 +104,7 @@ public class Mirage extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dark Banishing", 13, Rarity.COMMON, mage.cards.d.DarkBanishing.class));
|
||||
cards.add(new SetCardInfo("Dark Ritual", 14, Rarity.COMMON, mage.cards.d.DarkRitual.class));
|
||||
cards.add(new SetCardInfo("Dirtwater Wraith", 15, Rarity.COMMON, mage.cards.d.DirtwaterWraith.class));
|
||||
cards.add(new SetCardInfo("Disempower", 213, Rarity.COMMON, mage.cards.d.Disempower.class));
|
||||
cards.add(new SetCardInfo("Disenchant", 214, Rarity.COMMON, mage.cards.d.Disenchant.class));
|
||||
cards.add(new SetCardInfo("Dissipate", 61, Rarity.UNCOMMON, mage.cards.d.Dissipate.class));
|
||||
cards.add(new SetCardInfo("Divine Offering", 215, Rarity.COMMON, mage.cards.d.DivineOffering.class));
|
||||
|
|
|
@ -85,7 +85,9 @@ public class Onslaught extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Custody Battle", 197, Rarity.UNCOMMON, mage.cards.c.CustodyBattle.class));
|
||||
cards.add(new SetCardInfo("Daru Cavalier", 18, Rarity.COMMON, mage.cards.d.DaruCavalier.class));
|
||||
cards.add(new SetCardInfo("Daru Encampment", 315, Rarity.UNCOMMON, mage.cards.d.DaruEncampment.class));
|
||||
cards.add(new SetCardInfo("Daru Healer", 19, Rarity.COMMON, mage.cards.d.DaruHealer.class));
|
||||
cards.add(new SetCardInfo("Daru Lancer", 20, Rarity.COMMON, mage.cards.d.DaruLancer.class));
|
||||
cards.add(new SetCardInfo("Daunting Defender", 21, Rarity.COMMON, mage.cards.d.DauntingDefender.class));
|
||||
cards.add(new SetCardInfo("Dawning Purist", 22, Rarity.UNCOMMON, mage.cards.d.DawningPurist.class));
|
||||
cards.add(new SetCardInfo("Death Match", 136, Rarity.RARE, mage.cards.d.DeathMatch.class));
|
||||
cards.add(new SetCardInfo("Death Pulse", 137, Rarity.UNCOMMON, mage.cards.d.DeathPulse.class));
|
||||
|
|
|
@ -73,6 +73,7 @@ public class TimeSpiral extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Deep-Sea Kraken", 56, Rarity.RARE, mage.cards.d.DeepSeaKraken.class));
|
||||
cards.add(new SetCardInfo("Dementia Sliver", 236, Rarity.UNCOMMON, mage.cards.d.DementiaSliver.class));
|
||||
cards.add(new SetCardInfo("Demonic Collusion", 103, Rarity.RARE, mage.cards.d.DemonicCollusion.class));
|
||||
cards.add(new SetCardInfo("Divine Congregation", 13, Rarity.COMMON, mage.cards.d.DivineCongregation.class));
|
||||
cards.add(new SetCardInfo("Draining Whelk", 57, Rarity.RARE, mage.cards.d.DrainingWhelk.class));
|
||||
cards.add(new SetCardInfo("Dralnu, Lich Lord", 237, Rarity.RARE, mage.cards.d.DralnuLichLord.class));
|
||||
cards.add(new SetCardInfo("Dread Return", 104, Rarity.UNCOMMON, mage.cards.d.DreadReturn.class));
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.mage</groupId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-tests</artifactId>
|
||||
|
|
|
@ -58,7 +58,7 @@ public class PlayerDiedStackTargetHandlingTest extends CardTestMultiPlayerBase {
|
|||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Lightning Helix", 2);
|
||||
Assert.assertTrue("Active player has to be player C", currentGame.getActivePlayerId() == playerC.getId());
|
||||
Assert.assertTrue("Active player has to be player C", currentGame.getActivePlayerId().equals(playerC.getId()));
|
||||
|
||||
assertLife(playerA, 6);
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class PlayerDiedStackTargetHandlingTest extends CardTestMultiPlayerBase {
|
|||
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 2);
|
||||
assertGraveyardCount(playerA, "Tendrils of Agony", 1);
|
||||
Assert.assertTrue("Active player has to be player C", currentGame.getActivePlayerId() == playerC.getId());
|
||||
Assert.assertTrue("Active player has to be player C", currentGame.getActivePlayerId().equals(playerC.getId()));
|
||||
|
||||
assertLife(playerA, 7);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<groupId>org.mage</groupId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage-verify</artifactId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mage</artifactId>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
|
@ -33,14 +32,14 @@ import mage.abilities.effects.Effect;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
public class AttacksAndIsNotBlockedTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private boolean setTargetPointer;
|
||||
private final boolean setTargetPointer;
|
||||
|
||||
public AttacksAndIsNotBlockedTriggeredAbility(Effect effect) {
|
||||
this(effect, false, false);
|
||||
|
@ -72,14 +71,12 @@ public class AttacksAndIsNotBlockedTriggeredAbility extends TriggeredAbilityImpl
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent sourcePermanent = game.getPermanent(getSourceId());
|
||||
if(sourcePermanent.isAttacking()) {
|
||||
for(CombatGroup combatGroup: game.getCombat().getGroups()) {
|
||||
if(combatGroup.getBlockers().isEmpty() && combatGroup.getAttackers().contains(getSourceId())) {
|
||||
if(setTargetPointer) {
|
||||
for(Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getDefendingPlayerId(getSourceId(), game)));
|
||||
}
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(getSourceId());
|
||||
if (sourcePermanent != null && sourcePermanent.isAttacking()) {
|
||||
for (CombatGroup combatGroup : game.getCombat().getGroups()) {
|
||||
if (combatGroup.getBlockers().isEmpty() && combatGroup.getAttackers().contains(getSourceId())) {
|
||||
if (setTargetPointer) {
|
||||
this.getEffects().setTargetPointer(new FixedTarget(game.getCombat().getDefendingPlayerId(getSourceId(), game)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ class AftermathExileAsResolvesFromGraveyard extends ReplacementEffectImpl {
|
|||
sourceId = sourceCard.getId();
|
||||
}
|
||||
|
||||
if (event.getTargetId() == sourceId) {
|
||||
if (event.getTargetId().equals(sourceId)) {
|
||||
// Moving this spell from stack to yard
|
||||
Spell spell = game.getStack().getSpell(source.getSourceId());
|
||||
if (spell != null && spell.getFromZone() == Zone.GRAVEYARD) {
|
||||
|
|
|
@ -2,22 +2,21 @@ package mage.constants;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public enum CardType {
|
||||
ARTIFACT ("Artifact"),
|
||||
CONSPIRACY ("Conspiracy"),
|
||||
CREATURE ("Creature"),
|
||||
ENCHANTMENT ("Enchantment"),
|
||||
INSTANT ("Instant"),
|
||||
LAND ("Land"),
|
||||
PLANESWALKER ("Planeswalker"),
|
||||
SORCERY ("Sorcery"),
|
||||
TRIBAL ("Tribal");
|
||||
ARTIFACT("Artifact"),
|
||||
CONSPIRACY("Conspiracy"),
|
||||
CREATURE("Creature"),
|
||||
ENCHANTMENT("Enchantment"),
|
||||
INSTANT("Instant"),
|
||||
LAND("Land"),
|
||||
PLANESWALKER("Planeswalker"),
|
||||
SORCERY("Sorcery"),
|
||||
TRIBAL("Tribal");
|
||||
|
||||
private final String text;
|
||||
|
||||
|
@ -31,8 +30,8 @@ public enum CardType {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns all of the card types from two lists of card types.
|
||||
* Duplicates are eliminated.
|
||||
* Returns all of the card types from two lists of card types. Duplicates
|
||||
* are eliminated.
|
||||
*/
|
||||
public static CardType[] mergeTypes(CardType[] a, CardType[] b) {
|
||||
EnumSet<CardType> cardTypes = EnumSet.noneOf(CardType.class);
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
|
@ -39,10 +42,24 @@ import mage.constants.Zone;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public class GoldToken extends Token {
|
||||
|
||||
final static private List<String> tokenImageSets = new ArrayList<>();
|
||||
static {
|
||||
tokenImageSets.addAll(Arrays.asList("BNG", "C17"));
|
||||
}
|
||||
|
||||
public GoldToken() {
|
||||
this(null, 0);
|
||||
}
|
||||
|
||||
public GoldToken(String setCode) {
|
||||
this(setCode, 0);
|
||||
}
|
||||
|
||||
public GoldToken(String setCode, int tokenType) {
|
||||
super("Gold", "colorless artifact token named Gold onto the battlefield. It has \"Sacrifice this artifact: Add one mana of any color to your mana pool.\"");
|
||||
this.setOriginalExpansionSetCode("BNG");
|
||||
availableImageSetCodes = tokenImageSets;
|
||||
setOriginalExpansionSetCode(setCode);
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new SacrificeSourceCost()));
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ZombieToken extends Token {
|
|||
final static private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
static {
|
||||
tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "C16", "CNS",
|
||||
tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "C16", "C17", "CNS",
|
||||
"MMA", "BNG", "KTK", "DTK", "ORI", "OGW", "SOI", "EMN", "EMA", "MM3", "AKH", "CMA", "E01"));
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ foreach $num (sort {$a<=>$b} keys (%new_order))
|
|||
}
|
||||
}
|
||||
|
||||
print ("Choose your preferred tag: ");
|
||||
print ("Choose your preferred tag: ");
|
||||
|
||||
my $cmd = <STDIN>;
|
||||
chomp $cmd;
|
||||
|
@ -77,6 +77,10 @@ sub get_name_of_card_from_class
|
|||
}
|
||||
$card_name =~ s/(.)([A-Z])/$1 $2/g;
|
||||
$card_name =~ s/\d//g;
|
||||
$card_name =~ s/ The / the /g;
|
||||
$card_name =~ s/ Of / of /g;
|
||||
$card_name =~ s/ To / to /g;
|
||||
$card_name =~ s/ And / and /g;
|
||||
return $card_name;
|
||||
}
|
||||
return "";
|
||||
|
@ -85,8 +89,8 @@ sub get_name_of_card_from_class
|
|||
if (exists ($new_order{$cmd}))
|
||||
{
|
||||
my $tag = $new_order{$cmd};
|
||||
$tag =~ s/You chose //;
|
||||
$tag =~ s/,.*//;
|
||||
$tag =~ s/You chose //;
|
||||
$tag =~ s/,.*//;
|
||||
chomp $tag;
|
||||
print ("You chose $tag\n");
|
||||
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>org.mage</groupId>
|
||||
<artifactId>mage-root</artifactId>
|
||||
<version>1.4.25</version>
|
||||
<version>1.4.26</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Mage Root</name>
|
||||
<description>Mage Root POM</description>
|
||||
|
@ -84,7 +84,7 @@
|
|||
</repositories>
|
||||
|
||||
<properties>
|
||||
<mage-version>1.4.25</mage-version>
|
||||
<mage-version>1.4.26</mage-version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
|
Loading…
Reference in a new issue