Ejemplo n.º 1
0
 @Override
 public boolean hasSubtype(String value) {
   if (value == null) {
     return false;
   }
   if (this.subtype.contains(value)) {
     return true;
   } else { // checking for Changeling
     // first make sure input parameter is not creature type
     // if so, then ChangelingAbility doesn't matter
     if (value.equals("Mountain")
         || value.equals("Island")
         || value.equals("Plains")
         || value.equals("Forest")
         || value.equals("Swamp")
         || value.equals("Aura")
         || value.equals("Equipment")
         || value.equals("Fortification")
         || value.equals("Shrine")) {
       return false;
     }
     // as it is creature subtype, then check the existence of Changeling
     return abilities.contains(ChangelingAbility.getInstance())
         || this.subtype.contains(ChangelingAbility.ALL_CREATURE_TYPE);
   }
 }
Ejemplo n.º 2
0
 @Override
 public boolean hasSubtype(String value, Game game) {
   if (value == null) {
     return false;
   }
   List<String> subtypes = this.getSubtype(game);
   if (subtypes.contains(value)) {
     return true;
   } else {
     // checking for Changeling
     // first make sure input parameter is a creature subtype
     // if not, then ChangelingAbility doesn't matter
     if (CardUtil.isNonCreatureSubtype(value)) {
       return false;
     }
     // as it is creature subtype, then check the existence of Changeling
     return abilities.contains(ChangelingAbility.getInstance())
         || subtypes.contains(ChangelingAbility.ALL_CREATURE_TYPE);
   }
 }