mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
- Added Cloven Casting, Intimidation Bot, and Spellbound Dragon.
This commit is contained in:
parent
06163d6ac5
commit
e102000d03
6 changed files with 342 additions and 6 deletions
|
@ -74,11 +74,11 @@ public class BantSureblade extends CardImpl<BantSureblade> {
|
|||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new BoostSourceEffect(1,1, Duration.WhileOnBattlefield),
|
||||
new ControlsPermanentCondition(filter),
|
||||
"As long as you control another multicolored permanent, Bant Sureblade gets +1/+1 and has first strike"));
|
||||
"As long as you control another multicolored permanent, {this} gets +1/+1"));
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()),
|
||||
new ControlsPermanentCondition(filter),
|
||||
null));
|
||||
"As long as you control another multicolored permanent, {this} has first strike"));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
|
120
Mage.Sets/src/mage/sets/alarareborn/ClovenCasting.java
Normal file
120
Mage.Sets/src/mage/sets/alarareborn/ClovenCasting.java
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.alarareborn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class ClovenCasting extends CardImpl<ClovenCasting> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a multicolored instant or sorcery spell");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.INSTANT),
|
||||
new CardTypePredicate(CardType.SORCERY)));
|
||||
filter.add(new MulticoloredPredicate());
|
||||
}
|
||||
|
||||
public ClovenCasting(UUID ownerId) {
|
||||
super(ownerId, 86, "Cloven Casting", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}{R}");
|
||||
this.expansionSetCode = "ARB";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Whenever you cast a multicolored instant or sorcery spell, you may pay {1}. If you do, copy that spell. You may choose new targets for the copy.
|
||||
this.addAbility(new SpellCastTriggeredAbility(new DoIfCostPaid(new ClovenCastingEffect(), new GenericManaCost(1)), filter, true, true));
|
||||
|
||||
}
|
||||
|
||||
public ClovenCasting(final ClovenCasting card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClovenCasting copy() {
|
||||
return new ClovenCasting(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ClovenCastingEffect extends OneShotEffect<ClovenCastingEffect> {
|
||||
|
||||
public ClovenCastingEffect() {
|
||||
super(Outcome.Copy);
|
||||
staticText = "copy that spell. You may choose new targets for the copy";
|
||||
}
|
||||
|
||||
public ClovenCastingEffect(final ClovenCastingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
||||
if (spell != null) {
|
||||
Spell copy = spell.copySpell();
|
||||
copy.setControllerId(source.getControllerId());
|
||||
copy.setCopiedSpell(true);
|
||||
game.getStack().push(copy);
|
||||
copy.chooseNewTargets(game, source.getControllerId());
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
String activateMessage = copy.getActivatedMessage(game);
|
||||
if (activateMessage.startsWith(" casts ")) {
|
||||
activateMessage = activateMessage.substring(6);
|
||||
}
|
||||
game.informPlayers(player.getName() + " copies " + activateMessage);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClovenCastingEffect copy() {
|
||||
return new ClovenCastingEffect(this);
|
||||
}
|
||||
}
|
|
@ -74,11 +74,11 @@ public class EsperStormblade extends CardImpl<EsperStormblade> {
|
|||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new BoostSourceEffect(1,1, Duration.WhileOnBattlefield),
|
||||
new ControlsPermanentCondition(filter),
|
||||
"As long as you control another multicolored permanent, Esper Stormblade gets +1/+1 and has flying"));
|
||||
"As long as you control another multicolored permanent, {this} gets +1/+1"));
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance()),
|
||||
new ControlsPermanentCondition(filter),
|
||||
null));
|
||||
"As long as you control another multicolored permanent, {this} has flying"));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
|
|
@ -74,11 +74,11 @@ public class GrixisGrimblade extends CardImpl<GrixisGrimblade> {
|
|||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new BoostSourceEffect(1,1, Duration.WhileOnBattlefield),
|
||||
new ControlsPermanentCondition(filter),
|
||||
"As long as you control another multicolored permanent, Grixis Grimblade gets +1/+1 and has deathtouch"));
|
||||
"As long as you control another multicolored permanent, {this} gets +1/+1"));
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new GainAbilitySourceEffect(DeathtouchAbility.getInstance()),
|
||||
new ControlsPermanentCondition(filter),
|
||||
null));
|
||||
"As long as you control another multicolored permanent, {this} has deathtouch"));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability2);
|
||||
|
||||
|
|
101
Mage.Sets/src/mage/sets/alarareborn/IntimidationBolt.java
Normal file
101
Mage.Sets/src/mage/sets/alarareborn/IntimidationBolt.java
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.alarareborn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class IntimidationBolt extends CardImpl<IntimidationBolt> {
|
||||
|
||||
public IntimidationBolt(UUID ownerId) {
|
||||
super(ownerId, 99, "Intimidation Bolt", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{R}{W}");
|
||||
this.expansionSetCode = "ARB";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Intimidation Bolt deals 3 damage to target creature. Other creatures can't attack this turn.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellAbility().addEffect(new IntimidationEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
}
|
||||
|
||||
public IntimidationBolt(final IntimidationBolt card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntimidationBolt copy() {
|
||||
return new IntimidationBolt(this);
|
||||
}
|
||||
}
|
||||
|
||||
class IntimidationEffect extends RestrictionEffect<IntimidationEffect> {
|
||||
|
||||
public IntimidationEffect(Duration duration) {
|
||||
super(duration);
|
||||
staticText = "Other creatures can't attack this turn";
|
||||
}
|
||||
|
||||
public IntimidationEffect(final IntimidationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
if (!permanent.getId().equals(source.getFirstTarget())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttack(Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntimidationEffect copy() {
|
||||
return new IntimidationEffect(this);
|
||||
}
|
||||
|
||||
}
|
115
Mage.Sets/src/mage/sets/alarareborn/SpellboundDragon.java
Normal file
115
Mage.Sets/src/mage/sets/alarareborn/SpellboundDragon.java
Normal file
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.alarareborn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetDiscard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SpellboundDragon extends CardImpl<SpellboundDragon> {
|
||||
|
||||
public SpellboundDragon(UUID ownerId) {
|
||||
super(ownerId, 90, "Spellbound Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{R}");
|
||||
this.expansionSetCode = "ARB";
|
||||
this.subtype.add("Dragon");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Spellbound Dragon attacks, draw a card, then discard a card. Spellbound Dragon gets +X/+0 until end of turn, where X is the discarded card's converted mana cost.
|
||||
this.addAbility(new AttacksTriggeredAbility(new SpellboundDragonEffect(), false));
|
||||
|
||||
}
|
||||
|
||||
public SpellboundDragon(final SpellboundDragon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellboundDragon copy() {
|
||||
return new SpellboundDragon(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SpellboundDragonEffect extends OneShotEffect<SpellboundDragonEffect> {
|
||||
|
||||
public SpellboundDragonEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "draw a card, then discard a card. Spellbound Dragon gets +X/+0 until end of turn, where X is the discarded card's converted mana cost";
|
||||
}
|
||||
|
||||
public SpellboundDragonEffect(final SpellboundDragonEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellboundDragonEffect copy() {
|
||||
return new SpellboundDragonEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
Permanent dragon = game.getPermanent(source.getSourceId());
|
||||
you.drawCards(1, game);
|
||||
TargetDiscard target = new TargetDiscard(you.getId());
|
||||
you.choose(Outcome.Discard, target, source.getSourceId(), game);
|
||||
Card card = you.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null && you.discard(card, source, game)) {
|
||||
int cmc = card.getManaCost().convertedManaCost();
|
||||
if (dragon != null) {
|
||||
game.addEffect(new BoostSourceEffect(cmc, 0, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue