mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Selvala, Explorer Returned - Fixed that library top cards were revealead without using the mana ability. Possible mana from this source is no longer calculated for possible mana pool. Tapping for man can no longer be undone.(#2191).
This commit is contained in:
parent
9716ac3541
commit
8d06c23602
5 changed files with 40 additions and 17 deletions
|
@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.ParleyCount;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardAllEffect;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -60,13 +61,13 @@ public class SelvalaExplorerReturned extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Parley - {T}: Each player reveals the top card of his or her library. For each nonland card revealed this way, add {G} to your mana pool and you gain 1 life. Then each player draws a card.
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new SelvalaExplorerReturnedEffect(), new TapSourceCost());
|
||||
|
||||
ability.setAbilityWord(AbilityWord.PARLEY);
|
||||
ActivatedManaAbilityImpl manaAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new SelvalaExplorerReturnedEffect(), new TapSourceCost(), false);
|
||||
manaAbility.setUndoPossible(false);
|
||||
manaAbility.setAbilityWord(AbilityWord.PARLEY);
|
||||
Effect effect = new DrawCardAllEffect(1);
|
||||
effect.setText("Then each player draws a card");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
manaAbility.addEffect(effect);
|
||||
this.addAbility(manaAbility);
|
||||
}
|
||||
|
||||
public SelvalaExplorerReturned(final SelvalaExplorerReturned card) {
|
||||
|
|
|
@ -63,7 +63,7 @@ public class SelvalaHeartOfTheWilds extends CardImpl {
|
|||
filter.add(new GreatestPowerPredicate());
|
||||
}
|
||||
|
||||
private static final String rule = "Whenever another creature enters the battlefield, its controller may draw a card if its power is greater than each other creature's power";
|
||||
private static final String rule = "Whenever another creature enters the battlefield, its controller may draw a card if its power is greater than each other creature's power.";
|
||||
|
||||
public SelvalaHeartOfTheWilds(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}");
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package mage.sets;
|
||||
|
||||
import mage.cards.CardGraphicInfo;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.cards.o.OrcishSpy;
|
||||
import mage.cards.r.RukhEgg;
|
||||
import mage.constants.SetType;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.Rarity;
|
||||
import mage.cards.CardGraphicInfo;
|
||||
import mage.constants.SetType;
|
||||
|
||||
public class EighthEdition extends ExpansionSet {
|
||||
|
||||
|
@ -100,7 +100,6 @@ public class EighthEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Drudge Skeletons", 129, Rarity.COMMON, mage.cards.d.DrudgeSkeletons.class));
|
||||
cards.add(new SetCardInfo("Dusk Imp", 130, Rarity.COMMON, mage.cards.d.DuskImp.class));
|
||||
cards.add(new SetCardInfo("Dwarven Demolition Team", 184, Rarity.UNCOMMON, mage.cards.d.DwarvenDemolitionTeam.class));
|
||||
cards.add(new SetCardInfo("Eager Cadet", 1, Rarity.COMMON, mage.cards.e.EagerCadet.class));
|
||||
cards.add(new SetCardInfo("Eastern Paladin", 131, Rarity.RARE, mage.cards.e.EasternPaladin.class));
|
||||
cards.add(new SetCardInfo("Elfhame Palace", 324, Rarity.UNCOMMON, mage.cards.e.ElfhamePalace.class));
|
||||
cards.add(new SetCardInfo("Elite Archers", 18, Rarity.RARE, mage.cards.e.EliteArchers.class));
|
||||
|
@ -111,7 +110,6 @@ public class EighthEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Elvish Piper", 244, Rarity.RARE, mage.cards.e.ElvishPiper.class));
|
||||
cards.add(new SetCardInfo("Elvish Scrapper", 245, Rarity.UNCOMMON, mage.cards.e.ElvishScrapper.class));
|
||||
cards.add(new SetCardInfo("Emperor Crocodile", 246, Rarity.RARE, mage.cards.e.EmperorCrocodile.class));
|
||||
cards.add(new SetCardInfo("Enormous Baloth", 6, Rarity.UNCOMMON, mage.cards.e.EnormousBaloth.class));
|
||||
cards.add(new SetCardInfo("Enrage", 185, Rarity.UNCOMMON, mage.cards.e.Enrage.class));
|
||||
cards.add(new SetCardInfo("Ensnaring Bridge", 300, Rarity.RARE, mage.cards.e.EnsnaringBridge.class));
|
||||
cards.add(new SetCardInfo("Evacuation", 76, Rarity.RARE, mage.cards.e.Evacuation.class));
|
||||
|
@ -282,7 +280,6 @@ public class EighthEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sanctimony", 42, Rarity.UNCOMMON, mage.cards.s.Sanctimony.class));
|
||||
cards.add(new SetCardInfo("Savannah Lions", 43, Rarity.RARE, mage.cards.s.SavannahLions.class));
|
||||
cards.add(new SetCardInfo("Scathe Zombies", 160, Rarity.COMMON, mage.cards.s.ScatheZombies.class));
|
||||
cards.add(new SetCardInfo("Sea Eagle", 4, Rarity.COMMON, mage.cards.s.SeaEagle.class));
|
||||
cards.add(new SetCardInfo("Sea Monster", 99, Rarity.COMMON, mage.cards.s.SeaMonster.class));
|
||||
cards.add(new SetCardInfo("Searing Wind", 218, Rarity.RARE, mage.cards.s.SearingWind.class));
|
||||
cards.add(new SetCardInfo("Seasoned Marshal", 44, Rarity.UNCOMMON, mage.cards.s.SeasonedMarshal.class));
|
||||
|
@ -297,7 +294,6 @@ public class EighthEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Shivan Oasis", 326, Rarity.UNCOMMON, mage.cards.s.ShivanOasis.class));
|
||||
cards.add(new SetCardInfo("Shock", 222, Rarity.COMMON, mage.cards.s.Shock.class));
|
||||
cards.add(new SetCardInfo("Shock Troops", 223, Rarity.COMMON, mage.cards.s.ShockTroops.class));
|
||||
cards.add(new SetCardInfo("Silverback Ape", 7, Rarity.UNCOMMON, mage.cards.s.SilverbackApe.class));
|
||||
cards.add(new SetCardInfo("Sizzle", 224, Rarity.COMMON, mage.cards.s.Sizzle.class));
|
||||
cards.add(new SetCardInfo("Skull of Orm", 313, Rarity.RARE, mage.cards.s.SkullOfOrm.class));
|
||||
cards.add(new SetCardInfo("Slay", 164, Rarity.UNCOMMON, mage.cards.s.Slay.class));
|
||||
|
@ -353,13 +349,11 @@ public class EighthEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Urza's Tower", 330, Rarity.COMMON, mage.cards.u.UrzasTower.class));
|
||||
cards.add(new SetCardInfo("Vampiric Spirit", 170, Rarity.RARE, mage.cards.v.VampiricSpirit.class));
|
||||
cards.add(new SetCardInfo("Venerable Monk", 55, Rarity.COMMON, mage.cards.v.VenerableMonk.class));
|
||||
cards.add(new SetCardInfo("Vengeance", 2, Rarity.UNCOMMON, mage.cards.v.Vengeance.class));
|
||||
cards.add(new SetCardInfo("Verduran Enchantress", 285, Rarity.RARE, mage.cards.v.VerduranEnchantress.class));
|
||||
cards.add(new SetCardInfo("Vernal Bloom", 286, Rarity.RARE, mage.cards.v.VernalBloom.class));
|
||||
cards.add(new SetCardInfo("Viashino Sandstalker", 230, Rarity.UNCOMMON, mage.cards.v.ViashinoSandstalker.class));
|
||||
cards.add(new SetCardInfo("Vicious Hunger", 171, Rarity.COMMON, mage.cards.v.ViciousHunger.class));
|
||||
cards.add(new SetCardInfo("Vine Trellis", 287, Rarity.COMMON, mage.cards.v.VineTrellis.class));
|
||||
cards.add(new SetCardInfo("Vizzerdrix", 5, Rarity.RARE, mage.cards.v.Vizzerdrix.class));
|
||||
cards.add(new SetCardInfo("Volcanic Hammer", 231, Rarity.COMMON, mage.cards.v.VolcanicHammer.class));
|
||||
cards.add(new SetCardInfo("Wall of Air", 113, Rarity.UNCOMMON, mage.cards.w.WallOfAir.class));
|
||||
cards.add(new SetCardInfo("Wall of Spears", 320, Rarity.UNCOMMON, mage.cards.w.WallOfSpears.class));
|
||||
|
@ -377,6 +371,14 @@ public class EighthEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Yavimaya Enchantress", 290, Rarity.UNCOMMON, mage.cards.y.YavimayaEnchantress.class));
|
||||
cards.add(new SetCardInfo("Zombify", 174, Rarity.UNCOMMON, mage.cards.z.Zombify.class));
|
||||
cards.add(new SetCardInfo("Zur's Weirding", 116, Rarity.RARE, mage.cards.z.ZursWeirding.class));
|
||||
// 8ed Edition Box Set (we need to create own set)
|
||||
// cards.add(new SetCardInfo("Eager Cadet", 1, Rarity.COMMON, mage.cards.e.EagerCadet.class));
|
||||
// cards.add(new SetCardInfo("Vengeance", 2, Rarity.UNCOMMON, mage.cards.v.Vengeance.class));
|
||||
// cards.add(new SetCardInfo("Sea Eagle", 4, Rarity.COMMON, mage.cards.s.SeaEagle.class));
|
||||
// cards.add(new SetCardInfo("Vizzerdrix", 5, Rarity.RARE, mage.cards.v.Vizzerdrix.class));
|
||||
// cards.add(new SetCardInfo("Enormous Baloth", 6, Rarity.UNCOMMON, mage.cards.e.EnormousBaloth.class));
|
||||
// cards.add(new SetCardInfo("Silverback Ape", 7, Rarity.UNCOMMON, mage.cards.s.SilverbackApe.class));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -98,6 +98,11 @@ public abstract class ActivatedManaAbilityImpl extends ActivatedAbilityImpl impl
|
|||
return netMana.size() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is it allowed to undo the mana creation.
|
||||
* It's e.g. not allowed if some game revealing information is related (like reveal the top card of the library)
|
||||
* @return
|
||||
*/
|
||||
public boolean isUndoPossible() {
|
||||
return undoPossible;
|
||||
}
|
||||
|
|
|
@ -43,17 +43,32 @@ import mage.game.Game;
|
|||
*/
|
||||
public class SimpleManaAbility extends ActivatedManaAbilityImpl {
|
||||
|
||||
private boolean predictable;
|
||||
|
||||
public SimpleManaAbility(Zone zone, ManaEffect effect, Cost cost) {
|
||||
this(zone, effect, cost, true);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param zone
|
||||
* @param effect
|
||||
* @param cost
|
||||
* @param predictable set to false if definig the mana type or amount needs to reveal information and can't be predicted
|
||||
*/
|
||||
public SimpleManaAbility(Zone zone, ManaEffect effect, Cost cost, boolean predictable) {
|
||||
super(zone, effect, cost);
|
||||
this.predictable = predictable;
|
||||
}
|
||||
|
||||
public SimpleManaAbility(Zone zone, Mana mana, Cost cost) {
|
||||
super(zone, new BasicManaEffect(mana), cost);
|
||||
this.netMana.add(mana.copy());
|
||||
this.predictable = true;
|
||||
}
|
||||
|
||||
public SimpleManaAbility(final SimpleManaAbility ability) {
|
||||
super(ability);
|
||||
this.predictable = ability.predictable;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,7 +78,7 @@ public class SimpleManaAbility extends ActivatedManaAbilityImpl {
|
|||
|
||||
@Override
|
||||
public List<Mana> getNetMana(Game game) {
|
||||
if (netMana.isEmpty()) {
|
||||
if (netMana.isEmpty() && predictable) {
|
||||
for (Effect effect: getEffects()) {
|
||||
if (effect instanceof ManaEffect) {
|
||||
Mana effectMana =((ManaEffect)effect).getMana(game, this);
|
||||
|
|
Loading…
Reference in a new issue