mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
[FRF] Abzan Kin-Guard, Frontier Mastodon, Frontier Siege, Outpost Siege, Shamanic Revelation.
This commit is contained in:
parent
f6dbf0214b
commit
5e264470d3
5 changed files with 564 additions and 0 deletions
81
Mage.Sets/src/mage/sets/fatereforged/AbzanKinGuard.java
Normal file
81
Mage.Sets/src/mage/sets/fatereforged/AbzanKinGuard.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fatereforged;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AbzanKinGuard extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("as long as you control a white or black permanent");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new ColorPredicate(ObjectColor.WHITE), new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public AbzanKinGuard(UUID ownerId) {
|
||||
super(ownerId, 120, "Abzan Kin-Guard", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.expansionSetCode = "FRF";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Warrior");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Abzan Kin-Guard has lifelink as long as you control a white or black permanent.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new PermanentsOnTheBattlefieldCondition(filter), "{this} has lifelink as long as you control a white or black permanent")));
|
||||
}
|
||||
|
||||
public AbzanKinGuard(final AbzanKinGuard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbzanKinGuard copy() {
|
||||
return new AbzanKinGuard(this);
|
||||
}
|
||||
}
|
69
Mage.Sets/src/mage/sets/fatereforged/FrontierMastodon.java
Normal file
69
Mage.Sets/src/mage/sets/fatereforged/FrontierMastodon.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* 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.fatereforged;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.common.FerociousCondition;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class FrontierMastodon extends CardImpl {
|
||||
|
||||
public FrontierMastodon(UUID ownerId) {
|
||||
super(ownerId, 130, "Frontier Mastodon", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "FRF";
|
||||
this.subtype.add("Elephant");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Ferocious</i> - Frontier Mastodon enters the battlefield with a +1/+1 counter on it if you control a creature with power 4 or greater.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)),
|
||||
FerociousCondition.getInstance(), true,
|
||||
"<i>Ferocious</i> — {this} enters the battlefield with a +1/+1 counter on it if you control a creature with power 4 or greater.",""
|
||||
));
|
||||
}
|
||||
|
||||
public FrontierMastodon(final FrontierMastodon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontierMastodon copy() {
|
||||
return new FrontierMastodon(this);
|
||||
}
|
||||
}
|
168
Mage.Sets/src/mage/sets/fatereforged/FrontierSiege.java
Normal file
168
Mage.Sets/src/mage/sets/fatereforged/FrontierSiege.java
Normal file
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* 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.fatereforged;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.condition.common.ModeChoiceSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ChooseModeEffect;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class FrontierSiege extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with flying");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("a creature you don't control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
filter2.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||
}
|
||||
private final static String ruleTrigger1 = "&bull Khans — At the beginning of each of your main phases, add {G}{G} to your mana pool.";
|
||||
private final static String ruleTrigger2 = "&bull Dragons — Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.";
|
||||
|
||||
public FrontierSiege(UUID ownerId) {
|
||||
super(ownerId, 131, "Frontier Siege", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
|
||||
this.expansionSetCode = "FRF";
|
||||
|
||||
// As Frontier Siege enters the battlefield, choose Khans or Dragons.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?","Khans", "Dragons"),null, true,
|
||||
"As {this} enters the battlefield, choose Khans or Dragons.",""));
|
||||
|
||||
// * Khans - At the beginning of each of your main phases, add {G}{G} to your mana pool.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new FrontierSiegeKhansTriggeredAbility(),
|
||||
new ModeChoiceSourceCondition("Khans"),
|
||||
ruleTrigger1));
|
||||
|
||||
// * Dragons - Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.
|
||||
Ability ability2 = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new FrontierSiegeFightEffect(), filter, true, SetTargetPointer.PERMANENT, ""),
|
||||
new ModeChoiceSourceCondition("Dragons"),
|
||||
ruleTrigger2);
|
||||
ability2.addTarget(new TargetCreaturePermanent(filter2));
|
||||
this.addAbility(ability2);
|
||||
|
||||
}
|
||||
|
||||
public FrontierSiege(final FrontierSiege card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontierSiege copy() {
|
||||
return new FrontierSiege(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FrontierSiegeKhansTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public FrontierSiegeKhansTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddManaToManaPoolSourceControllerEffect(new Mana(0,2,0,0,0,0,0)), false);
|
||||
|
||||
}
|
||||
|
||||
public FrontierSiegeKhansTriggeredAbility(final FrontierSiegeKhansTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontierSiegeKhansTriggeredAbility copy() {
|
||||
return new FrontierSiegeKhansTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return (event.getType() == GameEvent.EventType.PRECOMBAT_MAIN_PHASE_PRE
|
||||
|| event.getType() == GameEvent.EventType.POSTCOMBAT_MAIN_PHASE_PRE)
|
||||
&& event.getPlayerId().equals(this.controllerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the beginning of each of your main phases, " + super.getRule();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class FrontierSiegeFightEffect extends OneShotEffect {
|
||||
|
||||
FrontierSiegeFightEffect() {
|
||||
super(Outcome.Damage);
|
||||
}
|
||||
|
||||
FrontierSiegeFightEffect(final FrontierSiegeFightEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent triggeredCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if (triggeredCreature != null
|
||||
&& target != null
|
||||
&& triggeredCreature.getCardType().contains(CardType.CREATURE)
|
||||
&& target.getCardType().contains(CardType.CREATURE)) {
|
||||
triggeredCreature.damage(target.getPower().getValue(), target.getId(), game, false, true);
|
||||
target.damage(triggeredCreature.getPower().getValue(), triggeredCreature.getId(), game, false, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontierSiegeFightEffect copy() {
|
||||
return new FrontierSiegeFightEffect(this);
|
||||
}
|
||||
}
|
168
Mage.Sets/src/mage/sets/fatereforged/OutpostSiege.java
Normal file
168
Mage.Sets/src/mage/sets/fatereforged/OutpostSiege.java
Normal file
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* 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.fatereforged;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.ZoneChangeAllTriggeredAbility;
|
||||
import mage.abilities.condition.common.ModeChoiceSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseModeEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
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.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class OutpostSiege extends CardImpl {
|
||||
|
||||
private final static String ruleTrigger1 = "&bull Khans — At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.";
|
||||
private final static String ruleTrigger2 = "&bull Dragons — Whenever a creature you control leaves the battlefield, {this} deals 1 damage to target creature or player.";
|
||||
|
||||
public OutpostSiege(UUID ownerId) {
|
||||
super(ownerId, 110, "Outpost Siege", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
|
||||
this.expansionSetCode = "FRF";
|
||||
|
||||
// As Outpost Siege enters the battlefield, choose Khans or Dragons.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?","Khans", "Dragons"),null, true,
|
||||
"As {this} enters the battlefield, choose Khans or Dragons.",""));
|
||||
|
||||
// * Khans - At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new OutpostSiegeExileEffect(), TargetController.YOU, false),
|
||||
new ModeChoiceSourceCondition("Khans"),
|
||||
ruleTrigger1));
|
||||
|
||||
// * Dragons - Whenever a creature you control leaves the battlefield, Outpost Siege deals 1 damage to target creature or player.
|
||||
Ability ability2 = new ConditionalTriggeredAbility(
|
||||
new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, null, new DamageTargetEffect(1),
|
||||
new FilterControlledCreaturePermanent(), "", false),
|
||||
new ModeChoiceSourceCondition("Dragons"),
|
||||
ruleTrigger2);
|
||||
ability2.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability2);
|
||||
|
||||
}
|
||||
|
||||
public OutpostSiege(final OutpostSiege card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutpostSiege copy() {
|
||||
return new OutpostSiege(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OutpostSiegeExileEffect extends OneShotEffect {
|
||||
|
||||
public OutpostSiegeExileEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "exile the top card of your library. Until end of turn, you may play that card";
|
||||
}
|
||||
|
||||
public OutpostSiegeExileEffect(final OutpostSiegeExileEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutpostSiegeExileEffect copy() {
|
||||
return new OutpostSiegeExileEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Card card = controller.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
|
||||
if (game.getState().getZone(card.getId()) == Zone.EXILED) {
|
||||
ContinuousEffect effect = new CastFromNonHandZoneTargetEffect(Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class CastFromNonHandZoneTargetEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CastFromNonHandZoneTargetEffect(Duration duration) {
|
||||
super(AsThoughEffectType.PLAY_FROM_NON_HAND_ZONE, duration, Outcome.Benefit);
|
||||
staticText = "until end of turn, you may play that card";
|
||||
}
|
||||
|
||||
public CastFromNonHandZoneTargetEffect(final CastFromNonHandZoneTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CastFromNonHandZoneTargetEffect copy() {
|
||||
return new CastFromNonHandZoneTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (getTargetPointer().getTargets(game, source).contains(objectId) &&
|
||||
source.getControllerId().equals(affectedControllerId)) {
|
||||
Card card = game.getCard(objectId);
|
||||
if (card != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
78
Mage.Sets/src/mage/sets/fatereforged/ShamanicRevelation.java
Normal file
78
Mage.Sets/src/mage/sets/fatereforged/ShamanicRevelation.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fatereforged;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ShamanicRevelation extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with power 4 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3));
|
||||
}
|
||||
|
||||
public ShamanicRevelation(UUID ownerId) {
|
||||
super(ownerId, 138, "Shamanic Revelation", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
|
||||
this.expansionSetCode = "FRF";
|
||||
|
||||
// Draw a card for each creature you control.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())));
|
||||
|
||||
// <i>Ferocious</i> - You gain 4 life for each creature you control with power 4 or greater.
|
||||
DynamicValue amount = new PermanentsOnBattlefieldCount(filter, 4);
|
||||
Effect effect = new GainLifeEffect(amount);
|
||||
effect.setText("<br><i>Ferocious</i> — You gain 4 life for each creature you control with power 4 or greater.");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
}
|
||||
|
||||
public ShamanicRevelation(final ShamanicRevelation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShamanicRevelation copy() {
|
||||
return new ShamanicRevelation(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue