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

cc_library(
    name = "action_requires_hero_exception",
    srcs = [],
    hdrs = ["ActionRequiresHeroException.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [],
)

cc_library(
    name = "defensive_ambush_action",
    srcs = ["DefensiveAmbushAction.cpp"],
    hdrs = ["DefensiveAmbushAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/util:combat_utils",
    ],
)

cc_library(
    name = "end_player_setup_command",
    srcs = ["EndPlayerSetupCommand.cpp"],
    hdrs = ["EndPlayerSetupCommand.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":new_round_action",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/actions:action_requires_hero_exception",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier_with_coords",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:odds_filter",
    ],
)

cc_library(
    name = "fall_into_water_action",
    srcs = ["FallIntoWaterAction.cpp"],
    hdrs = ["FallIntoWaterAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//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:action_result_flatbuffer_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "fire_out_action",
    srcs = ["FireOutAction.cpp"],
    hdrs = ["FireOutAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:percentile_roll_odds",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:tile_modifier_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:tile_modifier_cc_fbs",
    ],
)

cc_library(
    name = "fire_spread_action",
    srcs = ["FireSpreadAction.cpp"],
    hdrs = ["FireSpreadAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:percentile_roll_odds",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:tile_modifier_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:tile_modifier_cc_fbs",
    ],
)

cc_library(
    name = "ice_adjustment_action",
    srcs = ["IceAdjustmentAction.cpp"],
    hdrs = ["IceAdjustmentAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier_with_coords",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:terrain_cc_fbs",
        "//src/main/protobuf/net/eagle0/shardok/common:terrain_cc_proto",
    ],
)

cc_library(
    name = "meteor_cast_action",
    srcs = ["MeteorCastAction.cpp"],
    hdrs = ["MeteorCastAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":fall_into_water_action",
        "//src/main/cpp/net/eagle0/shardok/library:fire_utils",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/action_result_applier",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:tile_modifier_helpers",
        "//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 = "new_round_action",
    srcs = ["NewRoundAction.cpp"],
    hdrs = ["NewRoundAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":fall_into_water_action",
        ":start_player_turn_action",
        "//src/main/cpp/net/eagle0/shardok/library:battalion_type",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/action_factories:fire_out_action_factory",
        "//src/main/cpp/net/eagle0/shardok/library/action_factories:fire_spread_action_factory",
        "//src/main/cpp/net/eagle0/shardok/library/action_factories:ice_adjustment_action_factory",
        "//src/main/cpp/net/eagle0/shardok/library/action_factories:undead_change_action_factory",
        "//src/main/cpp/net/eagle0/shardok/library/action_result_applier",
        "//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:weather_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/util:zone_of_control_calculator",
    ],
)

cc_library(
    name = "perform_undead_commands_action",
    srcs = ["PerformUndeadCommandsAction.cpp"],
    hdrs = ["PerformUndeadCommandsAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":action_requires_hero_exception",
        "//src/main/cpp/net/eagle0/shardok/library:available_commands_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:hex_map_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier_with_coords",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:odds_filter",
    ],
)

cc_library(
    name = "place_hidden_unit_command",
    srcs = ["PlaceHiddenUnitCommand.cpp"],
    hdrs = ["PlaceHiddenUnitCommand.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":action_requires_hero_exception",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier_with_coords",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/util:action_result_flatbuffer_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:odds_filter",
        "//src/main/protobuf/net/eagle0/shardok/common:terrain_cc_proto",
    ],
)

cc_library(
    name = "place_unit_command",
    srcs = ["PlaceUnitCommand.cpp"],
    hdrs = ["PlaceUnitCommand.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":action_requires_hero_exception",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier_with_coords",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/util:action_result_flatbuffer_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:odds_filter",
        "//src/main/protobuf/net/eagle0/shardok/common:terrain_cc_proto",
    ],
)

cc_library(
    name = "snow_adjustment_action",
    srcs = ["SnowAdjustmentAction.cpp"],
    hdrs = ["SnowAdjustmentAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier_with_coords",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:terrain_cc_fbs",
        "//src/main/protobuf/net/eagle0/shardok/common:terrain_cc_proto",
    ],
)

cc_library(
    name = "start_player_turn_action",
    srcs = ["StartPlayerTurnAction.cpp"],
    hdrs = ["StartPlayerTurnAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":fall_into_water_action",
        "//src/main/cpp/net/eagle0/shardok/library:battalion_type",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/action_factories:fire_out_action_factory",
        "//src/main/cpp/net/eagle0/shardok/library/action_factories:fire_spread_action_factory",
        "//src/main/cpp/net/eagle0/shardok/library/action_result_applier",
        "//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:action_result_flatbuffer_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/util:zone_of_control_calculator",
    ],
)

cc_library(
    name = "undead_frozen_action",
    srcs = ["UndeadFrozenAction.cpp"],
    hdrs = ["UndeadFrozenAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/util:action_result_flatbuffer_helpers",
    ],
)

cc_library(
    name = "undead_change_action",
    srcs = ["UndeadChangeAction.cpp"],
    hdrs = ["UndeadChangeAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/util:action_result_flatbuffer_helpers",
    ],
)

cc_library(
    name = "update_game_status_action",
    srcs = ["UpdateGameStatusAction.cpp"],
    hdrs = ["UpdateGameStatusAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//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",
        "//src/main/cpp/net/eagle0/shardok/library/util:player_utils",
    ],
)

cc_library(
    name = "update_opponent_knowledge_action",
    srcs = ["UpdateOpponentKnowledgeAction.cpp"],
    hdrs = ["UpdateOpponentKnowledgeAction.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_action",
        "//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:action_result_flatbuffer_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
        "//src/main/cpp/net/eagle0/shardok/library/util:player_utils",
    ],
)
