コード例 #1
0
ファイル: ArrowsofJustice.java プロジェクト: NorthFury/jmagic
  public ArrowsofJustice(GameState state) {
    super(state);

    // Arrows of Justice deals 4 damage to target attacking or blocking
    // creature.
    Target target =
        this.addTarget(
            Intersect.instance(
                CreaturePermanents.instance(),
                Union.instance(Attacking.instance(), Blocking.instance())),
            "target attacking or blocking creature");
    this.addEffect(
        spellDealDamage(
            4,
            targetedBy(target),
            "Arrows of Justice deals 4 damage to target attacking or blocking creature."));
  }
コード例 #2
0
ファイル: MadcapSkills.java プロジェクト: ranjan-rk/jmagic
    public MadcapSkillsAbility1(GameState state) {
      super(
          state,
          "Enchanted creature gets +3/+0 and can't be blocked except by two or more creatures.");

      SetGenerator enchantedCreature = EnchantedBy.instance(This.instance());

      this.addEffectPart(modifyPowerAndToughness(enchantedCreature, +3, +0));

      SetGenerator restriction =
          Intersect.instance(
              Count.instance(Blocking.instance(enchantedCreature)), numberGenerator(1));
      ContinuousEffect.Part part =
          new ContinuousEffect.Part(ContinuousEffectType.BLOCKING_RESTRICTION);
      part.parameters.put(
          ContinuousEffectType.Parameter.RESTRICTION, Identity.instance(restriction));
      this.addEffectPart(part);
    }
コード例 #3
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);
    }
コード例 #4
0
ファイル: QuilledSliver.java プロジェクト: NorthFury/jmagic
    public SliverPing(GameState state) {
      super(state, "(T): This permanent deals 1 damage to target attacking or blocking creature.");

      this.costsTap = true;

      Target target =
          this.addTarget(
              Intersect.instance(
                  CreaturePermanents.instance(),
                  Union.instance(Attacking.instance(), Blocking.instance())),
              "target attacking or blocking creature");

      this.addEffect(
          permanentDealDamage(
              1,
              targetedBy(target),
              "This permanent deals 1 damage to target attacking or blocking creature."));
    }