mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
commit
e7eece8903
5 changed files with 204 additions and 4 deletions
139
Mage.Sets/src/mage/cards/u/UnclaimedTerritory.java
Normal file
139
Mage.Sets/src/mage/cards/u/UnclaimedTerritory.java
Normal file
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.abilities.mana.ConditionalAnyColorManaAbility;
|
||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||
import mage.abilities.mana.conditional.CreatureCastManaCondition;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class UnclaimedTerritory extends CardImpl {
|
||||
|
||||
public UnclaimedTerritory(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// As Unclaimed Territory enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Benefit)));
|
||||
|
||||
// {T}: Add {C} to your mana pool.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type.
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new UnclaimedTerritoryManaBuilder(), true));
|
||||
}
|
||||
|
||||
public UnclaimedTerritory(final UnclaimedTerritory card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnclaimedTerritory copy() {
|
||||
return new UnclaimedTerritory(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UnclaimedTerritoryManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
SubType creatureType;
|
||||
|
||||
@Override
|
||||
public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) {
|
||||
SubType value = (SubType) game.getState().getValue(source.getSourceId() + "_type");
|
||||
if (value != null) {
|
||||
creatureType = value;
|
||||
}
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName()
|
||||
+ " (can only be spent to cast creatures of type " + creatureType + ")");
|
||||
}
|
||||
return super.setMana(mana, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
return new UnclaimedTerritoryConditionalMana(this.mana, creatureType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Spend this mana only to cast a creature spell of the chosen type";
|
||||
}
|
||||
}
|
||||
|
||||
class UnclaimedTerritoryConditionalMana extends ConditionalMana {
|
||||
|
||||
public UnclaimedTerritoryConditionalMana(Mana mana, SubType creatureType) {
|
||||
super(mana);
|
||||
staticText = "Spend this mana only to cast a creature spell of the chosen type";
|
||||
addCondition(new UnclaimedTerritoryManaCondition(creatureType));
|
||||
}
|
||||
}
|
||||
|
||||
class UnclaimedTerritoryManaCondition extends CreatureCastManaCondition {
|
||||
|
||||
SubType creatureType;
|
||||
|
||||
UnclaimedTerritoryManaCondition(SubType creatureType) {
|
||||
this.creatureType = creatureType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, UUID originalId, Cost costToPay) {
|
||||
// check: ... to cast a creature spell
|
||||
if (super.apply(game, source)) {
|
||||
// check: ... of the chosen type
|
||||
MageObject object = game.getObject(source.getSourceId());
|
||||
if (creatureType != null && object.hasSubtype(creatureType, game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
59
Mage.Sets/src/mage/cards/u/UnfriendlyFire.java
Normal file
59
Mage.Sets/src/mage/cards/u/UnfriendlyFire.java
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* 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.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class UnfriendlyFire extends CardImpl {
|
||||
|
||||
public UnfriendlyFire(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}");
|
||||
|
||||
// Unfriendly Fire deals 4 damage to target creature or player.
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
}
|
||||
|
||||
public UnfriendlyFire(final UnfriendlyFire card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnfriendlyFire copy() {
|
||||
return new UnfriendlyFire(this);
|
||||
}
|
||||
}
|
|
@ -58,10 +58,12 @@ public class Ixalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tishana's Wayfinder", 211, Rarity.COMMON, mage.cards.t.TishanasWayfinder.class));
|
||||
cards.add(new SetCardInfo("Treasure Cove", 1250, Rarity.RARE, mage.cards.t.TreasureCove.class));
|
||||
cards.add(new SetCardInfo("Treasure Map", 250, Rarity.RARE, mage.cards.t.TreasureMap.class));
|
||||
cards.add(new SetCardInfo("Unclaimed Territory", 258, Rarity.UNCOMMON, mage.cards.u.UnclaimedTerritory.class));
|
||||
cards.add(new SetCardInfo("Unfriendly Fire", 172, Rarity.COMMON, mage.cards.u.UnfriendlyFire.class));
|
||||
cards.add(new SetCardInfo("Vanquisher's Banner", 251, Rarity.RARE, mage.cards.v.VanquishersBanner.class));
|
||||
cards.add(new SetCardInfo("Verdant Sun's Avatar", 213, Rarity.RARE, mage.cards.v.VerdantSunsAvatar.class));
|
||||
cards.add(new SetCardInfo("Vraska's Contempt", 129, Rarity.RARE, mage.cards.v.VraskasContempt.class));
|
||||
cards.add(new SetCardInfo("Waker of the Wilds", 215, Rarity.RARE, mage.cards.w.WakerOfTheWilds.class));
|
||||
cards.add(new SetCardInfo("Walk the Plank", 130, Rarity.UNCOMMON, mage.cards.w.WalkThePlank.class));
|
||||
cards.add(new SetCardInfo("Walk the Plank", 130, Rarity.UNCOMMON, mage.cards.w.WalkThePlank.class));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public enum SubType {
|
|||
DEMON("Demon", SubTypeSet.CreatureType, false),
|
||||
DESERTER("Deserter", SubTypeSet.CreatureType, false),
|
||||
DEVIL("Devil", SubTypeSet.CreatureType, false),
|
||||
DINOSAUR("Dinosaur", SubTypeSet.CreatureType, true), // only Grimlock right now, until Ixalan
|
||||
DINOSAUR("Dinosaur", SubTypeSet.CreatureType, false), // With Ixalan now being spoiled, need this to be selectable
|
||||
DJINN("Djinn", SubTypeSet.CreatureType, false),
|
||||
DRAGON("Dragon", SubTypeSet.CreatureType, false),
|
||||
DRAKE("Drake", SubTypeSet.CreatureType, false),
|
||||
|
|
|
@ -31789,7 +31789,7 @@ Black Market|Commander 2017|98|R|{3}{B}{B}|Enchantment|||Whenever a creature die
|
|||
Blood Artist|Commander 2017|99|U|{1}{B}|Creature - Vampire|0|1|Whenever Blood Artist or another creature dies, target player loses 1 life and you gain 1 life.|
|
||||
Blood Tribute|Commander 2017|100|R|{4}{B}{B}|Sorcery|||Kicker — Tap an untapped Vampire you control.$Target opponent loses half his or her life, rounded up. If Blood Tribute was kicked, you gain life equal to the life lost this way.|
|
||||
Bloodhusk Ritualist|Commander 2017|101|U|{2}{B}|Creature - Vampire Shaman|2|2|Multikicker {B}$When Bloodhusk Ritualist enters the battlefield, target opponent discards a card for each time it was kicked.|
|
||||
Bloodlost of Vaasgoth|Commander 2017|102|M|{3}{B}{B}|Creature - Vampire Warrior|3|3|Bloodthirst 3$Flying$Whenever you cast a Vampire creature spell, it gains bloodthirst 3.|
|
||||
Bloodlord of Vaasgoth|Commander 2017|102|M|{3}{B}{B}|Creature - Vampire Warrior|3|3|Bloodthirst 3$Flying$Whenever you cast a Vampire creature spell, it gains bloodthirst 3.|
|
||||
Butcher of Malakir|Commander 2017|103|R|{5}{B}{B}|Creature - Vampire Warrior|5|4|Flying$Whenever Butcher of Malakir or another creature you control dies, each opponent sacrifices a creature.|
|
||||
Captivating Vampire|Commander 2017|104|R|{1}{B}{B}|Creature - Vampire|2|2|Other Vampire creature you control get +1/+1.$Tap five untapped Vampires you control: Gain control of target creature. It becomes a Vampire in addition to its other types.|
|
||||
Consuming Vapors|Commander 2017|105|R|{3}{B}|Sorcery|||Target player sacrifices a creature. You gain life equal to that creature's toughness.$Rebound|
|
||||
|
@ -32460,4 +32460,4 @@ Mountain|Duel Decks: Mind vs. Might|61|L||Basic Land - Mountain|||{T}: Add {R} t
|
|||
Mountain|Duel Decks: Mind vs. Might|62|L||Basic Land - Mountain|||{T}: Add {R} to your mana pool.|
|
||||
Forest|Duel Decks: Mind vs. Might|63|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.|
|
||||
Forest|Duel Decks: Mind vs. Might|64|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.|
|
||||
Forest|Duel Decks: Mind vs. Might|65|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.|
|
||||
Forest|Duel Decks: Mind vs. Might|65|L||Basic Land - Forest|||{T}: Add {G} to your mana pool.|
|
||||
|
|
Loading…
Reference in a new issue