mirror of
https://github.com/correl/mage.git
synced 2025-04-05 17:00:10 -09:00
Merge branch 'master' of github.com:rsypen/mage into fix_tests_not_passing
This commit is contained in:
commit
29a889b236
58 changed files with 2327 additions and 150 deletions
Mage.Client/src/main/java
Mage.Common/src/main/java/mage/utils
Mage.Sets/src/mage
cards
a
b
c
f
g
h
i
j
k
m
n
p
r
s
t
sets
Mage.Tests/src/test/java/org/mage/test
Mage.Verify/src/test/java/mage/verify
Mage/src/main/java/mage
abilities
cards/repository
constants
filter/predicate/permanent
game
Utils
|
@ -122,7 +122,6 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener,
|
|||
addCard(card, bigCard, gameId, drawImage);
|
||||
}
|
||||
}
|
||||
// System.gc();
|
||||
drawCards(sortSetting);
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
|
|
@ -648,7 +648,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
|
|||
logger.fatal("Couldn't unmount zip files", e);
|
||||
JOptionPane.showMessageDialog(null, "Couldn't unmount zip files", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
} finally {
|
||||
System.gc();
|
||||
//
|
||||
}
|
||||
closeButton.setText("Close");
|
||||
updateCardsToDownload(jComboBoxSet.getSelectedItem().toString());
|
||||
|
|
|
@ -41,7 +41,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 = 26;
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "V11c";
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "V11d";
|
||||
public final static String MAGE_VERSION_INFO = "";
|
||||
|
||||
private final int major;
|
||||
|
|
|
@ -57,7 +57,7 @@ import mage.util.TargetAddress;
|
|||
public class AuraGraft extends CardImpl {
|
||||
|
||||
public AuraGraft(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Gain control of target Aura that's attached to a permanent. Attach it to another permanent it can enchant.
|
||||
FilterPermanent filter = new FilterPermanent("Aura that's attached to a permanent");
|
||||
|
@ -81,7 +81,6 @@ public class AuraGraft extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class AttachedToPermanentPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
||||
|
||||
public AttachedToPermanentPredicate() {
|
||||
|
@ -95,6 +94,7 @@ class AttachedToPermanentPredicate implements ObjectPlayerPredicate<ObjectPlayer
|
|||
}
|
||||
|
||||
class PermanentCanBeAttachedToPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
||||
|
||||
protected Permanent aura;
|
||||
|
||||
public PermanentCanBeAttachedToPredicate(Permanent aura) {
|
||||
|
@ -102,6 +102,7 @@ class PermanentCanBeAttachedToPredicate implements ObjectPlayerPredicate<ObjectP
|
|||
this.aura = aura;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectPlayer<Permanent> input, Game game) {
|
||||
Permanent potentialAttachment = input.getObject();
|
||||
for (TargetAddress addr : TargetAddress.walk(aura)) {
|
||||
|
@ -130,7 +131,7 @@ class MoveTargetAuraEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source){
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent enchantment = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
if (enchantment == null) {
|
||||
return false;
|
||||
|
@ -150,10 +151,10 @@ class MoveTargetAuraEffect extends OneShotEffect {
|
|||
Target target = new TargetPermanent(filter);
|
||||
target.setNotTarget(true);
|
||||
if (target.canChoose(oldAttachment.getId(), controller.getId(), game)
|
||||
&& controller.choose(outcome, target, oldAttachment.getId(), game)) {
|
||||
&& controller.choose(outcome, target, oldAttachment.getId(), game)) {
|
||||
Permanent newAttachment = game.getPermanent(target.getFirstTarget());
|
||||
if (newAttachment != null &&
|
||||
oldAttachment.removeAttachment(enchantment.getId(), game)) {
|
||||
if (newAttachment != null
|
||||
&& oldAttachment.removeAttachment(enchantment.getId(), game)) {
|
||||
newAttachment.addAttachment(enchantment.getId(), game);
|
||||
game.informPlayers(enchantment.getLogName() + " was unattached from " + oldAttachment.getLogName() + " and attached to " + newAttachment.getLogName());
|
||||
return true;
|
||||
|
|
|
@ -48,7 +48,7 @@ import mage.constants.PhaseStep;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.common.FilterBlockingCreature;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.permanent.PermanentInListPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -177,17 +177,3 @@ class BalduvianWarlordUnblockEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class PermanentInListPredicate implements Predicate<Permanent> {
|
||||
|
||||
private final List<Permanent> permanents;
|
||||
|
||||
public PermanentInListPredicate(List<Permanent> permanents) {
|
||||
this.permanents = permanents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return permanents.contains(input);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,9 +132,11 @@ class BishopOfBindingExiledCardsPowerCount implements DynamicValue {
|
|||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, sourceAbility.getSourceId(), sourceAbility.getSourceObjectZoneChangeCounter()));
|
||||
Card exiledCard = exileZone.getRandom(game);
|
||||
if (exiledCard != null) {
|
||||
return exiledCard.getPower().getValue();
|
||||
if (exileZone != null) {
|
||||
Card exiledCard = exileZone.getRandom(game);
|
||||
if (exiledCard != null) {
|
||||
return exiledCard.getPower().getValue();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
227
Mage.Sets/src/mage/cards/c/Camouflage.java
Normal file
227
Mage.Sets/src/mage/cards/c/Camouflage.java
Normal file
|
@ -0,0 +1,227 @@
|
|||
/*
|
||||
* 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 java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.PermanentInListPredicate;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public class Camouflage extends CardImpl {
|
||||
|
||||
public Camouflage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
|
||||
// Cast Camouflage only during your declare attackers step.
|
||||
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(null, PhaseStep.DECLARE_ATTACKERS, MyTurnCondition.instance, "Cast {this} only during your declare attackers step"));
|
||||
|
||||
// This turn, instead of declaring blockers, each defending player chooses any number of creatures he or she controls and divides them into a number of piles equal to the number of attacking creatures for whom that player is the defending player. Creatures he or she controls that can block additional creatures may likewise be put into additional piles. Assign each pile to a different one of those attacking creatures at random. Each creature in a pile that can block the creature that pile is assigned to does so. (Piles can be empty.)
|
||||
this.getSpellAbility().addEffect(new CamouflageEffect());
|
||||
}
|
||||
|
||||
public Camouflage(final Camouflage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Camouflage copy() {
|
||||
return new Camouflage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CamouflageEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public CamouflageEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Benefit, false, false);
|
||||
staticText = "This turn, instead of declaring blockers, each defending player chooses any number of creatures he or she controls and divides them into a number of piles equal to the number of attacking creatures for whom that player is the defending player. Creatures he or she controls that can block additional creatures may likewise be put into additional piles. Assign each pile to a different one of those attacking creatures at random. Each creature in a pile that can block the creature that pile is assigned to does so";
|
||||
}
|
||||
|
||||
public CamouflageEffect(final CamouflageEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CamouflageEffect copy() {
|
||||
return new CamouflageEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DECLARING_BLOCKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Map<UUID, List<List<Permanent>>> masterMap = new HashMap<>();
|
||||
// Each defending player chooses any number of creatures he or she controls
|
||||
// and divides them into a number of piles equal to the number of attacking creatures for whom that player is the defending player (piles can be empty)
|
||||
for (UUID defenderId : game.getCombat().getPlayerDefenders(game)) {
|
||||
Player defender = game.getPlayer(defenderId);
|
||||
if (defender != null) {
|
||||
List<List<Permanent>> masterList = new ArrayList<>();
|
||||
int attackerCount = 0;
|
||||
for (CombatGroup combatGroup : game.getCombat().getGroups()) {
|
||||
if (combatGroup.getDefendingPlayerId().equals(defenderId)) {
|
||||
attackerCount += combatGroup.getAttackers().size();
|
||||
}
|
||||
}
|
||||
// This shouldn't be necessary, but just in case
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), defenderId, game)) {
|
||||
permanent.setBlocking(0);
|
||||
}
|
||||
|
||||
boolean declinedChoice = false;
|
||||
while (masterList.size() < attackerCount) {
|
||||
List<Permanent> newPile = new ArrayList<>();
|
||||
if (!declinedChoice) {
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control not yet assigned to a pile");
|
||||
for (List<Permanent> list : masterList) {
|
||||
// Creatures he or she controls that can block additional creatures may likewise be put into additional piles.
|
||||
// (This temporarily manipulates Blocking values to "test" how many blockers the creature has still left to assign)
|
||||
List<Permanent> spentBlockers = new ArrayList<>();
|
||||
for (Permanent possibleBlocker : list) {
|
||||
if (possibleBlocker.getMaxBlocks() != 0 && possibleBlocker.getBlocking() >= possibleBlocker.getMaxBlocks()) {
|
||||
spentBlockers.add(possibleBlocker);
|
||||
}
|
||||
}
|
||||
filter.add(Predicates.not(new PermanentInListPredicate(spentBlockers)));
|
||||
}
|
||||
if (defender.chooseUse(Outcome.Neutral, "Make a new blocker pile? If not, all remaining piles stay empty. (remaining piles: " + (attackerCount - masterList.size()) + ')', source, game)) {
|
||||
Target target = new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, true);
|
||||
if (target.canChoose(source.getSourceId(), defenderId, game)) {
|
||||
if (defender.chooseTarget(Outcome.Neutral, target, source, game)) {
|
||||
for (UUID creatureId : target.getTargets()) {
|
||||
Permanent creature = game.getPermanent(creatureId);
|
||||
if (creature != null) {
|
||||
creature.setBlocking(creature.getBlocking() + 1);
|
||||
newPile.add(creature);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
declinedChoice = true;
|
||||
}
|
||||
}
|
||||
masterList.add(newPile);
|
||||
|
||||
StringBuilder sb = new StringBuilder("Blocker pile of ").append(defender.getLogName()).append(" (no. " + masterList.size() + "): ");
|
||||
int i = 0;
|
||||
for (Permanent permanent : newPile) {
|
||||
i++;
|
||||
sb.append(permanent.getLogName());
|
||||
if (i < newPile.size()) {
|
||||
sb.append(", ");
|
||||
}
|
||||
}
|
||||
game.informPlayers(sb.toString());
|
||||
}
|
||||
// Clear all test Blocking values before assigning piles
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), defenderId, game)) {
|
||||
permanent.setBlocking(0);
|
||||
}
|
||||
masterMap.put(defenderId, masterList);
|
||||
}
|
||||
}
|
||||
// Assign each pile to a different one of those attacking creatures at random. Each creature in a pile that can block the creature that pile is assigned to does so
|
||||
if (!masterMap.isEmpty()) {
|
||||
for (UUID playerId : masterMap.keySet()) {
|
||||
List<Permanent> available = new ArrayList<>();
|
||||
for (CombatGroup combatGroup : game.getCombat().getGroups()) {
|
||||
if (combatGroup.getDefendingPlayerId().equals(playerId)) {
|
||||
for (UUID attackerId : combatGroup.getAttackers()) {
|
||||
Permanent permanent = game.getPermanent(attackerId);
|
||||
if (permanent != null && permanent.isCreature()) {
|
||||
available.add(permanent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<List<Permanent>> allPiles = masterMap.get(playerId);
|
||||
for (List<Permanent> pile : allPiles) {
|
||||
if (available.isEmpty()) {
|
||||
break;
|
||||
}
|
||||
int randomAttacker = RandomUtil.nextInt(available.size());
|
||||
Permanent attacker = available.get(randomAttacker);
|
||||
if (attacker != null) {
|
||||
available.remove(randomAttacker);
|
||||
for (Permanent blocker : pile) {
|
||||
CombatGroup group = game.getCombat().findGroup(attacker.getId());
|
||||
if (group != null) {
|
||||
if (blocker.canBlock(attacker.getId(), game) && (blocker.getMaxBlocks() == 0 || group.getAttackers().size() <= blocker.getMaxBlocks())) {
|
||||
boolean notYetBlocked = group.getBlockers().isEmpty();
|
||||
group.addBlockerToGroup(blocker.getId(), blocker.getControllerId(), game);
|
||||
game.getCombat().addBlockingGroup(blocker.getId(), attacker.getId(), blocker.getControllerId(), game);
|
||||
if (notYetBlocked) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, attacker.getId(), null));
|
||||
}
|
||||
// TODO: find an alternate event solution for multi-blockers (as per issue #4285), this will work fine for single blocker creatures though
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BLOCKER_DECLARED, attacker.getId(), blocker.getId(), blocker.getControllerId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
135
Mage.Sets/src/mage/cards/c/ChickenALaKing.java
Normal file
135
Mage.Sets/src/mage/cards/c/ChickenALaKing.java
Normal file
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* 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 java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.RollDiceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
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.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class ChickenALaKing extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Chicken you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new TappedPredicate()));
|
||||
filter.add(new SubtypePredicate(SubType.CHICKEN));
|
||||
}
|
||||
|
||||
public ChickenALaKing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
|
||||
|
||||
this.subtype.add(SubType.CHICKEN);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever a 6 is rolled on a six-sided die, put a +1/+1 counter on each Chicken.
|
||||
this.addAbility(new ChickenALaKingTriggeredAbility());
|
||||
|
||||
// Tap an untapped Chicken you control: Roll a six-sided die.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RollDiceEffect(null, Outcome.Benefit, 6), new TapTargetCost(new TargetControlledPermanent(1, 1, filter, false))));
|
||||
}
|
||||
|
||||
public ChickenALaKing(final ChickenALaKing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChickenALaKing copy() {
|
||||
return new ChickenALaKing(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ChickenALaKingTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each Chicken");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.CHICKEN));
|
||||
}
|
||||
|
||||
public ChickenALaKingTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter));
|
||||
}
|
||||
|
||||
public ChickenALaKingTriggeredAbility(final ChickenALaKingTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChickenALaKingTriggeredAbility copy() {
|
||||
return new ChickenALaKingTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DICE_ROLLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (this.getControllerId().equals(event.getPlayerId()) && event.getFlag()) {
|
||||
// event.getData holds the num of sides of the die to roll
|
||||
String data = event.getData();
|
||||
if (data != null) {
|
||||
int numSides = Integer.parseInt(data);
|
||||
if (event.getAmount() == 6 && numSides == 6) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a 6 is rolled on a six-sided die, put a +1/+1 counter on each Chicken";
|
||||
}
|
||||
}
|
104
Mage.Sets/src/mage/cards/c/ChickenEgg.java
Normal file
104
Mage.Sets/src/mage/cards/c/ChickenEgg.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.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.GiantChickenToken;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
|
||||
public class ChickenEgg extends CardImpl {
|
||||
|
||||
public ChickenEgg(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.EGG);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// At the beginning of your upkeep, roll a six-sided die. If you roll a 6, sacrifice Chicken Egg and create a 4/4 red Giant Chicken creature token.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ChickenEggEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public ChickenEgg(final ChickenEgg card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChickenEgg copy() {
|
||||
return new ChickenEgg(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ChickenEggEffect extends OneShotEffect {
|
||||
|
||||
ChickenEggEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "roll a six-sided die. If you roll a 6, sacrifice {this} and create a 4/4 red Giant Chicken creature token";
|
||||
}
|
||||
|
||||
ChickenEggEffect(final ChickenEggEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int result = controller.rollDice(game, 6);
|
||||
if (result == 6) {
|
||||
new SacrificeSourceEffect().apply(game, source);
|
||||
return (new CreateTokenEffect(new GiantChickenToken(), 1)).apply(game, source);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChickenEggEffect copy() {
|
||||
return new ChickenEggEffect(this);
|
||||
}
|
||||
}
|
|
@ -182,7 +182,14 @@ class ChromeMoxManaEffect extends ManaEffect {
|
|||
if (choice.getChoices().size() == 1) {
|
||||
choice.setChoice(choice.getChoices().iterator().next());
|
||||
} else {
|
||||
player.choose(outcome, choice, game);
|
||||
while (!player.choose(outcome, choice, game)) {
|
||||
if (!player.canRespond()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (choice.getChoice() == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
switch (choice.getChoice()) {
|
||||
case "Black":
|
||||
|
|
|
@ -45,8 +45,8 @@ import mage.filter.FilterPermanent;
|
|||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
import mage.filter.predicate.ObjectPlayerPredicate;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.PermanentInListPredicate;
|
||||
import mage.game.Controllable;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
|
@ -192,17 +192,3 @@ class FalseOrdersUnblockEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class PermanentInListPredicate implements Predicate<Permanent> {
|
||||
|
||||
private final List<Permanent> permanents;
|
||||
|
||||
public PermanentInListPredicate(List<Permanent> permanents) {
|
||||
this.permanents = permanents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return permanents.contains(input);
|
||||
}
|
||||
}
|
||||
|
|
92
Mage.Sets/src/mage/cards/f/FowlPlay.java
Normal file
92
Mage.Sets/src/mage/cards/f/FowlPlay.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* 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.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureAttachedEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
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.permanent.token.Token;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class FowlPlay extends CardImpl {
|
||||
|
||||
public FowlPlay(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature is a Chicken with base power and toughness 1/1 and loses all abilities.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BecomesCreatureAttachedEffect(new FowlPlayToken(),
|
||||
"Enchanted creature is a Chicken with base power and toughness 1/1 and loses all abilities",
|
||||
Duration.WhileOnBattlefield, BecomesCreatureAttachedEffect.LoseType.ABILITIES_SUBTYPE_AND_PT)));
|
||||
}
|
||||
|
||||
public FowlPlay(final FowlPlay card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FowlPlay copy() {
|
||||
return new FowlPlay(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FowlPlayToken extends Token {
|
||||
|
||||
public FowlPlayToken() {
|
||||
super("Chicken", "a Chicken with base power and toughness 1/1 with no abilities");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.CHICKEN);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
125
Mage.Sets/src/mage/cards/g/GoblinTutor.java
Normal file
125
Mage.Sets/src/mage/cards/g/GoblinTutor.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.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterEnchantmentCard;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class GoblinTutor extends CardImpl {
|
||||
|
||||
public GoblinTutor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
|
||||
// Roll a six-sided die. If you roll a 1, Goblin Tutor has no effect. Otherwise, search your library for the indicated card, reveal it, put it into your hand, then shuffle your library. 2 - A card named Goblin Tutor 3 - An enchantment card 4 - An artifact card 5 - A creature card 6 - An instant or sorcery card
|
||||
this.getSpellAbility().addEffect(new GoblinTutorEffect());
|
||||
}
|
||||
|
||||
public GoblinTutor(final GoblinTutor card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoblinTutor copy() {
|
||||
return new GoblinTutor(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoblinTutorEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("card named Goblin Tutor");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Goblin Tutor"));
|
||||
}
|
||||
|
||||
public GoblinTutorEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Roll a six-sided die. If you roll a 1, {this} has no effect. Otherwise, search your library for the indicated card, reveal it, put it into your hand, then shuffle your library. 2 - A card named Goblin Tutor 3 - An enchantment card 4 - An artifact card 5 - A creature card 6 - An instant or sorcery card";
|
||||
}
|
||||
|
||||
public GoblinTutorEffect(final GoblinTutorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoblinTutorEffect copy() {
|
||||
return new GoblinTutorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int amount = controller.rollDice(game, 6);
|
||||
|
||||
Effect effect = null;
|
||||
// 2 - A card named Goblin Tutor
|
||||
// 3 - An enchantment card
|
||||
// 4 - An artifact card
|
||||
// 5 - A creature card
|
||||
// 6 - An instant or sorcery card
|
||||
if (amount == 2) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true);
|
||||
} else if (amount == 3) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterEnchantmentCard()), true);
|
||||
} else if (amount == 4) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterArtifactCard()), true);
|
||||
} else if (amount == 5) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterCreatureCard()), true);
|
||||
} else if (amount == 6) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterInstantOrSorceryCard()), true);
|
||||
}
|
||||
|
||||
if (effect != null) {
|
||||
effect.apply(game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
99
Mage.Sets/src/mage/cards/g/GrowthSpurt.java
Normal file
99
Mage.Sets/src/mage/cards/g/GrowthSpurt.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.g;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public class GrowthSpurt extends CardImpl {
|
||||
|
||||
public GrowthSpurt(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new GrowthSpurtEffect());
|
||||
}
|
||||
|
||||
public GrowthSpurt(final GrowthSpurt card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrowthSpurt copy() {
|
||||
return new GrowthSpurt(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GrowthSpurtEffect extends OneShotEffect {
|
||||
GrowthSpurtEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "todo"; //TODO
|
||||
}
|
||||
|
||||
GrowthSpurtEffect(final GrowthSpurtEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int result = controller.rollDice(game, 6);
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
ContinuousEffect effect = new BoostTargetEffect(result, result, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public GrowthSpurtEffect copy() {
|
||||
return new GrowthSpurtEffect(this);
|
||||
}
|
||||
}
|
116
Mage.Sets/src/mage/cards/h/HungryHungryHeifer.java
Normal file
116
Mage.Sets/src/mage/cards/h/HungryHungryHeifer.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.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.common.RemoveCounterCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.CounterPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class HungryHungryHeifer extends CardImpl {
|
||||
|
||||
public HungryHungryHeifer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.COW);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// At the beginning of your upkeep, you may remove a counter from a permanent you control. If you don't, sacrifice Hungry Hungry Heifer.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new HungryHungryHeiferEffect(), TargetController.YOU, false, false));
|
||||
}
|
||||
|
||||
public HungryHungryHeifer(final HungryHungryHeifer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HungryHungryHeifer copy() {
|
||||
return new HungryHungryHeifer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HungryHungryHeiferEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a permanent you control with a counter on it");
|
||||
|
||||
static {
|
||||
filter.add(new CounterPredicate(null));
|
||||
}
|
||||
|
||||
public HungryHungryHeiferEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
this.staticText = "you may remove a counter from a permanent you control. If you don't, sacrifice {this}";
|
||||
}
|
||||
|
||||
public HungryHungryHeiferEffect(final HungryHungryHeiferEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HungryHungryHeiferEffect copy() {
|
||||
return new HungryHungryHeiferEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourceObject = (Permanent) source.getSourceObjectIfItStillExists(game);
|
||||
if (sourceObject != null && controller != null) {
|
||||
if (controller.chooseUse(outcome, "Remove a counter from a permanent you control?", source, game)) {
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);
|
||||
RemoveCounterCost cost = new RemoveCounterCost(target);
|
||||
if (cost.pay(null, game, source.getSourceId(), controller.getId(), true)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
sourceObject.sacrifice(source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
121
Mage.Sets/src/mage/cards/i/Incoming.java
Normal file
121
Mage.Sets/src/mage/cards/i/Incoming.java
Normal file
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
* 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.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class Incoming extends CardImpl {
|
||||
|
||||
public Incoming(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}{G}{G}");
|
||||
|
||||
// Each player searches his or her library for any number of artifact, creature, enchantment, and/or land cards, puts them onto the battlefield, then shuffles his or her library.
|
||||
this.getSpellAbility().addEffect(new IncomingEffect());
|
||||
}
|
||||
|
||||
public Incoming(final Incoming card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Incoming copy() {
|
||||
return new Incoming(this);
|
||||
}
|
||||
}
|
||||
|
||||
class IncomingEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("artifact, creature, enchantment, and/or land cards");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT),
|
||||
new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public IncomingEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Each player searches his or her library for any number of artifact, creature, enchantment, and/or land cards, puts them onto the battlefield, then shuffles his or her library";
|
||||
}
|
||||
|
||||
public IncomingEffect(final IncomingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncomingEffect copy() {
|
||||
return new IncomingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(0, Integer.MAX_VALUE, filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
for (UUID cardId : target.getTargets()) {
|
||||
Card card = player.getLibrary().getCard(cardId, game);
|
||||
if (card != null) {
|
||||
card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId(), true);
|
||||
}
|
||||
|
||||
}
|
||||
player.shuffleLibrary(source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
// prevent undo
|
||||
controller.resetStoredBookmark(game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
119
Mage.Sets/src/mage/cards/j/JackInTheMox.java
Normal file
119
Mage.Sets/src/mage/cards/j/JackInTheMox.java
Normal file
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* 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.j;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class JackInTheMox extends CardImpl {
|
||||
|
||||
public JackInTheMox(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{0}");
|
||||
|
||||
// {T}: Roll a six-sided die. This ability has the indicated effect.
|
||||
// 1 - Sacrifice Jack-in-the-Mox and you lose 5 life.
|
||||
// 2 - Add {W} to your mana pool.
|
||||
// 3 - Add {U} to your mana pool.
|
||||
// 4 - Add {B} to your mana pool.
|
||||
// 5 - Add {R} to your mana pool.
|
||||
// 6 - Add {G} to your mana pool.
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new JackInTheMoxManaEffect(), new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public JackInTheMox(final JackInTheMox card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JackInTheMox copy() {
|
||||
return new JackInTheMox(this);
|
||||
}
|
||||
}
|
||||
|
||||
class JackInTheMoxManaEffect extends ManaEffect {
|
||||
|
||||
JackInTheMoxManaEffect() {
|
||||
super();
|
||||
staticText = "Roll a six-sided die. If result is 1 - Sacrifice {this} and you lose 5 life. 2 - Add {W} 3 - Add {U} 4 - Add {B} 5 - Add {R} 6 - Add {G} to your mana pool";
|
||||
}
|
||||
|
||||
JackInTheMoxManaEffect(final JackInTheMoxManaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (controller != null && permanent != null) {
|
||||
int amount = controller.rollDice(game, 6);
|
||||
if (amount == 1) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
controller.loseLife(5, game, false);
|
||||
} else if (amount == 2) {
|
||||
controller.getManaPool().addMana(Mana.WhiteMana(1), game, source);
|
||||
} else if (amount == 3) {
|
||||
controller.getManaPool().addMana(Mana.BlueMana(1), game, source);
|
||||
} else if (amount == 4) {
|
||||
controller.getManaPool().addMana(Mana.BlackMana(1), game, source);
|
||||
} else if (amount == 5) {
|
||||
controller.getManaPool().addMana(Mana.RedMana(1), game, source);
|
||||
} else if (amount == 6) {
|
||||
controller.getManaPool().addMana(Mana.GreenMana(1), game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JackInTheMoxManaEffect copy() {
|
||||
return new JackInTheMoxManaEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mana getMana(Game game, Ability source) {
|
||||
return null;
|
||||
}
|
||||
}
|
177
Mage.Sets/src/mage/cards/j/JumboImp.java
Normal file
177
Mage.Sets/src/mage/cards/j/JumboImp.java
Normal file
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
* 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.j;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class JumboImp extends CardImpl {
|
||||
|
||||
public JumboImp(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
this.subtype.add(SubType.IMP);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// As Jumbo Imp enters the battlefield, roll a six-sided die. Jumbo Imp enters the battlefield with a number of +1/+1 counters on it equal to the result.
|
||||
this.addAbility(new EntersBattlefieldAbility(new JumboImpEffect(new Counter("P1P1"))));
|
||||
|
||||
// At the beginning of your upkeep, roll a six-sided die and put a number of +1/+1 counters on Jumbo Imp equal to the result.
|
||||
Ability ability2 = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new JumboImpAddCountersEffect(), TargetController.YOU, false);
|
||||
this.addAbility(ability2);
|
||||
|
||||
// At the beginning of your end step, roll a six-sided die and remove a number of +1/+1 counters from Jumbo Imp equal to the result.
|
||||
Ability ability3 = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new JumboImpRemoveCountersEffect(), TargetController.YOU, null, false);
|
||||
this.addAbility(ability3);
|
||||
}
|
||||
|
||||
public JumboImp(final JumboImp card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JumboImp copy() {
|
||||
return new JumboImp(this);
|
||||
}
|
||||
}
|
||||
|
||||
class JumboImpEffect extends EntersBattlefieldWithXCountersEffect {
|
||||
|
||||
public JumboImpEffect(Counter counter) {
|
||||
super(counter);
|
||||
}
|
||||
|
||||
public JumboImpEffect(EntersBattlefieldWithXCountersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanentEntering(source.getSourceId());
|
||||
if (controller != null && permanent != null) {
|
||||
int amount = controller.rollDice(game, 6);
|
||||
ArrayList<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appldiedEffects"); // the basic event is the EntersBattlefieldEvent, so use already applied replacement effects from that event
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game, appliedEffects);
|
||||
return super.apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntersBattlefieldWithXCountersEffect copy() {
|
||||
return new JumboImpEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class JumboImpAddCountersEffect extends OneShotEffect {
|
||||
|
||||
public JumboImpAddCountersEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "roll a six-sided die and put a number of +1/+1 counters on {this} equal to the result";
|
||||
}
|
||||
|
||||
public JumboImpAddCountersEffect(final JumboImpAddCountersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JumboImpAddCountersEffect copy() {
|
||||
return new JumboImpAddCountersEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (controller != null && permanent != null) {
|
||||
int amount = controller.rollDice(game, 6);
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class JumboImpRemoveCountersEffect extends OneShotEffect {
|
||||
|
||||
public JumboImpRemoveCountersEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "roll a six-sided die and remove a number of +1/+1 counters on {this} equal to the result";
|
||||
}
|
||||
|
||||
public JumboImpRemoveCountersEffect(final JumboImpRemoveCountersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JumboImpRemoveCountersEffect copy() {
|
||||
return new JumboImpRemoveCountersEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (controller != null && permanent != null) {
|
||||
int amount = controller.rollDice(game, 6);
|
||||
permanent.removeCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -34,10 +34,10 @@ import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbil
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
|
@ -57,7 +57,7 @@ public class KindredCharge extends CardImpl {
|
|||
public KindredCharge(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
|
||||
|
||||
// Choose a creature type. For each creature you control of the chosen type, create a token that's a copy of that creature.
|
||||
// Choose a creature type. For each creature you control of the chosen type, create a token that's a copy of that creature.
|
||||
// Those tokens gain haste. Exile them at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new ChooseCreatureTypeEffect(Outcome.Copy));
|
||||
this.getSpellAbility().addEffect(new KindredChargeEffect());
|
||||
|
@ -95,7 +95,11 @@ class KindredChargeEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
String creatureType = game.getState().getValue(sourceObject.getId() + "_type").toString();
|
||||
Object object = game.getState().getValue(sourceObject.getId() + "_type");
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
String creatureType = object.toString();
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control of the chosen type");
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(creatureType)));
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, controller.getId(), game)) {
|
||||
|
|
|
@ -34,9 +34,9 @@ import mage.MageObject;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -48,6 +48,7 @@ import mage.filter.common.FilterCreatureCard;
|
|||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Saga
|
||||
|
@ -55,10 +56,10 @@ import mage.players.Player;
|
|||
public class KindredSummons extends CardImpl {
|
||||
|
||||
public KindredSummons(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{G}{G}");
|
||||
|
||||
// Choose a creature type. Reveal cards from the top of your library until you reveal X creature cards of the chosen type,
|
||||
// where X is the number of creatures you control of that type. Put those cards onto the battlefield,
|
||||
// Choose a creature type. Reveal cards from the top of your library until you reveal X creature cards of the chosen type,
|
||||
// where X is the number of creatures you control of that type. Put those cards onto the battlefield,
|
||||
// then shuffle the rest of the revealed cards into your library.
|
||||
this.getSpellAbility().addEffect(new ChooseCreatureTypeEffect(Outcome.PutCreatureInPlay));
|
||||
this.getSpellAbility().addEffect(new KindredSummonsEffect());
|
||||
|
@ -78,8 +79,8 @@ class KindredSummonsEffect extends OneShotEffect {
|
|||
|
||||
public KindredSummonsEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Reveal cards from the top of your library until you reveal X creature cards of the chosen type, " +
|
||||
"where X is the number of creatures you control of that type. Put those cards onto the battlefield, "
|
||||
this.staticText = "Reveal cards from the top of your library until you reveal X creature cards of the chosen type, "
|
||||
+ "where X is the number of creatures you control of that type. Put those cards onto the battlefield, "
|
||||
+ "then shuffle the rest of the revealed cards into your library";
|
||||
}
|
||||
|
||||
|
@ -97,7 +98,11 @@ class KindredSummonsEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null) {
|
||||
String creatureType = game.getState().getValue(sourceObject.getId() + "_type").toString();
|
||||
Object object = game.getState().getValue(sourceObject.getId() + "_type");
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
String creatureType = object.toString();
|
||||
FilterControlledCreaturePermanent filterPermanent = new FilterControlledCreaturePermanent("creature you control of the chosen type");
|
||||
filterPermanent.add(new SubtypePredicate(SubType.byDescription(creatureType)));
|
||||
int numberOfCards = game.getBattlefield().countAll(filterPermanent, source.getControllerId(), game);
|
||||
|
|
102
Mage.Sets/src/mage/cards/k/KrazyKow.java
Normal file
102
Mage.Sets/src/mage/cards/k/KrazyKow.java
Normal file
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* 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 mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageEverythingEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
|
||||
public class KrazyKow extends CardImpl {
|
||||
|
||||
public KrazyKow(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.COW);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// At the beginning of your upkeep, roll a six-sided die. If you a roll a 1, sacrifice Krazy Kow and it deals 3 damage to each creature and each player.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new KrazyKowEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public KrazyKow(final KrazyKow card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KrazyKow copy() {
|
||||
return new KrazyKow(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KrazyKowEffect extends OneShotEffect {
|
||||
KrazyKowEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "roll a six-sided die. If you roll a 1, sacrifice {this} and it deals 3 damage to each creature and each player";
|
||||
}
|
||||
|
||||
KrazyKowEffect(final KrazyKowEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int result = controller.rollDice(game, 6);
|
||||
if (result == 1) {
|
||||
new SacrificeSourceEffect().apply(game, source);
|
||||
return new DamageEverythingEffect(3).apply(game, source);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KrazyKowEffect copy() {
|
||||
return new KrazyKowEffect(this);
|
||||
}
|
||||
}
|
|
@ -39,8 +39,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -57,10 +57,9 @@ import mage.target.common.TargetLandPermanent;
|
|||
public class MarketFestival extends CardImpl {
|
||||
|
||||
public MarketFestival(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
|
||||
// Enchant land
|
||||
TargetPermanent auraTarget = new TargetLandPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
|
@ -108,14 +107,12 @@ class MarketFestivalTriggeredAbility extends TriggeredManaAbility {
|
|||
return enchantment != null && event.getSourceId().equals(enchantment.getAttachedTo());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever enchanted land is tapped for mana, its controller adds two mana in any combination of colors to his or her mana pool <i>(in addition to the mana the land produces)</i>.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MarketFestivalManaEffect extends ManaEffect {
|
||||
|
||||
public MarketFestivalManaEffect() {
|
||||
|
@ -152,7 +149,9 @@ class MarketFestivalManaEffect extends ManaEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (choiceColor.getChoice() == null) { // Possible after reconnect?
|
||||
return false;
|
||||
}
|
||||
choiceColor.increaseMana(mana);
|
||||
}
|
||||
checkToFirePossibleEvents(mana, game, source);
|
||||
|
|
|
@ -126,9 +126,11 @@ class MetzaliTowerOfTriumphEffect extends OneShotEffect {
|
|||
available.add(permanent);
|
||||
}
|
||||
}
|
||||
Permanent permanent = available.get(RandomUtil.nextInt(available.size()));
|
||||
if (permanent != null) {
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
if (!available.isEmpty()) {
|
||||
Permanent permanent = available.get(RandomUtil.nextInt(available.size()));
|
||||
if (permanent != null) {
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
|
@ -52,10 +53,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -124,7 +121,7 @@ class NewBloodEffect extends OneShotEffect {
|
|||
class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl {
|
||||
|
||||
private SubType fromSubType;
|
||||
private SubType toSubType;
|
||||
private final SubType toSubType;
|
||||
|
||||
public ChangeCreatureTypeTargetEffect(SubType fromSubType, SubType toSubType, Duration duration) {
|
||||
super(duration, Layer.TextChangingEffects_3, SubLayer.NA, Outcome.Benefit);
|
||||
|
@ -153,6 +150,7 @@ class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
}
|
||||
if (typeChoice.getChoice() == null) {
|
||||
discard();
|
||||
return;
|
||||
}
|
||||
fromSubType = SubType.byDescription(typeChoice.getChoice());
|
||||
|
|
74
Mage.Sets/src/mage/cards/p/PaperTiger.java
Normal file
74
Mage.Sets/src/mage/cards/p/PaperTiger.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.combat.CantAttackBlockAllEffect;
|
||||
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.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class PaperTiger extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures named Rock Lobster");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Rock Lobster"));
|
||||
}
|
||||
|
||||
public PaperTiger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Creatures named Rock Lobster can't attack or block.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
public PaperTiger(final PaperTiger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaperTiger copy() {
|
||||
return new PaperTiger(this);
|
||||
}
|
||||
}
|
111
Mage.Sets/src/mage/cards/p/Poultrygeist.java
Normal file
111
Mage.Sets/src/mage/cards/p/Poultrygeist.java
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* 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.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public class Poultrygeist extends CardImpl {
|
||||
|
||||
public Poultrygeist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
|
||||
this.subtype.add(SubType.CHICKEN);
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever a creature dies, you may roll a six-sided die. If you roll a 1, sacrifice Poultrygeist. Otherwise, put a +1/+1 counter on Poultrygeist.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new PoultrygeistEffect(), true);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public Poultrygeist(final Poultrygeist card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Poultrygeist copy() {
|
||||
return new Poultrygeist(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PoultrygeistEffect extends OneShotEffect {
|
||||
|
||||
PoultrygeistEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "roll a six-sided die. If you roll a 1, sacrifice {this}. Otherwise, put a +1/+1 counter on {this}";
|
||||
}
|
||||
|
||||
PoultrygeistEffect(final PoultrygeistEffect ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int result = controller.rollDice(game, 6);
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
if (result == 1) {
|
||||
return permanent.sacrifice(source.getSourceId(), game);
|
||||
} else {
|
||||
return new AddCountersSourceEffect(CounterType.P1P1.createInstance()).apply(game, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PoultrygeistEffect copy() {
|
||||
return new PoultrygeistEffect(this);
|
||||
}
|
||||
}
|
|
@ -31,7 +31,6 @@ import java.util.UUID;
|
|||
import mage.abilities.condition.common.CitysBlessingCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.keyword.AscendEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -52,7 +51,7 @@ public class PrideOfConquerors extends CardImpl {
|
|||
|
||||
// Creatures you control get +1/+1 until end of turn. If you have the city's blessing, those creatures get +2/+2 until end of turn instead.
|
||||
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn),
|
||||
new BoostTargetEffect(1, 1, Duration.EndOfTurn), CitysBlessingCondition.instance,
|
||||
new BoostControlledEffect(1, 1, Duration.EndOfTurn), CitysBlessingCondition.instance,
|
||||
"Creatures you control get +1/+1 until end of turn. If you have the city's blessing, those creatures get +2/+2 until end of turn instead"));
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ class ProfaneProcessionEffect extends OneShotEffect {
|
|||
new ExileTargetEffect(exileId, sourceObject.getIdName()).setTargetPointer(targetPointer).apply(game, source);
|
||||
game.applyEffects();
|
||||
ExileZone exileZone = game.getExile().getExileZone(exileId);
|
||||
if (exileZone.size() > 2) {
|
||||
if (exileZone != null && exileZone.size() > 2) {
|
||||
new TransformSourceEffect(true).apply(game, source);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -31,7 +31,6 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -55,7 +54,7 @@ public class Prohibit extends CardImpl {
|
|||
this.addAbility(new KickerAbility("{2}"));
|
||||
|
||||
// Counter target spell if its converted mana cost is 2 or less. If Prohibit was kicked, counter that spell if its converted mana cost is 4 or less instead.
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addEffect(new ProhibitEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
}
|
||||
|
||||
|
@ -69,20 +68,20 @@ public class Prohibit extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class OverloadEffect extends OneShotEffect {
|
||||
class ProhibitEffect extends OneShotEffect {
|
||||
|
||||
OverloadEffect() {
|
||||
ProhibitEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "Counter target spell if its converted mana cost is 2 or less. If {this} was kicked, counter that spell if its converted mana cost is 4 or less instead.";
|
||||
}
|
||||
|
||||
OverloadEffect(final OverloadEffect effect) {
|
||||
ProhibitEffect(final ProhibitEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OverloadEffect copy() {
|
||||
return new OverloadEffect(this);
|
||||
public ProhibitEffect copy() {
|
||||
return new ProhibitEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,9 +43,9 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.permanent.PermanentInListPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -194,17 +194,3 @@ class RagingRiverEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class PermanentInListPredicate implements Predicate<Permanent> {
|
||||
|
||||
private final List<Permanent> permanents;
|
||||
|
||||
public PermanentInListPredicate(List<Permanent> permanents) {
|
||||
this.permanents = permanents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return permanents.contains(input);
|
||||
}
|
||||
}
|
||||
|
|
74
Mage.Sets/src/mage/cards/r/RockLobster.java
Normal file
74
Mage.Sets/src/mage/cards/r/RockLobster.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.combat.CantAttackBlockAllEffect;
|
||||
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.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class RockLobster extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures named Scissors Lizard");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Scissors Lizard"));
|
||||
}
|
||||
|
||||
public RockLobster(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
|
||||
this.subtype.add(SubType.LOBSTER);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Creatures named Scissors Lizard can't attack or block.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
public RockLobster(final RockLobster card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RockLobster copy() {
|
||||
return new RockLobster(this);
|
||||
}
|
||||
}
|
74
Mage.Sets/src/mage/cards/s/ScissorsLizard.java
Normal file
74
Mage.Sets/src/mage/cards/s/ScissorsLizard.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.combat.CantAttackBlockAllEffect;
|
||||
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.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class ScissorsLizard extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures named Paper Tiger");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Paper Tiger"));
|
||||
}
|
||||
|
||||
public ScissorsLizard(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
|
||||
this.subtype.add(SubType.LIZARD);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Creatures named Paper Tiger can't attack or block.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
public ScissorsLizard(final ScissorsLizard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScissorsLizard copy() {
|
||||
return new ScissorsLizard(this);
|
||||
}
|
||||
}
|
|
@ -52,6 +52,7 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -82,7 +83,7 @@ public class SeeRed extends CardImpl {
|
|||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU),
|
||||
new InvertCondition(ControllerAttackedThisTurnCondition.instance),
|
||||
"At the beginning of your end step, if you didn't attack with a creature this turn, sacrifice {this}."));
|
||||
"At the beginning of your end step, if you didn't attack with a creature this turn, sacrifice {this}."), new AttackedThisTurnWatcher());
|
||||
}
|
||||
|
||||
public SeeRed(final SeeRed card) {
|
||||
|
|
118
Mage.Sets/src/mage/cards/t/TheCheeseStandsAlone.java
Normal file
118
Mage.Sets/src/mage/cards/t/TheCheeseStandsAlone.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class TheCheeseStandsAlone extends CardImpl {
|
||||
|
||||
public TheCheeseStandsAlone(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}");
|
||||
|
||||
// When you control no permanents other than The Cheese Stands Alone and have no cards in hand, you win the game.
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CheeseStandsAloneContinuousEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public TheCheeseStandsAlone(final TheCheeseStandsAlone card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheCheeseStandsAlone copy() {
|
||||
return new TheCheeseStandsAlone(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CheeseStandsAloneContinuousEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
private boolean wonAlready = false;
|
||||
static {
|
||||
filter.add(new NamePredicate("The Cheese Stands Alone"));
|
||||
}
|
||||
|
||||
public CheeseStandsAloneContinuousEffect() {
|
||||
super(Duration.EndOfGame, Outcome.Benefit, false, false);
|
||||
staticText = "When you control no permanents other than {this} and have no cards in hand, you win the game";
|
||||
}
|
||||
|
||||
public CheeseStandsAloneContinuousEffect(final CheeseStandsAloneContinuousEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller.getHand().isEmpty()) {
|
||||
int numberPerms = new PermanentsOnBattlefieldCount(new FilterControlledPermanent()).calculate(game, source, this);
|
||||
if (numberPerms == 1) {
|
||||
if (game.getBattlefield().contains(filter, source.getControllerId(), 1, game)) {
|
||||
if (!wonAlready) {
|
||||
wonAlready = true;
|
||||
controller.won(game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CheeseStandsAloneContinuousEffect copy() {
|
||||
return new CheeseStandsAloneContinuousEffect(this);
|
||||
}
|
||||
}
|
76
Mage.Sets/src/mage/cards/t/TimmyPowerGamer.java
Normal file
76
Mage.Sets/src/mage/cards/t/TimmyPowerGamer.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public class TimmyPowerGamer extends CardImpl {
|
||||
|
||||
public TimmyPowerGamer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.GAMER);
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {4}: You may put a creature card from your hand onto the battlefield.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new PutPermanentOnBattlefieldEffect(new FilterCreatureCard("a creature card")),
|
||||
new ManaCostsImpl("{4}"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public TimmyPowerGamer(final TimmyPowerGamer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimmyPowerGamer copy() {
|
||||
return new TimmyPowerGamer(this);
|
||||
}
|
||||
}
|
|
@ -119,7 +119,7 @@ public class ArabianNights extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mijae Djinn", 51, Rarity.RARE, mage.cards.m.MijaeDjinn.class));
|
||||
cards.add(new SetCardInfo("Moorish Cavalry", 62, Rarity.COMMON, mage.cards.m.MoorishCavalry.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Moorish Cavalry", 63, Rarity.COMMON, mage.cards.m.MoorishCavalry.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mountain", 91, Rarity.COMMON, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mountain", 91, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Nafs Asp", 36, Rarity.COMMON, NafsAsp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Nafs Asp", 37, Rarity.COMMON, NafsAsp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Oasis", 92, Rarity.UNCOMMON, mage.cards.o.Oasis.class));
|
||||
|
|
|
@ -170,11 +170,11 @@ public class Coldsnap extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sheltering Ancient", 121, Rarity.UNCOMMON, mage.cards.s.ShelteringAncient.class));
|
||||
cards.add(new SetCardInfo("Simian Brawler", 122, Rarity.COMMON, mage.cards.s.SimianBrawler.class));
|
||||
cards.add(new SetCardInfo("Skred", 97, Rarity.COMMON, mage.cards.s.Skred.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Forest", 155, Rarity.COMMON, mage.cards.s.SnowCoveredForest.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Island", 152, Rarity.COMMON, mage.cards.s.SnowCoveredIsland.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Mountain", 154, Rarity.COMMON, mage.cards.s.SnowCoveredMountain.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Plains", 151, Rarity.COMMON, mage.cards.s.SnowCoveredPlains.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Swamp", 153, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Forest", 155, Rarity.LAND, mage.cards.s.SnowCoveredForest.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Island", 152, Rarity.LAND, mage.cards.s.SnowCoveredIsland.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Mountain", 154, Rarity.LAND, mage.cards.s.SnowCoveredMountain.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Plains", 151, Rarity.LAND, mage.cards.s.SnowCoveredPlains.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Swamp", 153, Rarity.LAND, mage.cards.s.SnowCoveredSwamp.class));
|
||||
cards.add(new SetCardInfo("Soul Spike", 70, Rarity.RARE, mage.cards.s.SoulSpike.class));
|
||||
cards.add(new SetCardInfo("Sound the Call", 123, Rarity.COMMON, mage.cards.s.SoundTheCall.class));
|
||||
cards.add(new SetCardInfo("Squall Drifter", 17, Rarity.COMMON, mage.cards.s.SquallDrifter.class));
|
||||
|
|
|
@ -45,8 +45,8 @@ public class HasconPromo2017 extends ExpansionSet {
|
|||
|
||||
private HasconPromo2017() {
|
||||
super("HASCON Promo 2017", "H17", ExpansionSet.buildDate(2017, 9, 8), SetType.JOKESET);
|
||||
cards.add(new ExpansionSet.SetCardInfo("Grimlock, Dinobot Leader", 1, Rarity.MYTHIC, mage.cards.g.GrimlockDinobotLeader.class));
|
||||
cards.add(new ExpansionSet.SetCardInfo("Grimlock, Ferocious King", 1, Rarity.MYTHIC, mage.cards.g.GrimlockFerociousKing.class));
|
||||
cards.add(new ExpansionSet.SetCardInfo("Grimlock, Dinobot Leader", "1a", Rarity.MYTHIC, mage.cards.g.GrimlockDinobotLeader.class));
|
||||
cards.add(new ExpansionSet.SetCardInfo("Grimlock, Ferocious King", "1b", Rarity.MYTHIC, mage.cards.g.GrimlockFerociousKing.class));
|
||||
cards.add(new ExpansionSet.SetCardInfo("Sword of Dungeons & Dragons", 3, Rarity.MYTHIC, mage.cards.s.SwordOfDungeonsAndDragons.class));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -287,11 +287,11 @@ public class IceAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Skeleton Ship", 379, Rarity.RARE, mage.cards.s.SkeletonShip.class));
|
||||
cards.add(new SetCardInfo("Skull Catapult", 311, Rarity.UNCOMMON, mage.cards.s.SkullCatapult.class));
|
||||
cards.add(new SetCardInfo("Snow Fortress", 312, Rarity.RARE, mage.cards.s.SnowFortress.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Forest", 347, Rarity.COMMON, mage.cards.s.SnowCoveredForest.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Island", 348, Rarity.COMMON, mage.cards.s.SnowCoveredIsland.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Mountain", 349, Rarity.COMMON, mage.cards.s.SnowCoveredMountain.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Plains", 350, Rarity.COMMON, mage.cards.s.SnowCoveredPlains.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Swamp", 351, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Forest", 347, Rarity.LAND, mage.cards.s.SnowCoveredForest.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Island", 348, Rarity.LAND, mage.cards.s.SnowCoveredIsland.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Mountain", 349, Rarity.LAND, mage.cards.s.SnowCoveredMountain.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Plains", 350, Rarity.LAND, mage.cards.s.SnowCoveredPlains.class));
|
||||
cards.add(new SetCardInfo("Snow-Covered Swamp", 351, Rarity.LAND, mage.cards.s.SnowCoveredSwamp.class));
|
||||
cards.add(new SetCardInfo("Snow Hound", 277, Rarity.UNCOMMON, mage.cards.s.SnowHound.class));
|
||||
cards.add(new SetCardInfo("Soldevi Golem", 313, Rarity.RARE, mage.cards.s.SoldeviGolem.class));
|
||||
cards.add(new SetCardInfo("Soldevi Machinist", 102, Rarity.UNCOMMON, mage.cards.s.SoldeviMachinist.class));
|
||||
|
|
|
@ -49,6 +49,7 @@ public class LimitedEditionAlpha extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Bog Wraith", 4, Rarity.UNCOMMON, mage.cards.b.BogWraith.class));
|
||||
cards.add(new SetCardInfo("Braingeyser", 51, Rarity.RARE, mage.cards.b.Braingeyser.class));
|
||||
cards.add(new SetCardInfo("Burrowing", 139, Rarity.UNCOMMON, mage.cards.b.Burrowing.class));
|
||||
cards.add(new SetCardInfo("Camouflage", 96, Rarity.UNCOMMON, mage.cards.c.Camouflage.class));
|
||||
cards.add(new SetCardInfo("Castle", 193, Rarity.UNCOMMON, mage.cards.c.Castle.class));
|
||||
cards.add(new SetCardInfo("Celestial Prism", 234, Rarity.UNCOMMON, mage.cards.c.CelestialPrism.class));
|
||||
cards.add(new SetCardInfo("Channel", 97, Rarity.UNCOMMON, mage.cards.c.Channel.class));
|
||||
|
|
|
@ -49,6 +49,7 @@ public class LimitedEditionBeta extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Bog Wraith", 96, Rarity.UNCOMMON, mage.cards.b.BogWraith.class));
|
||||
cards.add(new SetCardInfo("Braingeyser", 51, Rarity.RARE, mage.cards.b.Braingeyser.class));
|
||||
cards.add(new SetCardInfo("Burrowing", 139, Rarity.UNCOMMON, mage.cards.b.Burrowing.class));
|
||||
cards.add(new SetCardInfo("Camouflage", 188, Rarity.UNCOMMON, mage.cards.c.Camouflage.class));
|
||||
cards.add(new SetCardInfo("Castle", 9, Rarity.UNCOMMON, mage.cards.c.Castle.class));
|
||||
cards.add(new SetCardInfo("Celestial Prism", 235, Rarity.UNCOMMON, mage.cards.c.CelestialPrism.class));
|
||||
cards.add(new SetCardInfo("Channel", 189, Rarity.UNCOMMON, mage.cards.c.Channel.class));
|
||||
|
|
|
@ -279,19 +279,19 @@ public class MastersEditionIV extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Two-Headed Giant of Foriys", 139, Rarity.UNCOMMON, mage.cards.t.TwoHeadedGiantOfForiys.class));
|
||||
cards.add(new SetCardInfo("Underground Sea", 256, Rarity.RARE, mage.cards.u.UndergroundSea.class));
|
||||
cards.add(new SetCardInfo("Urza's Chalice", 236, Rarity.COMMON, mage.cards.u.UrzasChalice.class));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257a", Rarity.LAND, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257b", Rarity.LAND, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257c", Rarity.LAND, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257d", Rarity.LAND, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257a", Rarity.COMMON, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257b", Rarity.COMMON, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257c", Rarity.COMMON, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Mine", "257d", Rarity.COMMON, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Miter", 237, Rarity.RARE, mage.cards.u.UrzasMiter.class));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258a", Rarity.LAND, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258b", Rarity.LAND, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258c", Rarity.LAND, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258d", Rarity.LAND, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259a", Rarity.LAND, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259b", Rarity.LAND, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259c", Rarity.LAND, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259d", Rarity.LAND, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258a", Rarity.COMMON, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258b", Rarity.COMMON, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258c", Rarity.COMMON, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Power Plant", "258d", Rarity.COMMON, mage.cards.u.UrzasPowerPlant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259a", Rarity.COMMON, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259b", Rarity.COMMON, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259c", Rarity.COMMON, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Urza's Tower", "259d", Rarity.COMMON, mage.cards.u.UrzasTower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Veteran Bodyguard", 32, Rarity.RARE, mage.cards.v.VeteranBodyguard.class));
|
||||
cards.add(new SetCardInfo("Vibrating Sphere", 238, Rarity.RARE, mage.cards.v.VibratingSphere.class));
|
||||
cards.add(new SetCardInfo("Volcanic Island", 260, Rarity.RARE, mage.cards.v.VolcanicIsland.class));
|
||||
|
|
|
@ -218,10 +218,10 @@ public class OathOfTheGatewatch extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Wandering Fumarole", 182, Rarity.RARE, mage.cards.w.WanderingFumarole.class));
|
||||
cards.add(new SetCardInfo("Warden of Geometries", 11, Rarity.COMMON, mage.cards.w.WardenOfGeometries.class));
|
||||
cards.add(new SetCardInfo("Warping Wail", 12, Rarity.UNCOMMON, mage.cards.w.WarpingWail.class));
|
||||
cards.add(new SetCardInfo("Wastes", "183a", Rarity.COMMON, Wastes.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Wastes", "183b", Rarity.COMMON, Wastes.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Wastes", "184a", Rarity.COMMON, Wastes.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Wastes", "184b", Rarity.COMMON, Wastes.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Wastes", "183a", Rarity.LAND, Wastes.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Wastes", "183b", Rarity.LAND, Wastes.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Wastes", "184a", Rarity.LAND, Wastes.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Wastes", "184b", Rarity.LAND, Wastes.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Weapons Trainer", 160, Rarity.UNCOMMON, mage.cards.w.WeaponsTrainer.class));
|
||||
cards.add(new SetCardInfo("Witness the End", 82, Rarity.COMMON, mage.cards.w.WitnessTheEnd.class));
|
||||
cards.add(new SetCardInfo("World Breaker", 126, Rarity.MYTHIC, mage.cards.w.WorldBreaker.class));
|
||||
|
|
|
@ -110,7 +110,7 @@ public class RivalsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Etali, Primal Storm", 100, Rarity.RARE, mage.cards.e.EtaliPrimalStorm.class));
|
||||
cards.add(new SetCardInfo("Everdawn Champion", 6, Rarity.UNCOMMON, mage.cards.e.EverdawnChampion.class));
|
||||
cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.COMMON, mage.cards.e.EvolvingWilds.class));
|
||||
cards.add(new SetCardInfo("Expel From Orazca", 37, Rarity.UNCOMMON, mage.cards.e.ExpelFromOrazca.class));
|
||||
cards.add(new SetCardInfo("Expel from Orazca", 37, Rarity.UNCOMMON, mage.cards.e.ExpelFromOrazca.class));
|
||||
cards.add(new SetCardInfo("Exultant Skymarcher", 7, Rarity.COMMON, mage.cards.e.ExultantSkymarcher.class));
|
||||
cards.add(new SetCardInfo("Famished Paladin", 8, Rarity.UNCOMMON, mage.cards.f.FamishedPaladin.class));
|
||||
cards.add(new SetCardInfo("Fanatical Firebrand", 101, Rarity.COMMON, mage.cards.f.FanaticalFirebrand.class));
|
||||
|
@ -120,7 +120,7 @@ public class RivalsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Forerunner of the Empire", 102, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheEmpire.class));
|
||||
cards.add(new SetCardInfo("Forerunner of the Heralds", 129, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheHeralds.class));
|
||||
cards.add(new SetCardInfo("Forerunner of the Legion", 9, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheLegion.class));
|
||||
cards.add(new SetCardInfo("Forest", 196, Rarity.COMMON, mage.cards.basiclands.Forest.class));
|
||||
cards.add(new SetCardInfo("Forest", 196, Rarity.LAND, mage.cards.basiclands.Forest.class));
|
||||
cards.add(new SetCardInfo("Form of the Dinosaur", 103, Rarity.RARE, mage.cards.f.FormOfTheDinosaur.class));
|
||||
cards.add(new SetCardInfo("Forsaken Sanctuary", 187, Rarity.UNCOMMON, mage.cards.f.ForsakenSanctuary.class));
|
||||
cards.add(new SetCardInfo("Foul Orchard", 188, Rarity.UNCOMMON, mage.cards.f.FoulOrchard.class));
|
||||
|
@ -143,7 +143,7 @@ public class RivalsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Impale", 76, Rarity.COMMON, mage.cards.i.Impale.class));
|
||||
cards.add(new SetCardInfo("Imperial Ceratops", 10, Rarity.UNCOMMON, mage.cards.i.ImperialCeratops.class));
|
||||
cards.add(new SetCardInfo("Induced Amnesia", 40, Rarity.RARE, mage.cards.i.InducedAmnesia.class));
|
||||
cards.add(new SetCardInfo("Island", 193, Rarity.COMMON, mage.cards.basiclands.Island.class));
|
||||
cards.add(new SetCardInfo("Island", 193, Rarity.LAND, mage.cards.basiclands.Island.class));
|
||||
cards.add(new SetCardInfo("Jade Bearer", 134, Rarity.COMMON, mage.cards.j.JadeBearer.class));
|
||||
cards.add(new SetCardInfo("Jadecraft Artisan", 135, Rarity.COMMON, mage.cards.j.JadecraftArtisan.class));
|
||||
cards.add(new SetCardInfo("Jadelight Ranger", 136, Rarity.RARE, mage.cards.j.JadelightRanger.class));
|
||||
|
@ -166,7 +166,7 @@ public class RivalsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mist-Cloaked Herald", 43, Rarity.COMMON, mage.cards.m.MistCloakedHerald.class));
|
||||
cards.add(new SetCardInfo("Moment of Craving", 79, Rarity.COMMON, mage.cards.m.MomentOfCraving.class));
|
||||
cards.add(new SetCardInfo("Moment of Triumph", 15, Rarity.COMMON, mage.cards.m.MomentOfTriumph.class));
|
||||
cards.add(new SetCardInfo("Mountain", 195, Rarity.COMMON, mage.cards.basiclands.Mountain.class));
|
||||
cards.add(new SetCardInfo("Mountain", 195, Rarity.LAND, mage.cards.basiclands.Mountain.class));
|
||||
cards.add(new SetCardInfo("Mutiny", 106, Rarity.COMMON, mage.cards.m.Mutiny.class));
|
||||
cards.add(new SetCardInfo("Naturalize", 139, Rarity.COMMON, mage.cards.n.Naturalize.class));
|
||||
cards.add(new SetCardInfo("Needletooth Raptor", 107, Rarity.UNCOMMON, mage.cards.n.NeedletoothRaptor.class));
|
||||
|
@ -182,7 +182,7 @@ public class RivalsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Path of Mettle", "165a", Rarity.RARE, mage.cards.p.PathOfMettle.class));
|
||||
cards.add(new SetCardInfo("Pirate's Pillage", 109, Rarity.UNCOMMON, mage.cards.p.PiratesPillage.class));
|
||||
cards.add(new SetCardInfo("Pitiless Plunderer", 81, Rarity.UNCOMMON, mage.cards.p.PitilessPlunderer.class));
|
||||
cards.add(new SetCardInfo("Plains", 192, Rarity.COMMON, mage.cards.basiclands.Plains.class));
|
||||
cards.add(new SetCardInfo("Plains", 192, Rarity.LAND, mage.cards.basiclands.Plains.class));
|
||||
cards.add(new SetCardInfo("Plummet", 143, Rarity.COMMON, mage.cards.p.Plummet.class));
|
||||
cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class));
|
||||
cards.add(new SetCardInfo("Pride of Conquerors", 17, Rarity.UNCOMMON, mage.cards.p.PrideOfConquerors.class));
|
||||
|
@ -236,7 +236,7 @@ public class RivalsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sun-Crested Pterodon", 27, Rarity.COMMON, mage.cards.s.SunCrestedPterodon.class));
|
||||
cards.add(new SetCardInfo("Swab Goblin", 203, Rarity.COMMON, mage.cards.s.SwabGoblin.class));
|
||||
cards.add(new SetCardInfo("Swaggering Corsair", 119, Rarity.COMMON, mage.cards.s.SwaggeringCorsair.class));
|
||||
cards.add(new SetCardInfo("Swamp", 194, Rarity.COMMON, mage.cards.basiclands.Swamp.class));
|
||||
cards.add(new SetCardInfo("Swamp", 194, Rarity.LAND, mage.cards.basiclands.Swamp.class));
|
||||
cards.add(new SetCardInfo("Swift Warden", 146, Rarity.UNCOMMON, mage.cards.s.SwiftWarden.class));
|
||||
cards.add(new SetCardInfo("Sworn Guardian", 58, Rarity.COMMON, mage.cards.s.SwornGuardian.class));
|
||||
cards.add(new SetCardInfo("Temple Altisaur", 28, Rarity.RARE, mage.cards.t.TempleAltisaur.class));
|
||||
|
|
|
@ -20,10 +20,27 @@ public class Unglued extends ExpansionSet {
|
|||
|
||||
private Unglued() {
|
||||
super("Unglued", "UGL", ExpansionSet.buildDate(1998, 8, 11), SetType.JOKESET);
|
||||
|
||||
cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class));
|
||||
cards.add(new SetCardInfo("Chicken a la King", 17, Rarity.RARE, mage.cards.c.ChickenALaKing.class));
|
||||
cards.add(new SetCardInfo("Forest", 88, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Fowl Play", 24, Rarity.COMMON, mage.cards.f.FowlPlay.class));
|
||||
cards.add(new SetCardInfo("Goblin Tutor", 45, Rarity.UNCOMMON, mage.cards.g.GoblinTutor.class));
|
||||
cards.add(new SetCardInfo("Growth Spurt", 61, Rarity.COMMON, mage.cards.g.GrowthSpurt.class));
|
||||
cards.add(new SetCardInfo("Hungry Hungry Heifer", 63, Rarity.UNCOMMON, mage.cards.h.HungryHungryHeifer.class));
|
||||
cards.add(new SetCardInfo("Incoming!", 64, Rarity.RARE, mage.cards.i.Incoming.class));
|
||||
cards.add(new SetCardInfo("Island", 85, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Jack-in-the-Mox", 75, Rarity.RARE, mage.cards.j.JackInTheMox.class));
|
||||
cards.add(new SetCardInfo("Jumbo Imp", 34, Rarity.UNCOMMON, mage.cards.j.JumboImp.class));
|
||||
cards.add(new SetCardInfo("Krazy Kow", 48, Rarity.COMMON, mage.cards.k.KrazyKow.class));
|
||||
cards.add(new SetCardInfo("Mountain", 87, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Paper Tiger", 78, Rarity.COMMON, mage.cards.p.PaperTiger.class));
|
||||
cards.add(new SetCardInfo("Plains", 84, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Poultrygeist", 37, Rarity.COMMON, mage.cards.p.Poultrygeist.class));
|
||||
cards.add(new SetCardInfo("Rock Lobster", 79, Rarity.COMMON, mage.cards.r.RockLobster.class));
|
||||
cards.add(new SetCardInfo("Scissors Lizard", 80, Rarity.COMMON, mage.cards.s.ScissorsLizard.class));
|
||||
cards.add(new SetCardInfo("Swamp", 86, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("The Cheese Stands Alone", 2, Rarity.RARE, mage.cards.t.TheCheeseStandsAlone.class));
|
||||
cards.add(new SetCardInfo("Timmy, Power Gamer", 68, Rarity.RARE, mage.cards.t.TimmyPowerGamer.class));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ public class UnlimitedEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Bog Wraith", 4, Rarity.UNCOMMON, mage.cards.b.BogWraith.class));
|
||||
cards.add(new SetCardInfo("Braingeyser", 51, Rarity.RARE, mage.cards.b.Braingeyser.class));
|
||||
cards.add(new SetCardInfo("Burrowing", 139, Rarity.UNCOMMON, mage.cards.b.Burrowing.class));
|
||||
cards.add(new SetCardInfo("Camouflage", 96, Rarity.UNCOMMON, mage.cards.c.Camouflage.class));
|
||||
cards.add(new SetCardInfo("Castle", 193, Rarity.UNCOMMON, mage.cards.c.Castle.class));
|
||||
cards.add(new SetCardInfo("Celestial Prism", 235, Rarity.UNCOMMON, mage.cards.c.CelestialPrism.class));
|
||||
cards.add(new SetCardInfo("Channel", 97, Rarity.UNCOMMON, mage.cards.c.Channel.class));
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.cards.decks.DeckCardLists;
|
|||
import mage.cards.repository.CardInfo;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.MatchTimeLimit;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.match.MatchOptions;
|
||||
|
@ -275,6 +276,7 @@ public class LoadTest {
|
|||
options.setAttackOption(MultiplayerAttackOption.MULTIPLE);
|
||||
options.setRange(RangeOfInfluence.ALL);
|
||||
options.setWinsNeeded(1);
|
||||
options.setMatchTimeLimit(MatchTimeLimit.MIN__15);
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,6 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
if (currentGame != null) {
|
||||
logger.debug("Resetting previous game and creating new one!");
|
||||
currentGame = null;
|
||||
System.gc();
|
||||
}
|
||||
|
||||
currentGame = createNewGameAndPlayers();
|
||||
|
|
|
@ -4,6 +4,8 @@ import mage.ObjectColor;
|
|||
import mage.cards.*;
|
||||
import mage.cards.basiclands.BasicLand;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SuperType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -30,6 +32,12 @@ public class VerifyCardDataTest {
|
|||
static {
|
||||
// skip lists for checks (example: unstable cards with same name may have different stats)
|
||||
|
||||
// TODO: mtgjson have wrong data for UGL
|
||||
// remove after fixed
|
||||
// https://github.com/mtgjson/mtgjson/issues/531
|
||||
// https://github.com/mtgjson/mtgjson/issues/534
|
||||
// https://github.com/mtgjson/mtgjson/issues/535
|
||||
|
||||
// power-toughness
|
||||
skipListCreate("PT");
|
||||
skipListAddName("PT", "Garbage Elemental"); // UST
|
||||
|
@ -37,19 +45,25 @@ public class VerifyCardDataTest {
|
|||
|
||||
// color
|
||||
skipListCreate("COLOR");
|
||||
//skipListAddName("COLOR", "Ulrich, Uncontested Alpha"); // gatherer is missing the color indicator on one card and json has wrong data (16.12.2017: not actual)
|
||||
|
||||
// cost
|
||||
skipListCreate("COST");
|
||||
|
||||
// supertype
|
||||
skipListCreate("SUPERTYPE");
|
||||
skipListAddName("SUPERTYPE", "Timmy, Power Gamer"); // UGL, mtgjson error
|
||||
|
||||
// type
|
||||
skipListCreate("TYPE");
|
||||
skipListAddName("TYPE", "Fowl Play"); // UGL, mtgjson error
|
||||
|
||||
// subtype
|
||||
skipListCreate("SUBTYPE");
|
||||
skipListAddName("SUBTYPE", "Timmy, Power Gamer"); // UGL, mtgjson error
|
||||
skipListAddName("SUBTYPE", "Fowl Play"); // UGL, mtgjson error
|
||||
skipListAddName("SUBTYPE", "Paper Tiger"); // UGL, mtgjson error
|
||||
skipListAddName("SUBTYPE", "Rock Lobster"); // UGL, mtgjson error
|
||||
skipListAddName("SUBTYPE", "Scissors Lizard"); // UGL, mtgjson error
|
||||
|
||||
// number
|
||||
skipListCreate("NUMBER");
|
||||
|
@ -76,7 +90,7 @@ public class VerifyCardDataTest {
|
|||
|
||||
private void fail(Card card, String category, String message) {
|
||||
failed++;
|
||||
System.out.println("Error: (" + category + ") " + message + " for " + card.getName());
|
||||
System.out.println("Error: (" + category + ") " + message + " for " + card.getName() + " (" + card.getExpansionSetCode() + ")");
|
||||
}
|
||||
|
||||
private int failed = 0;
|
||||
|
@ -280,6 +294,7 @@ public class VerifyCardDataTest {
|
|||
checkTypes(card, ref);
|
||||
checkColors(card, ref);
|
||||
//checkNumbers(card, ref); // TODO: load data from allsets.json and check it (allcards.json do not have card numbers)
|
||||
checkBasicLands(card, ref);
|
||||
}
|
||||
|
||||
private void checkColors(Card card, JsonCard ref) {
|
||||
|
@ -393,6 +408,48 @@ public class VerifyCardDataTest {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isBasicLandName(String name) {
|
||||
|
||||
String checkName = name;
|
||||
if (name.startsWith("Snow-Covered ")) {
|
||||
// snow lands is basic lands too
|
||||
checkName = name.replace("Snow-Covered ", "");
|
||||
}
|
||||
|
||||
return checkName.equals("Island") ||
|
||||
checkName.equals("Forest") ||
|
||||
checkName.equals("Swamp") ||
|
||||
checkName.equals("Plains") ||
|
||||
checkName.equals("Mountain") ||
|
||||
checkName.equals("Wastes");
|
||||
}
|
||||
|
||||
private void checkBasicLands(Card card, JsonCard ref) {
|
||||
|
||||
// basic lands must have Rarity.LAND and SuperType.BASIC
|
||||
// other cards can't have that stats
|
||||
|
||||
if (isBasicLandName(card.getName())) {
|
||||
// lands
|
||||
if (card.getRarity() != Rarity.LAND) {
|
||||
fail(card, "rarity", "basic land must be Rarity.LAND");
|
||||
}
|
||||
|
||||
if (!card.getSuperType().contains(SuperType.BASIC)) {
|
||||
fail(card, "supertype", "basic land must be SuperType.BASIC");
|
||||
}
|
||||
} else {
|
||||
// non lands
|
||||
if (card.getRarity() == Rarity.LAND) {
|
||||
fail(card, "rarity", "only basic land can be Rarity.LAND");
|
||||
}
|
||||
|
||||
if (card.getSuperType().contains(SuperType.BASIC)) {
|
||||
fail(card, "supertype", "only basic land can be SuperType.BASIC");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String join(Iterable<?> items) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (Object item : items) {
|
||||
|
|
|
@ -27,11 +27,12 @@
|
|||
*/
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -51,7 +52,7 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI
|
|||
/**
|
||||
* optional = false<br>
|
||||
* opponentController = false
|
||||
*
|
||||
*
|
||||
* @param effect
|
||||
*/
|
||||
public CreatureEntersBattlefieldTriggeredAbility(Effect effect) {
|
||||
|
@ -60,7 +61,7 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI
|
|||
|
||||
/**
|
||||
* opponentController = false
|
||||
*
|
||||
*
|
||||
* @param effect
|
||||
* @param optional
|
||||
*/
|
||||
|
@ -69,7 +70,7 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param effect
|
||||
* @param optional
|
||||
* @param opponentController
|
||||
|
@ -78,7 +79,7 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI
|
|||
this(Zone.BATTLEFIELD, effect, optional, opponentController);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param zone
|
||||
* @param effect
|
||||
|
@ -104,7 +105,6 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public CreatureEntersBattlefieldTriggeredAbility(CreatureEntersBattlefieldTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.opponentController = ability.opponentController;
|
||||
|
@ -118,7 +118,7 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (filter.match(permanent, sourceId, controllerId, game)
|
||||
&& (permanent.getControllerId().equals(this.controllerId) ^ opponentController)) {
|
||||
if (!this.getTargets().isEmpty()) {
|
||||
|
@ -137,7 +137,7 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a " + filter.getMessage() +" enters the battlefield under "
|
||||
return "Whenever a " + filter.getMessage() + " enters the battlefield under "
|
||||
+ (opponentController ? "an opponent's control, " : "your control, ")
|
||||
+ super.getRule();
|
||||
}
|
||||
|
|
|
@ -36,7 +36,9 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
|
||||
public DoIfCostPaid(Effect effect, Cost cost, String chooseUseText, boolean optional) {
|
||||
super(Outcome.Benefit);
|
||||
this.executingEffects.add(effect);
|
||||
if (effect != null) {
|
||||
this.executingEffects.add(effect);
|
||||
}
|
||||
this.cost = cost;
|
||||
this.chooseUseText = chooseUseText;
|
||||
this.optional = optional;
|
||||
|
@ -74,10 +76,9 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
message = CardUtil.replaceSourceName(message, mageObject.getLogName());
|
||||
boolean result = true;
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
|
||||
&& (!optional || player.chooseUse(executingEffects.get(0).getOutcome(), message, source, game))) {
|
||||
&& executingEffects.size() > 0 && (!optional || player.chooseUse(executingEffects.get(0).getOutcome(), message, source, game))) {
|
||||
cost.clearPaid();
|
||||
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
|
||||
game.applyEffects(); // To end effects e.g. of sacrificed permanents
|
||||
for (Effect effect : executingEffects) {
|
||||
effect.setTargetPointer(this.targetPointer);
|
||||
if (effect instanceof OneShotEffect) {
|
||||
|
@ -87,7 +88,8 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
player.resetStoredBookmark(game); // otherwise you can e.g. undo card drawn with Mentor of the Meek
|
||||
} else if (!otherwiseEffects.isEmpty()) {
|
||||
}
|
||||
else if (!otherwiseEffects.isEmpty()) {
|
||||
for (Effect effect : otherwiseEffects) {
|
||||
effect.setTargetPointer(this.targetPointer);
|
||||
if (effect instanceof OneShotEffect) {
|
||||
|
@ -97,7 +99,8 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (!otherwiseEffects.isEmpty()) {
|
||||
}
|
||||
else if (!otherwiseEffects.isEmpty()) {
|
||||
for (Effect effect : otherwiseEffects) {
|
||||
effect.setTargetPointer(this.targetPointer);
|
||||
if (effect instanceof OneShotEffect) {
|
||||
|
|
|
@ -58,7 +58,7 @@ public enum CardRepository {
|
|||
// raise this if db structure was changed
|
||||
private static final long CARD_DB_VERSION = 51;
|
||||
// raise this if new cards were added to the server
|
||||
private static final long CARD_CONTENT_VERSION = 99;
|
||||
private static final long CARD_CONTENT_VERSION = 100;
|
||||
private Dao<CardInfo, Object> cardDao;
|
||||
private Set<String> classNames;
|
||||
|
||||
|
|
|
@ -85,12 +85,14 @@ public enum SubType {
|
|||
CENTAUR("Centaur", SubTypeSet.CreatureType),
|
||||
CEREAN("Cerean", SubTypeSet.CreatureType, true), // Star Wars
|
||||
CEPHALID("Cephalid", SubTypeSet.CreatureType),
|
||||
CHICKEN("Chicken", SubTypeSet.CreatureType, true), // Unglued
|
||||
CHIMERA("Chimera", SubTypeSet.CreatureType),
|
||||
CHISS("Chiss", SubTypeSet.CreatureType, true),
|
||||
CITIZEN("Citizen", SubTypeSet.CreatureType),
|
||||
CLERIC("Cleric", SubTypeSet.CreatureType),
|
||||
COCKATRICE("Cockatrice", SubTypeSet.CreatureType),
|
||||
CONSTRUCT("Construct", SubTypeSet.CreatureType),
|
||||
COW("Cow", SubTypeSet.CreatureType, true), // Unglued
|
||||
COWARD("Coward", SubTypeSet.CreatureType),
|
||||
CRAB("Crab", SubTypeSet.CreatureType),
|
||||
CROCODILE("Crocodile", SubTypeSet.CreatureType),
|
||||
|
@ -114,6 +116,7 @@ public enum SubType {
|
|||
DWARF("Dwarf", SubTypeSet.CreatureType),
|
||||
// E
|
||||
EFREET("Efreet", SubTypeSet.CreatureType),
|
||||
EGG("Egg", SubTypeSet.CreatureType),
|
||||
ELDER("Elder", SubTypeSet.CreatureType),
|
||||
ELDRAZI("Eldrazi", SubTypeSet.CreatureType),
|
||||
ELEMENTAL("Elemental", SubTypeSet.CreatureType),
|
||||
|
@ -131,6 +134,7 @@ public enum SubType {
|
|||
FROG("Frog", SubTypeSet.CreatureType),
|
||||
FUNGUS("Fungus", SubTypeSet.CreatureType),
|
||||
// G
|
||||
GAMER("Gamer", SubTypeSet.CreatureType, true), // Un-sets
|
||||
GAMORREAN("Gamorrean", SubTypeSet.CreatureType, true), // Star Wars
|
||||
GAND("Gand", SubTypeSet.CreatureType, true), // Star Wars
|
||||
GARGOYLE("Gargoyle", SubTypeSet.CreatureType),
|
||||
|
@ -194,6 +198,7 @@ public enum SubType {
|
|||
LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType),
|
||||
LICID("Licid", SubTypeSet.CreatureType),
|
||||
LIZARD("Lizard", SubTypeSet.CreatureType),
|
||||
LOBSTER("Lobster", SubTypeSet.CreatureType, true), // Unglued
|
||||
// M
|
||||
MANTELLIAN("Mantellian", SubTypeSet.CreatureType, true), // Star Wars
|
||||
MANTICORE("Manticore", SubTypeSet.CreatureType),
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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.filter.predicate.permanent;
|
||||
|
||||
import java.util.List;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public class PermanentInListPredicate implements Predicate<Permanent> {
|
||||
|
||||
private final List<Permanent> permanents;
|
||||
|
||||
public PermanentInListPredicate(List<Permanent> permanents) {
|
||||
this.permanents = permanents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return permanents.contains(input);
|
||||
}
|
||||
}
|
|
@ -38,7 +38,6 @@ import mage.abilities.keyword.special.JohanVigilanceAbility;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureForCombatBlock;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
|
@ -655,7 +654,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
Map<UUID, Set<UUID>> mustBeBlockedByAtLeastOne = new HashMap<>();
|
||||
|
||||
// check mustBlock requirements of creatures from opponents of attacking player
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), player.getId(), game)) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED, player.getId(), game)) {
|
||||
// creature is controlled by an opponent of the attacker
|
||||
if (opponents.contains(creature.getControllerId())) {
|
||||
|
||||
|
@ -1180,6 +1179,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
//TODO: handle banding
|
||||
blockingGroups.get(blockerId).attackers.add(attackerId);
|
||||
}
|
||||
// "blocker.setBlocking(blocker.getBlocking() + 1)" is handled by the attacking combat group
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1392,6 +1392,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
}
|
||||
|
||||
public void removeBlockerGromGroup(UUID blockerId, CombatGroup groupToUnblock, Game game) {
|
||||
// Manual player action for undoing one declared blocker (used for multi-blocker creatures)
|
||||
Permanent creature = game.getPermanent(blockerId);
|
||||
if (creature != null) {
|
||||
for (CombatGroup group : groups) {
|
||||
|
@ -1404,7 +1405,26 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
if (creature.getBlocking() > 0) {
|
||||
creature.setBlocking(creature.getBlocking() - 1);
|
||||
} else {
|
||||
throw new UnsupportedOperationException("Tryinging creature to unblock, but blocking number value of creature < 1");
|
||||
throw new UnsupportedOperationException("Trying to unblock creature, but blocking number value of creature < 1");
|
||||
}
|
||||
boolean canRemove = false;
|
||||
for (CombatGroup blockGroup : getBlockingGroups()) {
|
||||
if (blockGroup.blockers.contains(blockerId)) {
|
||||
for (UUID attackerId : group.getAttackers()) {
|
||||
blockGroup.attackers.remove(attackerId);
|
||||
blockGroup.attackerOrder.remove(attackerId);
|
||||
}
|
||||
if (creature.getBlocking() == 0) {
|
||||
blockGroup.blockers.remove(blockerId);
|
||||
blockGroup.attackerOrder.clear();
|
||||
}
|
||||
}
|
||||
if (blockGroup.blockers.isEmpty()) {
|
||||
canRemove = true;
|
||||
}
|
||||
}
|
||||
if (canRemove) {
|
||||
blockingGroups.remove(blockerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1412,6 +1432,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
}
|
||||
|
||||
public void removeBlocker(UUID blockerId, Game game) {
|
||||
// Manual player action for undoing all declared blockers (used for single-blocker creatures and multi-blockers exceeding blocking limit)
|
||||
for (CombatGroup group : groups) {
|
||||
if (group.blockers.contains(blockerId)) {
|
||||
group.blockers.remove(blockerId);
|
||||
|
|
|
@ -60,12 +60,15 @@ import mage.target.TargetCard;
|
|||
import mage.util.CardUtil;
|
||||
import mage.util.GameLog;
|
||||
import mage.util.ThreadLocalStringBuilder;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public abstract class PermanentImpl extends CardImpl implements Permanent {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(PermanentImpl.class);
|
||||
|
||||
public class MarkedDamageInfo {
|
||||
|
||||
public MarkedDamageInfo(Counter counter, MageObject sourceObject) {
|
||||
|
@ -699,6 +702,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (getSpellAbility() == null) {
|
||||
logger.info("FATAL : no spell ability for attach to permanent: " + getName());
|
||||
return;
|
||||
}
|
||||
if (!getSpellAbility().getTargets().isEmpty() && (getSpellAbility().getTargets().get(0) instanceof TargetCard)) {
|
||||
Card attachedToCard = game.getCard(this.getAttachedTo());
|
||||
if (attachedToCard != null) {
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
|
||||
public class GiantChickenToken extends Token {
|
||||
|
||||
public GiantChickenToken() {
|
||||
super("Giant Chicken", "4/4 red Giant Chicken creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add(SubType.GIANT);
|
||||
subtype.add(SubType.CHICKEN);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
|
@ -32970,7 +32970,7 @@ Willing Test Subject|Unstable|126|C|{2}{G}|Creature- Spider Monkey Scientist|2|2
|
|||
Garbage Elemental|Unstable|82|U|{4}{R}|Creature - Elemental|3|2|Battle cry <i>(Whenever this creature attacks, each other attacking creature gets +1/+0 until end of turn.)</i>$When Garbage Elemental enters the battlefield, roll two six-sided dice. Create a number of 1/1 red Goblin creature tokens equal to the difference between those results.|
|
||||
Oddly Uneven|Unstable|15|R|{3}{W}{W}|Sorcery|||Choose one --$* Destroy each creature with an odd number of words in its name. (Hyphenated words are one word.)$* Destroy each creature with an even number of words in its name.|
|
||||
capital offense|Unstable|52|C|{2}{B}{B}|Instant|||target creature gets -x/-x until end of turn, where x is the number of times a capital letter appears in its rules text. (ignore reminder text and flavor text.)
|
||||
Very Cryptic Command|Unstable|49|R|{1}{U}{U}{U}|Instant|||Choose two - Return target permanent to its controller<EFBFBD>s hand.; Draw two cards, then discard a card.; Change the target of target spell with a single target.; Turn over target nontoken creature.|
|
||||
Very Cryptic Command|Unstable|49|R|{1}{U}{U}{U}|Instant|||Choose two - Return target permanent to its controller's hand.; Draw two cards, then discard a card.; Change the target of target spell with a single target.; Turn over target nontoken creature.|
|
||||
Master of Waves|Duel Decks: Merfolk vs. Goblins|1|M|{3}{U}|Creature - Merfolk Wizard|2|1|Protection from red$Elemental creatures you control get +1/+1.$When Master of Waves enters the battlefield, create a number of 1/0 blue Elemental creature tokens equal to your devotion to blue. <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i>|
|
||||
Aquitect's Will|Duel Decks: Merfolk vs. Goblins|2|C|{U}|Tribal Sorcery - Merfolk|||Put a flood counter on target land. That land is an Island in addition to its other types for as long as it has a flood counter on it. If you control a Merfolk, draw a card.|
|
||||
Claustrophobia|Duel Decks: Merfolk vs. Goblins|3|C|{1}{U}{U}|Enchantment - Aura|||Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.|
|
||||
|
@ -33030,3 +33030,47 @@ Blighted Gorge|Duel Decks: Merfolk vs. Goblins|58|U||Land|||{tap}: Add {C} to yo
|
|||
Forgotten Cave|Duel Decks: Merfolk vs. Goblins|59|C||Land|||Forgotten Cave enters the battlefield tapped.${tap}: Add {R} to your mana pool.$Cycling {R} <i>({R}, Discard this card: Draw a card.)</i>|
|
||||
Mountain|Duel Decks: Merfolk vs. Goblins|60|L||Basic Land - Mountain||||
|
||||
Mountain|Duel Decks: Merfolk vs. Goblins|61|L||Basic Land - Mountain||||
|
||||
The Cheese Stands Alone|Unglued|2|R|{4}{W}{W}|Enchantment|||When you control no permanents other than The Cheese Stands Alone and have no cards in hand, you win the game.|
|
||||
Lexivore|Unglued|7|U|{3}{W}|Creature - Beast|2|3| Whenever Lexivore deals damage to a player, destroy target permanent other than Lexivore with the most lines of text in its text box. (If two or more cards are tied, target any one of them.)|
|
||||
Miss Demeanor|Unglued|10|U|{3}{W}|Creature - Lady of Proper Etiquette|3|1| Flying, first strike At the beginning of each other player's upkeep, you may compliment that player on his or her game play. If you don't, sacrifice Miss Demeanor.|
|
||||
Once More with Feeling|Unglued|11|R|{W}{W}{W}{W}|Sorcery|||Exile all permanents and all cards from all graveyards. Each player shuffles his or her hand into his or her library, then draws seven cards. Each player's life total becomes 10. Exile Once More with Feeling. DCI ruling - A deck can have only one card named Once More with Feeling.|
|
||||
Checks and Balances|Unglued|16|U|{2}{U}|Enchantment|||Cast Checks and Balances only if there are three or more players in the game. Whenever a player casts a spell, each of that player's opponents may discard a card. If they do, counter that spell.|
|
||||
Chicken a la King|Unglued|17|R|{1}{U}{U}|Creature - Chicken|2|2| Whenever a 6 is rolled on a six-sided die, put a +1/+1 counter on each Chicken. (You may roll dice only when instructed to.) Tap an untapped Chicken you control: Roll a six-sided die.|
|
||||
Clambassadors|Unglued|18|C|{3}{U}|Creature - Clamfolk|4|4| Whenever Clambassadors deals damage to a player, choose an artifact, creature, or land you control. That player gains control of that permanent.|
|
||||
Clam-I-Am|Unglued|19|C|{2}{U}|Creature - Clamfolk|2|2| If you roll a 3 on a six-sided die, you may reroll that die.|
|
||||
Denied!|Unglued|22|C|{U}|Instant|||Choose a card name, then target spell's controller reveals his or her hand. If a card with the chosen name is revealed this way, counter that spell.|
|
||||
Fowl Play|Unglued|24|C|{2}{U}|Enchantment - Aura|||Enchant creature Enchanted creature is a Chicken with base power and toughness 1/1 and loses all abilities.|
|
||||
Free-for-All|Unglued|25|R|{3}{U}|Enchantment|||When Free-for-All enters the battlefield, exile all creatures face down. At the beginning of each player's upkeep, that player chooses a card exiled with Free-for-All at random and puts it onto the battlefield. When Free-for-All leaves the battlefield, put all cards exiled with it into their owners' graveyards.|
|
||||
Psychic Network|Unglued|26|R|{U}|Enchantment|||Each player plays with the top card of his or her library held against his or her forehead, revealed to each other player.|
|
||||
Deadhead|Unglued|30|C|{3}{B}|Creature - Zombie|3|3| {0}: Return Deadhead from your graveyard to the battlefield. Activate this ability only if an opponent isn't touching his or her hand (of cards).|
|
||||
Jumbo Imp|Unglued|34|U|{2}{B}|Creature - Imp|0|0| Flying$As Jumbo Imp enters the battlefield, roll a six-sided die. Jumbo Imp enters the battlefield with a number of +1/+1 counters on it equal to the result.$At the beginning of your upkeep, roll a six-sided die and put a number of +1/+1 counters on Jumbo Imp equal to the result. At the beginning of your end step, roll a six-sided die and remove a number of +1/+1 counters from Jumbo Imp equal to the result.|
|
||||
Organ Harvest|Unglued|35|C|{B}|Sorcery|||Your team may sacrifice any number of creatures. For each creature sacrificed this way, you add {B}{B} to your mana pool.|
|
||||
Poultrygeist|Unglued|37|C|{2}{B}|Creature - Chicken|1|1| Flying Whenever a creature dies, you may roll a six-sided die. If you roll a 1, sacrifice Poultrygeist. Otherwise, put a +1/+1 counter on Poultrygeist.|
|
||||
Temp of the Damned|Unglued|38|C|{2}{B}|Creature - Zombie|3|3| As Temp of the Damned enters the battlefield, roll a six-sided die. Temp of the Damned enters the battlefield with a number of funk counters on it equal to the result. At the beginning of your upkeep, remove a funk counter from Temp of the Damned. If you can't, sacrifice it.|
|
||||
Burning Cinder Fury of Crimson Chaos Fire|Unglued|40|R|{3}{R}|Enchantment|||Whenever any player taps a permanent, that player choose one of his or her opponents. The chosen player gains control of that permanent at the beginning of the next end step. At the beginning of each player's end step, if that player didn't tap any nonland permanents that turn, Burning Cinder Fury of Crimson Chaos Fire deals 3 damage to that player.|
|
||||
Chicken Egg|Unglued|41|R|{1}{R}|Creature - Egg|0|1| At the beginning of your upkeep, roll a six-sided die. If you roll a 6, sacrifice Chicken Egg and create a 4/4 red Giant Chicken creature token.|
|
||||
Goblin Bookie|Unglued|43|C|{R}|Creature - Goblin|1|1| {R}, {T}: Reflip any coin or reroll any die. (Activate this ability only any time it makes sense.)|
|
||||
Goblin Bowling Team|Unglued|44|C|{3}{R}|Creature - Goblin|1|1| If Goblin Bowling Team would deal damage to a creature or player, it deals that much damage plus the result of a six-sided die roll to that creature or player instead.|
|
||||
Goblin Tutor|Unglued|45|U|{R}|Instant|||Roll a six-sided die. If you roll a 1, Goblin Tutor has no effect. Otherwise, search your library for the indicated card, reveal it, put it into your hand, then shuffle your library. 2 - A card named Goblin Tutor 3 - An enchantment card 4 - An artifact card 5 - A creature card 6 - An instant or sorcery card|
|
||||
Jalum Grifter|Unglued|47|R|{3}{R}{R}|Legendary Creature - Devil|3|5| {1}{R}, {T}: Shuffle Jalum Grifter and two lands you control face down. Target opponent chooses one of those cards. Turn the cards face up. If the opponent chose Jalum Grifter, sacrifice it. Otherwise, destroy target permanent.|
|
||||
Krazy Kow|Unglued|48|C|{3}{R}|Creature - Cow|3|3| At the beginning of your upkeep, roll a six-sided die. If you a roll a 1, sacrifice Krazy Kow and it deals 3 damage to each creature and each player.|
|
||||
Ricochet|Unglued|50|U|{R}|Enchantment|||Whenever a player casts a spell that targets a single player, each player rolls a six-sided die. Change the target of that spell to the player with the lowest result. Reroll to break ties, if necessary.|
|
||||
Spark Fiend|Unglued|51|R|{4}{R}|Creature - Beast, When Spark Fiend enters the battlefield, roll two six-sided dice. If you rolled 2, 3, or 12, sacrifice Spark Fiend. If you rolled 7 or 11, don't roll dice for Spark Fiend during any of your following upkeeps. If you rolled any other total, note that total. At the beginning of your upkeep, roll two six-sided dice. If you rolled 7, sacrifice Spark Fiend. If you roll the noted total, don't roll dice for Spark Fiend during any of your following upkeeps. Otherwise, do nothing.|
|
||||
Strategy, Schmategy|Unglued|52|R|{1}{R}|Sorcery|||Roll a six-sided die. Strategy, Schmategy has the indicated effect. 1 - Do nothing. 2 - Destroy all artifacts. 3 - Destroy all lands. 4 - Strategy, Schmategy deals 3 damage to each creature and each player. 5 - Each player discards his or her hand and draws seven cards. 6 - Repeat this process two more times.|
|
||||
The Ultimate Nightmare of Wizards of the Coast Customer Service|Unglued|53|U|{X}{Y}{Z}{R}{R}|Sorcery|||The Ultimate Nightmare of Wizards of the Coast® Customer Service deals X damage to each of Y target creatures and Z target players.|
|
||||
Elvish Impersonators|Unglued|56|C|{3}{G}|Creature - Elves, */*, As Elvish Impersonators enters the battlefield, roll a six-sided die twice. Its base power becomes the first result and its base toughness becomes the second result.|
|
||||
Flock of Rabid Sheep|Unglued|57|U|{X}{G}{G}|Sorcery|||Flip X coins. For each flip you win, create a 2/2 green Sheep creature token named Rabid Sheep.|
|
||||
Free-Range Chicken|Unglued|58|C|{3}{G}|Creature - Chicken|3|3| {1}{G}: Roll two six-sided dice. If both results are the same, Free-Range Chicken gets +X/+X until end of turn, where X is that result. If the total of those results is equal to any other total you have rolled this turn for Free-Range Chicken, sacrifice it. (For example, if you roll two 3s, Free-Range Chicken gets +3/+3. If you roll a total of 6 for Free-Range Chicken later that turn, sacrifice it.)|
|
||||
Gerrymandering|Unglued|59|U|{2}{G}|Sorcery|||Exile all lands. Give each player a number of those cards chosen at random equal to the number of those cards the player controlled. Each player returns those cards to the battlefield under that player's control.|
|
||||
Growth Spurt|Unglued|61|C|{1}{G}|Instant|||Roll a six-sided die. Target creature gets +X/+X until end of turn, where X is the result.|
|
||||
Hungry Hungry Heifer|Unglued|63|U|{2}{G}|Creature - Cow|3|3| At the beginning of your upkeep, you may remove a counter from a permanent you control. If you don't, sacrifice Hungry Hungry Heifer.|
|
||||
Incoming!|Unglued|64|R|{4}{G}{G}{G}{G}|Sorcery|||Each player searches his or her library for any number of artifact, creature, enchantment, and/or land cards, puts them onto the battlefield, then shuffles his or her library.|
|
||||
Team Spirit|Unglued|67|C|{2}{G}|Instant|||Creatures target player's team controls get +1/+1 until end of turn.|
|
||||
Timmy, Power Gamer|Unglued|68|R|{2}{G}{G}|Legendary Creature - Human Gamer|1|1| {4}: You may put a creature card from your hand onto the battlefield.|
|
||||
Giant Fan|Unglued|74|R|{4}|Artifact|||{2}, {T}: Move a counter from one permanent onto another. If the second permanent refers to any kind of counter, the moved counter becomes one of those counters. Otherwise, it becomes a +1/+1 counter.|
|
||||
Jack-in-the-Mox|Unglued|75|R|{0}|Artifact|||{T}: Roll a six-sided die. This ability has the indicated effect. 1 - Sacrifice Jack-in-the-Mox and you lose 5 life. 2 - Add {W} to your mana pool. 3 - Add {U} to your mana pool. 4 - Add {B} to your mana pool. 5 - Add {R} to your mana pool. 6 - Add {G} to your mana pool.|
|
||||
Paper Tiger|Unglued|78|C|{4}|Artifact Creature - Cat|4|3| Creatures named Rock Lobster can't attack or block.|
|
||||
Rock Lobster|Unglued|79|C|{4}|Artifact Creature - Lobster|4|3| Creatures named Scissors Lizard can't attack or block.|
|
||||
Scissors Lizard|Unglued|80|C|{4}|Artifact Creature - Lizard|4|3| Creatures named Paper Tiger can't attack or block.|
|
||||
Spatula of the Ages|Unglued|81|U|{4}|Artifact|||{4}, {T}, Sacrifice Spatula of the Ages: You may put a silver-bordered permanent card from your hand onto the battlefield.|
|
||||
Urza's Science Fair Project|Unglued|83|U|{6}|Artifact Creature - Construct|4|4| {2}: Roll a six-sided die. Urza's Science Fair Project gets the indicated result. 1 - It gets -2/-2 until end of turn. 2 - Prevent all combat damage it would deal this turn. 3 - It gains vigilance until end of turn. 4 - It gains first strike until end of turn. 5 - It gains flying until end of turn. 6 - It gets +2/+2 until end of turn.|
|
||||
|
|
Loading…
Add table
Reference in a new issue