mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[GTC] Frontline Medic, Murder Investigation, Gideon Champion of Justice
This commit is contained in:
parent
421f6fb49d
commit
7ff55c8ac0
3 changed files with 375 additions and 0 deletions
88
Mage.Sets/src/mage/sets/gatecrash/FrontlineMedic.java
Normal file
88
Mage.Sets/src/mage/sets/gatecrash/FrontlineMedic.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.keyword.BattalionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.VariableManaCostPredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class FrontlineMedic extends CardImpl<FrontlineMedic> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("spell with {X} in its mana cost");
|
||||
|
||||
static {
|
||||
filter.add(new VariableManaCostPredicate());
|
||||
}
|
||||
|
||||
public FrontlineMedic(UUID ownerId) {
|
||||
super(ownerId, 12, "Frontline Medic", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "GTC";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Battalion - Whenever Frontline Medic and at least two other creatures attack, creatures you control are indestructible this turn.
|
||||
this.addAbility(new BattalionAbility(new IndestructibleAllEffect(new FilterControlledCreaturePermanent(), Constants.Duration.EndOfTurn)));
|
||||
|
||||
// Sacrifice Frontline Medic: Counter target spell with {X} in its mana cost unless its controller pays 3.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new CounterUnlessPaysEffect(new GenericManaCost(3))), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public FrontlineMedic(final FrontlineMedic card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrontlineMedic copy() {
|
||||
return new FrontlineMedic(this);
|
||||
}
|
||||
}
|
169
Mage.Sets/src/mage/sets/gatecrash/GideonChampionOfJustice.java
Normal file
169
Mage.Sets/src/mage/sets/gatecrash/GideonChampionOfJustice.java
Normal file
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.PreventAllDamageSourceEffect;
|
||||
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
|
||||
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class GideonChampionOfJustice extends CardImpl<GideonChampionOfJustice> {
|
||||
|
||||
public GideonChampionOfJustice(UUID ownerId) {
|
||||
super(ownerId, 13, "Gideon, Champion of Justice", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}");
|
||||
this.expansionSetCode = "GTC";
|
||||
this.subtype.add("Gideon");
|
||||
this.color.setWhite(true);
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));
|
||||
|
||||
// +1: Put a loyalty counter on Gideon, Champion of Justice for each creature target opponent controls.
|
||||
LoyaltyAbility ability1 = new LoyaltyAbility(
|
||||
new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), new PermanentsTargetOpponentControlsCount(), false), 1);
|
||||
ability1.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability1);
|
||||
|
||||
// 0: Until end of turn, Gideon becomes an indestructible Human Soldier creature with power and toughness each equal to the number of loyalty counters on him. He's still a planeswalker. Prevent all damage that would be dealt to him this turn.
|
||||
LoyaltyAbility ability2 = new LoyaltyAbility(new BecomesCreatureSourceEffect(new GideonChampionOfJusticeToken(), "planeswalker", Constants.Duration.EndOfTurn), 0);
|
||||
ability2.addEffect(new PreventAllDamageSourceEffect(Constants.Duration.EndOfTurn));
|
||||
this.addAbility(ability2);
|
||||
|
||||
// -15: Exile all other permanents.
|
||||
this.addAbility(new LoyaltyAbility(new GideonExileAllOtherPermanentsEffect(), -15));
|
||||
|
||||
}
|
||||
|
||||
public GideonChampionOfJustice(final GideonChampionOfJustice card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GideonChampionOfJustice copy() {
|
||||
return new GideonChampionOfJustice(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PermanentsTargetOpponentControlsCount implements DynamicValue {
|
||||
|
||||
public PermanentsTargetOpponentControlsCount() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility) {
|
||||
if (sourceAbility.getFirstTarget() != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new ControllerIdPredicate(sourceAbility.getFirstTarget()));
|
||||
int value = game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
|
||||
return value;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
return new PermanentsTargetOpponentControlsCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "creature target opponent controls";
|
||||
}
|
||||
}
|
||||
|
||||
class GideonExileAllOtherPermanentsEffect extends OneShotEffect<GideonExileAllOtherPermanentsEffect> {
|
||||
|
||||
public GideonExileAllOtherPermanentsEffect() {
|
||||
super(Constants.Outcome.Exile);
|
||||
staticText = "Exile all other permanents";
|
||||
}
|
||||
|
||||
public GideonExileAllOtherPermanentsEffect(final GideonExileAllOtherPermanentsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GideonExileAllOtherPermanentsEffect copy() {
|
||||
return new GideonExileAllOtherPermanentsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
|
||||
if (!permanent.getId().equals(source.getSourceId())) {
|
||||
permanent.moveToExile(null, null, source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class GideonChampionOfJusticeToken extends Token {
|
||||
|
||||
public GideonChampionOfJusticeToken() {
|
||||
super("", "indestructible Human Soldier creature with power and toughness each equal to the number of loyalty counters on him");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Human");
|
||||
subtype.add("Soldier");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.ALL, new SetPowerToughnessSourceEffect(new CountersCount(CounterType.LOYALTY), Constants.Duration.WhileOnBattlefield)));
|
||||
}
|
||||
|
||||
}
|
118
Mage.Sets/src/mage/sets/gatecrash/MurderInvestigation.java
Normal file
118
Mage.Sets/src/mage/sets/gatecrash/MurderInvestigation.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesAttachedTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SoldierToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class MurderInvestigation extends CardImpl<MurderInvestigation> {
|
||||
|
||||
public MurderInvestigation(UUID ownerId) {
|
||||
super(ownerId, 21, "Murder Investigation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.subtype.add("Aura");
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Enchant creature you control
|
||||
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
// When enchanted creature dies, put X 1/1 white Soldier creature tokens onto the battlefield, where X is its power.
|
||||
this.addAbility(new DiesAttachedTriggeredAbility(new CreateTokenEffect(new SoldierToken(), new AttachedPermanentPowerCount()), "enchanted creature"));
|
||||
}
|
||||
|
||||
public MurderInvestigation(final MurderInvestigation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MurderInvestigation copy() {
|
||||
return new MurderInvestigation(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AttachedPermanentPowerCount implements DynamicValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility) {
|
||||
Permanent attachmentPermanent = game.getPermanent(sourceAbility.getSourceId());
|
||||
if (attachmentPermanent == null) {
|
||||
attachmentPermanent = (Permanent) game.getLastKnownInformation(sourceAbility.getSourceId(), Zone.BATTLEFIELD);
|
||||
}
|
||||
if (attachmentPermanent != null && attachmentPermanent.getAttachedTo() != null) {
|
||||
Permanent attached = game.getPermanent(attachmentPermanent.getAttachedTo());
|
||||
if (attached == null) {
|
||||
attached = (Permanent) game.getLastKnownInformation(attachmentPermanent.getAttachedTo(), Zone.BATTLEFIELD);
|
||||
}
|
||||
if (attached != null) {
|
||||
return attached.getPower().getValue();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
return new AttachedPermanentPowerCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "its power";
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue