Example #1
0
    public EnergyFluxAbility0(GameState state) {
      super(
          state,
          "All artifacts have \"At the beginning of your upkeep, sacrifice this artifact unless you pay (2).\"");

      this.addEffectPart(
          addAbilityToObject(ArtifactPermanents.instance(), ThisArtifactKindOfSucksNow.class));
    }
    public DarksteelCDA(GameState state) {
      super(
          state,
          "Darksteel Juggernaut's power and toughness are each equal to the number of artifacts you control.",
          Characteristics.Characteristic.POWER,
          Characteristics.Characteristic.TOUGHNESS);

      SetGenerator count =
          Count.instance(
              Intersect.instance(
                  ArtifactPermanents.instance(), ControlledBy.instance(You.instance())));

      this.addEffectPart(setPowerAndToughness(This.instance(), count, count));
    }
Example #3
0
  public FracturingGust(GameState state) {
    super(state);

    // Destroy all artifacts and enchantments.
    EventFactory destroy =
        destroy(
            Union.instance(ArtifactPermanents.instance(), EnchantmentPermanents.instance()),
            "Destroy artifacts and enchantments.");
    this.addEffect(destroy);

    // You gain 2 life for each permanent destroyed this way.
    SetGenerator X = Count.instance(NewObjectOf.instance(EffectResult.instance(destroy)));
    this.addEffect(
        gainLife(
            You.instance(),
            Multiply.instance(numberGenerator(2), X),
            "You gain 2 life for each permanent destroyed this way."));
  }
    public TezzeretAgentofBolasAbility1(GameState state) {
      super(
          state,
          -1,
          "Target artifact becomes an artifact creature with base power and toughness 5/5.");

      SetGenerator target =
          targetedBy(this.addTarget(ArtifactPermanents.instance(), "target artifact"));

      Animator animate = new Animator(target, 5, 5);
      animate.addType(Type.ARTIFACT);
      animate.removeOldTypes();
      this.addEffect(
          createFloatingEffect(
              Empty.instance(),
              "Target artifact becomes an artifact creature with base power and toughness 5/5.",
              animate.getParts()));
    }
    public TezzeretAgentofBolasAbility2(GameState state) {
      super(
          state,
          -4,
          "Target player loses X life and you gain X life, where X is twice the number of artifacts you control.");

      SetGenerator target = targetedBy(this.addTarget(Players.instance(), "target player"));

      SetGenerator X =
          Multiply.instance(
              numberGenerator(2),
              Count.instance(
                  Intersect.instance(
                      ArtifactPermanents.instance(), ControlledBy.instance(You.instance()))));

      EventFactory loseLife = loseLife(target, X, "Target player loses X life");
      EventFactory gainLife =
          gainLife(
              You.instance(),
              X,
              "and you gain X life, where X is twice the number of artifacts you control.");
      this.addEffect(simultaneous(loseLife, gainLife));
    }