Region number calculation.

This commit is contained in:
marcins78@gmail.com
2012-03-06 16:59:40 +00:00
parent 7e97908659
commit b8de3ee71a
2 changed files with 2 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ public class Card17_105 extends AbstractPermanent {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
PhysicalCard mountDoom = Filters.findFirstActive(gameState, modifiersQuerying, Filters.name("Mount Doom"));
return mountDoom != null && ((mountDoom.getSiteNumber() - 1) / 3) == GameUtils.getRegion(gameState);
return mountDoom != null && (1 + ((mountDoom.getSiteNumber() - 1) / 3)) == GameUtils.getRegion(gameState);
}
}), -2));
return modifiers;

View File

@@ -93,6 +93,6 @@ public class GameUtils {
}
public static int getRegion(GameState gameState) {
return (gameState.getCurrentSiteNumber() - 1) / 3;
return 1 + ((gameState.getCurrentSiteNumber() - 1) / 3);
}
}