- Better ranking system for damaging planeswalkers directly (accounts for loyalty and closeness to ultimate for now).

This commit is contained in:
Agetian
2018-04-16 21:31:49 +03:00
parent 3344453253
commit 2c9b23fc6d
2 changed files with 48 additions and 1 deletions

View File

@@ -94,6 +94,15 @@ public class Cost implements Serializable {
return true;
}
public <T extends CostPart> T getCostPart(Class<T> costType) {
for (CostPart p : getCostParts()) {
if (costType.isInstance(p)) {
return (T)p;
}
}
return null;
}
/**
* Gets the cost parts.
*