mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Permanents with alternative cost will now display their altCost in the CardDetailPanel
This commit is contained in:
@@ -1083,11 +1083,18 @@ public class Card extends MyObservable {
|
|||||||
|
|
||||||
ArrayList<String> addedManaStrings = new ArrayList<String>();
|
ArrayList<String> addedManaStrings = new ArrayList<String>();
|
||||||
SpellAbility[] abilities = getSpellAbility();
|
SpellAbility[] abilities = getSpellAbility();
|
||||||
|
boolean primaryCost = true;
|
||||||
for(SpellAbility sa : abilities){
|
for(SpellAbility sa : abilities){
|
||||||
// only add abilities not Spell portions of cards
|
// only add abilities not Spell portions of cards
|
||||||
if(!isPermanent() || sa instanceof Spell_Permanent)
|
if (!isPermanent())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (sa instanceof Spell_Permanent && primaryCost){
|
||||||
|
// For Alt costs, make sure to display the cost!
|
||||||
|
primaryCost = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
String sAbility = sa.toString();
|
String sAbility = sa.toString();
|
||||||
|
|
||||||
if (sa instanceof Ability_Mana){
|
if (sa instanceof Ability_Mana){
|
||||||
@@ -1096,8 +1103,14 @@ public class Card extends MyObservable {
|
|||||||
addedManaStrings.add(sAbility);
|
addedManaStrings.add(sAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(sAbility);
|
if (sa instanceof Spell_Permanent){
|
||||||
sb.append("\r\n");
|
sb.insert(0, "\r\n");
|
||||||
|
sb.insert(0, sAbility);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sb.append(sAbility);
|
||||||
|
sb.append("\r\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE:
|
// NOTE:
|
||||||
|
|||||||
Reference in New Issue
Block a user