Example #1
0
    public GolemFoundryAbility0(GameState state) {
      super(
          state,
          "Whenever you cast an artifact spell, you may put a charge counter on Golem Foundry.");

      SimpleEventPattern pattern = new SimpleEventPattern(EventType.BECOMES_PLAYED);
      pattern.put(EventType.Parameter.PLAYER, You.instance());
      pattern.withResult(HasType.instance(Type.ARTIFACT));
      this.addPattern(pattern);

      this.addEffect(
          youMay(
              putCounters(
                  1,
                  Counter.CounterType.CHARGE,
                  ABILITY_SOURCE_OF_THIS,
                  "Put a charge counter on Golem Foundry."),
              "You may put a charge counter on Golem Foundry."));
    }