@Override public String toString() { return "Color(" + color.toString() + ')'; } }
@Override public String toString() { return objectColorCurrent.toString(); }
private String tokenDescriptor() { String strName = this.name.replaceAll("[^a-zA-Z0-9]", ""); String strColor = this.color.toString().replaceAll("[^a-zA-Z0-9]", ""); String strSubtype = this.subtype.toString().replaceAll("[^a-zA-Z0-9]", ""); String strCardType = this.cardType.toString().replaceAll("[^a-zA-Z0-9]", ""); String descriptor = strName + '.' + strColor + '.' + strSubtype + '.' + strCardType + '.' + this.power + '.' + this.toughness; descriptor = descriptor.toUpperCase(Locale.ENGLISH); return descriptor; }
@Override public Mana produceMana(boolean netMana, Game game, Ability source) { ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); if (color != null) { return new Mana(ColoredManaSymbol.lookup(color.toString().charAt(0))); } else { return null; } }
@Override public Mana produceMana(boolean netMana, Game game, Ability source) { ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); if (color != null) { return new Mana(ColoredManaSymbol.lookup(color.toString().charAt(0))); } else { return null; } }
@Override public Mana produceMana(boolean netMana, Game game, Ability source) { ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); if (color != null) { return new Mana(ColoredManaSymbol.lookup(color.toString().charAt(0))); } else { return null; } }
switch (param) { case PARAM_COLOR_COST: resInfo.add(card.getColor(game).toString()); break; case PARAM_COLOR_COMMANDER:
sb.append('\n').append(card.getColor().toString());
sb.append('\n').append(card.getColor().toString());
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(controllerId)) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); if (permanent != null && permanent.isLand()) { ObjectColor color = (ObjectColor) game.getState().getValue(this.sourceId + "_color"); if (color != null && event.getData().contains(color.toString())) { return true; } } } return false; }
sb.append(this.view.getToughness()); sb.append(this.view.getLoyalty()); sb.append(this.view.getColor().toString()); sb.append(this.view.getExpansionSetCode()); for (CardType type : this.view.getCardTypes()) {
public GainProtectionFromColorTargetEffect(Duration duration, ObjectColor protectColor) { super(new ProtectionAbility(new FilterCard()), duration); choice = new ChoiceColor(true, "Choose a color to gain protection against it"); if (protectColor != null) { choice.setChoice(protectColor.toString()); } }
drawBasicManaSymbol(g, x + w / 2 - 9 * h / 8 + 1, y - 3 * h / 4, 9 * h / 4, 9 * h / 4, ((TextboxBasicManaRule) allRules.get(0)).getBasicManaSymbol()); } else { drawBasicManaSymbol(g, x + w / 2 - h - h / 8, y - 3 * h / 4, 9 * h / 4, 9 * h / 4, cardView.getFrameColor().toString()); drawBasicManaSymbol(g, x + w / 2 - h - h / 8, y - 3 * h / 4, 9 * h / 4, 9 * h / 4, cardView.getFrameColor().toString());
sb.append('\n').append(permanent.getOriginal().getColor().toString());
@Override public String getInfoMessage(Ability source, GameEvent event, Game game) { ObjectColor chosenColor = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null && chosenColor != null) { return "You can't cast " + chosenColor.toString() + " spells (" + mageObject.getIdName() + ")."; } return null; }
@Override public void init(Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return; } if (setColor == null) { ChoiceColor choice = new ChoiceColor(); if (!controller.choose(Outcome.PutManaInPool, choice, game)) { discard(); return; } setColor = choice.getColor(); if (!game.isSimulation()) { game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString()); } } super.init(source, game); }
@Override public void init(Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return; } if (setColor == null) { ChoiceColor choice = new ChoiceColor(); if (!controller.choose(Outcome.PutManaInPool, choice, game)) { discard(); return; } setColor = choice.getColor(); if (!game.isSimulation()) { game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString()); } } super.init(source, game); //To change body of generated methods, choose Tools | Templates. }
@Override public void init(Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return; } if (setColor == null) { ChoiceColor choice = new ChoiceColor(); if (!controller.choose(Outcome.PutManaInPool, choice, game)) { discard(); return; } setColor = choice.getColor(); if (!game.isSimulation()) { game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString()); } } super.init(source, game); //To change body of generated methods, choose Tools | Templates. }
this.frameColor = card.getFrameColor(null).toString(); this.variousArt = card.getUsesVariousArt(); this.blue = card.getColor(null).isBlue();
@Override public Mana produceMana(boolean netMana, Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); ChoiceColor choice = new ChoiceColor(true); if (controller != null && controller.choose(outcome, choice, game)) { Mana chosenMana = new Mana(); switch (choice.getColor().toString()) { case "R": chosenMana.setRed(1); break; case "U": chosenMana.setBlue(1); break; case "W": chosenMana.setWhite(1); break; case "B": chosenMana.setBlack(1); break; case "G": chosenMana.setGreen(1); break; } return chosenMana; } return null; }