示例#1
0
    public TidehollowScullerAbility1(GameState state) {
      super(
          state,
          "When Tidehollow Sculler leaves the battlefield, return the exiled card to its owner's hand.");
      this.addPattern(whenThisLeavesTheBattlefield());

      this.getLinkManager().addLinkClass(TidehollowScullerAbility0.class);
      SetGenerator exiledCard = ChosenFor.instance(LinkedTo.instance(This.instance()));

      EventFactory move =
          new EventFactory(EventType.MOVE_OBJECTS, "Return the exiled card to its owner's hand.");
      move.parameters.put(EventType.Parameter.CAUSE, This.instance());
      move.parameters.put(EventType.Parameter.TO, HandOf.instance(OwnerOf.instance(exiledCard)));
      move.parameters.put(EventType.Parameter.OBJECT, exiledCard);
      this.addEffect(move);
    }
示例#2
0
    public TheLordGivethBack(GameState state) {
      super(
          state,
          "When Journey to Nowhere leaves the battlefield, return the exiled card to the battlefield under its owner's control.");
      this.addPattern(whenThisLeavesTheBattlefield());

      SetGenerator exiledCard = ChosenFor.instance(LinkedTo.instance(This.instance()));

      EventFactory returnCard =
          new EventFactory(
              EventType.PUT_ONTO_BATTLEFIELD,
              "Return the exiled card to the battlefield under its owner's control.");
      returnCard.parameters.put(EventType.Parameter.CAUSE, This.instance());
      returnCard.parameters.put(EventType.Parameter.CONTROLLER, OwnerOf.instance(exiledCard));
      returnCard.parameters.put(EventType.Parameter.OBJECT, exiledCard);
      this.addEffect(returnCard);

      this.getLinkManager().addLinkClass(TheLordTakethAway.class);
    }