mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[MID] Implemented Duel for Dominance
This commit is contained in:
parent
e951ca480a
commit
d911891ab5
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/d/DuelForDominance.java
Normal file
83
Mage.Sets/src/mage/cards/d/DuelForDominance.java
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.common.CovenCondition;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.hint.common.CovenHint;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AbilityWord;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author weirddan455
|
||||||
|
*/
|
||||||
|
public final class DuelForDominance extends CardImpl {
|
||||||
|
|
||||||
|
public DuelForDominance(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||||
|
|
||||||
|
// Coven — Choose target creature you control and target creature you don't control.
|
||||||
|
// If you control three or more creatures with different powers, put a +1/+1 counter on the chosen creature you control.
|
||||||
|
// Then the chosen creatures fight each other.
|
||||||
|
this.getSpellAbility().addEffect(new DuelForDominanceEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
|
||||||
|
this.getSpellAbility().setAbilityWord(AbilityWord.COVEN);
|
||||||
|
this.getSpellAbility().addHint(CovenHint.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DuelForDominance(final DuelForDominance card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DuelForDominance copy() {
|
||||||
|
return new DuelForDominance(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DuelForDominanceEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public DuelForDominanceEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Choose target creature you control and target creature you don't control. " +
|
||||||
|
"If you control three or more creatures with different powers, put a +1/+1 counter on the chosen creature you control. " +
|
||||||
|
"Then the chosen creatures fight each other";
|
||||||
|
}
|
||||||
|
|
||||||
|
private DuelForDominanceEffect(final DuelForDominanceEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DuelForDominanceEffect copy() {
|
||||||
|
return new DuelForDominanceEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent controlledCreature = game.getPermanent(source.getTargets().get(0).getFirstTarget());
|
||||||
|
if (controlledCreature == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (CovenCondition.instance.apply(game, source)) {
|
||||||
|
controlledCreature.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game);
|
||||||
|
}
|
||||||
|
Permanent enemyCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||||
|
if (enemyCreature != null) {
|
||||||
|
controlledCreature.fight(enemyCreature, source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -66,6 +66,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Diregraf Horde", 96, Rarity.COMMON, mage.cards.d.DiregrafHorde.class));
|
cards.add(new SetCardInfo("Diregraf Horde", 96, Rarity.COMMON, mage.cards.d.DiregrafHorde.class));
|
||||||
cards.add(new SetCardInfo("Diregraf Rebirth", 220, Rarity.UNCOMMON, mage.cards.d.DiregrafRebirth.class));
|
cards.add(new SetCardInfo("Diregraf Rebirth", 220, Rarity.UNCOMMON, mage.cards.d.DiregrafRebirth.class));
|
||||||
cards.add(new SetCardInfo("Dissipate", 49, Rarity.UNCOMMON, mage.cards.d.Dissipate.class));
|
cards.add(new SetCardInfo("Dissipate", 49, Rarity.UNCOMMON, mage.cards.d.Dissipate.class));
|
||||||
|
cards.add(new SetCardInfo("Duel for Dominance", 184, Rarity.COMMON, mage.cards.d.DuelForDominance.class));
|
||||||
cards.add(new SetCardInfo("Eaten Alive", 99, Rarity.COMMON, mage.cards.e.EatenAlive.class));
|
cards.add(new SetCardInfo("Eaten Alive", 99, Rarity.COMMON, mage.cards.e.EatenAlive.class));
|
||||||
cards.add(new SetCardInfo("Embodiment of Flame", 141, Rarity.UNCOMMON, mage.cards.e.EmbodimentOfFlame.class));
|
cards.add(new SetCardInfo("Embodiment of Flame", 141, Rarity.UNCOMMON, mage.cards.e.EmbodimentOfFlame.class));
|
||||||
cards.add(new SetCardInfo("Faith Flare", 19, Rarity.COMMON, mage.cards.f.FaithFlare.class));
|
cards.add(new SetCardInfo("Faith Flare", 19, Rarity.COMMON, mage.cards.f.FaithFlare.class));
|
||||||
|
|
Loading…
Reference in a new issue