Package mage

Examples of mage.ObjectColor


  }

  public FilterObject(String name) {
    super(name);
    abilities = new AbilitiesImpl<Ability>();
    color = new ObjectColor();
  }
View Full Code Here


    this.toughness = "";
    this.loyalty = "";
    this.cardTypes = new ArrayList<CardType>();
    this.subTypes = new ArrayList<String>();
    this.superTypes = new ArrayList<String>();
    this.color = new ObjectColor();
    this.manaCost = ability.getManaCosts().getSymbols();
    this.art = "";
  }
View Full Code Here

  public ChoiceColor copy() {
    return new ChoiceColor(this);
  }

  public ObjectColor getColor() {
    ObjectColor color = new ObjectColor();
    if (choice.equals("Black"))
      color.setBlack(true);
    else if (choice.equals("Blue"))
      color.setBlue(true);
    else if (choice.equals("Green"))
      color.setGreen(true);
    else if (choice.equals("Red"))
      color.setRed(true);
    else if (choice.equals("White"))
      color.setWhite(true);
    return color;
  }
View Full Code Here

                            } else {
                                ability.getCosts().add(cost.copy());
                            }
                        }
                        // change spell colors
                        ObjectColor spellColor = spell.getColor();
                        spellColor.setBlack(false);
                        spellColor.setRed(false);
                        spellColor.setGreen(false);
                        spellColor.setWhite(false);
                        spellColor.setBlue(false);
                    } else {
                        spell.setFaceDown(false);
                    }
                }
            }
View Full Code Here

   
    public static void setPermanentToMorph(Permanent permanent) {
        permanent.getPower().initValue(2);
        permanent.getToughness().initValue(2);
        permanent.getAbilities().clear();
        permanent.getColor().setColor(new ObjectColor());
        permanent.setName("");
        permanent.getCardType().clear();
        permanent.getCardType().add(CardType.CREATURE);
        permanent.getSubtype().clear();
        permanent.getSupertype().clear();
View Full Code Here

                    permanent.getCardType().add(CardType.CREATURE);
                    permanent.getSubtype().clear();
                    permanent.getManaCost().clear();
                    break;
                case ColorChangingEffects_5:
                    permanent.getColor().setColor(new ObjectColor());
                    break;
                case AbilityAddingRemovingEffects_6:
                    Card card = game.getCard(permanent.getId()); // 
                    List<Ability> abilities = new ArrayList<>();
                    for (Ability ability : permanent.getAbilities()) {
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        boolean result = false;
        ObjectColor objectColor = null;
        if (setColor == null) {
            ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
            if (choice != null && choice.getColor() != null) {
                objectColor = choice.getColor();
            }           
View Full Code Here

        super(effect);
    }

    @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.getLogName() + ").";
        }
        return null;
    }
View Full Code Here

    @Override
    public boolean applies(GameEvent event, Ability source, Game game) {
        if (event.getType() == GameEvent.EventType.CAST_SPELL) {
            if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId()) ) {
                ObjectColor chosenColor = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color");
                Card card = game.getCard(event.getSourceId());
                if (chosenColor != null && card != null && card.getColor().contains(chosenColor)) {
                    return true;
                }
            }
View Full Code Here

    public boolean usesVariousArt() {
        return Character.isDigit(className.charAt(className.length() - 1));
    }

    public ObjectColor getColor() {
        ObjectColor color = new ObjectColor();
        color.setBlack(black);
        color.setBlue(blue);
        color.setGreen(green);
        color.setRed(red);
        color.setWhite(white);
        return color;
    }
View Full Code Here

TOP

Related Classes of mage.ObjectColor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.