load("@rules_cc//cc:defs.bzl", "cc_library")
load("//tools:copts.bzl", "COPTS")

cc_library(
    name = "challenge_duel_command",
    srcs = ["ChallengeDuelCommand.cpp"],
    hdrs = ["ChallengeDuelCommand.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library/command_factories:__pkg__",
        "//src/test/cpp/net/eagle0/shardok/library/commands/challenge_duel_command:__pkg__",
    ],
    deps = [
        ":duel_utils",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:action_result_flatbuffer_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "duel_utils",
    srcs = ["DuelUtils.cpp"],
    hdrs = ["DuelUtils.hpp"],
    copts = COPTS,
    visibility = [
        "//src/test/cpp/net/eagle0/shardok/library/commands/challenge_duel_command:__pkg__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:percentile_roll_odds",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/util:combat_utils",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:unit_filter",
    ],
)
