mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user