mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
Aladdin's Lamp - fixed miss X can't be 0.
This commit is contained in:
parent
499f21778d
commit
9b4cc9d56c
3 changed files with 9 additions and 2 deletions
|
@ -6,6 +6,7 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.costs.mana.VariableManaCost;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.cards.*;
|
import mage.cards.*;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -30,8 +31,13 @@ public final class AladdinsLamp extends CardImpl {
|
||||||
// {X}, {T}: The next time you would draw a card this turn, instead look at the top X cards of your library, put all but one of them on the bottom of your library in a random order, then draw a card. X can't be 0.
|
// {X}, {T}: The next time you would draw a card this turn, instead look at the top X cards of your library, put all but one of them on the bottom of your library in a random order, then draw a card. X can't be 0.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AladdinsLampEffect(), new ManaCostsImpl<>("{X}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AladdinsLampEffect(), new ManaCostsImpl<>("{X}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
|
for (Object cost : ability.getManaCosts()) {
|
||||||
|
if (cost instanceof VariableManaCost) {
|
||||||
|
((VariableManaCost) cost).setMinX(1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private AladdinsLamp(final AladdinsLamp card) {
|
private AladdinsLamp(final AladdinsLamp card) {
|
||||||
|
|
|
@ -51,6 +51,7 @@ public final class LairOfTheHydra extends CardImpl {
|
||||||
for (Object cost : manaCosts) {
|
for (Object cost : manaCosts) {
|
||||||
if (cost instanceof VariableManaCost) {
|
if (cost instanceof VariableManaCost) {
|
||||||
((VariableManaCost) cost).setMinX(1);
|
((VariableManaCost) cost).setMinX(1);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LairOfTheHydraEffect(), manaCosts));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LairOfTheHydraEffect(), manaCosts));
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class SuspendAbility extends SpecialAction {
|
||||||
* Gives the card the SuspendAbility
|
* Gives the card the SuspendAbility
|
||||||
*
|
*
|
||||||
* @param suspend - amount of time counters, if Integer.MAX_VALUE is set
|
* @param suspend - amount of time counters, if Integer.MAX_VALUE is set
|
||||||
* there will be {X} costs and X counters added
|
* there will be {X} costs and X counters added with X can't be 0 limit
|
||||||
* @param cost - null is used for temporary gained suspend ability
|
* @param cost - null is used for temporary gained suspend ability
|
||||||
* @param card - card that has the suspend ability
|
* @param card - card that has the suspend ability
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue