Example #1
0
  void assignMissingFields() { // Most scripts do not specify color explicitly
    if (null == oracleText) {
      System.err.println(name + " has no Oracle text.");
      oracleText = "";
    }
    if (manaCost == null && color == null)
      System.err.println(name + " has neither ManaCost nor Color");
    if (color == null) color = ColorSet.fromManaCost(manaCost);

    if (keywords == null) keywords = emptyList;
    if (abilities == null) abilities = emptyList;
    if (staticAbilities == null) staticAbilities = emptyList;
    if (triggers == null) triggers = emptyList;
    if (replacements == null) replacements = emptyList;
    if (variables == null) variables = emptyMap;
    if (null == nonAbilityText) nonAbilityText = "";
  }
Example #2
0
 public ColorSet getSharedColors(final ColorSet ccOther) {
   return fromMask(getColor() & ccOther.getColor());
 }
Example #3
0
 /** this has no other colors except defined by operand. */
 public boolean hasNoColorsExcept(final ColorSet other) {
   return hasNoColorsExcept(other.getColor());
 }