forked from External/mage
[MIC] Implemented Visions of Dominance
This commit is contained in:
parent
61288b6439
commit
a88427a6d9
5 changed files with 90 additions and 0 deletions
77
Mage.Sets/src/mage/cards/v/VisionsOfDominance.java
Normal file
77
Mage.Sets/src/mage/cards/v/VisionsOfDominance.java
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
package mage.cards.v;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.costs.costadjusters.CommanderManaValueAdjuster;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.FlashbackAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class VisionsOfDominance extends CardImpl {
|
||||||
|
|
||||||
|
public VisionsOfDominance(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||||
|
|
||||||
|
// Put a +1/+1 counter on target creature, then double the number of +1/+1 counters on it.
|
||||||
|
this.getSpellAbility().addEffect(new VisionsOfDominanceEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
|
||||||
|
// Flashback {8}{G}{G}. This spell costs {X} less to cast this way, where X is the greatest mana value of a commander you own on the battlefield or in the command zone.
|
||||||
|
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{8}{G}{G}"))
|
||||||
|
.setAbilityName("This spell costs {X} less to cast this way, where X is the greatest mana value " +
|
||||||
|
"of a commander you own on the battlefield or in the command zone.")
|
||||||
|
.setCostAdjuster(CommanderManaValueAdjuster.instance));
|
||||||
|
}
|
||||||
|
|
||||||
|
private VisionsOfDominance(final VisionsOfDominance card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VisionsOfDominance copy() {
|
||||||
|
return new VisionsOfDominance(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class VisionsOfDominanceEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
VisionsOfDominanceEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "put a +1/+1 counter on target creature, then double the number of +1/+1 counters on it";
|
||||||
|
}
|
||||||
|
|
||||||
|
private VisionsOfDominanceEffect(final VisionsOfDominanceEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VisionsOfDominanceEffect copy() {
|
||||||
|
return new VisionsOfDominanceEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
permanent.addCounters(CounterType.P1P1.createInstance(), source, game);
|
||||||
|
int counterCount = permanent.getCounters(game).getCount(CounterType.P1P1);
|
||||||
|
if (counterCount > 0) {
|
||||||
|
permanent.addCounters(CounterType.P1P1.createInstance(counterCount), source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -142,6 +142,7 @@ public final class MidnightHuntCommander extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Undead Augur", 130, Rarity.UNCOMMON, mage.cards.u.UndeadAugur.class));
|
cards.add(new SetCardInfo("Undead Augur", 130, Rarity.UNCOMMON, mage.cards.u.UndeadAugur.class));
|
||||||
cards.add(new SetCardInfo("Verdurous Gearhulk", 145, Rarity.MYTHIC, mage.cards.v.VerdurousGearhulk.class));
|
cards.add(new SetCardInfo("Verdurous Gearhulk", 145, Rarity.MYTHIC, mage.cards.v.VerdurousGearhulk.class));
|
||||||
cards.add(new SetCardInfo("Victory's Envoy", 96, Rarity.RARE, mage.cards.v.VictorysEnvoy.class));
|
cards.add(new SetCardInfo("Victory's Envoy", 96, Rarity.RARE, mage.cards.v.VictorysEnvoy.class));
|
||||||
|
cards.add(new SetCardInfo("Visions of Dominance", 37, Rarity.RARE, mage.cards.v.VisionsOfDominance.class));
|
||||||
cards.add(new SetCardInfo("Visions of Duplicity", 33, Rarity.RARE, mage.cards.v.VisionsOfDuplicity.class));
|
cards.add(new SetCardInfo("Visions of Duplicity", 33, Rarity.RARE, mage.cards.v.VisionsOfDuplicity.class));
|
||||||
cards.add(new SetCardInfo("Visions of Glory", 32, Rarity.RARE, mage.cards.v.VisionsOfGlory.class));
|
cards.add(new SetCardInfo("Visions of Glory", 32, Rarity.RARE, mage.cards.v.VisionsOfGlory.class));
|
||||||
cards.add(new SetCardInfo("Wild Beastmaster", 146, Rarity.RARE, mage.cards.w.WildBeastmaster.class));
|
cards.add(new SetCardInfo("Wild Beastmaster", 146, Rarity.RARE, mage.cards.w.WildBeastmaster.class));
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,8 @@ public interface Card extends MageObject {
|
||||||
|
|
||||||
void looseAllAbilities(Game game);
|
void looseAllAbilities(Game game);
|
||||||
|
|
||||||
|
boolean addCounters(Counter counter, Ability source, Game game);
|
||||||
|
|
||||||
boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game);
|
boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game);
|
||||||
|
|
||||||
boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game, boolean isEffect);
|
boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game, boolean isEffect);
|
||||||
|
|
|
||||||
|
|
@ -687,6 +687,11 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
||||||
return ownerId;
|
return ownerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addCounters(Counter counter, Ability source, Game game) {
|
||||||
|
return addCounters(counter, source.getControllerId(), source, game);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game) {
|
public boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game) {
|
||||||
return addCounters(counter, playerAddingCounters, source, game, null, true);
|
return addCounters(counter, playerAddingCounters, source, game, null, true);
|
||||||
|
|
|
||||||
|
|
@ -989,6 +989,11 @@ public class Spell extends StackObjectImpl implements Card {
|
||||||
return card.getCounters(state);
|
return card.getCounters(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addCounters(Counter counter, Ability source, Game game) {
|
||||||
|
return card.addCounters(counter, source, game);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game) {
|
public boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game) {
|
||||||
return card.addCounters(counter, playerAddingCounters, source, game);
|
return card.addCounters(counter, playerAddingCounters, source, game);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue