コード例 #1
0
ファイル: PlayerCardResponses.cs プロジェクト: ll2585/LOTRLCG
    public static void sneak_attack(EventArgs args)
    {
        GameArgs      game_args          = (GameArgs)args;
        Card          card_to_respond_to = game_args.relevant_card;
        PlayerCard    the_card           = (PlayerCard)game_args.relevant_card;
        LOTRPlayer    the_player         = game_args.relevant_player;
        Action <Card> the_action         = (ally_chosen) =>
        {
            //put ally card in play. flag it with the phase.
            PlayerCard chosen_card = (PlayerCard)ally_chosen;
            chosen_card.add_flag(LOTRAbility.ABILITY_FLAGS.SNEAK_ATTACK);
            the_player.play_card(chosen_card);
        };

        game.wait_for_forced_response(card_to_respond_to: card_to_respond_to,
                                      after_responding_with_card: the_action, what_to_do_after_responding: game_args.what_to_do_after_event_or_if_no_response);
    }