Merge branch 'ai-better-pw-damage' into 'master'

Better ranking system for damaging planeswalkers directly

See merge request core-developers/forge!414
This commit is contained in:
Michael Kamensky
2018-04-17 07:01:47 +00:00
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 getCostPartByType(Class<T> costType) {
for (CostPart p : getCostParts()) {
if (costType.isInstance(p)) {
return (T)p;
}
}
return null;
}
/**
* Gets the cost parts.
*