forked from External/mage
* Performance: memory usage optimization for deck editor (part 2 of removed bloated usage of ManaCosts -> ManaColor objects, see #7515);
This commit is contained in:
parent
c1dea5b21e
commit
10e557b873
25 changed files with 164 additions and 113 deletions
|
|
@ -22,6 +22,7 @@ import mage.target.targetadjustment.TargetAdjuster;
|
|||
import mage.watchers.Watcher;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageIdentifier;
|
||||
|
|
@ -123,6 +124,14 @@ public interface Ability extends Controllable, Serializable {
|
|||
*/
|
||||
ManaCosts<ManaCost> getManaCosts();
|
||||
|
||||
default List<String> getManaCostSymbols() {
|
||||
List<String> symbols = new ArrayList<>();
|
||||
for (ManaCost cost : getManaCosts()) {
|
||||
symbols.add(cost.getText());
|
||||
}
|
||||
return symbols;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the {@link ManaCosts} that must be paid before activating this
|
||||
* ability. These costs should be modified by any modification effects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue