Ejemplo n.º 1
0
  public BeastbreakerOfBalaGed(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.CREATURE}, "{1}{G}");
    this.subtype.add("Human");
    this.subtype.add("Warrior");

    this.color.setGreen(true);
    this.power = new MageInt(2);
    this.toughness = new MageInt(2);

    // Level up {2}{G} ({2}{G}: Put a level counter on this. Level up only as a sorcery.)
    this.addAbility(new LevelUpAbility(new ManaCostsImpl("{2}{G}")));

    Abilities<Ability> levelAbilities = new AbilitiesImpl<Ability>();
    levelAbilities.add(TrampleAbility.getInstance());

    this.addAbilities(
        LevelerCardBuilder.construct(
            // LEVEL 1-3
            //      4/4
            new LevelerCardBuilder.LevelAbility(1, 3, new AbilitiesImpl<Ability>(), 4, 4),
            // LEVEL 1-3
            //      4/4
            //      Trample
            new LevelerCardBuilder.LevelAbility(4, -1, levelAbilities, 6, 6)));
    setMaxLevelCounters(4);
  }
Ejemplo n.º 2
0
 @Override
 public boolean hasAbility(UUID abilityId, Game game) {
   if (this.getAbilities().containsKey(abilityId)) {
     return true;
   }
   Abilities<Ability> otherAbilities = game.getState().getAllOtherAbilities(getId());
   return otherAbilities != null && otherAbilities.containsKey(abilityId);
 }
Ejemplo n.º 3
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.º 4
0
 public Token(
     String name,
     String description,
     ObjectColor color,
     List<String> subtype,
     int power,
     int toughness,
     Abilities abilities) {
   this(name, description);
   this.cardType.add(CardType.CREATURE);
   this.color = color.copy();
   this.subtype = subtype;
   this.power.setValue(power);
   this.toughness.setValue(toughness);
   if (abilities != null) {
     this.abilities = abilities.copy();
   }
 }
Ejemplo n.º 5
0
Archivo: Token.java Proyecto: royk/mage
 public Token(
     String name,
     String description,
     ObjectColor color,
     List<String> subtype,
     int power,
     int toughness,
     Abilities<Ability> abilities) {
   this(name, description);
   this.cardType.add(CardType.CREATURE);
   this.color = color.copy();
   this.subtype = subtype;
   this.power.modifyBaseValue(power);
   this.toughness.modifyBaseValue(toughness);
   if (abilities != null) {
     this.abilities = abilities.copy();
   }
   this.expansionSetCodeChecked = false;
 }
Ejemplo n.º 6
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);
   }
 }