mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
[BNG] Added 5 cards.
This commit is contained in:
parent
4834dce33a
commit
da392d4297
8 changed files with 570 additions and 5 deletions
80
Mage.Sets/src/mage/sets/bornofthegods/GlimpseTheSunGod.java
Normal file
80
Mage.Sets/src/mage/sets/bornofthegods/GlimpseTheSunGod.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* 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.bornofthegods;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.effects.common.ScryEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class GlimpseTheSunGod extends CardImpl<GlimpseTheSunGod> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures");
|
||||
|
||||
public GlimpseTheSunGod(UUID ownerId) {
|
||||
super(ownerId, 13, "Glimpse the Sun God", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{W}");
|
||||
this.expansionSetCode = "BNG";
|
||||
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Tap X target creatures. Scry 1.
|
||||
this.getSpellAbility().addEffect(new TapTargetEffect("X target creatures"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1,filter, false));
|
||||
this.getSpellAbility().addEffect(new ScryEffect(1));
|
||||
}
|
||||
|
||||
public GlimpseTheSunGod(final GlimpseTheSunGod card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
if (ability instanceof SpellAbility) {
|
||||
ability.getTargets().clear();
|
||||
int numberToTap = ability.getManaCostsToPay().getX();
|
||||
numberToTap = Math.min(game.getBattlefield().count(filter, ability.getSourceId(), ability.getControllerId(), game), numberToTap);
|
||||
ability.addTarget(new TargetCreaturePermanent(numberToTap, numberToTap, filter, false));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlimpseTheSunGod copy() {
|
||||
return new GlimpseTheSunGod(this);
|
||||
}
|
||||
}
|
199
Mage.Sets/src/mage/sets/bornofthegods/HeroesPodium.java
Normal file
199
Mage.Sets/src/mage/sets/bornofthegods/HeroesPodium.java
Normal file
|
@ -0,0 +1,199 @@
|
|||
/*
|
||||
* 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.bornofthegods;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class HeroesPodium extends CardImpl<HeroesPodium> {
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each legendary creature you control");
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
}
|
||||
public HeroesPodium(UUID ownerId) {
|
||||
super(ownerId, 159, "Heroes' Podium", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||
this.expansionSetCode = "BNG";
|
||||
this.supertype.add("Legendary");
|
||||
|
||||
// Each legendary creature you control gets +1/+1 for each other legendary creature you control.
|
||||
DynamicValue xValue = new HeroesPodiumLegendaryCount();
|
||||
Effect effect = new BoostControlledEffect(xValue, xValue, Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("Each legendary creature you control gets +1/+1 for each other legendary creature you control");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// {X}, {T}: Look at the top X cards of your library. You may reveal a legendary creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HeroesPodiumEffect(), new ManaCostsImpl("{X}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public HeroesPodium(final HeroesPodium card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeroesPodium copy() {
|
||||
return new HeroesPodium(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HeroesPodiumLegendaryCount implements DynamicValue {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other legendary creature you control");
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility) {
|
||||
int value = game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
|
||||
if (value > 0) {
|
||||
value--;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return filter.getMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeroesPodiumLegendaryCount copy() {
|
||||
return new HeroesPodiumLegendaryCount();
|
||||
}
|
||||
}
|
||||
|
||||
class HeroesPodiumEffect extends OneShotEffect<HeroesPodiumEffect> {
|
||||
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a legendary creature card");
|
||||
static {
|
||||
filter.add(new SupertypePredicate(("Legendary")));
|
||||
}
|
||||
|
||||
public HeroesPodiumEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top X cards of your library. You may reveal a legendary creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order";
|
||||
}
|
||||
|
||||
public HeroesPodiumEffect(final HeroesPodiumEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeroesPodiumEffect copy() {
|
||||
return new HeroesPodiumEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl(Zone.PICK);
|
||||
int count = source.getManaCostsToPay().getX();
|
||||
count = Math.min(player.getLibrary().size(), count);
|
||||
boolean legendaryIncluded = false;
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
if (filter.match(card, game)) {
|
||||
legendaryIncluded = true;
|
||||
}
|
||||
game.setZone(card.getId(), Zone.PICK);
|
||||
}
|
||||
}
|
||||
player.lookAtCards("Heroes' Podium", cards, game);
|
||||
|
||||
// You may reveal a legendary creature card from among them and put it into your hand.
|
||||
if (!cards.isEmpty() && legendaryIncluded && player.chooseUse(outcome, "Put a legendary creature card into your hand?", game)) {
|
||||
if (cards.size() == 1) {
|
||||
Card card = cards.getRandom(game);
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
return true;
|
||||
} else {
|
||||
TargetCard target = new TargetCard(Zone.PICK, filter);
|
||||
if (player.choose(outcome, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Put the rest on the bottom of your library in a random order
|
||||
while (cards.size() > 0) {
|
||||
Card card = cards.getRandom(game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* 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.bornofthegods;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.TributeNotPaidCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.abilities.keyword.TributeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class NessianWildsRavager extends CardImpl<NessianWildsRavager> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature");
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public NessianWildsRavager(UUID ownerId) {
|
||||
super(ownerId, 129, "Nessian Wilds Ravager", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
||||
this.expansionSetCode = "BNG";
|
||||
this.subtype.add("Hydra");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Tribute 6
|
||||
this.addAbility(new TributeAbility(6));
|
||||
// When Nessian Wilds Ravager enters the battlefield, if tribute wasn't paid, you may have Nessian Wilds Ravager fight another target creature.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new FightTargetsEffect(), true);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(),
|
||||
"When {this} enters the battlefield, if its tribute wasn't paid, you may have {this} fight another target creature."));
|
||||
}
|
||||
|
||||
public NessianWildsRavager(final NessianWildsRavager card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NessianWildsRavager copy() {
|
||||
return new NessianWildsRavager(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/bornofthegods/ReapWhatIsSown.java
Normal file
68
Mage.Sets/src/mage/sets/bornofthegods/ReapWhatIsSown.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.bornofthegods;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ReapWhatIsSown extends CardImpl<ReapWhatIsSown> {
|
||||
|
||||
public ReapWhatIsSown(UUID ownerId) {
|
||||
super(ownerId, 154, "Reap What Is Sown", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}{W}");
|
||||
this.expansionSetCode = "BNG";
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Put a +1/+1 counter on each of up to three target creatures.
|
||||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
|
||||
effect.setText("Put a +1/+1 counter on each of up to three target creatures");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 3, new FilterCreaturePermanent("creatures"), false));
|
||||
}
|
||||
|
||||
public ReapWhatIsSown(final ReapWhatIsSown card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReapWhatIsSown copy() {
|
||||
return new ReapWhatIsSown(this);
|
||||
}
|
||||
}
|
132
Mage.Sets/src/mage/sets/bornofthegods/XenagosGodOfRevels.java
Normal file
132
Mage.Sets/src/mage/sets/bornofthegods/XenagosGodOfRevels.java
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* 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.bornofthegods;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.continious.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
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.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class XenagosGodOfRevels extends CardImpl<XenagosGodOfRevels> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control");
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public XenagosGodOfRevels(UUID ownerId) {
|
||||
super(ownerId, 156, "Xenagos, God of Revels", Rarity.MYTHIC, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{R}{G}");
|
||||
this.expansionSetCode = "BNG";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("God");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Indestructible
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
// As long as your devotion to red and green is less than seven, Xenagos isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.G), 7);
|
||||
effect.setText("As long as your devotion to red and green is less than seven, Xenagos isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
// At the beginning of combat on your turn, another target creature you control gains haste and gets +X/+X until end of turn, where X is that creature's power.
|
||||
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("another target creature you control gains haste");
|
||||
Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false);
|
||||
ability.addEffect(new XenagosGodOfRevelsEffect());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1,1,filter, false, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public XenagosGodOfRevels(final XenagosGodOfRevels card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XenagosGodOfRevels copy() {
|
||||
return new XenagosGodOfRevels(this);
|
||||
}
|
||||
}
|
||||
|
||||
class XenagosGodOfRevelsEffect extends OneShotEffect<XenagosGodOfRevelsEffect> {
|
||||
|
||||
public XenagosGodOfRevelsEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "and gets +X/+X until end of turn, where X is that creature's power";
|
||||
}
|
||||
|
||||
public XenagosGodOfRevelsEffect(final XenagosGodOfRevelsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XenagosGodOfRevelsEffect copy() {
|
||||
return new XenagosGodOfRevelsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (targetCreature != null) {
|
||||
ContinuousEffect effect = new BoostTargetEffect(targetCreature.getPower().getValue(), targetCreature.getToughness().getValue(), Duration.EndOfTurn);
|
||||
effect.setTargetPointer(this.getTargetPointer());
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -109,7 +109,7 @@ class WorldlyCounselEffect extends OneShotEffect<WorldlyCounselEffect> {
|
|||
if (cards.size() == 1) {
|
||||
Card card = cards.getRandom(game);
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, false);
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
return true;
|
||||
} else {
|
||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put into your hand"));
|
||||
|
@ -117,7 +117,7 @@ class WorldlyCounselEffect extends OneShotEffect<WorldlyCounselEffect> {
|
|||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, false);
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ class WorldlyCounselEffect extends OneShotEffect<WorldlyCounselEffect> {
|
|||
}
|
||||
if (cards.size() == 1) {
|
||||
Card card = cards.get(cards.iterator().next(), game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class BeginningOfCombatTriggeredAbility extends TriggeredAbilityImpl<Begi
|
|||
public String getRule() {
|
||||
switch (targetController) {
|
||||
case YOU:
|
||||
return "At the beginning of your combat step, " + generateZoneString() + getEffects().getText(modes.getMode());
|
||||
return "At the beginning of combat on your turn, " + generateZoneString() + getEffects().getText(modes.getMode());
|
||||
case OPPONENT:
|
||||
return "At the beginning of each opponent's combat step, " + generateZoneString() + getEffects().getText(modes.getMode());
|
||||
case ANY:
|
||||
|
|
|
@ -127,7 +127,11 @@ public class GainAbilityTargetEffect extends ContinuousEffectImpl<GainAbilityTar
|
|||
}
|
||||
sb.append(target.getMaxNumberOfTargets()).append(" target ").append(target.getTargetName()).append(" gain ");
|
||||
} else {
|
||||
sb.append("Target ").append(target.getTargetName()).append(" gains ");
|
||||
if (!target.getTargetName().startsWith("another")) {
|
||||
sb.append("Target ");
|
||||
}
|
||||
sb.append(target.getTargetName()).append(" gains ");
|
||||
|
||||
}
|
||||
sb.append(ability.getRule()).append(" ").append(duration.toString());
|
||||
return sb.toString();
|
||||
|
|
Loading…
Reference in a new issue