mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Made target of Mindslaver mandatory. Mana abilities of Wall of Roots and Mana Bloom are handled as mana abilities now. Improved select text of Chord of Calling.
This commit is contained in:
parent
7e11cccc5b
commit
7e853da353
4 changed files with 9 additions and 8 deletions
|
@ -89,10 +89,11 @@ class ChordofCallingSearchEffect extends OneShotEffect<ChordofCallingSearchEffec
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
FilterCard filter = new FilterCard("creature card with converted mana cost X or less");
|
int xCost = source.getManaCostsToPay().getX();
|
||||||
|
FilterCard filter = new FilterCard(new StringBuilder("creature card with converted mana cost ").append(xCost).append(" or less").toString());
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
||||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1));
|
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xCost + 1));
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||||
if (player.searchLibrary(target, game)) {
|
if (player.searchLibrary(target, game)) {
|
||||||
if (target.getTargets().size() > 0) {
|
if (target.getTargets().size() > 0) {
|
||||||
|
|
|
@ -37,7 +37,6 @@ import mage.Constants.Zone;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.TriggeredAbility;
|
||||||
import mage.abilities.common.ActivateOncePerTurnActivatedAbility;
|
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.condition.common.HasCounterCondition;
|
import mage.abilities.condition.common.HasCounterCondition;
|
||||||
|
@ -47,6 +46,7 @@ import mage.abilities.effects.EntersBattlefieldEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
|
import mage.abilities.mana.ActivateOncePerTurnManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.choices.ChoiceColor;
|
import mage.choices.ChoiceColor;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
@ -71,7 +71,7 @@ public class ManaBloom extends CardImpl<ManaBloom> {
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ManaBloomEffect(),rule));
|
this.addAbility(new EntersBattlefieldAbility(new ManaBloomEffect(),rule));
|
||||||
|
|
||||||
// Remove a charge counter from Mana Bloom: Add one mana of any color to your mana pool. Activate this ability only once each turn.
|
// Remove a charge counter from Mana Bloom: Add one mana of any color to your mana pool. Activate this ability only once each turn.
|
||||||
Ability ability = new ActivateOncePerTurnActivatedAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()));
|
Ability ability = new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()));
|
||||||
ability.addChoice(new ChoiceColor());
|
ability.addChoice(new ChoiceColor());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class Mindslaver extends CardImpl<Mindslaver> {
|
||||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ControlTargetPlayerNextTurnEffect(), new GenericManaCost(4));
|
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ControlTargetPlayerNextTurnEffect(), new GenericManaCost(4));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer(true));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,16 +28,16 @@
|
||||||
package mage.sets.timeshifted;
|
package mage.sets.timeshifted;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Constants;
|
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.ActivateOncePerTurnActivatedAbility;
|
|
||||||
import mage.abilities.costs.CostImpl;
|
import mage.abilities.costs.CostImpl;
|
||||||
import mage.abilities.effects.common.BasicManaEffect;
|
import mage.abilities.effects.common.BasicManaEffect;
|
||||||
import mage.abilities.keyword.DefenderAbility;
|
import mage.abilities.keyword.DefenderAbility;
|
||||||
|
import mage.abilities.mana.ActivateOncePerTurnManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.BoostCounter;
|
import mage.counters.BoostCounter;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -62,7 +62,7 @@ public class WallOfRoots extends CardImpl<WallOfRoots> {
|
||||||
// Defender
|
// Defender
|
||||||
this.addAbility(DefenderAbility.getInstance());
|
this.addAbility(DefenderAbility.getInstance());
|
||||||
// Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.
|
// Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.
|
||||||
Ability ability = new ActivateOncePerTurnActivatedAbility(Constants.Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana), new WallOfRootsCost());
|
Ability ability = new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana), new WallOfRootsCost());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue