@Override public MageObject getEmblem(UUID objectId) { if (objectId == null) { return null; } for (CommandObject commandObject : state.getCommand()) { if (commandObject.getId().equals(objectId)) { return commandObject; } } return null; }
@Override public boolean apply(Game game, Ability source) { Iterator<CommandObject> commandZone = game.getState().getCommand().iterator(); while (commandZone.hasNext()) { UUID thing = commandZone.next().getId(); if (thing.equals(source.getSourceId())) { return true; } } return (game.getPermanent(source.getSourceId()) != null); }
public void addCommandObject(CommandObject commandObject) { getCommand().add(commandObject); setZone(commandObject.getId(), Zone.COMMAND); for (Ability ability : commandObject.getAbilities()) { addAbility(ability, commandObject); } }
return object; for (CommandObject commandObject : state.getCommand()) { if (commandObject instanceof Commander && commandObject.getId().equals(objectId)) { return commandObject; for (CommandObject commandObject : state.getCommand()) { if (commandObject.getId().equals(objectId)) { return commandObject;
sb.append(state.getCombat()); sb.append("<br>getCommand: "); sb.append(state.getCommand()); sb.append("<br>getContinuousEffects: "); sb.append(state.getContinuousEffects());
for (CommandObject commandObject : state.getCommand()) { if (commandObject.getId().equals(objectId)) { return commandObject;
@Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { Player player = game.getPlayer(controllerId); Card card = player.getHand().get(ability.getSourceId(), game); if (card == null && commander && player.getCommandersIds().contains(ability.getSourceId())) { for (CommandObject coj : game.getState().getCommand()) { if (coj != null && coj.getId().equals(ability.getSourceId())) { card = game.getCard(ability.getSourceId()); break; } } } if (card != null) { Cards cards = new CardsImpl(card); player.revealCards("Ninjutsu", cards, game); paid = true; return paid; } return false; }
for (CommandObject cobject : game.getState().getCommand()) { if (cobject instanceof Plane) { game.getState().addSeenPlane((Plane) cobject, game, id); game.getState().getCommand().remove(cobject); break;
for (Iterator<CommandObject> it = this.getState().getCommand().iterator(); it.hasNext(); ) { CommandObject obj = it.next(); if (obj.isControlledBy(playerId)) {
for (CommandObject commandObject : game.getState().getCommand()) { for (ActivatedAbility ability : commandObject.getAbilities().getActivatedAbilities(Zone.COMMAND)) { if (ability.isControlledBy(getId()) && canPlay(ability, availableMana, game.getObject(ability.getSourceId()), game)) {
for (CommandObject commandObject : game.getState().getCommand()) { if (commandObject instanceof Emblem) { Emblem emblem = (Emblem) commandObject;
for (CommandObject commandObject : game.getState().getCommand()) { if (commandObject.getId().equals(objectId)) { lkiObject = commandObject; removed = game.getState().getCommand().remove((CommandObject) lkiObject);
for (CommandObject cobject : state.getCommand()) { if (cobject instanceof Plane) { return false;
for (CommandObject commandObject : game.getState().getCommand()) { if (commandObject instanceof Commander) { if (commandObject.isControlledBy(controller.getId())) {
for (CommandObject commandObject : game.getState().getCommand()) { commandObject.getColor(game).setColor(colorless);
for (CommandObject commandObject : game.getState().getCommand()) { if (commandObject instanceof Commander) { commandObject.getColor(game).addColor(color);