Example #1
0
  public HanweirWatchkeep(UUID ownerId) {
    super(
        ownerId,
        145,
        "Hanweir Watchkeep",
        Rarity.UNCOMMON,
        new CardType[] {CardType.CREATURE},
        "{2}{R}");
    this.expansionSetCode = "ISD";
    this.subtype.add("Human");
    this.subtype.add("Warrior");
    this.subtype.add("Werewolf");

    this.canTransform = true;
    this.secondSideCard = new BaneOfHanweir(ownerId);

    this.power = new MageInt(1);
    this.toughness = new MageInt(5);

    this.addAbility(DefenderAbility.getInstance());
    // At the beginning of each upkeep, if no spells were cast last turn, transform Hanweir
    // Watchkeep.
    this.addAbility(new TransformAbility());
    TriggeredAbility ability =
        new BeginningOfUpkeepTriggeredAbility(
            new TransformSourceEffect(true), TargetController.ANY, false);
    this.addAbility(
        new ConditionalTriggeredAbility(
            ability,
            NoSpellsWereCastLastTurnCondition.getInstance(),
            TransformAbility.NO_SPELLS_TRANSFORM_RULE));
  }
Example #2
0
  public MinamoScrollkeeper(UUID ownerId) {
    super(
        ownerId,
        45,
        "Minamo Scrollkeeper",
        Rarity.COMMON,
        new CardType[] {CardType.CREATURE},
        "{1}{U}");
    this.expansionSetCode = "SOK";
    this.subtype.add("Human");
    this.subtype.add("Wizard");
    this.color.setBlue(true);
    this.power = new MageInt(2);
    this.toughness = new MageInt(3);

    // Defender (This creature can't attack.)
    this.addAbility(DefenderAbility.getInstance());

    // Your maximum hand size is increased by one.
    this.addAbility(
        new SimpleStaticAbility(
            Constants.Zone.BATTLEFIELD,
            new MaximumHandSizeControllerEffect(
                1, Duration.WhileOnBattlefield, HandSizeModification.INCREASE)));
  }
Example #3
0
  public DirgurNemesis(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.CREATURE}, "{5}{U}");
    this.subtype.add("Serpent");
    this.power = new MageInt(6);
    this.toughness = new MageInt(5);

    // Defender
    this.addAbility(DefenderAbility.getInstance());
    // Megamorph {6}{U}
    this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{U}"), true));
  }
  public DarettiConstructToken(String setCode) {
    super("Construct", "1/1 colorless Construct artifact creature token with defender");
    this.setOriginalExpansionSetCode(setCode);
    cardType.add(CardType.ARTIFACT);
    cardType.add(CardType.CREATURE);
    subtype.add("Construct");
    power = new MageInt(1);
    toughness = new MageInt(1);

    addAbility(DefenderAbility.getInstance());
  }
Example #5
0
  public GargoyleSentinel(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.ARTIFACT, CardType.CREATURE}, "{3}");
    this.subtype.add("Gargoyle");
    this.power = new MageInt(3);
    this.toughness = new MageInt(3);

    this.addAbility(DefenderAbility.getInstance());
    this.addAbility(
        new SimpleActivatedAbility(
            Zone.BATTLEFIELD, new GargoyleSentinelEffect(), new ManaCostsImpl("{3}")));
  }
Example #6
0
 public WallOfTanglecord(UUID ownerId, CardSetInfo setInfo) {
   super(ownerId, setInfo, new CardType[] {CardType.ARTIFACT, CardType.CREATURE}, "{2}");
   this.subtype.add("Wall");
   this.power = new MageInt(0);
   this.toughness = new MageInt(6);
   this.addAbility(DefenderAbility.getInstance());
   this.addAbility(
       new SimpleActivatedAbility(
           Zone.BATTLEFIELD,
           new GainAbilitySourceEffect(ReachAbility.getInstance(), Duration.EndOfTurn),
           new ManaCostsImpl("{G}")));
 }
Example #7
0
  public VineTrellis(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.CREATURE}, "{1}{G}");
    this.subtype.add("Plant");
    this.subtype.add("Wall");

    this.power = new MageInt(0);
    this.toughness = new MageInt(4);

    // Defender
    this.addAbility(DefenderAbility.getInstance());
    // {tap}: Add {G} to your mana pool.
    this.addAbility(new GreenManaAbility());
  }
Example #8
0
 public SteelWall(UUID ownerId) {
   super(
       ownerId,
       248,
       "Steel Wall",
       Rarity.COMMON,
       new CardType[] {CardType.ARTIFACT, CardType.CREATURE},
       "{1}");
   this.expansionSetCode = "MRD";
   this.subtype.add("Wall");
   this.power = new MageInt(0);
   this.toughness = new MageInt(4);
   this.addAbility(DefenderAbility.getInstance());
 }
