mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[MH2] Implemented Geyadrone Dihada (#7873)
This commit is contained in:
parent
f7c3d15ed2
commit
03db612f83
4 changed files with 95 additions and 0 deletions
92
Mage.Sets/src/mage/cards/g/GeyadroneDihada.java
Normal file
92
Mage.Sets/src/mage/cards/g/GeyadroneDihada.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class GeyadroneDihada extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("permanents with corruption counters on them");
|
||||
private static final FilterCreatureOrPlaneswalkerPermanent filter2 = new FilterCreatureOrPlaneswalkerPermanent("other creature or planeswalker");
|
||||
private static final FilterPermanent filter3 = new FilterPermanent("each permanent with a corruption counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CorruptionCounterPredicate.instance);
|
||||
filter2.add(AnotherPredicate.instance);
|
||||
filter3.add(CorruptionCounterPredicate.instance);
|
||||
}
|
||||
|
||||
public GeyadroneDihada(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{U}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DIHADA);
|
||||
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
|
||||
|
||||
// Protection from permanents with corruption counters on them
|
||||
this.addAbility(new ProtectionAbility(filter));
|
||||
|
||||
// +1: Each opponent loses 2 life and you gain 2 life. Put a corruption counter on up to one other target creature or planeswalker.
|
||||
Ability ability = new LoyaltyAbility(new LoseLifeOpponentsEffect(2), 1);
|
||||
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
|
||||
ability.addEffect(new AddCountersTargetEffect(CounterType.CORRUPTION.createInstance(), Outcome.Detriment)
|
||||
.setText("Put a corruption counter on up to one other target creature or planeswalker"));
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalker(0, 1, filter2, false));
|
||||
this.addAbility(ability);
|
||||
|
||||
// −3: Gain control of target creature or planeswalker until end of tun. Untap it and put a corruption counter on it. It gains haste until end of turn.
|
||||
ability = new LoyaltyAbility(new GainControlTargetEffect(Duration.EndOfTurn), -3);
|
||||
ability.addEffect(new UntapTargetEffect().setText("Untap it"));
|
||||
ability.addEffect(new AddCountersTargetEffect(CounterType.CORRUPTION.createInstance(), Outcome.Detriment).setText("and put a corruption counter on it"));
|
||||
ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn"));
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
|
||||
// −7: Gain control of each permanent with a corruption counter on it.
|
||||
this.addAbility(new LoyaltyAbility(new GainControlAllEffect(Duration.Custom, filter3), -7));
|
||||
}
|
||||
|
||||
private GeyadroneDihada(final GeyadroneDihada card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GeyadroneDihada copy() {
|
||||
return new GeyadroneDihada(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum CorruptionCounterPredicate implements Predicate<Permanent> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return input.getCounters(game).getCount(CounterType.CORRUPTION) > 0;
|
||||
}
|
||||
}
|
|
@ -84,6 +84,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fractured Sanity", 44, Rarity.RARE, mage.cards.f.FracturedSanity.class));
|
||||
cards.add(new SetCardInfo("Gaea's Will", 162, Rarity.RARE, mage.cards.g.GaeasWill.class));
|
||||
cards.add(new SetCardInfo("General Ferrous Rokiric", 198, Rarity.RARE, mage.cards.g.GeneralFerrousRokiric.class));
|
||||
cards.add(new SetCardInfo("Geyadrone Dihada", 199, Rarity.MYTHIC, mage.cards.g.GeyadroneDihada.class));
|
||||
cards.add(new SetCardInfo("Ghost-Lit Drifter", 45, Rarity.UNCOMMON, mage.cards.g.GhostLitDrifter.class));
|
||||
cards.add(new SetCardInfo("Glinting Creeper", 164, Rarity.UNCOMMON, mage.cards.g.GlintingCreeper.class));
|
||||
cards.add(new SetCardInfo("Glorious Enforcer", 14, Rarity.UNCOMMON, mage.cards.g.GloriousEnforcer.class));
|
||||
|
|
|
@ -403,6 +403,7 @@ public enum SubType {
|
|||
DAKKON("Dakkon", SubTypeSet.PlaneswalkerType),
|
||||
DARETTI("Daretti", SubTypeSet.PlaneswalkerType),
|
||||
DAVRIEL("Davriel", SubTypeSet.PlaneswalkerType),
|
||||
DIHADA("Dihada", SubTypeSet.PlaneswalkerType),
|
||||
DOMRI("Domri", SubTypeSet.PlaneswalkerType),
|
||||
DOOKU("Dooku", SubTypeSet.PlaneswalkerType, true), // Star Wars
|
||||
DOVIN("Dovin", SubTypeSet.PlaneswalkerType),
|
||||
|
|
|
@ -31,6 +31,7 @@ public enum CounterType {
|
|||
CHIP("chip"),
|
||||
COIN("coin"),
|
||||
CORPSE("corpse"),
|
||||
CORRUPTION("corruption"),
|
||||
CREDIT("credit"),
|
||||
CRYSTAL("crystal"),
|
||||
CUBE("cube"),
|
||||
|
|
Loading…
Reference in a new issue