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,10 +1083,17 @@ public class Card extends MyObservable {
|
||||
|
||||
ArrayList<String> addedManaStrings = new ArrayList<String>();
|
||||
SpellAbility[] abilities = getSpellAbility();
|
||||
boolean primaryCost = true;
|
||||
for(SpellAbility sa : abilities){
|
||||
// only add abilities not Spell portions of cards
|
||||
if(!isPermanent() || sa instanceof Spell_Permanent)
|
||||
continue;
|
||||
if (!isPermanent())
|
||||
continue;
|
||||
|
||||
if (sa instanceof Spell_Permanent && primaryCost){
|
||||
// For Alt costs, make sure to display the cost!
|
||||
primaryCost = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
String sAbility = sa.toString();
|
||||
|
||||
@@ -1096,8 +1103,14 @@ public class Card extends MyObservable {
|
||||
addedManaStrings.add(sAbility);
|
||||
}
|
||||
|
||||
sb.append(sAbility);
|
||||
sb.append("\r\n");
|
||||
if (sa instanceof Spell_Permanent){
|
||||
sb.insert(0, "\r\n");
|
||||
sb.insert(0, sAbility);
|
||||
}
|
||||
else{
|
||||
sb.append(sAbility);
|
||||
sb.append("\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE:
|
||||
|
||||
Reference in New Issue
Block a user