public RitualoftheReturned(GameState state) {
    super(state);

    // Exile target creature card from your graveyard.
    SetGenerator deadThings =
        Intersect.instance(
            HasType.instance(Type.CREATURE), InZone.instance(GraveyardOf.instance(You.instance())));
    SetGenerator target =
        targetedBy(
            this.addTarget(
                deadThings,
                "Put a black Zombie creature token onto the battlefield. Its power is equal to that card's power and its toughness is equal to that card's toughness."));
    EventFactory exile = exile(target, "Exile target creature card from your graveyard.");
    this.addEffect(exile);

    // Put a black Zombie creature token onto the battlefield. Its power is
    // equal to that card's power and its toughness is equal to that card's
    // toughness.
    SetGenerator thatCard = NewObjectOf.instance(EffectResult.instance(exile));
    SetGenerator power = PowerOf.instance(thatCard);
    SetGenerator toughness = ToughnessOf.instance(thatCard);
    CreateTokensFactory zombie =
        new CreateTokensFactory(
            numberGenerator(1),
            power,
            toughness,
            "Put a black Zombie creature token onto the battlefield. Its power is equal to that card's power and its toughness is equal to that card's toughness.");
    zombie.setColors(Color.BLACK);
    zombie.setSubTypes(SubType.ZOMBIE);
    this.addEffect(zombie.getEventFactory());
  }
Beispiel #2
0
  public PredatorsRapport(GameState state) {
    super(state);

    // Choose target creature you control. You gain life equal to that
    // creature's power plus its toughness.
    SetGenerator target =
        targetedBy(this.addTarget(CREATURES_YOU_CONTROL, "target creature you control"));
    this.addEffect(
        gainLife(
            You.instance(),
            Sum.instance(Union.instance(PowerOf.instance(target), ToughnessOf.instance(target))),
            "Choose target creature you control. You gain life equal to that creature's power plus its toughness."));
  }
Beispiel #3
0
  public WrackwithMadness(GameState state) {
    super(state);

    // Target creature deals damage to itself equal to its power.
    SetGenerator target =
        targetedBy(this.addTarget(CreaturePermanents.instance(), "target creature"));
    EventFactory damage =
        new EventFactory(
            EventType.DEAL_DAMAGE_EVENLY,
            "Target creature deals damage to itself equal to its power.");
    damage.parameters.put(EventType.Parameter.SOURCE, target);
    damage.parameters.put(EventType.Parameter.NUMBER, PowerOf.instance(target));
    damage.parameters.put(EventType.Parameter.TAKER, target);
    this.addEffect(damage);
  }
Beispiel #4
0
    public CappableRedrum(GameState state) {
      super(
          state,
          "When Murderous Redcap enters the battlefield, it deals damage equal to its power to target creature or player.");

      this.addPattern(whenThisEntersTheBattlefield());

      Target target = this.addTarget(CREATURES_AND_PLAYERS, "target creature or player");

      this.addEffect(
          permanentDealDamage(
              PowerOf.instance(ABILITY_SOURCE_OF_THIS),
              targetedBy(target),
              "It deals damage equal to its power to target creature or playter"));
    }
Beispiel #5
0
    public DiscipleofBolasAbility0(GameState state) {
      super(
          state,
          "When Disciple of Bolas enters the battlefield, sacrifice another creature. You gain X life and draw X cards, where X is that creature's power.");
      this.addPattern(whenThisEntersTheBattlefield());

      EventFactory sacrifice =
          sacrifice(
              You.instance(),
              1,
              RelativeComplement.instance(CREATURES_YOU_CONTROL, ABILITY_SOURCE_OF_THIS),
              "Sacrifice another creature");
      this.addEffect(sacrifice);

      SetGenerator X = PowerOf.instance(OldObjectOf.instance(EffectResult.instance(sacrifice)));

      this.addEffect(gainLife(You.instance(), X, "You gain X life"));
      this.addEffect(drawCards(You.instance(), X, "and draw X cards"));
    }