mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[KTK] Added 4 golden, 1 green (not finished), 10 land cards.
This commit is contained in:
parent
21d4d4cfb7
commit
9b4637b002
20 changed files with 1435 additions and 15 deletions
69
Mage.Sets/src/mage/sets/khansoftarkir/BloodfellCaves.java
Normal file
69
Mage.Sets/src/mage/sets/khansoftarkir/BloodfellCaves.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BloodfellCaves extends CardImpl {
|
||||
|
||||
public BloodfellCaves(UUID ownerId) {
|
||||
super(ownerId, 229, "Bloodfell Caves", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Bloodfell Caves enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// When Bloodfell Caves enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
|
||||
// {T}: Add {B} or {R} to your mana pool.
|
||||
this.addAbility(new BlackManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
}
|
||||
|
||||
public BloodfellCaves(final BloodfellCaves card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BloodfellCaves copy() {
|
||||
return new BloodfellCaves(this);
|
||||
}
|
||||
}
|
69
Mage.Sets/src/mage/sets/khansoftarkir/BlossomingSands.java
Normal file
69
Mage.Sets/src/mage/sets/khansoftarkir/BlossomingSands.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BlossomingSands extends CardImpl {
|
||||
|
||||
public BlossomingSands(UUID ownerId) {
|
||||
super(ownerId, 231, "Blossoming Sands", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Blossoming Sands enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// When Blossoming Sands enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
|
||||
// {T}: Add {G} or {W} to your mana pool.
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
}
|
||||
|
||||
public BlossomingSands(final BlossomingSands card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlossomingSands copy() {
|
||||
return new BlossomingSands(this);
|
||||
}
|
||||
}
|
135
Mage.Sets/src/mage/sets/khansoftarkir/DeflectingPalm.java
Normal file
135
Mage.Sets/src/mage/sets/khansoftarkir/DeflectingPalm.java
Normal file
|
@ -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.sets.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.PreventionEffectData;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetSource;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DeflectingPalm extends CardImpl {
|
||||
|
||||
public DeflectingPalm(UUID ownerId) {
|
||||
super(ownerId, 173, "Deflecting Palm", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{R}{W}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// The next time a source of your choice would deal damage to you this turn, prevent that damage. If damage is prevented this way, Deflecting Palm deals that much damage to that source's controller.
|
||||
this.getSpellAbility().addEffect(new DeflectingPalmEffect());
|
||||
}
|
||||
|
||||
public DeflectingPalm(final DeflectingPalm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeflectingPalm copy() {
|
||||
return new DeflectingPalm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DeflectingPalmEffect extends PreventionEffectImpl {
|
||||
|
||||
private final TargetSource target;
|
||||
|
||||
public DeflectingPalmEffect() {
|
||||
super(Duration.EndOfTurn, Integer.MAX_VALUE, false, false);
|
||||
this.staticText = "The next time a source of your choice would deal damage to you this turn, prevent that damage. If damage is prevented this way, {this} deals that much damage to that source's controller";
|
||||
this.target = new TargetSource();
|
||||
}
|
||||
|
||||
public DeflectingPalmEffect(final DeflectingPalmEffect effect) {
|
||||
super(effect);
|
||||
this.target = effect.target.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeflectingPalmEffect copy() {
|
||||
return new DeflectingPalmEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
this.target.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
PreventionEffectData preventionData = preventDamageAction(event, source, game);
|
||||
this.used = true;
|
||||
this.discard(); // only one use
|
||||
if (preventionData.getPreventedDamage() > 0) {
|
||||
MageObject damageDealingObject = game.getObject(target.getFirstTarget());
|
||||
UUID objectControllerId = null;
|
||||
if (damageDealingObject instanceof Permanent) {
|
||||
objectControllerId = ((Permanent) damageDealingObject).getControllerId();
|
||||
} else if (damageDealingObject instanceof Ability) {
|
||||
objectControllerId = ((Ability) damageDealingObject).getControllerId();
|
||||
}
|
||||
if (objectControllerId != null) {
|
||||
Player objectController = game.getPlayer(objectControllerId);
|
||||
if (objectController != null) {
|
||||
objectController.damage(preventionData.getPreventedDamage(), source.getSourceId(), game, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (!this.used && super.applies(event, source, game)) {
|
||||
if (event.getTargetId().equals(source.getControllerId()) && event.getSourceId().equals(target.getFirstTarget())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
67
Mage.Sets/src/mage/sets/khansoftarkir/DismalBackwater.java
Normal file
67
Mage.Sets/src/mage/sets/khansoftarkir/DismalBackwater.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DismalBackwater extends CardImpl {
|
||||
|
||||
public DismalBackwater(UUID ownerId) {
|
||||
super(ownerId, 232, "Dismal Backwater", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Dismal Backwater enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Dismal Backwater enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {U} or {B} to your mana pool.
|
||||
this.addAbility(new BlueManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
}
|
||||
|
||||
public DismalBackwater(final DismalBackwater card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DismalBackwater copy() {
|
||||
return new DismalBackwater(this);
|
||||
}
|
||||
}
|
130
Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java
Normal file
130
Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java
Normal file
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
* 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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.effects.AsTurnedFaceUpEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.EntersBattlefieldEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
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.game.permanent.token.SnakeToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class HoodedHydra extends CardImpl {
|
||||
|
||||
public HoodedHydra(UUID ownerId) {
|
||||
super(ownerId, 136, "Hooded Hydra", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{X}{G}{G}");
|
||||
this.expansionSetCode = "KTK";
|
||||
this.subtype.add("Snake");
|
||||
this.subtype.add("Hydra");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// Hooded Hydra enters the battlefield with X +1/+1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new HoodedHydraEffect1(), "with X +1/+1 counters on it"));
|
||||
|
||||
// When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it.
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SnakeToken("KTK"), new CountersCount(CounterType.P1P1)), false));
|
||||
|
||||
// Morph {3}{G}{G}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{G}{G}")));
|
||||
|
||||
// As Hooded Hydra is turned face up, put five +1/+1 counters on it.
|
||||
Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(5));
|
||||
effect.setText("put five +1/+1 counters on it");
|
||||
// TODO: Does not work because the ability is still removed from permanent while the effect checks if the ability still exosts.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new AsTurnedFaceUpEffect(effect, false)));
|
||||
}
|
||||
|
||||
public HoodedHydra(final HoodedHydra card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HoodedHydra copy() {
|
||||
return new HoodedHydra(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HoodedHydraEffect1 extends OneShotEffect {
|
||||
|
||||
public HoodedHydraEffect1() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "{this} enters the battlefield with X +1/+1 counters on it";
|
||||
}
|
||||
|
||||
public HoodedHydraEffect1(final HoodedHydraEffect1 effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null && !permanent.isFaceDown()) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HoodedHydraEffect1 copy() {
|
||||
return new HoodedHydraEffect1(this);
|
||||
}
|
||||
|
||||
}
|
68
Mage.Sets/src/mage/sets/khansoftarkir/JungleHollow.java
Normal file
68
Mage.Sets/src/mage/sets/khansoftarkir/JungleHollow.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class JungleHollow extends CardImpl {
|
||||
|
||||
public JungleHollow(UUID ownerId) {
|
||||
super(ownerId, 235, "Jungle Hollow", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Jungle Hollow enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Jungle Hollow enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {B} or {G} to your mana pool.
|
||||
this.addAbility(new BlackManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
||||
}
|
||||
|
||||
public JungleHollow(final JungleHollow card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JungleHollow copy() {
|
||||
return new JungleHollow(this);
|
||||
}
|
||||
}
|
152
Mage.Sets/src/mage/sets/khansoftarkir/MarduCharm.java
Normal file
152
Mage.Sets/src/mage/sets/khansoftarkir/MarduCharm.java
Normal file
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
* 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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class MarduCharm extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a noncreature, nonland card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public MarduCharm(UUID ownerId) {
|
||||
super(ownerId, 186, "Mardu Charm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{R}{W}{B}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Choose one -
|
||||
// <strong>*</strong> Mardu Charm deals 4 damage to target creature.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// <strong>*</strong> Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn.
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new MarduCharmCreateTokenEffect());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// <strong>*</strong> Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card.
|
||||
mode = new Mode();
|
||||
mode.getEffects().add(new DiscardCardYouChooseTargetEffect(filter));
|
||||
mode.getTargets().add(new TargetOpponent());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
}
|
||||
|
||||
public MarduCharm(final MarduCharm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarduCharm copy() {
|
||||
return new MarduCharm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MarduCharmCreateTokenEffect extends OneShotEffect {
|
||||
|
||||
public MarduCharmCreateTokenEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn";
|
||||
}
|
||||
|
||||
public MarduCharmCreateTokenEffect(final MarduCharmCreateTokenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarduCharmCreateTokenEffect copy() {
|
||||
return new MarduCharmCreateTokenEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
CreateTokenEffect effect = new CreateTokenEffect(new MarduCharmWarriorToken(), 2);
|
||||
effect.apply(game, source);
|
||||
for (UUID tokenId :effect.getLastAddedTokenIds()) {
|
||||
Permanent token = game.getPermanent(tokenId);
|
||||
if (token != null) {
|
||||
ContinuousEffect continuousEffect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||
continuousEffect.setTargetPointer(new FixedTarget(tokenId));
|
||||
game.addEffect(continuousEffect, source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
class MarduCharmWarriorToken extends Token {
|
||||
|
||||
public MarduCharmWarriorToken() {
|
||||
super("Warrior", "1/1 white Warrior creature token");
|
||||
this.setOriginalExpansionSetCode("KTK");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add("Warrior");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/khansoftarkir/RuggedHighlands.java
Normal file
68
Mage.Sets/src/mage/sets/khansoftarkir/RuggedHighlands.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class RuggedHighlands extends CardImpl {
|
||||
|
||||
public RuggedHighlands(UUID ownerId) {
|
||||
super(ownerId, 240, "Rugged Highlands", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Rugged Highlands enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Rugged Highlands enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {R} or {G} to your mana pool.
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
||||
}
|
||||
|
||||
public RuggedHighlands(final RuggedHighlands card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuggedHighlands copy() {
|
||||
return new RuggedHighlands(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/khansoftarkir/ScouredBarrens.java
Normal file
68
Mage.Sets/src/mage/sets/khansoftarkir/ScouredBarrens.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ScouredBarrens extends CardImpl {
|
||||
|
||||
public ScouredBarrens(UUID ownerId) {
|
||||
super(ownerId, 242, "Scoured Barrens", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Scoured Barrens enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Scoured Barrens enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {W} or {B} to your mana pool.
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
|
||||
}
|
||||
|
||||
public ScouredBarrens(final ScouredBarrens card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScouredBarrens copy() {
|
||||
return new ScouredBarrens(this);
|
||||
}
|
||||
}
|
78
Mage.Sets/src/mage/sets/khansoftarkir/SiegeRhino.java
Normal file
78
Mage.Sets/src/mage/sets/khansoftarkir/SiegeRhino.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SiegeRhino extends CardImpl {
|
||||
|
||||
public SiegeRhino(UUID ownerId) {
|
||||
super(ownerId, 200, "Siege Rhino", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{B}{G}");
|
||||
this.expansionSetCode = "KTK";
|
||||
this.subtype.add("Rhino");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// When Siege Rhino enters the battlefield, each opponent loses 3 life and you gain 3 life.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamagePlayersEffect(3, TargetController.OPPONENT));
|
||||
Effect effect = new GainLifeEffect(3);
|
||||
effect.setText("and you gain 3 life");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SiegeRhino(final SiegeRhino card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SiegeRhino copy() {
|
||||
return new SiegeRhino(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/khansoftarkir/SwiftwaterCliffs.java
Normal file
68
Mage.Sets/src/mage/sets/khansoftarkir/SwiftwaterCliffs.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SwiftwaterCliffs extends CardImpl {
|
||||
|
||||
public SwiftwaterCliffs(UUID ownerId) {
|
||||
super(ownerId, 243, "Swiftwater Cliffs", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Swiftwater Cliffs enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Swiftwater Cliffs enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {U} or {R} to your mana pool.
|
||||
this.addAbility(new BlueManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
||||
}
|
||||
|
||||
public SwiftwaterCliffs(final SwiftwaterCliffs card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwiftwaterCliffs copy() {
|
||||
return new SwiftwaterCliffs(this);
|
||||
}
|
||||
}
|
106
Mage.Sets/src/mage/sets/khansoftarkir/TemurCharm.java
Normal file
106
Mage.Sets/src/mage/sets/khansoftarkir/TemurCharm.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* 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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockAllEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TemurCharm extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
|
||||
private static final FilterCreaturePermanent filterCantBlock = new FilterCreaturePermanent("Creatures with power 3 or less");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||
filterCantBlock.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4));
|
||||
}
|
||||
|
||||
public TemurCharm(UUID ownerId) {
|
||||
super(ownerId, 208, "Temur Charm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{G}{U}{R}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlue(true);
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Choose one -
|
||||
// <strong><EFBFBD></strong> Target creature you control gets +1/+1 until end of turn. That creature fights target creature you don't control.
|
||||
Effect effect = new BoostTargetEffect(1,1,Duration.EndOfTurn);
|
||||
effect.setApplyEffectsAfter();
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
effect = new FightTargetsEffect();
|
||||
effect.setText("That creature fights target creature you don't control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
// <strong><EFBFBD></strong> Counter target spell unless its controller pays {3}.
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new CounterUnlessPaysEffect(new GenericManaCost(3)));
|
||||
mode.getTargets().add(new TargetSpell());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// <strong><EFBFBD></strong> Creatures with power 3 or less can't block this turn.
|
||||
mode = new Mode();
|
||||
mode.getEffects().add(new CantBlockAllEffect(filterCantBlock, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
}
|
||||
|
||||
public TemurCharm(final TemurCharm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemurCharm copy() {
|
||||
return new TemurCharm(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/khansoftarkir/ThornwoodFalls.java
Normal file
68
Mage.Sets/src/mage/sets/khansoftarkir/ThornwoodFalls.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ThornwoodFalls extends CardImpl {
|
||||
|
||||
public ThornwoodFalls(UUID ownerId) {
|
||||
super(ownerId, 244, "Thornwood Falls", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Thornwood Falls enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Thornwood Falls enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {G} or {U} to your mana pool.
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
}
|
||||
|
||||
public ThornwoodFalls(final ThornwoodFalls card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThornwoodFalls copy() {
|
||||
return new ThornwoodFalls(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/khansoftarkir/TranquilCove.java
Normal file
68
Mage.Sets/src/mage/sets/khansoftarkir/TranquilCove.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TranquilCove extends CardImpl {
|
||||
|
||||
public TranquilCove(UUID ownerId) {
|
||||
super(ownerId, 246, "Tranquil Cove", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Tranquil Cove enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Tranquil Cove enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {W} or {U} to your mana pool.
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
}
|
||||
|
||||
public TranquilCove(final TranquilCove card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TranquilCove copy() {
|
||||
return new TranquilCove(this);
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/khansoftarkir/WindScarredCrag.java
Normal file
68
Mage.Sets/src/mage/sets/khansoftarkir/WindScarredCrag.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.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class WindScarredCrag extends CardImpl {
|
||||
|
||||
public WindScarredCrag(UUID ownerId) {
|
||||
super(ownerId, 247, "Wind-Scarred Crag", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
// Wind-Scarred Crag enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
// When Wind-Scarred Crag enters the battlefield, you gain 1 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1)));
|
||||
// {T}: Add {R} or {W} to your mana pool.
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
||||
}
|
||||
|
||||
public WindScarredCrag(final WindScarredCrag card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WindScarredCrag copy() {
|
||||
return new WindScarredCrag(this);
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ package mage.sets.limitedalpha;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.PreventionEffectData;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -71,7 +72,7 @@ class ReverseDamageEffect extends PreventionEffectImpl {
|
|||
private final TargetSource target;
|
||||
|
||||
public ReverseDamageEffect() {
|
||||
super(Duration.EndOfTurn);
|
||||
super(Duration.EndOfTurn, Integer.MAX_VALUE, false, false);
|
||||
this.staticText = "The next time a source of your choice would deal damage to you this turn, prevent that damage. You gain life equal to the damage prevented this way.";
|
||||
this.target = new TargetSource();
|
||||
}
|
||||
|
@ -98,21 +99,16 @@ class ReverseDamageEffect extends PreventionEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
PreventionEffectData preventionData = preventDamageAction(event, source, game);
|
||||
this.used = true;
|
||||
int damageAmount = event.getAmount();
|
||||
GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getControllerId(), source.getSourceId(), source.getControllerId(), damageAmount, false);
|
||||
if (!game.replaceEvent(preventEvent)) {
|
||||
event.setAmount(0);
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getControllerId(), source.getSourceId(), source.getControllerId(), damageAmount));
|
||||
|
||||
this.discard(); // only one use
|
||||
if (preventionData.getPreventedDamage() > 0) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.gainLife(damageAmount, game);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
player.gainLife(preventionData.getPreventedDamage(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
119
Mage/src/mage/abilities/effects/AsTurnedFaceUpEffect.java
Normal file
119
Mage/src/mage/abilities/effects/AsTurnedFaceUpEffect.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.abilities.effects;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.constants.Duration;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class AsTurnedFaceUpEffect extends ReplacementEffectImpl {
|
||||
|
||||
protected Effects baseEffects = new Effects();
|
||||
protected boolean optional;
|
||||
|
||||
public AsTurnedFaceUpEffect(Effect baseEffect, boolean optional) {
|
||||
super(Duration.WhileOnBattlefield, baseEffect.getOutcome(), true);
|
||||
this.baseEffects.add(baseEffect);
|
||||
this.optional = optional;
|
||||
}
|
||||
|
||||
public AsTurnedFaceUpEffect(final AsTurnedFaceUpEffect effect) {
|
||||
super(effect);
|
||||
this.baseEffects = effect.baseEffects.copy();
|
||||
this.optional = effect.optional;
|
||||
}
|
||||
|
||||
public void addEffect(Effect effect) {
|
||||
baseEffects.add(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.TURNFACEUP) {
|
||||
if (event.getTargetId().equals(source.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
if (optional) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject object = game.getObject(source.getSourceId());
|
||||
if (controller == null || object == null) {
|
||||
return false;
|
||||
}
|
||||
if (!controller.chooseUse(outcome, new StringBuilder("Use effect of ").append(object.getLogName()).append("?").toString(), game)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (Effect effect: baseEffects) {
|
||||
if (source.activate(game, false)) {
|
||||
if (effect instanceof ContinuousEffect) {
|
||||
game.addEffect((ContinuousEffect) effect, source);
|
||||
}
|
||||
else {
|
||||
effect.apply(game, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return "As {this} is turned face up, " + baseEffects.getText(mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsTurnedFaceUpEffect copy() {
|
||||
return new AsTurnedFaceUpEffect(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
|
@ -49,6 +50,7 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
private boolean tapped;
|
||||
private boolean attacking;
|
||||
private UUID lastAddedTokenId;
|
||||
private ArrayList<UUID> lastAddedTokenIds = new ArrayList<>();
|
||||
|
||||
public CreateTokenEffect(Token token) {
|
||||
this(token, new StaticValue(1));
|
||||
|
@ -82,6 +84,7 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
this.tapped = effect.tapped;
|
||||
this.attacking = effect.attacking;
|
||||
this.lastAddedTokenId = effect.lastAddedTokenId;
|
||||
this.lastAddedTokenIds.addAll(effect.lastAddedTokenIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,6 +99,7 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
tokenCopy.getAbilities().newId(); // neccessary if token has ability like DevourAbility()
|
||||
tokenCopy.putOntoBattlefield(value, game, source.getSourceId(), source.getControllerId(), tapped, attacking);
|
||||
this.lastAddedTokenId = tokenCopy.getLastAddedToken();
|
||||
this.lastAddedTokenIds = tokenCopy.getLastAddedTokenIds();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -103,6 +107,10 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
return lastAddedTokenId;
|
||||
}
|
||||
|
||||
public ArrayList<UUID> getLastAddedTokenIds() {
|
||||
return lastAddedTokenIds;
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder("put ");
|
||||
if (amount.toString().equals("1")) {
|
||||
|
|
|
@ -28,9 +28,8 @@
|
|||
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -39,7 +38,12 @@ import mage.ObjectColor;
|
|||
public class SnakeToken extends Token {
|
||||
|
||||
public SnakeToken() {
|
||||
this("ZEN");
|
||||
}
|
||||
|
||||
public SnakeToken(String setCode) {
|
||||
super("Snake", "1/1 green Snake creature token");
|
||||
setOriginalExpansionSetCode(setCode);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Snake");
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
|
@ -49,6 +50,7 @@ import mage.util.CardUtil;
|
|||
public class Token extends MageObjectImpl {
|
||||
|
||||
protected String description;
|
||||
private ArrayList<UUID> lastAddedTokenIds = new ArrayList<>();
|
||||
private UUID lastAddedTokenId;
|
||||
private int tokenType;
|
||||
private int originalCardNumber;
|
||||
|
@ -91,6 +93,7 @@ public class Token extends MageObjectImpl {
|
|||
this.description = token.description;
|
||||
this.tokenType = token.tokenType;
|
||||
this.lastAddedTokenId = token.lastAddedTokenId;
|
||||
this.lastAddedTokenIds.addAll(token.lastAddedTokenIds);
|
||||
this.originalCardNumber = token.originalCardNumber;
|
||||
this.originalExpansionSetCode = token.originalExpansionSetCode;
|
||||
}
|
||||
|
@ -103,6 +106,12 @@ public class Token extends MageObjectImpl {
|
|||
return lastAddedTokenId;
|
||||
}
|
||||
|
||||
public ArrayList<UUID> getLastAddedTokenIds() {
|
||||
ArrayList<UUID> ids = new ArrayList<>();
|
||||
ids.addAll(lastAddedTokenIds);
|
||||
return ids;
|
||||
}
|
||||
|
||||
public void addAbility(Ability ability) {
|
||||
ability.setSourceId(this.getId());
|
||||
abilities.add(ability);
|
||||
|
@ -122,6 +131,7 @@ public class Token extends MageObjectImpl {
|
|||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
lastAddedTokenIds.clear();
|
||||
Card source = game.getCard(sourceId);
|
||||
String setCode;
|
||||
if (this.getOriginalExpansionSetCode() != null && !this.getOriginalExpansionSetCode().isEmpty()) {
|
||||
|
@ -139,6 +149,7 @@ public class Token extends MageObjectImpl {
|
|||
if (tapped) {
|
||||
newToken.setTapped(true);
|
||||
}
|
||||
this.lastAddedTokenIds.add(newToken.getId());
|
||||
this.lastAddedTokenId = newToken.getId();
|
||||
game.setScopeRelevant(true);
|
||||
game.applyEffects();
|
||||
|
|
Loading…
Reference in a new issue