Пример #1
0
    public BigGameHunterAbility0(GameState state) {
      super(
          state,
          "When Big Game Hunter enters the battlefield, destroy target creature with power 4 or greater. It can't be regenerated.");
      this.addPattern(whenThisEntersTheBattlefield());

      SetGenerator targetable =
          Intersect.instance(
              CreaturePermanents.instance(), HasPower.instance(Between.instance(4, null)));
      SetGenerator target =
          targetedBy(this.addTarget(targetable, "target creature with power 4 or greater"));
      this.addEffects(
          bury(
              this,
              target,
              "Destroy target creature with power 4 or greater. It can't be regenerated."));
    }
Пример #2
0
    public KrakenoftheStraitsAbility0(GameState state) {
      super(
          state,
          "Creatures with power less than the number of Islands you control can't block Kraken of the Straits.");

      SetGenerator yourIslands =
          Intersect.instance(
              ControlledBy.instance(You.instance()), HasSubType.instance(SubType.ISLAND));
      SetGenerator weak =
          HasPower.instance(Between.instance(numberGenerator(0), Count.instance(yourIslands)));
      SetGenerator restriction = Intersect.instance(weak, Blocking.instance(This.instance()));

      ContinuousEffect.Part part =
          new ContinuousEffect.Part(ContinuousEffectType.BLOCKING_RESTRICTION);
      part.parameters.put(
          ContinuousEffectType.Parameter.RESTRICTION, Identity.instance(restriction));
      this.addEffectPart(part);
    }
Пример #3
0
    public EnsnaringBridgeAbility0(GameState state) {
      super(
          state,
          "Creatures with power greater than the number of cards in your hand can't attack.");

      SetGenerator numberOfCardsInYourHand =
          Count.instance(InZone.instance(HandOf.instance(You.instance())));
      SetGenerator hasPowerGreater =
          HasPower.instance(
              Between.instance(
                  Sum.instance(Union.instance(numberGenerator(1), numberOfCardsInYourHand)),
                  Empty.instance()));
      SetGenerator restriction = Intersect.instance(Attacking.instance(), hasPowerGreater);

      ContinuousEffect.Part part =
          new ContinuousEffect.Part(ContinuousEffectType.ATTACKING_RESTRICTION);
      part.parameters.put(
          ContinuousEffectType.Parameter.RESTRICTION, Identity.instance(restriction));
      this.addEffectPart(part);
    }