Fixed Crew Ability

This commit is contained in:
Styxo 2016-09-21 21:05:37 +02:00
parent b6f71f3621
commit 935a51c4da

View file

@ -122,7 +122,10 @@ class CrewCost extends CostImpl {
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
int sumPower = 0;
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, controllerId, game)) {
sumPower += permanent.getPower().getValue();
int powerToAdd = permanent.getPower().getValue();
if (powerToAdd > 0) {
sumPower += powerToAdd;
}
if (sumPower >= value) {
return true;
}