mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed adding mana "of any type that land produced".
This commit is contained in:
parent
ad2a10bb37
commit
7dc96adac2
8 changed files with 20 additions and 31 deletions
|
@ -29,7 +29,7 @@ package mage.sets.championsofkamigawa;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorTargetCanProduceEffect;
|
||||
import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -49,7 +49,7 @@ public class HeartbeatOfSpring extends CardImpl {
|
|||
|
||||
// Whenever a player taps a land for mana, that player adds one mana to his or her mana pool of any type that land produced.
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
new AddManaOfAnyColorTargetCanProduceEffect(),
|
||||
new AddManaOfAnyTypeProducedEffect(),
|
||||
new FilterLandPermanent("a player taps a land"),
|
||||
SetTargetPointer.PERMANENT));
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.dragonsmaze;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorTargetCanProduceEffect;
|
||||
import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -55,7 +55,7 @@ public class ZhurTaaAncient extends CardImpl {
|
|||
|
||||
// Whenever a player taps a land for mana, that player adds one mana to his or her mana pool of any type that land produced.
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
new AddManaOfAnyColorTargetCanProduceEffect(),
|
||||
new AddManaOfAnyTypeProducedEffect(),
|
||||
new FilterLandPermanent("a player taps a land"),
|
||||
SetTargetPointer.PERMANENT));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ package mage.sets.fourthedition;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorTargetCanProduceEffect;
|
||||
import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -48,7 +48,7 @@ public class ManaFlare extends CardImpl {
|
|||
|
||||
// Whenever a player taps a land for mana, that player adds one mana to his or her mana pool of any type that land produced.
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
new AddManaOfAnyColorTargetCanProduceEffect(),
|
||||
new AddManaOfAnyTypeProducedEffect(),
|
||||
new FilterLandPermanent("a player taps a land"),
|
||||
SetTargetPointer.PERMANENT));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ package mage.sets.journeyintonyx;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorTargetCanProduceEffect;
|
||||
import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -53,7 +53,7 @@ public class DictateOfKarametra extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
// Whenever a player taps a land for mana, that player adds one mana to his or her mana pool of any type that land produced.
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
new AddManaOfAnyColorTargetCanProduceEffect(),
|
||||
new AddManaOfAnyTypeProducedEffect(),
|
||||
new FilterLandPermanent("a player taps a land"),
|
||||
SetTargetPointer.PERMANENT));
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.judgment;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorTargetCanProduceEffect;
|
||||
import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -57,7 +57,7 @@ public class MirarisWake extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1,1,Duration.WhileOnBattlefield)));
|
||||
// Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced.
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
new AddManaOfAnyColorTargetCanProduceEffect(),
|
||||
new AddManaOfAnyTypeProducedEffect(),
|
||||
new FilterControlledLandPermanent("you tap a land"),
|
||||
SetTargetPointer.PERMANENT));
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorTargetCanProduceEffect;
|
||||
import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -64,7 +64,7 @@ public class VorinclexVoiceOfHunger extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
// Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced.
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
new AddManaOfAnyColorTargetCanProduceEffect(),
|
||||
new AddManaOfAnyTypeProducedEffect(),
|
||||
new FilterControlledLandPermanent("you tap a land"),
|
||||
SetTargetPointer.PERMANENT));
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.shardsofalara;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorTargetCanProduceEffect;
|
||||
import mage.abilities.effects.common.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -67,7 +67,7 @@ public class KeeperOfProgenitus extends CardImpl {
|
|||
|
||||
// Whenever a player taps a Mountain, Forest, or Plains for mana, that player adds one mana to his or her mana pool of any type that land produced.
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
new AddManaOfAnyColorTargetCanProduceEffect(),
|
||||
new AddManaOfAnyTypeProducedEffect(),
|
||||
filter, SetTargetPointer.PERMANENT));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,12 +29,9 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.Mana;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -44,14 +41,14 @@ import mage.players.Player;
|
|||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class AddManaOfAnyColorTargetCanProduceEffect extends ManaEffect {
|
||||
public class AddManaOfAnyTypeProducedEffect extends ManaEffect {
|
||||
|
||||
public AddManaOfAnyColorTargetCanProduceEffect() {
|
||||
public AddManaOfAnyTypeProducedEffect() {
|
||||
super();
|
||||
staticText = "that player adds one mana to his or her mana pool of any type that land produced";
|
||||
}
|
||||
|
||||
public AddManaOfAnyColorTargetCanProduceEffect(final AddManaOfAnyColorTargetCanProduceEffect effect) {
|
||||
public AddManaOfAnyTypeProducedEffect(final AddManaOfAnyTypeProducedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -63,13 +60,7 @@ public class AddManaOfAnyColorTargetCanProduceEffect extends ManaEffect {
|
|||
if (targetController == null) {
|
||||
return false;
|
||||
}
|
||||
Abilities<ManaAbility> mana = permanent.getAbilities().getManaAbilities(Zone.BATTLEFIELD);
|
||||
Mana types = new Mana();
|
||||
for (ManaAbility ability : mana) {
|
||||
for(Mana netMana: ability.getNetMana(game)) {
|
||||
types.add(netMana);
|
||||
}
|
||||
}
|
||||
Mana types = (Mana) this.getValue("mana");
|
||||
Choice choice = new ChoiceImpl(true);
|
||||
choice.setMessage("Pick the type of mana to produce");
|
||||
if (types.getBlack() > 0) {
|
||||
|
@ -129,14 +120,12 @@ public class AddManaOfAnyColorTargetCanProduceEffect extends ManaEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public AddManaOfAnyColorTargetCanProduceEffect copy() {
|
||||
return new AddManaOfAnyColorTargetCanProduceEffect(this);
|
||||
public AddManaOfAnyTypeProducedEffect copy() {
|
||||
return new AddManaOfAnyTypeProducedEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mana getMana(Game game, Ability source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue