mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
replaced all instances of converted mana cost with mana value
This commit is contained in:
parent
cb0df438dd
commit
a61d5543fa
610 changed files with 1781 additions and 1796 deletions
|
|
@ -363,7 +363,7 @@
|
|||
|
||||
@Override
|
||||
public int compare(MageCard o1, MageCard o2) {
|
||||
int val = Integer.compare(o1.getOriginal().getConvertedManaCost(), o2.getOriginal().getConvertedManaCost());
|
||||
int val = Integer.compare(o1.getOriginal().getManaValue(), o2.getOriginal().getManaValue());
|
||||
if (val == 0) {
|
||||
return o1.getOriginal().getName().compareTo(o2.getOriginal().getName());
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
public enum Sort {
|
||||
NONE("No Sort", new CardViewNoneComparator()),
|
||||
CARD_TYPE("Card Type", new CardViewCardTypeComparator()),
|
||||
CMC("Converted Mana Cost", new CardViewCostComparator()),
|
||||
CMC("Mana Value", new CardViewCostComparator()),
|
||||
COLOR("Color", new CardViewColorComparator()),
|
||||
COLOR_IDENTITY("Color Identity", new CardViewColorIdentityComparator()),
|
||||
RARITY("Rarity", new CardViewRarityComparator()),
|
||||
|
|
@ -1475,7 +1475,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
mc = mc.replaceAll("#2\\/", "#");
|
||||
mc = mc.replaceAll("p}", "}");
|
||||
mc = mc.toLowerCase(Locale.ENGLISH);
|
||||
int cmc = card.getConvertedManaCost();
|
||||
int cmc = card.getManaValue();
|
||||
|
||||
// Do colorless mana pips
|
||||
Pattern regex = Pattern.compile("#([0-9]+)}");
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public final class DeckGenerator {
|
|||
while (count < spellCount) {
|
||||
Card card = cardPool.get(RandomUtil.nextInt(retrievedCount)).getMockCard();
|
||||
if (genPool.isValidSpellCard(card)) {
|
||||
int cardCMC = card.getConvertedManaCost();
|
||||
int cardCMC = card.getManaValue();
|
||||
for (DeckGeneratorCMC.CMC deckCMC : deckCMCs) {
|
||||
if (cardCMC >= deckCMC.min && cardCMC <= deckCMC.max) {
|
||||
int currentAmount = deckCMC.getAmount();
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ public class MageCardComparator implements CardViewComparator {
|
|||
break;
|
||||
// Cost
|
||||
case 2:
|
||||
aCom = a.getConvertedManaCost();
|
||||
bCom = b.getConvertedManaCost();
|
||||
aCom = a.getManaValue();
|
||||
bCom = b.getManaValue();
|
||||
break;
|
||||
// Color
|
||||
case 3:
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ public class CardViewCostComparator implements CardViewComparator {
|
|||
|
||||
@Override
|
||||
public int compare(CardView o1, CardView o2) {
|
||||
return Integer.compare(o1.getConvertedManaCost(), o2.getConvertedManaCost());
|
||||
return Integer.compare(o1.getManaValue(), o2.getManaValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCategoryName(CardView sample) {
|
||||
return "CMC: " + sample.getConvertedManaCost();
|
||||
return "CMC: " + sample.getManaValue();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue