mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge pull request #2297 from maxlebedev/master
Changes similar cards to have mana instead of activated abilities.
This commit is contained in:
commit
12001a6a03
4 changed files with 23 additions and 15 deletions
|
@ -31,10 +31,10 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -54,7 +54,7 @@ public class CoalGolem extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// {3}, Sacrifice Coal Golem: Add {R}{R}{R} to your mana pool.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(3)),new GenericManaCost(3));
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(3),new GenericManaCost(3));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -50,7 +51,7 @@ public class VesselOfVolatility extends CardImpl {
|
|||
this.expansionSetCode = "SOI";
|
||||
|
||||
// {1}{R}, Sacrifice Vessel of Volatility: Add {R}{R}{R}{R} to your mana pool.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(4)), new ManaCostsImpl("{1}{R}"));
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(4), new ManaCostsImpl("{1}{R}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -55,8 +56,8 @@ public class SatyrHedonist extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {R}, Sacrifice Satyr Hedonist: Add {R}{R}{R} to your mana pool.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(3)),new ManaCostsImpl("{R}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(3), new ManaCostsImpl("{R}"));
|
||||
ability .addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
@ -31,16 +31,15 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.ParleyCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardAllEffect;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
@ -62,7 +61,8 @@ 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 SimpleActivatedAbility(Zone.BATTLEFIELD, new SelvalaExplorerReturnedEffect(), new TapSourceCost());
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new SelvalaExplorerReturnedEffect(), new TapSourceCost());
|
||||
|
||||
ability.setAbilityWord(AbilityWord.PARLEY);
|
||||
Effect effect = new DrawCardAllEffect(1);
|
||||
effect.setText("Then each player draws a card");
|
||||
|
@ -80,13 +80,13 @@ public class SelvalaExplorerReturned extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SelvalaExplorerReturnedEffect extends OneShotEffect {
|
||||
class SelvalaExplorerReturnedEffect extends ManaEffect {
|
||||
|
||||
public SelvalaExplorerReturnedEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "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";
|
||||
}
|
||||
|
||||
|
||||
public SelvalaExplorerReturnedEffect(final SelvalaExplorerReturnedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
@ -100,13 +100,19 @@ class SelvalaExplorerReturnedEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int parley = ParleyCount.getInstance().calculate(game, source, this);
|
||||
if (parley > 0) {
|
||||
controller.getManaPool().addMana(new Mana(0, parley, 0, 0, 0, 0, 0, 0), game, source);
|
||||
controller.gainLife(parley, game);
|
||||
Mana parley = getMana(game, source);
|
||||
if (parley.getAny() > 0) {
|
||||
controller.getManaPool().addMana(parley, game, source);
|
||||
controller.gainLife(parley.getAny(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Mana getMana(Game game, Ability source) {
|
||||
return Mana.GreenMana(ParleyCount.getInstance().calculate(game, source, this));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue