mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
add Lion's Eye Diamond (form Mirage)
This commit is contained in:
@@ -1402,6 +1402,23 @@ public class AbilityFactory {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* isInstantSpeed. To be used for mana abilities like Lion's Eye Diamond
|
||||
* </p>
|
||||
*
|
||||
* @param sa
|
||||
* a {@link forge.card.spellability.SpellAbility} object.
|
||||
* @return a boolean.
|
||||
*/
|
||||
public static boolean isInstantSpeed(final SpellAbility sa) {
|
||||
if (sa.isAbility()) {
|
||||
return sa.getRestrictions().isInstantSpeed();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Utility functions used by the AFs
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -100,6 +100,10 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
this.setSorcerySpeed(true);
|
||||
}
|
||||
|
||||
if (params.containsKey("InstantSpeed")) {
|
||||
this.setInstantSpeed(true);
|
||||
}
|
||||
|
||||
if (params.containsKey("PlayerTurn")) {
|
||||
this.setPlayerTurn(true);
|
||||
}
|
||||
|
||||
@@ -54,6 +54,9 @@ public class SpellAbilityVariables {
|
||||
|
||||
/** The b sorcery speed. */
|
||||
private boolean sorcerySpeed = false;
|
||||
|
||||
/** The b instant speed. */
|
||||
private boolean instantSpeed = false;
|
||||
|
||||
/** The b any player. */
|
||||
private boolean anyPlayer = false;
|
||||
@@ -243,6 +246,29 @@ public class SpellAbilityVariables {
|
||||
return this.sorcerySpeed;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* setInstantSpeed.
|
||||
* </p>
|
||||
*
|
||||
* @param bSpeed
|
||||
* a boolean.
|
||||
*/
|
||||
public final void setInstantSpeed(final boolean bSpeed) {
|
||||
this.instantSpeed = bSpeed;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* getInstantSpeed.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean isInstantSpeed() {
|
||||
return this.instantSpeed;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* setAnyPlayer.
|
||||
|
||||
@@ -27,6 +27,7 @@ import forge.Card;
|
||||
import forge.CardUtil;
|
||||
import forge.Constant;
|
||||
import forge.Constant.Zone;
|
||||
import forge.card.abilityfactory.AbilityFactory;
|
||||
import forge.card.abilityfactory.AbilityFactoryMana;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaPool;
|
||||
@@ -93,6 +94,10 @@ public class InputPayManaCostUtil {
|
||||
it.remove();
|
||||
} else if (!InputPayManaCostUtil.canMake(ma, cneeded.toString())) {
|
||||
it.remove();
|
||||
} else if (AbilityFactory.isInstantSpeed(ma)) {
|
||||
System.out.println("Removing ability from: "+card);
|
||||
System.out.println("Ability: "+ma);
|
||||
it.remove();
|
||||
}
|
||||
|
||||
if (!skipExpress) {
|
||||
|
||||
Reference in New Issue
Block a user