mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
commit
06d3b929a2
24 changed files with 2023 additions and 34 deletions
|
@ -36,14 +36,26 @@ import mage.abilities.common.SkipUntapOptionalAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,6 +64,8 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class TawnossCoffin extends CardImpl {
|
||||
|
||||
public Counters godHelpMe=null;
|
||||
|
||||
public TawnossCoffin(UUID ownerId) {
|
||||
super(ownerId, 33, "Tawnos's Coffin", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
this.expansionSetCode = "ATQ";
|
||||
|
@ -59,15 +73,15 @@ public class TawnossCoffin extends CardImpl {
|
|||
// You may choose not to untap Tawnos's Coffin during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
// {3}, {tap}: Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetForSourceEffect(), new TapSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TawnossCoffinEffect(), new TapSourceCost());
|
||||
ability.addCost(new ManaCostsImpl("{3}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
//When Tawnos's Coffin leaves the battlefield...
|
||||
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD, true), false);
|
||||
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new TawnossCoffinReturnEffect(), false);
|
||||
this.addAbility(ability2);
|
||||
//or becomes untapped, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it, and if you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.
|
||||
Ability ability3 = new BecomesUnTappedSourceTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD, true), false);
|
||||
Ability ability3 = new BecomesUnTappedSourceTriggeredAbility(new TawnossCoffinReturnEffect(), false);
|
||||
this.addAbility(ability3);
|
||||
}
|
||||
|
||||
|
@ -113,4 +127,143 @@ class BecomesUnTappedSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public String getRule() {
|
||||
return "When {this} becomes untapped, " + super.getRule();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class TawnossCoffinEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Aura"));
|
||||
}
|
||||
|
||||
public TawnossCoffinEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. When TawnossCoffin leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
||||
}
|
||||
|
||||
public TawnossCoffinEffect(final TawnossCoffinEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TawnossCoffinEffect copy() {
|
||||
return new TawnossCoffinEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
// Exile enchanted creature and all Auras attached to it.
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
if (enchantment == null) {
|
||||
enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
}
|
||||
UUID targetId=source.getFirstTarget();
|
||||
|
||||
if (targetId==null) return false; // if previous scan somehow failed, simply quit
|
||||
|
||||
if (enchantment != null) { //back to code (mostly) copied from Flickerform
|
||||
Permanent enchantedCreature = game.getPermanent(targetId);
|
||||
if (enchantedCreature != null) {
|
||||
UUID exileZoneId = source.getSourceId();
|
||||
enchantedCreature.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game);
|
||||
for (UUID attachementId : enchantedCreature.getAttachments()) {
|
||||
Permanent attachment = game.getPermanent(attachementId);
|
||||
if (attachment != null && filter.match(attachment, game)) {
|
||||
attachment.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
|
||||
//((TawnossCoffin)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no?
|
||||
((TawnossCoffin)game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
|
||||
|
||||
if (!(enchantedCreature instanceof Token)) {
|
||||
|
||||
// If you do, return the other cards exiled this way to the battlefield under their owners' control attached to that creature
|
||||
/*LeavesBattlefieldTriggeredAbility triggeredAbility = new LeavesBattlefieldTriggeredAbility(
|
||||
new TawnossCoffinReturnEffect(), false);
|
||||
enchantment.addAbility(triggeredAbility, source.getSourceId(), game);
|
||||
*/
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class TawnossCoffinReturnEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filterAura = new FilterCard();
|
||||
|
||||
static {
|
||||
filterAura.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
filterAura.add(new SubtypePredicate("Aura"));
|
||||
}
|
||||
|
||||
|
||||
public TawnossCoffinReturnEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
||||
|
||||
}
|
||||
|
||||
public TawnossCoffinReturnEffect(final TawnossCoffinReturnEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TawnossCoffinReturnEffect copy() {
|
||||
return new TawnossCoffinReturnEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
|
||||
|
||||
FilterCard filter = new FilterCard();
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
//There should be only 1 there, but the for each loop seems the most practical to get to it
|
||||
for (Card enchantedCard : exileZone.getCards(filter, game)){
|
||||
if (enchantedCard == null) continue;
|
||||
enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId());
|
||||
Permanent newPermanent = game.getPermanent(enchantedCard.getId());
|
||||
if (newPermanent != null) {
|
||||
newPermanent.tap(game);
|
||||
for (Card enchantment : exileZone.getCards(game)) {
|
||||
if (filterAura.match(enchantment, game)) {
|
||||
boolean canTarget = false;
|
||||
for (Target target : enchantment.getSpellAbility().getTargets()) {
|
||||
Filter filter2 = target.getFilter();
|
||||
if (filter2.match(newPermanent, game)) {
|
||||
canTarget = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!canTarget) {
|
||||
// Aura stays exiled
|
||||
continue;
|
||||
}
|
||||
game.getState().setValue("attachTo:" + enchantment.getId(), newPermanent);
|
||||
}
|
||||
if (enchantment.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantment.getOwnerId())) {
|
||||
if (filterAura.match(enchantment, game)) {
|
||||
newPermanent.addAttachment(enchantment.getId(), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
Card oubliette = game.getCard(source.getSourceId());
|
||||
if (oubliette == null) return false;//1st stab at getting those counters back
|
||||
for(Counter c : ((TawnossCoffin)oubliette).godHelpMe.values()){ //would be nice if could just use that copy function to set the whole field
|
||||
if(c!=null) newPermanent.getCounters(game).addCounter(c);
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -74,8 +73,8 @@ public class Oubliette extends CardImpl {
|
|||
this.addAbility(ability1);
|
||||
|
||||
// When Oubliette leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.
|
||||
//Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD, true), false);
|
||||
//this.addAbility(ability2);
|
||||
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new OublietteReturnEffect(), false);
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
||||
public Oubliette(final Oubliette card) {
|
||||
|
@ -99,7 +98,7 @@ class OublietteEffect extends OneShotEffect {
|
|||
|
||||
public OublietteEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "4Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. When Oubliette leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
||||
this.staticText = "Exile target creature and all Auras attached to it. Note the number and kind of counters that were on that creature. When Oubliette leaves the battlefield, return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
||||
}
|
||||
|
||||
public OublietteEffect(final OublietteEffect effect) {
|
||||
|
@ -125,7 +124,7 @@ class OublietteEffect extends OneShotEffect {
|
|||
if (enchantment != null) { //back to code (mostly) copied from Flickerform
|
||||
Permanent enchantedCreature = game.getPermanent(targetId);
|
||||
if (enchantedCreature != null) {
|
||||
UUID exileZoneId = UUID.randomUUID();
|
||||
UUID exileZoneId = source.getSourceId();
|
||||
enchantedCreature.moveToExile(exileZoneId, enchantment.getName(), source.getSourceId(), game);
|
||||
for (UUID attachementId : enchantedCreature.getAttachments()) {
|
||||
Permanent attachment = game.getPermanent(attachementId);
|
||||
|
@ -134,16 +133,20 @@ class OublietteEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
//((Oubliette)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game);
|
||||
//((Oubliette)game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
|
||||
|
||||
//((Oubliette)enchantment.getMainCard()).godHelpMe = enchantedCreature.getCounters(game); //why doesn't work? should return the same card, no?
|
||||
((Oubliette)game.getCard(source.getSourceId())).godHelpMe = enchantedCreature.getCounters(game).copy();
|
||||
/*
|
||||
if (!(enchantedCreature instanceof Token)) {
|
||||
|
||||
// If you do, return the other cards exiled this way to the battlefield under their owners' control attached to that creature
|
||||
LeavesBattlefieldTriggeredAbility triggeredAbility = new LeavesBattlefieldTriggeredAbility(
|
||||
new OublietteReturnEffect(enchantedCreature.getId(), exileZoneId, enchantment), false);
|
||||
enchantment.addAbility(triggeredAbility, source.getSourceId(), game);
|
||||
}
|
||||
new OublietteReturnEffect(), false);
|
||||
//enchantment.addAbility(triggeredAbility, source.getSourceId(), game, false);
|
||||
//Card card = game.getCard(source.getSourceId());
|
||||
//game.getState().addOtherAbility(card, triggeredAbility);
|
||||
|
||||
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -161,24 +164,15 @@ class OublietteReturnEffect extends OneShotEffect {
|
|||
filterAura.add(new SubtypePredicate("Aura"));
|
||||
}
|
||||
|
||||
private final UUID enchantedCardId;
|
||||
private final UUID exileZoneId;
|
||||
private final Permanent oubliette;
|
||||
|
||||
public OublietteReturnEffect(UUID enchantedCardId, UUID exileZoneId, Permanent oubliette) {
|
||||
public OublietteReturnEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.enchantedCardId = enchantedCardId;
|
||||
this.exileZoneId = exileZoneId;
|
||||
this.oubliette = oubliette;
|
||||
this.staticText = "return the exiled card to the battlefield under its owner's control tapped with the noted number and kind of counters on it. If you do, return the exiled Aura cards to the battlefield under their owner's control attached to that permanent.";
|
||||
|
||||
}
|
||||
|
||||
public OublietteReturnEffect(final OublietteReturnEffect effect) {
|
||||
super(effect);
|
||||
this.enchantedCardId = effect.enchantedCardId;
|
||||
this.exileZoneId = effect.exileZoneId;
|
||||
this.oubliette = effect.oubliette;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -188,19 +182,23 @@ class OublietteReturnEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
ExileZone exileZone = game.getExile().getExileZone(exileZoneId);
|
||||
Card enchantedCard = exileZone.get(enchantedCardId, game);
|
||||
if (enchantedCard != null) {
|
||||
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
|
||||
|
||||
FilterCard filter = new FilterCard();
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
//There should be only 1 there, but the for each loop seems the most practical to get to it
|
||||
for (Card enchantedCard : exileZone.getCards(filter, game)){
|
||||
if (enchantedCard == null) continue;
|
||||
enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId());
|
||||
Permanent newPermanent = game.getPermanent(enchantedCardId);
|
||||
Permanent newPermanent = game.getPermanent(enchantedCard.getId());
|
||||
if (newPermanent != null) {
|
||||
newPermanent.tap(game);
|
||||
for (Card enchantment : exileZone.getCards(game)) {
|
||||
if (filterAura.match(enchantment, game)) {
|
||||
boolean canTarget = false;
|
||||
for (Target target : enchantment.getSpellAbility().getTargets()) {
|
||||
Filter filter = target.getFilter();
|
||||
if (filter.match(newPermanent, game)) {
|
||||
Filter filter2 = target.getFilter();
|
||||
if (filter2.match(newPermanent, game)) {
|
||||
canTarget = true;
|
||||
break;
|
||||
}
|
||||
|
@ -217,6 +215,7 @@ class OublietteReturnEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
Card oubliette = game.getCard(source.getSourceId());
|
||||
if (oubliette == null) return false;//1st stab at getting those counters back
|
||||
for(Counter c : ((Oubliette)oubliette).godHelpMe.values()){ //would be nice if could just use that copy function to set the whole field
|
||||
if(c!=null) newPermanent.getCounters(game).addCounter(c);
|
||||
|
@ -225,6 +224,7 @@ class OublietteReturnEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
104
Mage.Sets/src/mage/sets/fallenempires/DelifsCone.java
Normal file
104
Mage.Sets/src/mage/sets/fallenempires/DelifsCone.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.sets.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class DelifsCone extends CardImpl {
|
||||
|
||||
public DelifsCone(UUID ownerId) {
|
||||
super(ownerId, 169, "Delif's Cone", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{0}");
|
||||
this.expansionSetCode = "FEM";
|
||||
|
||||
Ability ability2 = new AttacksAndIsNotBlockedTriggeredAbility(new DelifsConeEffect(), true);
|
||||
ability2.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn));
|
||||
// {tap}, Sacrifice Delif's Cone: This turn, when target creature you control attacks and isn't blocked, you may gain life equal to its power. If you do, it assigns no combat damage this turn.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityTargetEffect(ability2, Duration.EndOfTurn),
|
||||
new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public DelifsCone(final DelifsCone card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DelifsCone copy() {
|
||||
return new DelifsCone(this);
|
||||
}
|
||||
}
|
||||
class DelifsConeEffect extends OneShotEffect{
|
||||
|
||||
public DelifsConeEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.setText("you may gain life equal to its power");
|
||||
}
|
||||
|
||||
public DelifsConeEffect(final DelifsConeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DelifsConeEffect copy() {
|
||||
return new DelifsConeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent perm = game.getPermanent(source.getSourceId());
|
||||
GainLifeEffect lifeEffect = new GainLifeEffect(perm.getPower().getValue());
|
||||
return lifeEffect.apply(game, source);
|
||||
}
|
||||
}
|
119
Mage.Sets/src/mage/sets/fallenempires/DelifsCube.java
Normal file
119
Mage.Sets/src/mage/sets/fallenempires/DelifsCube.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.sets.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.RegenerateTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class DelifsCube extends CardImpl {
|
||||
|
||||
public DelifsCube(UUID ownerId) {
|
||||
super(ownerId, 170, "Delif's Cube", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
this.expansionSetCode = "FEM";
|
||||
|
||||
Ability ability2 = new AttacksAndIsNotBlockedTriggeredAbility(new DelifsCubeEffect(this.getId()), false);
|
||||
ability2.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn));
|
||||
// {2}, {tap}: This turn, when target creature you control attacks and isn't blocked, it assigns no combat damage this turn and you put a cube counter on Delif's Cube.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityTargetEffect(ability2, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{2}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
this.addAbility(ability);
|
||||
// {2}, Remove a cube counter from Delif's Cube: Regenerate target creature.
|
||||
SimpleActivatedAbility ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new RegenerateTargetEffect(),
|
||||
new ManaCostsImpl("{2}"));
|
||||
ability3.addCost(new RemoveCountersSourceCost(CounterType.CUBE.createInstance()));
|
||||
ability3.addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
this.addAbility(ability3);
|
||||
}
|
||||
|
||||
public DelifsCube(final DelifsCube card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DelifsCube copy() {
|
||||
return new DelifsCube(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DelifsCubeEffect extends OneShotEffect{
|
||||
|
||||
private UUID cubeId;
|
||||
|
||||
public DelifsCubeEffect(UUID cubeId) {
|
||||
super(Outcome.Benefit);
|
||||
this.cubeId = cubeId;
|
||||
this.setText("This turn, when target creature you control attacks and isn't blocked, it assigns no combat damage this turn and you put a cube counter on Delif's Cube.");
|
||||
}
|
||||
|
||||
public DelifsCubeEffect(final DelifsCubeEffect effect) {
|
||||
super(effect);
|
||||
this.cubeId = effect.cubeId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DelifsCubeEffect copy() {
|
||||
return new DelifsCubeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent perm = game.getPermanent(cubeId);
|
||||
if (perm == null) return false;
|
||||
perm.addCounters(CounterType.CUBE.createInstance(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
71
Mage.Sets/src/mage/sets/fallenempires/DwarvenSoldier.java
Normal file
71
Mage.Sets/src/mage/sets/fallenempires/DwarvenSoldier.java
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* 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.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class DwarvenSoldier extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Orc", "Orc creature");
|
||||
|
||||
public DwarvenSoldier(UUID ownerId) {
|
||||
super(ownerId, 107, "Dwarven Soldier", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.expansionSetCode = "FEM";
|
||||
this.subtype.add("Dwarf");
|
||||
this.subtype.add("Soldier");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever Dwarven Soldier blocks or becomes blocked by one or more Orcs, Dwarven Soldier gets +0/+2 until end of turn.
|
||||
this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(new BoostSourceEffect(0, 2, Duration.EndOfTurn), filter, false));
|
||||
}
|
||||
|
||||
public DwarvenSoldier(final DwarvenSoldier card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DwarvenSoldier copy() {
|
||||
return new DwarvenSoldier(this);
|
||||
}
|
||||
}
|
139
Mage.Sets/src/mage/sets/fallenempires/FarrelitePriest.java
Normal file
139
Mage.Sets/src/mage/sets/fallenempires/FarrelitePriest.java
Normal file
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* 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.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import static mage.Mana.WhiteMana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class FarrelitePriest extends CardImpl {
|
||||
|
||||
public FarrelitePriest(UUID ownerId) {
|
||||
super(ownerId, 137, "Farrelite Priest", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
|
||||
this.expansionSetCode = "FEM";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {1}: Add {W} to your mana pool. If this ability has been activated four or more times this turn, sacrifice Farrelite Priest at the beginning of the next end step.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BasicManaEffect(WhiteMana(1)),
|
||||
new ManaCostsImpl("{1}"));
|
||||
ability.addEffect(new FarrelitePriestEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public FarrelitePriest(final FarrelitePriest card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FarrelitePriest copy() {
|
||||
return new FarrelitePriest(this);
|
||||
}
|
||||
}
|
||||
class FarrelitePriestEffect extends OneShotEffect {
|
||||
|
||||
public FarrelitePriestEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "If this ability has been activated four or more times this turn, sacrifice {this} at the beginning of the next end step";
|
||||
}
|
||||
|
||||
public FarrelitePriestEffect(final FarrelitePriestEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FarrelitePriestEffect copy() {
|
||||
return new FarrelitePriestEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Integer amount = (Integer) game.getState().getValue(source.getSourceId().toString() + "FarrelitePriest");
|
||||
if (amount == null) {
|
||||
amount = 0;
|
||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new FarrelitePriestResetEffect());
|
||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||
}
|
||||
amount++;
|
||||
game.getState().setValue(source.getSourceId().toString() + "FarrelitePriest", amount);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class FarrelitePriestResetEffect extends OneShotEffect {
|
||||
|
||||
public FarrelitePriestResetEffect() {
|
||||
super(Outcome.Neutral);
|
||||
this.staticText = "If this ability has been activated four or more times this turn, sacrifice {this} at the beginning of the next end step";
|
||||
}
|
||||
|
||||
public FarrelitePriestResetEffect(final FarrelitePriestResetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FarrelitePriestResetEffect copy() {
|
||||
return new FarrelitePriestResetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Integer amount = (Integer) game.getState().getValue(source.getSourceId().toString() + "FarrelitePriest");
|
||||
if (amount != null && amount >= 4) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
game.getState().setValue(source.getSourceId().toString() + "FarrelitePriest", null);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
138
Mage.Sets/src/mage/sets/fallenempires/FarrelsMantle.java
Normal file
138
Mage.Sets/src/mage/sets/fallenempires/FarrelsMantle.java
Normal file
|
@ -0,0 +1,138 @@
|
|||
/*
|
||||
* 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.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class FarrelsMantle extends CardImpl {
|
||||
|
||||
|
||||
public FarrelsMantle(UUID ownerId) {
|
||||
super(ownerId, 138, "Farrel's Mantle", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
this.expansionSetCode = "FEM";
|
||||
this.subtype.add("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);
|
||||
|
||||
// Whenever enchanted creature attacks and isn't blocked, its controller may have it deal damage equal to its power plus 2 to another target creature. If that player does, the attacking creature assigns no combat damage this turn.
|
||||
FilterPermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(Predicates.not(new AttachmentByUUIDPredicate(this.getId())));
|
||||
|
||||
Ability ability2 = new AttacksAndIsNotBlockedTriggeredAbility(new FarrelsMantleEffect(), true);
|
||||
ability2.addTarget(new TargetPermanent(filter));
|
||||
ability2.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability2, AttachmentType.AURA)));
|
||||
|
||||
}
|
||||
|
||||
public FarrelsMantle(final FarrelsMantle card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FarrelsMantle copy() {
|
||||
return new FarrelsMantle(this);
|
||||
}
|
||||
}
|
||||
class AttachmentByUUIDPredicate implements Predicate<Permanent> {
|
||||
|
||||
private final UUID id;
|
||||
|
||||
public AttachmentByUUIDPredicate(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return input.getAttachments().contains(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AttachmentUUID(" + id + ')';
|
||||
}
|
||||
}
|
||||
|
||||
class FarrelsMantleEffect extends OneShotEffect{
|
||||
|
||||
public FarrelsMantleEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.setText("its controller may have it deal damage equal to its power plus 2 to another target creature.");
|
||||
}
|
||||
|
||||
public FarrelsMantleEffect(final FarrelsMantleEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FarrelsMantleEffect copy() {
|
||||
return new FarrelsMantleEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent perm = game.getPermanent(source.getSourceId());
|
||||
DamageTargetEffect dmgEffect = new DamageTargetEffect(2+perm.getPower().getValue());
|
||||
return dmgEffect.apply(game, source);
|
||||
}
|
||||
}
|
92
Mage.Sets/src/mage/sets/fallenempires/GoblinFlotilla.java
Normal file
92
Mage.Sets/src/mage/sets/fallenempires/GoblinFlotilla.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.sets.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.IslandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.abilities.effects.common.DoUnlessControllerPaysEffect;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class GoblinFlotilla extends CardImpl {
|
||||
|
||||
public GoblinFlotilla(UUID ownerId) {
|
||||
super(ownerId, 113, "Goblin Flotilla", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
this.expansionSetCode = "FEM";
|
||||
this.subtype.add("Goblin");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Islandwalk
|
||||
this.addAbility(new IslandwalkAbility());
|
||||
// At the beginning of each combat, unless you pay {R}, whenever Goblin Flotilla blocks or becomes blocked by a creature this combat, that creature gains first strike until end of turn.
|
||||
this.addAbility(new BeginningOfCombatTriggeredAbility(new DoUnlessControllerPaysEffect(
|
||||
new GainAbilitySourceEffect(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, "Blocks or Blocked by Goblin Flotilla"), false), Duration.EndOfCombat)
|
||||
//new GoblinFlotillaEffect()
|
||||
, new ManaCostsImpl("{R}"), "Pay Goblin Flotilla combat effect?"), TargetController.ANY, false));
|
||||
}
|
||||
|
||||
public GoblinFlotilla(final GoblinFlotilla card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoblinFlotilla copy() {
|
||||
return new GoblinFlotilla(this);
|
||||
}
|
||||
}
|
||||
/*
|
||||
class GoblinFlotillaEffect extends OneShotEffect {
|
||||
GoblinFlotillaEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "unless you pay {R}, whenever Goblin Flotilla blocks or becomes blocked by a creature this combat, that creature gains first strike until end of turn.";
|
||||
}
|
||||
|
||||
GoblinFlotillaEffect(final GoblinFlotillaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
new GainAbilitySourceEffect(new BlocksOrBecomesBlockedByCreatureTriggeredAbility(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), false), Duration.EndOfCombat);
|
||||
}
|
||||
}*/
|
118
Mage.Sets/src/mage/sets/fallenempires/GoblinKites.java
Normal file
118
Mage.Sets/src/mage/sets/fallenempires/GoblinKites.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.sets.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class GoblinKites extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("controlled creature with power 2 or less");
|
||||
|
||||
static {
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public GoblinKites(UUID ownerId) {
|
||||
super(ownerId, 117, "Goblin Kites", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
|
||||
this.expansionSetCode = "FEM";
|
||||
|
||||
// {R}: Target creature you control with toughness 2 or less gains flying until end of turn. Flip a coin at the beginning of the next end step. If you lose the flip, sacrifice that creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addEffect(new GainAbilityTargetEffect(new BeginningOfEndStepTriggeredAbility(new GoblinKitesEffect(), TargetController.NEXT, false), Duration.EndOfTurn));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public GoblinKites(final GoblinKites card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoblinKites copy() {
|
||||
return new GoblinKites(this);
|
||||
}
|
||||
}
|
||||
class GoblinKitesEffect extends OneShotEffect {
|
||||
|
||||
public GoblinKitesEffect() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "flip a coin. If you lose the flip, sacrifice {this}";
|
||||
}
|
||||
|
||||
public GoblinKitesEffect(GoblinKitesEffect 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) {
|
||||
if (controller.flipCoin(game)) {
|
||||
return true;
|
||||
} else {
|
||||
new SacrificeSourceEffect().apply(game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoblinKitesEffect copy() {
|
||||
return new GoblinKitesEffect(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* 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.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import static mage.Mana.BlackMana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class InitiatesOfTheEbonHand extends CardImpl {
|
||||
|
||||
public InitiatesOfTheEbonHand(UUID ownerId) {
|
||||
super(ownerId, 16, "Initiates of the Ebon Hand", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}");
|
||||
this.expansionSetCode = "FEM";
|
||||
this.subtype.add("Cleric");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {1}: Add {B} to your mana pool. If this ability has been activated four or more times this turn, sacrifice Initiates of the Ebon Hand at the beginning of the next end step.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BasicManaEffect(BlackMana(1)),
|
||||
new ManaCostsImpl("{1}"));
|
||||
ability.addEffect(new InitiatesOfTheEbonHandEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public InitiatesOfTheEbonHand(final InitiatesOfTheEbonHand card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InitiatesOfTheEbonHand copy() {
|
||||
return new InitiatesOfTheEbonHand(this);
|
||||
}
|
||||
}
|
||||
|
||||
class InitiatesOfTheEbonHandEffect extends OneShotEffect {
|
||||
|
||||
public InitiatesOfTheEbonHandEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "If this ability has been activated four or more times this turn, sacrifice {this} at the beginning of the next end step";
|
||||
}
|
||||
|
||||
public InitiatesOfTheEbonHandEffect(final InitiatesOfTheEbonHandEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InitiatesOfTheEbonHandEffect copy() {
|
||||
return new InitiatesOfTheEbonHandEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Integer amount = (Integer) game.getState().getValue(source.getSourceId().toString() + "InitiatesOfTheEbonHand");
|
||||
if (amount == null) {
|
||||
amount = 0;
|
||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new InitiatesOfTheEbonHandResetEffect());
|
||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||
}
|
||||
amount++;
|
||||
game.getState().setValue(source.getSourceId().toString() + "InitiatesOfTheEbonHand", amount);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class InitiatesOfTheEbonHandResetEffect extends OneShotEffect {
|
||||
|
||||
public InitiatesOfTheEbonHandResetEffect() {
|
||||
super(Outcome.Neutral);
|
||||
this.staticText = "If this ability has been activated four or more times this turn, sacrifice {this} at the beginning of the next end step";
|
||||
}
|
||||
|
||||
public InitiatesOfTheEbonHandResetEffect(final InitiatesOfTheEbonHandResetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InitiatesOfTheEbonHandResetEffect copy() {
|
||||
return new InitiatesOfTheEbonHandResetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Integer amount = (Integer) game.getState().getValue(source.getSourceId().toString() + "InitiatesOfTheEbonHand");
|
||||
if (amount != null && amount >= 4) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
game.getState().setValue(source.getSourceId().toString() + "InitiatesOfTheEbonHand", null);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
110
Mage.Sets/src/mage/sets/fallenempires/Necrite.java
Normal file
110
Mage.Sets/src/mage/sets/fallenempires/Necrite.java
Normal file
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* 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.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class Necrite extends CardImpl {
|
||||
|
||||
public Necrite(UUID ownerId) {
|
||||
super(ownerId, 22, "Necrite", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
||||
this.expansionSetCode = "FEM";
|
||||
this.subtype.add("Thrull");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever Necrite attacks and isn't blocked, you may sacrifice it. If you do, destroy target creature defending player controls. It can't be regenerated.
|
||||
DoIfCostPaid effect = new DoIfCostPaid(new DestroyTargetEffect(true), new SacrificeSourceCost(), "Sacrifice {this} to destroy target creature defending player controls?");
|
||||
effect.setText("you may sacrifice it. If you do, destroy target creature defending player controls. It can't be regenerated.");
|
||||
effect.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn));
|
||||
Ability ability = new NecriteTriggeredAbility(effect);
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public Necrite(final Necrite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Necrite copy() {
|
||||
return new Necrite(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NecriteTriggeredAbility extends AttacksAndIsNotBlockedTriggeredAbility{
|
||||
|
||||
public NecriteTriggeredAbility(Effect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
public NecriteTriggeredAbility(final NecriteTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NecriteTriggeredAbility copy() {
|
||||
return new NecriteTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (super.checkTrigger(event, game)){
|
||||
UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(getSourceId(), game);
|
||||
FilterPermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new ControllerIdPredicate(defendingPlayerId));
|
||||
Target target = new TargetPermanent(filter);
|
||||
this.addTarget(target);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
54
Mage.Sets/src/mage/sets/fallenempires/Orgg.java
Normal file
54
Mage.Sets/src/mage/sets/fallenempires/Orgg.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* 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.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class Orgg extends mage.sets.timeshifted.Orgg {
|
||||
|
||||
public Orgg(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 131;
|
||||
this.expansionSetCode = "FEM";
|
||||
this.rarity = Rarity.RARE;
|
||||
}
|
||||
|
||||
public Orgg(final Orgg card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orgg copy() {
|
||||
return new Orgg(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/fallenempires/SoulExchange.java
Normal file
52
Mage.Sets/src/mage/sets/fallenempires/SoulExchange.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fallenempires;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class SoulExchange extends mage.sets.masterseditionii.SoulExchange {
|
||||
|
||||
public SoulExchange(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 28;
|
||||
this.expansionSetCode = "FEM";
|
||||
}
|
||||
|
||||
public SoulExchange(final SoulExchange card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulExchange copy() {
|
||||
return new SoulExchange(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/fifthedition/DwarvenSoldier.java
Normal file
52
Mage.Sets/src/mage/sets/fifthedition/DwarvenSoldier.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class DwarvenSoldier extends mage.sets.fallenempires.DwarvenSoldier {
|
||||
|
||||
public DwarvenSoldier(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 221;
|
||||
this.expansionSetCode = "5ED";
|
||||
}
|
||||
|
||||
public DwarvenSoldier(final DwarvenSoldier card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DwarvenSoldier copy() {
|
||||
return new DwarvenSoldier(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class InitiatesOfTheEbonHand extends mage.sets.fallenempires.InitiatesOfTheEbonHand {
|
||||
|
||||
public InitiatesOfTheEbonHand(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 31;
|
||||
this.expansionSetCode = "5ED";
|
||||
}
|
||||
|
||||
public InitiatesOfTheEbonHand(final InitiatesOfTheEbonHand card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InitiatesOfTheEbonHand copy() {
|
||||
return new InitiatesOfTheEbonHand(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/fifthedition/Necrite.java
Normal file
52
Mage.Sets/src/mage/sets/fifthedition/Necrite.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class Necrite extends mage.sets.fallenempires.Necrite {
|
||||
|
||||
public Necrite(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 43;
|
||||
this.expansionSetCode = "5ED";
|
||||
}
|
||||
|
||||
public Necrite(final Necrite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Necrite copy() {
|
||||
return new Necrite(this);
|
||||
}
|
||||
}
|
54
Mage.Sets/src/mage/sets/fifthedition/Orgg.java
Normal file
54
Mage.Sets/src/mage/sets/fifthedition/Orgg.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* 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.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class Orgg extends mage.sets.timeshifted.Orgg {
|
||||
|
||||
public Orgg(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 259;
|
||||
this.expansionSetCode = "5ED";
|
||||
this.rarity = Rarity.RARE;
|
||||
}
|
||||
|
||||
public Orgg(final Orgg card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orgg copy() {
|
||||
return new Orgg(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/mastersedition/DwarvenSoldier.java
Normal file
52
Mage.Sets/src/mage/sets/mastersedition/DwarvenSoldier.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.mastersedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class DwarvenSoldier extends mage.sets.fallenempires.DwarvenSoldier {
|
||||
|
||||
public DwarvenSoldier(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 92;
|
||||
this.expansionSetCode = "MED";
|
||||
}
|
||||
|
||||
public DwarvenSoldier(final DwarvenSoldier card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DwarvenSoldier copy() {
|
||||
return new DwarvenSoldier(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/masterseditionii/FarrelsMantle.java
Normal file
52
Mage.Sets/src/mage/sets/masterseditionii/FarrelsMantle.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.masterseditionii;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class FarrelsMantle extends mage.sets.fallenempires.FarrelsMantle {
|
||||
|
||||
public FarrelsMantle(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 13;
|
||||
this.expansionSetCode = "ME2";
|
||||
}
|
||||
|
||||
public FarrelsMantle(final FarrelsMantle card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FarrelsMantle copy() {
|
||||
return new FarrelsMantle(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/masterseditionii/Necrite.java
Normal file
52
Mage.Sets/src/mage/sets/masterseditionii/Necrite.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.masterseditionii;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class Necrite extends mage.sets.fallenempires.Necrite {
|
||||
|
||||
public Necrite(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 106;
|
||||
this.expansionSetCode = "ME2";
|
||||
}
|
||||
|
||||
public Necrite(final Necrite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Necrite copy() {
|
||||
return new Necrite(this);
|
||||
}
|
||||
}
|
111
Mage.Sets/src/mage/sets/masterseditionii/SoulExchange.java
Normal file
111
Mage.Sets/src/mage/sets/masterseditionii/SoulExchange.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.sets.masterseditionii;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.ExileTargetCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class SoulExchange extends CardImpl {
|
||||
|
||||
public SoulExchange(UUID ownerId) {
|
||||
super(ownerId, 111, "Soul Exchange", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{B}{B}");
|
||||
this.expansionSetCode = "ME2";
|
||||
|
||||
// As an additional cost to cast Soul Exchange, exile a creature you control.
|
||||
Cost cost = new ExileTargetCost(new TargetControlledCreaturePermanent());
|
||||
this.getSpellAbility().addCost(cost);
|
||||
// Return target creature card from your graveyard to the battlefield. Put a +2/+2 counter on that creature if the exiled creature was a Thrull.
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
|
||||
this.getSpellAbility().addEffect(new SoulExchangeEffect());
|
||||
|
||||
}
|
||||
|
||||
public SoulExchange(final SoulExchange card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulExchange copy() {
|
||||
return new SoulExchange(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SoulExchangeEffect extends OneShotEffect{
|
||||
|
||||
public SoulExchangeEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.setText("Return target creature card from your graveyard to the battlefield. Put a +2/+2 counter on that creature if the exiled creature was a Thrull.");
|
||||
}
|
||||
|
||||
public SoulExchangeEffect(final SoulExchangeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulExchangeEffect copy() {
|
||||
return new SoulExchangeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
ReturnFromGraveyardToBattlefieldTargetEffect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
|
||||
if (!effect.apply(game, source)) return false;
|
||||
|
||||
for (Cost c : source.getCosts()){
|
||||
if (!c.getTargets().isEmpty()){
|
||||
UUID t = c.getTargets().getFirstTarget();
|
||||
Permanent exiled = game.getPermanentOrLKIBattlefield(t);
|
||||
if (exiled == null) return false;
|
||||
if (exiled.getSubtype().contains("Thrull")){
|
||||
game.getPermanent(source.getFirstTarget()).addCounters(CounterType.P2P2.createInstance(), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
87
Mage.Sets/src/mage/sets/timeshifted/Orgg.java
Normal file
87
Mage.Sets/src/mage/sets/timeshifted/Orgg.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* 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.timeshifted;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.combat.CantAttackIfDefenderControlsPermanent;
|
||||
import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class Orgg extends CardImpl {
|
||||
|
||||
static final private FilterCreaturePermanent filter = new FilterCreaturePermanent("untapped creature with power 3 or greater");
|
||||
static final private FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures with power 3 or greater");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.and(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2), Predicates.not(new TappedPredicate())));
|
||||
filter2.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2));
|
||||
}
|
||||
public Orgg(UUID ownerId) {
|
||||
super(ownerId, 67, "Orgg", Rarity.SPECIAL, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||
this.expansionSetCode = "TSB";
|
||||
this.subtype.add("Orgg");
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// Orgg can't attack if defending player controls an untapped creature with power 3 or greater.
|
||||
Effect effect = new CantAttackIfDefenderControlsPermanent(filter);
|
||||
effect.setText("{this} can't attack if defending player controls an untapped creature with power 3 or greater.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// Orgg can't block creatures with power 3 or greater.
|
||||
Effect effectBlock = new CantBlockCreaturesSourceEffect(filter2);
|
||||
effectBlock.setText("{this} can't block creatures with power 3 or greater.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectBlock));
|
||||
}
|
||||
|
||||
public Orgg(final Orgg card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orgg copy() {
|
||||
return new Orgg(this);
|
||||
}
|
||||
}
|
|
@ -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.abilities.effects.common;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MarcoMarin
|
||||
*/
|
||||
public class DoUnlessControllerPaysEffect extends OneShotEffect {
|
||||
|
||||
protected Effects executingEffects = new Effects();
|
||||
private final Cost cost;
|
||||
private String chooseUseText;
|
||||
|
||||
public DoUnlessControllerPaysEffect(Effect effect, Cost cost) {
|
||||
this(effect, cost, null);
|
||||
}
|
||||
|
||||
public DoUnlessControllerPaysEffect(Effect effect, Cost cost, String chooseUseText) {
|
||||
super(Outcome.Benefit);
|
||||
this.executingEffects.add(effect);
|
||||
this.cost = cost;
|
||||
this.chooseUseText = chooseUseText;
|
||||
}
|
||||
|
||||
public DoUnlessControllerPaysEffect(final DoUnlessControllerPaysEffect effect) {
|
||||
super(effect);
|
||||
this.executingEffects = effect.executingEffects.copy();
|
||||
this.cost = effect.cost.copy();
|
||||
this.chooseUseText = effect.chooseUseText;
|
||||
}
|
||||
|
||||
public void addEffect(Effect effect) {
|
||||
executingEffects.add(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
String message;
|
||||
if (chooseUseText == null) {
|
||||
String effectText = executingEffects.getText(source.getModes().getMode());
|
||||
message = "Pay " + cost.getText() + " to prevent (" + effectText.substring(0, effectText.length() - 1) + ")?";
|
||||
} else {
|
||||
message = chooseUseText;
|
||||
}
|
||||
message = CardUtil.replaceSourceName(message, sourceObject.getName());
|
||||
boolean result = true;
|
||||
boolean doEffect = true;
|
||||
|
||||
// check if controller is willing to pay
|
||||
if (cost.canPay(source, source.getSourceId(), controller.getId(), game) && controller.chooseUse(Outcome.Detriment, message, source, game)) {
|
||||
cost.clearPaid();
|
||||
if (cost.pay(source, game, source.getSourceId(), controller.getId(), false, null)) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(controller.getLogName() + " pays the cost to prevent the effect");
|
||||
}
|
||||
doEffect = false;
|
||||
}
|
||||
}
|
||||
|
||||
// do the effects if not paid
|
||||
if (doEffect) {
|
||||
for (Effect effect : executingEffects) {
|
||||
effect.setTargetPointer(this.targetPointer);
|
||||
if (effect instanceof OneShotEffect) {
|
||||
result &= effect.apply(game, source);
|
||||
} else {
|
||||
game.addEffect((ContinuousEffect) effect, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected Player getPayingPlayer(Game game, Ability source) {
|
||||
return game.getPlayer(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (!staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
String effectsText = executingEffects.getText(mode);
|
||||
return effectsText.substring(0, effectsText.length() - 1) + " unless controller pays " + cost.getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoUnlessControllerPaysEffect copy() {
|
||||
return new DoUnlessControllerPaysEffect(this);
|
||||
}
|
||||
}
|
|
@ -46,6 +46,7 @@ public enum CounterType {
|
|||
CORPSE("corpse"),
|
||||
CREDIT("credit"),
|
||||
CRYSTAL("crystal"),
|
||||
CUBE("cube"),
|
||||
DELAY("delay"),
|
||||
DEPLETION("depletion"),
|
||||
DESPAIR("despair"),
|
||||
|
|
Loading…
Reference in a new issue