Package mage.abilities.keyword

Examples of mage.abilities.keyword.ProtectionAbility


public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect {

  FilterCard protectionFilter;

  public GainProtectionFromColorTargetEffect(Duration duration) {
    super(new ProtectionAbility(new FilterCard()), duration);
    protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter();
    protectionFilter.setUseColor(true);
  }
View Full Code Here


    this.addAbility(FlyingAbility.getInstance());
    this.addAbility(FirstStrikeAbility.getInstance());
    this.addAbility(LifelinkAbility.getInstance());
    FilterPermanent filter1 = new FilterCreaturePermanent("Demon");
    filter1.getSubtype().add("Demon");
    this.addAbility(new ProtectionAbility(filter1));
    FilterPermanent filter2 = new FilterCreaturePermanent("Dragon");
    filter2.getSubtype().add("Dragon");
    this.addAbility(new ProtectionAbility(filter2));
  }
View Full Code Here

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

    this.addAbility(FirstStrikeAbility.getInstance());
    this.addAbility(new ProtectionAbility(filter));
  }
View Full Code Here

    this.addAbility(FirstStrikeAbility.getInstance());
    FilterCard filter = new FilterCard("Black");
    filter.setUseColor(true);
    filter.getColor().setBlack(true);
    this.addAbility(new ProtectionAbility(filter));
  }
View Full Code Here

    this.toughness = new MageInt(3);

    FilterCard filter1 = new FilterCard("Blue");
    filter1.setUseColor(true);
    filter1.getColor().setBlue(true);
    this.addAbility(new ProtectionAbility(filter1));
    FilterCard filter2 = new FilterCard("Black");
    filter2.setUseColor(true);
    filter2.getColor().setBlack(true);
    this.addAbility(new ProtectionAbility(filter2));
    this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantCounterSourceEffect()));
  }
View Full Code Here

        this.color.setWhite(true);
        this.subtype.add("Human");
        this.subtype.add("Scout");
        this.power = new MageInt(2);
  this.toughness = new MageInt(2);
        this.addAbility(new ProtectionAbility(filter));
    }
View Full Code Here

        this.color.setBlue(true);
        this.subtype.add("Vedalken");
        this.subtype.add("Scout");
        this.power = new MageInt(2);
  this.toughness = new MageInt(2);
        this.addAbility(new ProtectionAbility(filter));
    }
View Full Code Here

        this.color.setBlue(true);
        this.subtype.add("Zombie");
        this.subtype.add("Scout");
        this.power = new MageInt(2);
  this.toughness = new MageInt(2);
        this.addAbility(new ProtectionAbility(filter));
    }
View Full Code Here

  }

  FilterCard filter2;

  public BraveTheElementsEffect() {
    super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1);
    filter2 = (FilterCard)((ProtectionAbility)ability).getFilter();
    filter2.setUseColor(true);
  }
View Full Code Here

  @Override
  public boolean apply(Game game, Ability source) {
    ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
    filter2.setColor(choice.getColor());
    filter2.setMessage(choice.getChoice());
    ability = new ProtectionAbility(new FilterCard(filter2));
    return super.apply(game, source);
  }
View Full Code Here

TOP

Related Classes of mage.abilities.keyword.ProtectionAbility

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.