Example #9
0
  public WallOfStone(UUID ownerId) {
    super(
        ownerId,
        274,
        "Wall of Stone",
        Rarity.UNCOMMON,
        new CardType[] {CardType.CREATURE},
        "{1}{R}{R}");
    this.expansionSetCode = "5ED";
    this.subtype.add("Wall");

    this.power = new MageInt(0);
    this.toughness = new MageInt(8);

    this.addAbility(DefenderAbility.getInstance());
  }
Example #10
0
    @Override
    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
      Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
      if (permanent != null) {
        Choice choice = new ChoiceImpl(true);
        choice.setMessage("Choose what " + permanent.getIdName() + " becomes to");
        choice.getChoices().add(choice33);
        choice.getChoices().add(choice22);
        choice.getChoices().add(choice16);
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
          while (!choice.isChosen()) {
            controller.choose(Outcome.Neutral, choice, game);
            if (!controller.canRespond()) {
              return false;
            }
          }
        }
        int power = 0;
        int toughness = 0;
        switch (choice.getChoice()) {
          case choice33:
            power = 3;
            toughness = 3;
            break;
          case choice22:
            power = 2;
            toughness = 2;
            game.addEffect(
                new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.Custom), source);
            break;
          case choice16:
            power = 1;
            toughness = 6;
            game.addEffect(
                new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom),
                source);
            break;
        }
        permanent.getPower().modifyBaseValue(power);
        permanent.getToughness().modifyBaseValue(toughness);
        // game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom,
        // SubLayer.SetPT_7b), source);

      }
      return false;
    }
Example #11
0
  public ReturnedPhalanx(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.CREATURE}, "{1}{B}");
    this.subtype.add("Zombie");
    this.subtype.add("Soldier");

    this.power = new MageInt(3);
    this.toughness = new MageInt(3);

    // Defender
    this.addAbility(DefenderAbility.getInstance());
    // {1}{U}: Returned Phalanx can attack this turn as though it didn't have defender.
    this.addAbility(
        new SimpleActivatedAbility(
            Zone.BATTLEFIELD,
            new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn),
            new ManaCostsImpl("{1}{U}")));
  }
Example #12
0
  public WallOfSpears(UUID ownerId) {
    super(
        ownerId,
        407,
        "Wall of Spears",
        Rarity.COMMON,
        new CardType[] {CardType.ARTIFACT, CardType.CREATURE},
        "{3}");
    this.expansionSetCode = "5ED";
    this.subtype.add("Wall");

    this.power = new MageInt(2);
    this.toughness = new MageInt(3);

    this.addAbility(DefenderAbility.getInstance());
    this.addAbility(FirstStrikeAbility.getInstance());
  }
Example #13
0
  public HornetNest(UUID ownerId) {
    super(ownerId, 177, "Hornet Nest", Rarity.RARE, new CardType[] {CardType.CREATURE}, "{2}{G}");
    this.expansionSetCode = "M15";
    this.subtype.add("Insect");

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

    // Defender
    this.addAbility(DefenderAbility.getInstance());
    // Whenever Hornet Nest is dealt damage, put that many 1/1 green Insect creature tokens with
    // flying and deathtouch onto the battlefield.
    this.addAbility(
        new DealtDamageToSourceTriggeredAbility(
            Zone.BATTLEFIELD, new HornetNestDealDamageEffect(), false));
  }
Example #14
0
  public ThrabenGargoyle(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.ARTIFACT, CardType.CREATURE}, "{1}");
    this.subtype.add("Gargoyle");
    this.power = new MageInt(2);
    this.toughness = new MageInt(2);

    this.transformable = true;
    this.secondSideCardClazz = StonewingAntagonizer.class;

    // Defender
    this.addAbility(DefenderAbility.getInstance());

    // {6}: Transform Thraben Gargoyle.
    this.addAbility(new TransformAbility());
    this.addAbility(
        new SimpleActivatedAbility(
            Zone.BATTLEFIELD, new TransformSourceEffect(true), new GenericManaCost(6)));
  }
Example #15
0
  public WallOfWonder(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.CREATURE}, "{2}{U}{U}");
    this.subtype.add("Wall");
    this.power = new MageInt(1);
    this.toughness = new MageInt(5);

    // Defender
    this.addAbility(DefenderAbility.getInstance());
    // {2}{U}{U}: Wall of Wonder gets +4/-4 until end of turn and can attack this turn as though it
    // didn't have defender.
    Ability ability =
        new SimpleActivatedAbility(
            Zone.BATTLEFIELD,
            new BoostSourceEffect(4, -4, Duration.EndOfTurn),
            new ManaCostsImpl("{2}{U}{U}"));
    ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn));
    this.addAbility(ability);
  }
