mirror of
https://github.com/correl/mage.git
synced 2025-01-13 11:01:58 +00:00
Merge pull request #5714 from ketsuban/alliances
Implement some Alliances cards
This commit is contained in:
commit
7912d217cb
7 changed files with 299 additions and 1 deletions
54
Mage.Sets/src/mage/cards/g/GiftOfTheWoods.java
Normal file
54
Mage.Sets/src/mage/cards/g/GiftOfTheWoods.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public final class GiftOfTheWoods extends CardImpl {
|
||||
|
||||
public GiftOfTheWoods(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.ENCHANTMENT }, "{G}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever enchanted creature blocks or becomes blocked, it gets +0/+3 until
|
||||
// end of turn and you gain 1 life.
|
||||
Ability ability2 = new BlocksOrBecomesBlockedTriggeredAbility(
|
||||
new BoostEnchantedEffect(0, 3, Duration.EndOfTurn), false);
|
||||
ability2.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
||||
public GiftOfTheWoods(final GiftOfTheWoods card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GiftOfTheWoods copy() {
|
||||
return new GiftOfTheWoods(this);
|
||||
}
|
||||
}
|
64
Mage.Sets/src/mage/cards/k/KjeldoranPride.java
Normal file
64
Mage.Sets/src/mage/cards/k/KjeldoranPride.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherEnchantedPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public final class KjeldoranPride extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature other than enchanted creature");
|
||||
|
||||
static {
|
||||
filter.add(new AnotherEnchantedPredicate());
|
||||
}
|
||||
|
||||
public KjeldoranPride(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.ENCHANTMENT }, "{1}{W}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
|
||||
Ability enchantAbility = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(enchantAbility);
|
||||
|
||||
// Enchanted creature gets +1/+2.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2)));
|
||||
|
||||
// 2U: Attach Kjeldoran Pride to target creature other than enchanted creature.
|
||||
Ability ability = new SimpleActivatedAbility(new AttachEffect(Outcome.Benefit), new ManaCostsImpl<>("{2}{U}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public KjeldoranPride(final KjeldoranPride card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KjeldoranPride copy() {
|
||||
return new KjeldoranPride(this);
|
||||
}
|
||||
}
|
103
Mage.Sets/src/mage/cards/r/RogueSkycaptain.java
Normal file
103
Mage.Sets/src/mage/cards/r/RogueSkycaptain.java
Normal file
|
@ -0,0 +1,103 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.RemoveAllCountersSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public class RogueSkycaptain extends CardImpl {
|
||||
|
||||
public RogueSkycaptain(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.CREATURE }, "{2}{R}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.subtype.add(SubType.MERCENARY);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// At the beginning of your upkeep, put a wage counter on Rogue Skycaptain. You
|
||||
// may pay 2 for each wage counter on it. If you don't, remove all wage counters
|
||||
// from Rogue Skycaptain and an opponent gains control of it.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RogueSkycaptainEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Card copy() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class RogueSkycaptainEffect extends OneShotEffect {
|
||||
|
||||
public RogueSkycaptainEffect() {
|
||||
super(Outcome.GainControl);
|
||||
staticText = "put a wage counter on {this}. You may pay {2} for each wage counter on it. If you don't, remove all wage counters from {this} and an opponent gains control of it";
|
||||
}
|
||||
|
||||
public RogueSkycaptainEffect(final RogueSkycaptainEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effect copy() {
|
||||
return new RogueSkycaptainEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (controller != null && permanent != null) {
|
||||
new AddCountersSourceEffect(CounterType.WAGE.createInstance(), true).apply(game, source);
|
||||
Cost cost = new GenericManaCost(2 * permanent.getCounters(game).getCount(CounterType.WAGE));
|
||||
if (!cost.pay(source, game, controller.getId(), controller.getId(), false)) {
|
||||
new RemoveAllCountersSourceEffect(CounterType.WAGE).apply(game, source);
|
||||
Player opponent;
|
||||
Set<UUID> opponents = game.getOpponents(controller.getId());
|
||||
if (opponents.size() == 1) {
|
||||
opponent = game.getPlayer(opponents.iterator().next());
|
||||
} else {
|
||||
Target target = new TargetOpponent(true);
|
||||
target.setNotTarget(true);
|
||||
target.choose(Outcome.GainControl, source.getControllerId(), source.getSourceId(), game);
|
||||
opponent = game.getPlayer(target.getFirstTarget());
|
||||
}
|
||||
if (opponent != null) {
|
||||
permanent.changeControllerId(opponent.getId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/cards/s/SoldeviSentry.java
Normal file
68
Mage.Sets/src/mage/cards/s/SoldeviSentry.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
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.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public final class SoldeviSentry extends CardImpl {
|
||||
|
||||
public SoldeviSentry(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.ARTIFACT, CardType.CREATURE }, "{1}");
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// 1: Choose target opponent. Regenerate Soldevi Sentry. When it regenerates
|
||||
// this way, that player may draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(new SoldeviSentryEffect(), new GenericManaCost(1));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SoldeviSentry(final SoldeviSentry card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoldeviSentry copy() {
|
||||
return new SoldeviSentry(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SoldeviSentryEffect extends RegenerateSourceEffect {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
//20110204 - 701.11
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null && permanent.regenerate(this.getId(), game)) {
|
||||
if (opponent != null) {
|
||||
if (opponent.chooseUse(Outcome.DrawCard, "Draw a card?", source, game)) {
|
||||
opponent.drawCards(1, game);
|
||||
}
|
||||
}
|
||||
this.used = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -83,6 +83,8 @@ public final class Alliances extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fyndhorn Druid", "90a", Rarity.COMMON, mage.cards.f.FyndhornDruid.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Fyndhorn Druid", "90b", Rarity.COMMON, mage.cards.f.FyndhornDruid.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Gargantuan Gorilla", 91, Rarity.RARE, mage.cards.g.GargantuanGorilla.class));
|
||||
cards.add(new SetCardInfo("Gift of the Woods", "92a", Rarity.COMMON, mage.cards.g.GiftOfTheWoods.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Gift of the Woods", "92b", Rarity.COMMON, mage.cards.g.GiftOfTheWoods.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Gorilla Berserkers", "93a", Rarity.COMMON, mage.cards.g.GorillaBerserkers.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Gorilla Berserkers", "93b", Rarity.COMMON, mage.cards.g.GorillaBerserkers.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Gorilla Chieftain", "94a", Rarity.COMMON, mage.cards.g.GorillaChieftain.class, NON_FULL_USE_VARIOUS));
|
||||
|
@ -106,6 +108,8 @@ public final class Alliances extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Keeper of Tresserhorn", 52, Rarity.RARE, mage.cards.k.KeeperOfTresserhorn.class));
|
||||
cards.add(new SetCardInfo("Kjeldoran Escort", "7a", Rarity.COMMON, mage.cards.k.KjeldoranEscort.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Kjeldoran Escort", "7b", Rarity.COMMON, mage.cards.k.KjeldoranEscort.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Kjeldoran Pride", "9a", Rarity.COMMON, mage.cards.k.KjeldoranPride.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Kjeldoran Pride", "9b", Rarity.COMMON, mage.cards.k.KjeldoranPride.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Kjeldoran Home Guard", 8, Rarity.UNCOMMON, mage.cards.k.KjeldoranHomeGuard.class));
|
||||
cards.add(new SetCardInfo("Kjeldoran Outpost", 139, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class));
|
||||
cards.add(new SetCardInfo("Krovikan Horror", 53, Rarity.RARE, mage.cards.k.KrovikanHorror.class));
|
||||
|
@ -149,6 +153,7 @@ public final class Alliances extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Reprisal", "13a", Rarity.COMMON, mage.cards.r.Reprisal.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Reprisal", "13b", Rarity.COMMON, mage.cards.r.Reprisal.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Ritual of the Machine", 59, Rarity.RARE, mage.cards.r.RitualOfTheMachine.class));
|
||||
cards.add(new SetCardInfo("Rogue Skycaptain", 79, Rarity.RARE, mage.cards.r.RogueSkycaptain.class));
|
||||
cards.add(new SetCardInfo("Royal Decree", 14, Rarity.RARE, mage.cards.r.RoyalDecree.class));
|
||||
cards.add(new SetCardInfo("Royal Herbalist", "15a", Rarity.COMMON, mage.cards.r.RoyalHerbalist.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Royal Herbalist", "15b", Rarity.COMMON, mage.cards.r.RoyalHerbalist.class, NON_FULL_USE_VARIOUS));
|
||||
|
@ -166,6 +171,8 @@ public final class Alliances extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Soldevi Heretic", "33b", Rarity.COMMON, mage.cards.s.SoldeviHeretic.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sage", "34a", Rarity.COMMON, mage.cards.s.SoldeviSage.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sage", "34b", Rarity.COMMON, mage.cards.s.SoldeviSage.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sentry", "132a", Rarity.COMMON, mage.cards.s.SoldeviSentry.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sentry", "132b", Rarity.COMMON, mage.cards.s.SoldeviSentry.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Steam Beast", "133a", Rarity.COMMON, mage.cards.s.SoldeviSteamBeast.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Steam Beast", "133b", Rarity.COMMON, mage.cards.s.SoldeviSteamBeast.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldier of Fortune", 80, Rarity.UNCOMMON, mage.cards.s.SoldierOfFortune.class));
|
||||
|
|
|
@ -152,7 +152,7 @@ public final class MastersEditionII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Leaping Lizard", 171, Rarity.COMMON, mage.cards.l.LeapingLizard.class));
|
||||
cards.add(new SetCardInfo("Lim-Dul's High Guard", 103, Rarity.UNCOMMON, mage.cards.l.LimDulsHighGuard.class));
|
||||
cards.add(new SetCardInfo("Lodestone Bauble", 213, Rarity.RARE, mage.cards.l.LodestoneBauble.class));
|
||||
cards.add(new SetCardInfo("Lost Order of Jarkeld", 24, Rarity.RARE, mage.cards.l.LostOrderOfJarkeld.class));
|
||||
cards.add(new SetCardInfo("Lost Order of Jarkeld", 24, Rarity.RARE, mage.cards.l.LostOrderOfJarkeld.class));
|
||||
cards.add(new SetCardInfo("Magus of the Unseen", 53, Rarity.RARE, mage.cards.m.MagusOfTheUnseen.class));
|
||||
cards.add(new SetCardInfo("Mana Crypt", 214, Rarity.RARE, mage.cards.m.ManaCrypt.class));
|
||||
cards.add(new SetCardInfo("Marjhan", 54, Rarity.RARE, mage.cards.m.Marjhan.class));
|
||||
|
@ -195,6 +195,7 @@ public final class MastersEditionII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ritual of Subdual", 174, Rarity.RARE, mage.cards.r.RitualOfSubdual.class));
|
||||
cards.add(new SetCardInfo("Ritual of the Machine", 109, Rarity.RARE, mage.cards.r.RitualOfTheMachine.class));
|
||||
cards.add(new SetCardInfo("Roterothopter", 218, Rarity.COMMON, mage.cards.r.Roterothopter.class));
|
||||
cards.add(new SetCardInfo("Rogue Skycaptain", 149, Rarity.RARE, mage.cards.r.RogueSkycaptain.class));
|
||||
cards.add(new SetCardInfo("Royal Decree", 31, Rarity.RARE, mage.cards.r.RoyalDecree.class));
|
||||
cards.add(new SetCardInfo("Royal Trooper", 32, Rarity.COMMON, mage.cards.r.RoyalTrooper.class));
|
||||
cards.add(new SetCardInfo("Ruins of Trokair", 234, Rarity.UNCOMMON, mage.cards.r.RuinsOfTrokair.class));
|
||||
|
|
|
@ -135,6 +135,7 @@ public enum CounterType {
|
|||
VERSE("verse"),
|
||||
VITALITY("vitality"),
|
||||
VORTEX("vortex"),
|
||||
WAGE("wage"),
|
||||
WINCH("winch"),
|
||||
WIND("wind"),
|
||||
WISH("wish");
|
||||
|
|
Loading…
Reference in a new issue