mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Nethroi (IKO)
This commit is contained in:
committed by
Anthony Calosa
parent
47fcd88366
commit
d7f0665bae
@@ -212,6 +212,20 @@ public final class InputSelectTargets extends InputSyncronizedBase {
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("MaxTotalTargetPower")) {
|
||||
int maxTotalPower = tgt.getMaxTotalPower(sa.getHostCard(), sa);
|
||||
if (maxTotalPower > 0) {
|
||||
int soFar = Aggregates.sum(sa.getTargets().getTargetCards(), CardPredicates.Accessors.fnGetNetPower);
|
||||
if (!sa.isTargeting(card)) {
|
||||
soFar += card.getNetPower();
|
||||
}
|
||||
if (soFar > maxTotalPower) {
|
||||
showMessage(sa.getHostCard() + " - Cannot target this card (power limit exceeded)");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If all cards must have different controllers
|
||||
if (tgt.isDifferentControllers()) {
|
||||
final List<Player> targetedControllers = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user