Example #16
0
 @Override
 public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
   Permanent permanent = game.getPermanent(source.getSourceId());
   if (permanent != null) {
     switch (layer) {
       case AbilityAddingRemovingEffects_6:
         if (sublayer == SubLayer.NA) {
           for (Iterator<Ability> i = permanent.getAbilities().iterator(); i.hasNext(); ) {
             Ability entry = i.next();
             if (entry.getId().equals(DefenderAbility.getInstance().getId())) i.remove();
           }
           permanent.getAbilities().add(FlyingAbility.getInstance());
         }
         break;
     }
     return true;
   }
   return false;
 }
Example #17
0
  public OneEyedScarecrow(UUID ownerId) {
    super(
        ownerId,
        230,
        "One-Eyed Scarecrow",
        Rarity.COMMON,
        new CardType[] {CardType.ARTIFACT, CardType.CREATURE},
        "{3}");
    this.expansionSetCode = "ISD";
    this.subtype.add("Scarecrow");

    this.power = new MageInt(2);
    this.toughness = new MageInt(3);

    this.addAbility(DefenderAbility.getInstance());
    // Creatures with flying your opponents control get -1/-0.
    this.addAbility(
        new SimpleStaticAbility(
            Zone.BATTLEFIELD,
            new BoostAllEffect(-1, 0, Duration.WhileOnBattlefield, filter, false)));
  }
Example #18
0
  public SanctumPlowbeast(UUID ownerId) {
    super(
        ownerId,
        10,
        "Sanctum Plowbeast",
        Rarity.COMMON,
        new CardType[] {CardType.ARTIFACT, CardType.CREATURE},
        "{4}{W}{U}");
    this.expansionSetCode = "ARB";
    this.subtype.add("Beast");

    this.color.setBlue(true);
    this.color.setWhite(true);
    this.power = new MageInt(3);
    this.toughness = new MageInt(6);

    // Defender
    this.addAbility(DefenderAbility.getInstance());
    // Plainscycling {2}, islandcycling {2}
    this.addAbility(new PlainscyclingAbility(new ManaCostsImpl("{2}")));
    this.addAbility(new IslandcyclingAbility(new ManaCostsImpl("{2}")));
  }
Example #19
0
  public OpalEyeKondasYojimbo(UUID ownerId) {
    super(
        ownerId,
        17,
        "Opal-Eye, Konda's Yojimbo",
        Rarity.RARE,
        new CardType[] {CardType.CREATURE},
        "{1}{W}{W}");
    this.expansionSetCode = "BOK";
    this.supertype.add("Legendary");
    this.subtype.add("Fox");
    this.subtype.add("Samurai");
    this.color.setWhite(true);
    this.power = new MageInt(1);
    this.toughness = new MageInt(4);

    // Defender (This creature can't attack.)
    this.addAbility(DefenderAbility.getInstance());

    // Bushido 1 (When this blocks or becomes blocked, it gets +1/+1 until end of turn.)
    this.addAbility(new BushidoAbility(1));

    // {T}: The next time a source of your choice would deal damage this turn, that damage is dealt
    // to Opal-Eye, Konda's Yojimbo instead.
    Ability ability =
        new SimpleActivatedAbility(
            Zone.BATTLEFIELD, new OpalEyeKondasYojimboRedirectionEffect(), new TapSourceCost());
    ability.addTarget(new TargetSource());
    this.addAbility(ability);

    // {1}{W}: Prevent the next 1 damage that would be dealt to Opal-Eye this turn.
    this.addAbility(
        new SimpleActivatedAbility(
            Zone.BATTLEFIELD,
            new OpalEyeKondasYojimboPreventEffect(),
            new ManaCostsImpl("{1}{W}")));
  }
Example #20
0
  public AxebaneGuardian(UUID ownerId) {
    super(
        ownerId,
        115,
        "Axebane Guardian",
        Rarity.COMMON,
        new CardType[] {CardType.CREATURE},
        "{2}{G}");
    this.expansionSetCode = "RTR";
    this.subtype.add("Human");
    this.subtype.add("Druid");

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

    // Defender
    this.addAbility(DefenderAbility.getInstance());
    // {tap}: Add X mana in any combination of colors to your mana pool, where X is the number of
    // creatures with defender you control.
    this.addAbility(
        new SimpleManaAbility(
            Zone.BATTLEFIELD, new AxebaneGuardianManaEffect(), new TapSourceCost()));
  }