Added Standard Bearer, Coalition Flag and Coalition Honor Guard.

This commit is contained in:
LevelX2 2016-10-15 09:33:42 +02:00
parent a74e0c2ed3
commit a402d9fa1f
2 changed files with 5 additions and 2 deletions

View file

@ -65,8 +65,9 @@ public class TargetsHaveToTargetPermanentIfAbleEffect extends ContinuousRuleModi
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
Player targetingPlayer = game.getPlayer(event.getPlayerId());
if (controller != null
&& controller.isHuman() // TODO: This target handling does only work for non AI players so AI logic
&& targetingPlayer.isHuman() // TODO: This target handling does only work for non AI players so AI logic
&& controller.hasOpponent(event.getPlayerId(), game)) {
StackObject stackObject = game.getStack().getStackObject(event.getSourceId());
if (stackObject.isCopy()) {

View file

@ -95,6 +95,7 @@ public class Targets extends ArrayList<Target> {
if (!canChoose(source.getSourceId(), playerId, game)) {
return false;
}
int state = game.bookmarkState();
while (!isChosen()) {
Target target = this.getUnchosen().get(0);
UUID targetController = playerId;
@ -110,7 +111,8 @@ public class Targets extends ArrayList<Target> {
// Check if there are some rules for targets are violated, if so reset the targets and start again
if (this.getUnchosen().isEmpty()
&& game.replaceEvent(new GameEvent(GameEvent.EventType.TARGETS_VALID, source.getSourceId(), source.getSourceId(), source.getControllerId()), source)) {
this.clearChosen();
game.restoreState(state, "Targets");
clearChosen();
}
}
}