draw in-game casting cost on card in hand, closes #629
parent
af7443359d
commit
0119427739
|
@ -214,6 +214,10 @@ public class MagicCard
|
|||
return getCardDefinition().getCost();
|
||||
}
|
||||
|
||||
public MagicManaCost getGameCost() {
|
||||
return getGame().modCost(this, getCost());
|
||||
}
|
||||
|
||||
public Iterable<MagicEvent> getCostEvent() {
|
||||
return getCardDefinition().getCostEvent(this);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,6 @@ public class MagicManaCost {
|
|||
}
|
||||
|
||||
private MagicManaCost(final int[] aAmounts, final int aXCount) {
|
||||
costText = "";
|
||||
int total = 0;
|
||||
for (int i = 0; i < aAmounts.length; i++) {
|
||||
amounts[i] = aAmounts[i];
|
||||
|
@ -91,6 +90,7 @@ public class MagicManaCost {
|
|||
}
|
||||
XCount = aXCount;
|
||||
converted = total;
|
||||
costText = getCanonicalText(amounts, XCount);
|
||||
}
|
||||
|
||||
private void addType(final MagicCostManaType type,final int amount,final int[] convertedArr) {
|
||||
|
|
|
@ -25,8 +25,10 @@ class TestCostReduction extends TestGameBuilder {
|
|||
P.setLife(4);
|
||||
addToLibrary(P, "Mountain", 20);
|
||||
createPermanent(P, "Mountain", false, 6);
|
||||
addToHand(P, "Lightning Bolt", 2);
|
||||
addToHand(P, "Ruby Medallion", 1);
|
||||
addToHand(P, "Circle of Flame", 1);
|
||||
addToHand(P, "Jund Battlemage", 1);
|
||||
addToHand(P, "Ruby Medallion", 2);
|
||||
addToHand(P, "Ruby Leech", 2);
|
||||
addToHand(P, "Enrage", 1);
|
||||
addToHand(P, "Bonfire of the Damned", 1);
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ public class ImageCardListViewer extends JPanel implements IChoiceViewer {
|
|||
y2-17
|
||||
);
|
||||
} else {
|
||||
ImageDrawingUtils.drawCostInfo(g,this,card.getCost(),x1,x2-1,y1+2);
|
||||
ImageDrawingUtils.drawCostInfo(g,this,card.getGameCost(),x1,x2-1,y1+2);
|
||||
}
|
||||
if (cardDefinition.isCreature()) {
|
||||
ImageDrawingUtils.drawAbilityInfo(g,this,cardDefinition.genAbilityFlags(),x1+2,y2-18);
|
||||
|
|
Loading…
Reference in New Issue