コード例 #1
0
ファイル: Entwine.java プロジェクト: jmagicdev/jmagic
    public EntwineIncreaseModeChoices(GameState state) {
      super(state, "You may choose all modes of this spell instead of just one.");

      ContinuousEffect.Part part =
          new ContinuousEffect.Part(ContinuousEffectType.ADD_CHOOSABLE_NUMBER_OF_MODES);
      part.parameters.put(ContinuousEffectType.Parameter.OBJECT, This.instance());
      part.parameters.put(ContinuousEffectType.Parameter.NUMBER, Empty.instance());
      this.addEffectPart(part);

      // This always applies
      this.canApply = NonEmpty.instance();
    }
コード例 #2
0
ファイル: Flash.java プロジェクト: NorthFury/jmagic
    public FlashAbility(GameState state) {
      super(state, "You may play this card any time you could play an instant.");

      SetGenerator youHavePriority =
          Intersect.instance(You.instance(), PlayerWithPriority.instance());

      ContinuousEffect.Part part = new ContinuousEffect.Part(ContinuousEffectType.MAY_PLAY_TIMING);
      part.parameters.put(ContinuousEffectType.Parameter.OBJECT, This.instance());
      part.parameters.put(
          ContinuousEffectType.Parameter.PERMISSION,
          Identity.instance(new PlayPermission(youHavePriority)));
      this.addEffectPart(part);

      this.canApply = NonEmpty.instance();
    }
コード例 #3
0
ファイル: BlasphemousAct.java プロジェクト: NorthFury/jmagic
    public BlasphemousActAbility0(GameState state) {
      super(state, "Blasphemous Act costs (1) less to cast for each creature on the battlefield.");

      ContinuousEffect.Part part =
          new ContinuousEffect.Part(ContinuousEffectType.MANA_COST_REDUCTION);
      part.parameters.put(ContinuousEffectType.Parameter.OBJECT, This.instance());
      part.parameters.put(
          ContinuousEffectType.Parameter.NUMBER, Count.instance(CreaturePermanents.instance()));
      part.parameters.put(
          ContinuousEffectType.Parameter.COST, Identity.instance(new ManaPool("(1)")));
      this.addEffectPart(part);

      // doesn't union with this.canApply since it completely changes when
      // it applies
      this.canApply = NonEmpty.instance();
    }
コード例 #4
0
    public ResoundingTrigger(GameState state) {
      super(
          state,
          "When you cycle Resounding Thunder, it deals 6 damage to target creature or player.");

      this.canTrigger = NonEmpty.instance();

      this.addPattern(whenYouCycleThis());

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

      this.addEffect(
          permanentDealDamage(
              6,
              targetedBy(target),
              "Resounding Thunder deals 6 damage to target creature or player."));
    }