mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Synchronize nomenclature of Generic Cost
- Add new Colorless Cost
- Start displaying of colorless mana with new symbol (with backwards compatibility for existing scripts that produce "{1}" instead of "{C}")
This commit is contained in:
@@ -82,7 +82,7 @@ public enum FSkinProp {
|
||||
IMG_MANA_PHRYX_B (new int[] {320, 360, 40, 40}, PropType.IMAGE),
|
||||
IMG_MANA_SNOW (new int[] {320, 160, 40, 40}, PropType.IMAGE),
|
||||
|
||||
//colorless mana images
|
||||
//generic mana images
|
||||
IMG_MANA_0 (new int[] {640, 200, 20, 20}, PropType.IMAGE),
|
||||
IMG_MANA_1 (new int[] {660, 200, 20, 20}, PropType.IMAGE),
|
||||
IMG_MANA_2 (new int[] {640, 220, 20, 20}, PropType.IMAGE),
|
||||
|
||||
@@ -169,7 +169,7 @@ public class CardDetailUtil {
|
||||
if (curColors.hasGreen()) { strCurColors += "{G}"; }
|
||||
|
||||
if (strCurColors.isEmpty()) {
|
||||
strCurColors = "{X} (colorless)";
|
||||
strCurColors = "{C}";
|
||||
}
|
||||
|
||||
return strCurColors;
|
||||
|
||||
@@ -168,7 +168,7 @@ public class DeckProxy implements InventoryItem {
|
||||
else {
|
||||
for (final ManaCostShard shard : rules.getManaCost()) {
|
||||
//track phyrexian and hybrid costs separately as they won't always affect color
|
||||
if (shard.isPhyrexian() || shard.isOr2Colorless() || !shard.isMonoColor()) {
|
||||
if (shard.isPhyrexian() || shard.isOr2Generic() || !shard.isMonoColor()) {
|
||||
if (nonReqColors == null) {
|
||||
nonReqColors = new HashSet<Byte>();
|
||||
}
|
||||
|
||||
@@ -129,8 +129,8 @@ public abstract class InputPayMana extends InputSyncronizedBase {
|
||||
colorCanUse |= color;
|
||||
}
|
||||
}
|
||||
if (manaCost.isAnyPartPayableWith((byte) ManaAtom.COLORLESS, player.getManaPool())) {
|
||||
colorCanUse |= ManaAtom.COLORLESS;
|
||||
if (manaCost.isAnyPartPayableWith((byte) ManaAtom.GENERIC, player.getManaPool())) {
|
||||
colorCanUse |= ManaAtom.GENERIC;
|
||||
}
|
||||
if (colorCanUse == 0) { // no mana cost or something
|
||||
return abilities;
|
||||
@@ -183,8 +183,8 @@ public abstract class InputPayMana extends InputSyncronizedBase {
|
||||
if (manaCost.isAnyPartPayableWith(color, player.getManaPool())) { colorCanUse |= color; }
|
||||
if (manaCost.needsColor(color, player.getManaPool())) { colorNeeded |= color; }
|
||||
}
|
||||
if (manaCost.isAnyPartPayableWith((byte) ManaAtom.COLORLESS, player.getManaPool())) {
|
||||
colorCanUse |= ManaAtom.COLORLESS;
|
||||
if (manaCost.isAnyPartPayableWith((byte) ManaAtom.GENERIC, player.getManaPool())) {
|
||||
colorCanUse |= ManaAtom.GENERIC;
|
||||
}
|
||||
|
||||
if (colorCanUse == 0) { // no mana cost or something
|
||||
@@ -293,7 +293,7 @@ public abstract class InputPayMana extends InputSyncronizedBase {
|
||||
}
|
||||
|
||||
private static boolean abilityProducesManaColor(final SpellAbility am, AbilityManaPart m, final byte neededColor) {
|
||||
if (0 != (neededColor & ManaAtom.COLORLESS)) {
|
||||
if (0 != (neededColor & ManaAtom.GENERIC)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public final class InputSelectCardsForConvoke extends InputSelectManyBase<Card>
|
||||
colors = ColorSet.fromMask(colors.getColor() & remainingCost.getUnpaidColors());
|
||||
}
|
||||
if (!colors.isMulticolor()) {
|
||||
// Since the convoke mana logic can use colored mana as colorless if needed,
|
||||
// Since the convoke mana logic can use colored mana as generic if needed,
|
||||
// there is no need to prompt the user when convoking with a mono-color creature.
|
||||
chosenColor = colors.getColor();
|
||||
}
|
||||
|
||||
@@ -701,8 +701,8 @@ public class PlayerControllerHuman
|
||||
}
|
||||
|
||||
@Override
|
||||
public CardCollectionView chooseCardsToDelve(final int colorLessAmount, final CardCollection grave) {
|
||||
final int cardsInGrave = Math.min(colorLessAmount, grave.size());
|
||||
public CardCollectionView chooseCardsToDelve(final int genericAmount, final CardCollection grave) {
|
||||
final int cardsInGrave = Math.min(genericAmount, grave.size());
|
||||
if (cardsInGrave == 0) {
|
||||
return CardCollection.EMPTY;
|
||||
}
|
||||
@@ -1437,7 +1437,7 @@ public class PlayerControllerHuman
|
||||
} else {
|
||||
FThreads.invokeInEdtNowOrLater(new Runnable() {
|
||||
@Override public final void run() {
|
||||
getGui().message("Cannot pass priority at this time.");
|
||||
//getGui().message("Cannot pass priority at this time.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user