Controlling 5 sites now wins you a game, defined per format.

This commit is contained in:
marcins78
2013-02-13 16:44:49 +00:00
parent ee97e301bd
commit 9aad83ee04

View File

@@ -35,7 +35,8 @@ public class WinConditionRule {
&& game.getGameState().getCurrentSiteNumber() == 9
&& !game.getModifiersQuerying().hasFlagActive(game.getGameState(), ModifierFlag.WIN_CHECK_AFTER_SHADOW_RECONCILE))
game.playerWon(game.getGameState().getCurrentPlayerId(), "Surviving to Regroup phase on site 9");
else if (game.getFormat().winOnControlling5Sites()) {
else if (game.getFormat().winOnControlling5Sites()
&& effectResults.getType() == EffectResult.Type.TAKE_CONTROL_OF_SITE) {
for (String opponent : GameUtils.getOpponents(game, game.getGameState().getCurrentPlayerId())) {
if (Filters.countActive(game.getGameState(), game.getModifiersQuerying(), CardType.SITE, Filters.siteControlled(opponent))>=5)
game.playerWon(opponent, "Controls 5 sites");