mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
commit
ca4eebdb69
6 changed files with 452 additions and 8 deletions
189
Mage.Sets/src/mage/cards/a/ArcaneAdaptation.java
Normal file
189
Mage.Sets/src/mage/cards/a/ArcaneAdaptation.java
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
/*
|
||||||
|
* 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.a;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Layer;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubLayer;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
import mage.game.stack.StackObject;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ArcaneAdaptation extends CardImpl {
|
||||||
|
|
||||||
|
public ArcaneAdaptation(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||||
|
|
||||||
|
// As Arcane Adaptation enters the battlefield, choose a creature type.
|
||||||
|
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral)));
|
||||||
|
// Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConspyEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArcaneAdaptation(final ArcaneAdaptation card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArcaneAdaptation copy() {
|
||||||
|
return new ArcaneAdaptation(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ConspyEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
public ConspyEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
staticText = "Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConspyEffect(final ConspyEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConspyEffect copy() {
|
||||||
|
return new ConspyEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
SubType choice = (SubType) game.getState().getValue(source.getSourceId().toString() + "_type");
|
||||||
|
if (controller != null && choice != null) {
|
||||||
|
// Creature cards you own that aren't on the battlefield
|
||||||
|
// in graveyard
|
||||||
|
for (UUID cardId : controller.getGraveyard()) {
|
||||||
|
Card card = game.getCard(cardId);
|
||||||
|
if (card.isCreature() && !card.getSubtype(game).contains(choice)) {
|
||||||
|
for (SubType s : card.getSubtype(game)) {
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(s);
|
||||||
|
}
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(choice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// on Hand
|
||||||
|
for (UUID cardId : controller.getHand()) {
|
||||||
|
Card card = game.getCard(cardId);
|
||||||
|
if (card.isCreature() && !card.getSubtype(game).contains(choice)) {
|
||||||
|
for (SubType s : card.getSubtype(game)) {
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(s);
|
||||||
|
}
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(choice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// in Exile
|
||||||
|
for (Card card : game.getState().getExile().getAllCards(game)) {
|
||||||
|
if (card.isCreature() && !card.getSubtype(game).contains(choice)) {
|
||||||
|
for (SubType s : card.getSubtype(game)) {
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(s);
|
||||||
|
}
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(choice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// in Library (e.g. for Mystical Teachings)
|
||||||
|
for (Card card : controller.getLibrary().getCards(game)) {
|
||||||
|
if (card.getOwnerId().equals(controller.getId()) && card.isCreature() && !card.getSubtype(game).contains(choice)) {
|
||||||
|
for (SubType s : card.getSubtype(game)) {
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(s);
|
||||||
|
}
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(choice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// commander in command zone
|
||||||
|
for (UUID commanderId : controller.getCommandersIds()) {
|
||||||
|
if (game.getState().getZone(commanderId) == Zone.COMMAND) {
|
||||||
|
Card card = game.getCard(commanderId);
|
||||||
|
if (card.isCreature() && !card.getSubtype(game).contains(choice)) {
|
||||||
|
for (SubType s : card.getSubtype(game)) {
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(s);
|
||||||
|
}
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(choice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// creature spells you control
|
||||||
|
for (Iterator<StackObject> iterator = game.getStack().iterator(); iterator.hasNext();) {
|
||||||
|
StackObject stackObject = iterator.next();
|
||||||
|
if (stackObject instanceof Spell
|
||||||
|
&& stackObject.getControllerId().equals(source.getControllerId())
|
||||||
|
&& stackObject.isCreature()
|
||||||
|
&& !stackObject.getSubtype(game).contains(choice)) {
|
||||||
|
Card card = ((Spell) stackObject).getCard();
|
||||||
|
for (SubType s : card.getSubtype(game)) {
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(s);
|
||||||
|
}
|
||||||
|
game.getState().getCreateCardAttribute(card).getSubtype().add(choice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// creatures you control
|
||||||
|
List<Permanent> creatures = game.getBattlefield().getAllActivePermanents(
|
||||||
|
new FilterControlledCreaturePermanent(), source.getControllerId(), game);
|
||||||
|
for (Permanent creature : creatures) {
|
||||||
|
if (creature != null && !creature.getSubtype(game).contains(choice)) {
|
||||||
|
creature.getSubtype(game).add(choice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasLayer(Layer layer) {
|
||||||
|
return layer == Layer.TypeChangingEffects_4;
|
||||||
|
}
|
||||||
|
}
|
81
Mage.Sets/src/mage/cards/b/BishopOfTheBloodstained.java
Normal file
81
Mage.Sets/src/mage/cards/b/BishopOfTheBloodstained.java
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
/*
|
||||||
|
* 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.b;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class BishopOfTheBloodstained extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Vampire you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.VAMPIRE));
|
||||||
|
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BishopOfTheBloodstained(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.VAMPIRE);
|
||||||
|
this.subtype.add(SubType.CLERIC);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// When Bishop of the Bloodstained enters the battlefield, target player loses 1 life for each vampire you control.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(new PermanentsOnBattlefieldCount(filter)));
|
||||||
|
ability.addTarget(new TargetPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BishopOfTheBloodstained(final BishopOfTheBloodstained card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BishopOfTheBloodstained copy() {
|
||||||
|
return new BishopOfTheBloodstained(this);
|
||||||
|
}
|
||||||
|
}
|
93
Mage.Sets/src/mage/cards/c/ChartACourse.java
Normal file
93
Mage.Sets/src/mage/cards/c/ChartACourse.java
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
/*
|
||||||
|
* 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.abilities.Ability;
|
||||||
|
import mage.abilities.condition.common.RaidCondition;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.watchers.common.PlayerAttackedWatcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class ChartACourse extends CardImpl {
|
||||||
|
|
||||||
|
public ChartACourse(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}");
|
||||||
|
|
||||||
|
// Draw two cards. Then discard a card unless you attacked with a creature this turn.
|
||||||
|
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
|
||||||
|
this.getSpellAbility().addEffect(new ChartACourseEffect());
|
||||||
|
this.getSpellAbility().addWatcher(new PlayerAttackedWatcher());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChartACourse(final ChartACourse card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChartACourse copy() {
|
||||||
|
return new ChartACourse(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChartACourseEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
ChartACourseEffect() {
|
||||||
|
super(Outcome.Neutral);
|
||||||
|
this.staticText = "Then discard a card unless you attacked with a creature this turn.";
|
||||||
|
}
|
||||||
|
|
||||||
|
ChartACourseEffect(final ChartACourseEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChartACourseEffect copy() {
|
||||||
|
return new ChartACourseEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player != null && !RaidCondition.instance.apply(game, source)) {
|
||||||
|
player.discard(1, false, source, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,7 +29,6 @@ package mage.cards.c;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ContinuousEffectImpl;
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||||
|
@ -44,10 +43,10 @@ import mage.game.stack.Spell;
|
||||||
import mage.game.stack.StackObject;
|
import mage.game.stack.StackObject;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.util.SubTypeList;
|
import mage.util.SubTypeList;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -56,10 +55,10 @@ import java.util.UUID;
|
||||||
public class Conspiracy extends CardImpl {
|
public class Conspiracy extends CardImpl {
|
||||||
|
|
||||||
public Conspiracy(UUID ownerId, CardSetInfo setInfo) {
|
public Conspiracy(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}");
|
||||||
|
|
||||||
// As Conspiracy enters the battlefield, choose a creature type.
|
// As Conspiracy enters the battlefield, choose a creature type.
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral)));
|
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Neutral)));
|
||||||
// Creature cards you own that aren't on the battlefield, creature spells you control, and creatures you control are the chosen type.
|
// Creature cards you own that aren't on the battlefield, creature spells you control, and creatures you control are the chosen type.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConspiracyEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConspiracyEffect()));
|
||||||
}
|
}
|
||||||
|
@ -134,9 +133,9 @@ class ConspiracyEffect extends ContinuousEffectImpl {
|
||||||
// creature spells you control
|
// creature spells you control
|
||||||
for (Iterator<StackObject> iterator = game.getStack().iterator(); iterator.hasNext();) {
|
for (Iterator<StackObject> iterator = game.getStack().iterator(); iterator.hasNext();) {
|
||||||
StackObject stackObject = iterator.next();
|
StackObject stackObject = iterator.next();
|
||||||
if (stackObject instanceof Spell &&
|
if (stackObject instanceof Spell
|
||||||
stackObject.getControllerId().equals(source.getControllerId()) &&
|
&& stackObject.getControllerId().equals(source.getControllerId())
|
||||||
stackObject.isCreature()) {
|
&& stackObject.isCreature()) {
|
||||||
Card card = ((Spell) stackObject).getCard();
|
Card card = ((Spell) stackObject).getCard();
|
||||||
setCreatureSubtype(card, choice, game);
|
setCreatureSubtype(card, choice, game);
|
||||||
}
|
}
|
||||||
|
@ -166,7 +165,7 @@ class ConspiracyEffect extends ContinuousEffectImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setChosenSubtype(SubTypeList subtype, SubType choice) {
|
private void setChosenSubtype(SubTypeList subtype, SubType choice) {
|
||||||
if (subtype.size() != 1 || !subtype.contains(choice)) {
|
if (subtype.size() != 1 || !subtype.contains(choice)) {
|
||||||
subtype.removeAll(SubType.getCreatureTypes(false));
|
subtype.removeAll(SubType.getCreatureTypes(false));
|
||||||
subtype.add(choice);
|
subtype.add(choice);
|
||||||
}
|
}
|
||||||
|
|
78
Mage.Sets/src/mage/cards/d/DinosaurStampede.java
Normal file
78
Mage.Sets/src/mage/cards/d/DinosaurStampede.java
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.common.FilterAttackingCreature;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class DinosaurStampede extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterAttackingCreature filter = new FilterAttackingCreature("Attacking creatures");
|
||||||
|
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Dinosaurs you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter2.add(new SubtypePredicate(SubType.DINOSAUR));
|
||||||
|
filter2.add(new ControllerPredicate(TargetController.YOU));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DinosaurStampede(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
|
||||||
|
|
||||||
|
// Attacking creatures get +2/+0 until end of turn. Dinosaurs you control gain trample until end of turn.
|
||||||
|
this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false));
|
||||||
|
Effect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, filter2);
|
||||||
|
effect.setText("Dinosaurs you control gain trample until end of turn.");
|
||||||
|
this.getSpellAbility().addEffect(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DinosaurStampede(final DinosaurStampede card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DinosaurStampede copy() {
|
||||||
|
return new DinosaurStampede(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,12 +33,14 @@ public class Ixalan extends ExpansionSet {
|
||||||
this.ratioBoosterMythic = 8;
|
this.ratioBoosterMythic = 8;
|
||||||
cards.add(new SetCardInfo("Admiral Beckett Brass", 217, Rarity.MYTHIC, mage.cards.a.AdmiralBeckettBrass.class));
|
cards.add(new SetCardInfo("Admiral Beckett Brass", 217, Rarity.MYTHIC, mage.cards.a.AdmiralBeckettBrass.class));
|
||||||
cards.add(new SetCardInfo("Angrath's Marauders", 132, Rarity.RARE, mage.cards.a.AngrathsMarauders.class));
|
cards.add(new SetCardInfo("Angrath's Marauders", 132, Rarity.RARE, mage.cards.a.AngrathsMarauders.class));
|
||||||
|
cards.add(new SetCardInfo("Arcane Adaptation", 46, Rarity.RARE, mage.cards.a.ArcaneAdaptation.class));
|
||||||
cards.add(new SetCardInfo("Arguel's Blood Fast", 90, Rarity.RARE, mage.cards.a.ArguelsBloodFast.class));
|
cards.add(new SetCardInfo("Arguel's Blood Fast", 90, Rarity.RARE, mage.cards.a.ArguelsBloodFast.class));
|
||||||
cards.add(new SetCardInfo("Ashes of the Abhorrent", 2, Rarity.RARE, mage.cards.a.AshesOfTheAbhorrent.class));
|
cards.add(new SetCardInfo("Ashes of the Abhorrent", 2, Rarity.RARE, mage.cards.a.AshesOfTheAbhorrent.class));
|
||||||
cards.add(new SetCardInfo("Azcanta, The Sunken Ruin", 74, Rarity.RARE, mage.cards.a.AzcantaTheSunkenRuin.class));
|
cards.add(new SetCardInfo("Azcanta, The Sunken Ruin", 74, Rarity.RARE, mage.cards.a.AzcantaTheSunkenRuin.class));
|
||||||
cards.add(new SetCardInfo("Bishop of Rebirth", 5, Rarity.RARE, mage.cards.b.BishopOfRebirth.class));
|
cards.add(new SetCardInfo("Bishop of Rebirth", 5, Rarity.RARE, mage.cards.b.BishopOfRebirth.class));
|
||||||
cards.add(new SetCardInfo("Belligerent Brontodon", 218, Rarity.UNCOMMON, mage.cards.b.BelligerentBrontodon.class));
|
cards.add(new SetCardInfo("Belligerent Brontodon", 218, Rarity.UNCOMMON, mage.cards.b.BelligerentBrontodon.class));
|
||||||
cards.add(new SetCardInfo("Bellowing Aegisaur", 4, Rarity.UNCOMMON, mage.cards.b.BellowingAegisaur.class));
|
cards.add(new SetCardInfo("Bellowing Aegisaur", 4, Rarity.UNCOMMON, mage.cards.b.BellowingAegisaur.class));
|
||||||
|
cards.add(new SetCardInfo("Bishop of the Bloodstained", 91, Rarity.UNCOMMON, mage.cards.b.BishopOfTheBloodstained.class));
|
||||||
cards.add(new SetCardInfo("Bloodcrazed Paladin", 93, Rarity.RARE, mage.cards.b.BloodcrazedPaladin.class));
|
cards.add(new SetCardInfo("Bloodcrazed Paladin", 93, Rarity.RARE, mage.cards.b.BloodcrazedPaladin.class));
|
||||||
cards.add(new SetCardInfo("Boneyard Parley", 94, Rarity.MYTHIC, mage.cards.b.BoneyardParley.class));
|
cards.add(new SetCardInfo("Boneyard Parley", 94, Rarity.MYTHIC, mage.cards.b.BoneyardParley.class));
|
||||||
cards.add(new SetCardInfo("Burning Sun's Avatar", 135, Rarity.RARE, mage.cards.b.BurningSunsAvatar.class));
|
cards.add(new SetCardInfo("Burning Sun's Avatar", 135, Rarity.RARE, mage.cards.b.BurningSunsAvatar.class));
|
||||||
|
@ -46,6 +48,7 @@ public class Ixalan extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Captain Lannery Storm", 136, Rarity.RARE, mage.cards.c.CaptainLanneryStorm.class));
|
cards.add(new SetCardInfo("Captain Lannery Storm", 136, Rarity.RARE, mage.cards.c.CaptainLanneryStorm.class));
|
||||||
cards.add(new SetCardInfo("Carnage Tyrant", 179, Rarity.MYTHIC, mage.cards.c.CarnageTyrant.class));
|
cards.add(new SetCardInfo("Carnage Tyrant", 179, Rarity.MYTHIC, mage.cards.c.CarnageTyrant.class));
|
||||||
cards.add(new SetCardInfo("Castaway's Despair", 281, Rarity.COMMON, mage.cards.c.CastawaysDespair.class));
|
cards.add(new SetCardInfo("Castaway's Despair", 281, Rarity.COMMON, mage.cards.c.CastawaysDespair.class));
|
||||||
|
cards.add(new SetCardInfo("Chart a Course", 48, Rarity.UNCOMMON, mage.cards.c.ChartACourse.class));
|
||||||
cards.add(new SetCardInfo("Commune with Dinosaurs", 181, Rarity.COMMON, mage.cards.c.CommuneWithDinosaurs.class));
|
cards.add(new SetCardInfo("Commune with Dinosaurs", 181, Rarity.COMMON, mage.cards.c.CommuneWithDinosaurs.class));
|
||||||
cards.add(new SetCardInfo("Conqueror's Foothold", 234, Rarity.RARE, mage.cards.c.ConquerorsFoothold.class));
|
cards.add(new SetCardInfo("Conqueror's Foothold", 234, Rarity.RARE, mage.cards.c.ConquerorsFoothold.class));
|
||||||
cards.add(new SetCardInfo("Conqueror's Galleon", 234, Rarity.RARE, mage.cards.c.ConquerorsGalleon.class));
|
cards.add(new SetCardInfo("Conqueror's Galleon", 234, Rarity.RARE, mage.cards.c.ConquerorsGalleon.class));
|
||||||
|
@ -57,6 +60,7 @@ public class Ixalan extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Deathless Ancient", 100, Rarity.UNCOMMON, mage.cards.d.DeathlessAncient.class));
|
cards.add(new SetCardInfo("Deathless Ancient", 100, Rarity.UNCOMMON, mage.cards.d.DeathlessAncient.class));
|
||||||
cards.add(new SetCardInfo("Deeproot Champion", 185, Rarity.RARE, mage.cards.d.DeeprootChampion.class));
|
cards.add(new SetCardInfo("Deeproot Champion", 185, Rarity.RARE, mage.cards.d.DeeprootChampion.class));
|
||||||
cards.add(new SetCardInfo("Deeproot Waters", 51, Rarity.UNCOMMON, mage.cards.d.DeeprootWaters.class));
|
cards.add(new SetCardInfo("Deeproot Waters", 51, Rarity.UNCOMMON, mage.cards.d.DeeprootWaters.class));
|
||||||
|
cards.add(new SetCardInfo("Dinosaur Stampede", 140, Rarity.UNCOMMON, mage.cards.d.DinosaurStampede.class));
|
||||||
cards.add(new SetCardInfo("Dire Fleet Captain", 221, Rarity.UNCOMMON, mage.cards.d.DireFleetCaptain.class));
|
cards.add(new SetCardInfo("Dire Fleet Captain", 221, Rarity.UNCOMMON, mage.cards.d.DireFleetCaptain.class));
|
||||||
cards.add(new SetCardInfo("Dragonskull Summit", 252, Rarity.RARE, mage.cards.d.DragonskullSummit.class));
|
cards.add(new SetCardInfo("Dragonskull Summit", 252, Rarity.RARE, mage.cards.d.DragonskullSummit.class));
|
||||||
cards.add(new SetCardInfo("Dreamcaller Siren", 54, Rarity.RARE, mage.cards.d.DreamcallerSiren.class));
|
cards.add(new SetCardInfo("Dreamcaller Siren", 54, Rarity.RARE, mage.cards.d.DreamcallerSiren.class));
|
||||||
|
|
Loading…
Reference in a new issue