Skip to content

Commit

Permalink
if action requires exactly one target, perform action directly (see #61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Aug 23, 2015
1 parent 335bace commit c34fa4b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game_board/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ function GameboardController(CardshifterServerAPI, $scope, $timeout, $rootScope,
selected.splice(index, 1);
entity.selected = false;
}

// if action requires exactly one target, perform action when target is chosen
if ($scope.targetsMessage.min === 1 && $scope.targetsMessage.max === 1) {
$scope.performAction();
}
}


Expand Down

0 comments on commit c34fa4b

Please sign in to comment.