"""
Type stubs for UnitHandle - Provides strict IDE validation and autocomplete.
Unlike the runtime class, this stub does not permit arbitrary attribute assignment.
"""
from typing import List, Optional, Tuple, Any, Union

from aoe2_genie_tooling.Base.workspace import GenieWorkspace
from aoe2_genie_tooling.Units.task_builder import TaskBuilder

from aoe2_genie_tooling.Units.handles import (
    TaskHandle, AttackHandle, ArmourHandle, DamageGraphicHandle,
    TrainLocationHandle, DropSiteHandle
)

from aoe2_genie_tooling.Units.wrappers import (
    CombatWrapper,
    CreationWrapper,
    MovementWrapper,
    BehaviorWrapper,
    ProjectileWrapper,
    BuildingWrapper
)

from aoe2_genie_tooling.Units.unit_collections import (
    TasksManager,
    AttacksManager,
    ArmoursManager,
    DamageGraphicsManager,
    TrainLocationsManager,
    DropSitesManager,
    AnnexesManager,
    CostsManager,
    ResourcesManager
)

class UnitHandle:
    __slots__ = (
        "_workspace", "_unit_id", "_civ_ids", "_units_cache",
        "_combat_cache", "_creation_cache", "_cost_cache", "_movement_cache",
        "_behavior_cache", "_projectile_cache", "_building_cache",
        "_tasks_cache", "_attacks_cache", "_armours_cache", 
        "_damage_graphics_cache", "_train_locations_cache", 
        "_annexes_cache", "_drop_sites_cache", "_costs_cache", "_resources_cache",
    )

    # --------------------------------------------------------------------------
    # Core Attributes
    # --------------------------------------------------------------------------
    @property
    def id(self) -> int: ...
    @property
    def unit_id(self) -> int: ...

    @property
    def name(self) -> str: ...
    @name.setter
    def name(self, value: str) -> None: ...

    @property
    def type_(self) -> int: ...
    @type_.setter
    def type_(self, value: int) -> None: ...

    def change_unit_type(self, new_type: int) -> None:
        """Safely change unit type (structures sync at save time)."""
        ...

    @property
    def enabled(self) -> int: ...
    @enabled.setter
    def enabled(self, value: int) -> None: ...

    @property
    def disabled(self) -> int: ...
    @disabled.setter
    def disabled(self, value: int) -> None: ...

    @property
    def class_(self) -> int: ...
    @class_.setter
    def class_(self, value: int) -> None: ...

    @property
    def hit_points(self) -> int: ...
    @hit_points.setter
    def hit_points(self, value: int) -> None: ...

    @property
    def line_of_sight(self) -> float: ...
    @line_of_sight.setter
    def line_of_sight(self, value: float) -> None: ...

    @property
    def garrison_capacity(self) -> int: ...
    @garrison_capacity.setter
    def garrison_capacity(self, value: int) -> None: ...

    @property
    def speed(self) -> float: ...
    @speed.setter
    def speed(self, value: float) -> None: ...

    @property
    def name_str_id(self) -> int: ...
    @name_str_id.setter
    def name_str_id(self, value: int) -> None: ...

    @property
    def creation_str_id(self) -> int: ...
    @creation_str_id.setter
    def creation_str_id(self, value: int) -> None: ...

    @property
    def help_str_id(self) -> int: ...
    @help_str_id.setter
    def help_str_id(self, value: int) -> None: ...

    @property
    def hotkey_text_str_id(self) -> int: ...
    @hotkey_text_str_id.setter
    def hotkey_text_str_id(self, value: int) -> None: ...

    @property
    def hotkey_str_id(self) -> int: ...
    @hotkey_str_id.setter
    def hotkey_str_id(self, value: int) -> None: ...

    @property
    def trait(self) -> int: ...
    @trait.setter
    def trait(self, value: int) -> None: ...

    @property
    def trait_piece(self) -> int: ...
    @trait_piece.setter
    def trait_piece(self, value: int) -> None: ...

    @property
    def standing_sprite_id1(self) -> int: ...
    @standing_sprite_id1.setter
    def standing_sprite_id1(self, value: int) -> None: ...

    @property
    def standing_sprite_id2(self) -> int: ...
    @standing_sprite_id2.setter
    def standing_sprite_id2(self, value: int) -> None: ...

    @property
    def dying_sprite_id(self) -> int: ...
    @dying_sprite_id.setter
    def dying_sprite_id(self, value: int) -> None: ...

    @property
    def undead_sprite_id(self) -> int: ...
    @undead_sprite_id.setter
    def undead_sprite_id(self, value: int) -> None: ...

    @property
    def icon_id(self) -> int: ...
    @icon_id.setter
    def icon_id(self, value: int) -> None: ...

    @property
    def radius_x(self) -> float: ...
    @radius_x.setter
    def radius_x(self, value: float) -> None: ...

    @property
    def radius_y(self) -> float: ...
    @radius_y.setter
    def radius_y(self, value: float) -> None: ...

    @property
    def radius_z(self) -> float: ...
    @radius_z.setter
    def radius_z(self, value: float) -> None: ...

    @property
    def selection_radius_x(self) -> float: ...
    @selection_radius_x.setter
    def selection_radius_x(self, value: float) -> None: ...

    @property
    def selection_radius_y(self) -> float: ...
    @selection_radius_y.setter
    def selection_radius_y(self, value: float) -> None: ...

    @property
    def selection_radius_z(self) -> float: ...
    @selection_radius_z.setter
    def selection_radius_z(self, value: float) -> None: ...

    @property
    def selection_effect(self) -> int: ...
    @selection_effect.setter
    def selection_effect(self, value: int) -> None: ...

    @property
    def editor_selection_color(self) -> int: ...
    @editor_selection_color.setter
    def editor_selection_color(self, value: int) -> None: ...

    @property
    def train_sound_id(self) -> int: ...
    @train_sound_id.setter
    def train_sound_id(self, value: int) -> None: ...

    @property
    def damage_sound_id1(self) -> int: ...
    @damage_sound_id1.setter
    def damage_sound_id1(self, value: int) -> None: ...

    @property
    def selection_sound_id(self) -> int: ...
    @selection_sound_id.setter
    def selection_sound_id(self, value: int) -> None: ...

    @property
    def dying_sound_id(self) -> int: ...
    @dying_sound_id.setter
    def dying_sound_id(self, value: int) -> None: ...

    @property
    def wwise_train_sound_id(self) -> int: ...
    @wwise_train_sound_id.setter
    def wwise_train_sound_id(self, value: int) -> None: ...

    @property
    def wwise_damage_sound_id(self) -> int: ...
    @wwise_damage_sound_id.setter
    def wwise_damage_sound_id(self, value: int) -> None: ...

    @property
    def wwise_selection_sound_id(self) -> int: ...
    @wwise_selection_sound_id.setter
    def wwise_selection_sound_id(self, value: int) -> None: ...

    @property
    def wwise_dying_sound_id(self) -> int: ...
    @wwise_dying_sound_id.setter
    def wwise_dying_sound_id(self, value: int) -> None: ...

    @property
    def dead_unit_id(self) -> int: ...
    @dead_unit_id.setter
    def dead_unit_id(self, value: int) -> None: ...

    @property
    def blood_unit_id(self) -> int: ...
    @blood_unit_id.setter
    def blood_unit_id(self, value: int) -> None: ...

    @property
    def undead_mode(self) -> int: ...
    @undead_mode.setter
    def undead_mode(self, value: int) -> None: ...

    @property
    def can_be_built_on(self) -> int: ...
    @can_be_built_on.setter
    def can_be_built_on(self, value: int) -> None: ...

    @property
    def required_side_terrain_id1(self) -> int: ...
    @required_side_terrain_id1.setter
    def required_side_terrain_id1(self, value: int) -> None: ...

    @property
    def required_side_terrain_id2(self) -> int: ...
    @required_side_terrain_id2.setter
    def required_side_terrain_id2(self, value: int) -> None: ...

    @property
    def required_center_terrain_id1(self) -> int: ...
    @required_center_terrain_id1.setter
    def required_center_terrain_id1(self, value: int) -> None: ...

    @property
    def required_center_terrain_id2(self) -> int: ...
    @required_center_terrain_id2.setter
    def required_center_terrain_id2(self, value: int) -> None: ...

    @property
    def required_clearance_radius_x(self) -> float: ...
    @required_clearance_radius_x.setter
    def required_clearance_radius_x(self, value: float) -> None: ...

    @property
    def required_clearance_radius_y(self) -> float: ...
    @required_clearance_radius_y.setter
    def required_clearance_radius_y(self, value: float) -> None: ...

    @property
    def elevation_restriction_mode(self) -> int: ...
    @elevation_restriction_mode.setter
    def elevation_restriction_mode(self, value: int) -> None: ...

    @property
    def terrain_restriction_id(self) -> int: ...
    @terrain_restriction_id.setter
    def terrain_restriction_id(self, value: int) -> None: ...

    @property
    def foundation_terrain_id(self) -> int: ...
    @foundation_terrain_id.setter
    def foundation_terrain_id(self, value: int) -> None: ...

    @property
    def movement_mode(self) -> int: ...
    @movement_mode.setter
    def movement_mode(self, value: int) -> None: ...

    @property
    def obstruction_type(self) -> int: ...
    @obstruction_type.setter
    def obstruction_type(self, value: int) -> None: ...

    @property
    def obstruction_class(self) -> int: ...
    @obstruction_class.setter
    def obstruction_class(self, value: int) -> None: ...

    @property
    def resource_carry_capacity(self) -> int: ...
    @resource_carry_capacity.setter
    def resource_carry_capacity(self, value: int) -> None: ...

    @property
    def resource_decay_rate(self) -> float: ...
    @resource_decay_rate.setter
    def resource_decay_rate(self, value: float) -> None: ...

    @property
    def resource_gather_group(self) -> int: ...
    @resource_gather_group.setter
    def resource_gather_group(self, value: int) -> None: ...

    @property
    def enable_auto_gather(self) -> int: ...
    @enable_auto_gather.setter
    def enable_auto_gather(self, value: int) -> None: ...

    @property
    def blast_defense_level(self) -> int: ...
    @blast_defense_level.setter
    def blast_defense_level(self, value: int) -> None: ...

    @property
    def combat_level(self) -> int: ...
    @combat_level.setter
    def combat_level(self, value: int) -> None: ...

    @property
    def old_attack_mode(self) -> int: ...
    @old_attack_mode.setter
    def old_attack_mode(self, value: int) -> None: ...

    @property
    def interaction_mode(self) -> int: ...
    @interaction_mode.setter
    def interaction_mode(self, value: int) -> None: ...

    @property
    def minimap_mode(self) -> int: ...
    @minimap_mode.setter
    def minimap_mode(self, value: int) -> None: ...

    @property
    def interface_mode(self) -> int: ...
    @interface_mode.setter
    def interface_mode(self, value: int) -> None: ...

    @property
    def minimap_color(self) -> int: ...
    @minimap_color.setter
    def minimap_color(self, value: int) -> None: ...

    @property
    def fog_visibility_mode(self) -> int: ...
    @fog_visibility_mode.setter
    def fog_visibility_mode(self, value: int) -> None: ...

    @property
    def occlusion_mode(self) -> int: ...
    @occlusion_mode.setter
    def occlusion_mode(self, value: int) -> None: ...

    @property
    def sort_number(self) -> int: ...
    @sort_number.setter
    def sort_number(self, value: int) -> None: ...

    @property
    def hide_in_editor(self) -> int: ...
    @hide_in_editor.setter
    def hide_in_editor(self, value: int) -> None: ...

    @property
    def multiple_attribute_mode(self) -> float: ...
    @multiple_attribute_mode.setter
    def multiple_attribute_mode(self, value: float) -> None: ...

    @property
    def recyclable(self) -> int: ...
    @recyclable.setter
    def recyclable(self, value: int) -> None: ...

    @property
    def doppelganger_mode(self) -> int: ...
    @doppelganger_mode.setter
    def doppelganger_mode(self, value: int) -> None: ...

    @property
    def convert_terrain(self) -> int: ...
    @convert_terrain.setter
    def convert_terrain(self, value: int) -> None: ...

    # --------------------------------------------------------------------------
    # Wrapper Accessors
    # --------------------------------------------------------------------------
    @property
    def combat(self) -> CombatWrapper: ...
    @property
    def creation(self) -> CreationWrapper: ...
    @property
    def cost(self) -> CostsManager: ...  # Wrapper points to CostsManager via property in unit_handle.py
    
    @property
    def movement(self) -> MovementWrapper: ...
    @property
    def behavior(self) -> BehaviorWrapper: ...
    @property
    def projectile(self) -> ProjectileWrapper: ...
    @property
    def building(self) -> BuildingWrapper: ...
    
    @property
    def resource_storages(self) -> ResourcesManager: ...
    @property
    def resources(self) -> ResourcesManager: ...
    
    @property
    def damage_graphics(self) -> DamageGraphicsManager: ...
    @property
    def train_locations_wrapper(self) -> TrainLocationsManager: ...
    
    @property
    def tasks(self) -> TasksManager: ...
    @property
    def tasks_wrapper(self) -> TasksManager: ...

    # --------------------------------------------------------------------------
    # Flattened Wrappers
    # --------------------------------------------------------------------------
    # BuildingWrapper
    @property
    def construction_graphic_id(self) -> int: ...
    @construction_graphic_id.setter
    def construction_graphic_id(self, value: int) -> None: ...

    @property
    def snow_graphic_id(self) -> int: ...
    @snow_graphic_id.setter
    def snow_graphic_id(self, value: int) -> None: ...

    @property
    def destruction_graphic_id(self) -> int: ...
    @destruction_graphic_id.setter
    def destruction_graphic_id(self, value: int) -> None: ...

    @property
    def destruction_rubble_graphic_id(self) -> int: ...
    @destruction_rubble_graphic_id.setter
    def destruction_rubble_graphic_id(self, value: int) -> None: ...

    @property
    def research_graphic_id(self) -> int: ...
    @research_graphic_id.setter
    def research_graphic_id(self, value: int) -> None: ...

    @property
    def research_complete_graphic_id(self) -> int: ...
    @research_complete_graphic_id.setter
    def research_complete_graphic_id(self, value: int) -> None: ...

    @property
    def adjacent_mode(self) -> int: ...
    @adjacent_mode.setter
    def adjacent_mode(self, value: int) -> None: ...

    @property
    def graphics_angle(self) -> int: ...
    @graphics_angle.setter
    def graphics_angle(self, value: int) -> None: ...

    @property
    def disappears_when_built(self) -> int: ...
    @disappears_when_built.setter
    def disappears_when_built(self, value: int) -> None: ...

    @property
    def stack_unit_id(self) -> int: ...
    @stack_unit_id.setter
    def stack_unit_id(self, value: int) -> None: ...

    @property
    def old_overlap_id(self) -> int: ...
    @old_overlap_id.setter
    def old_overlap_id(self, value: int) -> None: ...

    @property
    def tech_id(self) -> int: ...
    @tech_id.setter
    def tech_id(self, value: int) -> None: ...

    @property
    def completion_tech_id(self) -> int: ...
    @completion_tech_id.setter
    def completion_tech_id(self, value: int) -> None: ...

    @property
    def can_burn(self) -> int: ...
    @can_burn.setter
    def can_burn(self, value: int) -> None: ...

    @property
    def head_unit_id(self) -> int: ...
    @head_unit_id.setter
    def head_unit_id(self, value: int) -> None: ...

    @property
    def transform_unit_id(self) -> int: ...
    @transform_unit_id.setter
    def transform_unit_id(self, value: int) -> None: ...

    @property
    def salvage_unit_id(self) -> int: ...
    @salvage_unit_id.setter
    def salvage_unit_id(self, value: int) -> None: ...

    @property
    def pile_unit_id(self) -> int: ...
    @pile_unit_id.setter
    def pile_unit_id(self, value: int) -> None: ...

    @property
    def transform_sound_id(self) -> int: ...
    @transform_sound_id.setter
    def transform_sound_id(self, value: int) -> None: ...

    @property
    def construction_sound_id(self) -> int: ...
    @construction_sound_id.setter
    def construction_sound_id(self, value: int) -> None: ...

    @property
    def wwise_transform_sound_id(self) -> int: ...
    @wwise_transform_sound_id.setter
    def wwise_transform_sound_id(self, value: int) -> None: ...

    @property
    def wwise_construction_sound_id(self) -> int: ...
    @wwise_construction_sound_id.setter
    def wwise_construction_sound_id(self, value: int) -> None: ...

    @property
    def garrison_type(self) -> int: ...
    @garrison_type.setter
    def garrison_type(self, value: int) -> None: ...

    @property
    def garrison_heal_rate(self) -> float: ...
    @garrison_heal_rate.setter
    def garrison_heal_rate(self, value: float) -> None: ...

    @property
    def garrison_repair_rate(self) -> float: ...
    @garrison_repair_rate.setter
    def garrison_repair_rate(self, value: float) -> None: ...

    @property
    def looting_table(self) -> Any: ...
    @looting_table.setter
    def looting_table(self, value: Any) -> None: ...

    @property
    def annexes(self) -> AnnexesManager: ...
    @annexes.setter
    def annexes(self, value: AnnexesManager) -> None: ...

    @property
    def annexes_manager(self) -> AnnexesManager: ...
    @annexes_manager.setter
    def annexes_manager(self, value: AnnexesManager) -> None: ...

    # CombatWrapper
    @property
    def attack_graphic_id(self) -> int: ...
    @attack_graphic_id.setter
    def attack_graphic_id(self, value: int) -> None: ...

    @property
    def attack_graphic_2_id(self) -> int: ...
    @attack_graphic_2_id.setter
    def attack_graphic_2_id(self, value: int) -> None: ...

    @property
    def max_range(self) -> float: ...
    @max_range.setter
    def max_range(self, value: float) -> None: ...

    @property
    def min_range(self) -> float: ...
    @min_range.setter
    def min_range(self, value: float) -> None: ...

    @property
    def reload_time(self) -> float: ...
    @reload_time.setter
    def reload_time(self, value: float) -> None: ...

    @property
    def accuracy_percent(self) -> int: ...
    @accuracy_percent.setter
    def accuracy_percent(self, value: int) -> None: ...

    @property
    def accuracy_dispersion(self) -> float: ...
    @accuracy_dispersion.setter
    def accuracy_dispersion(self, value: float) -> None: ...

    @property
    def blast_width(self) -> float: ...
    @blast_width.setter
    def blast_width(self, value: float) -> None: ...

    @property
    def blast_damage(self) -> float: ...
    @blast_damage.setter
    def blast_damage(self, value: float) -> None: ...

    @property
    def blast_attack_level(self) -> int: ...
    @blast_attack_level.setter
    def blast_attack_level(self, value: int) -> None: ...

    @property
    def frame_delay(self) -> int: ...
    @frame_delay.setter
    def frame_delay(self, value: int) -> None: ...

    @property
    def break_off_combat(self) -> int: ...
    @break_off_combat.setter
    def break_off_combat(self, value: int) -> None: ...

    @property
    def base_armor(self) -> int: ...
    @base_armor.setter
    def base_armor(self, value: int) -> None: ...

    @property
    def defense_terrain_bonus(self) -> int: ...
    @defense_terrain_bonus.setter
    def defense_terrain_bonus(self, value: int) -> None: ...

    @property
    def bonus_damage_resistance(self) -> float: ...
    @bonus_damage_resistance.setter
    def bonus_damage_resistance(self, value: float) -> None: ...

    @property
    def damage_reflection(self) -> float: ...
    @damage_reflection.setter
    def damage_reflection(self, value: float) -> None: ...

    @property
    def friendly_fire_damage(self) -> float: ...
    @friendly_fire_damage.setter
    def friendly_fire_damage(self, value: float) -> None: ...

    @property
    def displayed_attack(self) -> int: ...
    @displayed_attack.setter
    def displayed_attack(self, value: int) -> None: ...

    @property
    def displayed_melee_armour(self) -> int: ...
    @displayed_melee_armour.setter
    def displayed_melee_armour(self, value: int) -> None: ...

    @property
    def displayed_range(self) -> float: ...
    @displayed_range.setter
    def displayed_range(self, value: float) -> None: ...

    @property
    def displayed_reload_time(self) -> float: ...
    @displayed_reload_time.setter
    def displayed_reload_time(self, value: float) -> None: ...

    @property
    def projectile_unit_id(self) -> int: ...
    @projectile_unit_id.setter
    def projectile_unit_id(self, value: int) -> None: ...

    @property
    def graphic_displacement(self) -> Tuple[float, float, float]: ...
    @graphic_displacement.setter
    def graphic_displacement(self, value: Tuple[float, float, float]) -> None: ...

    @property
    def weapon_offset_x(self) -> float: ...
    @weapon_offset_x.setter
    def weapon_offset_x(self, value: float) -> None: ...

    @property
    def weapon_offset_y(self) -> float: ...
    @weapon_offset_y.setter
    def weapon_offset_y(self, value: float) -> None: ...

    @property
    def weapon_offset_z(self) -> float: ...
    @weapon_offset_z.setter
    def weapon_offset_z(self, value: float) -> None: ...

    @property
    def interrupt_frame(self) -> int: ...
    @interrupt_frame.setter
    def interrupt_frame(self, value: int) -> None: ...

    @property
    def garrison_firepower(self) -> float: ...
    @garrison_firepower.setter
    def garrison_firepower(self, value: float) -> None: ...

    # CreationWrapper
    @property
    def train_time(self) -> int: ...
    @train_time.setter
    def train_time(self, value: int) -> None: ...

    @property
    def train_location_id(self) -> int: ...
    @train_location_id.setter
    def train_location_id(self, value: int) -> None: ...

    @property
    def button_id(self) -> int: ...
    @button_id.setter
    def button_id(self, value: int) -> None: ...

    @property
    def hot_key_id(self) -> int: ...
    @hot_key_id.setter
    def hot_key_id(self, value: int) -> None: ...

    @property
    def garrison_graphic_id(self) -> int: ...
    @garrison_graphic_id.setter
    def garrison_graphic_id(self, value: int) -> None: ...

    @property
    def spawning_graphic_id(self) -> int: ...
    @spawning_graphic_id.setter
    def spawning_graphic_id(self, value: int) -> None: ...

    @property
    def upgrade_graphic_id(self) -> int: ...
    @upgrade_graphic_id.setter
    def upgrade_graphic_id(self, value: int) -> None: ...

    @property
    def hero_glow_graphic_id(self) -> int: ...
    @hero_glow_graphic_id.setter
    def hero_glow_graphic_id(self, value: int) -> None: ...

    @property
    def idle_attack_graphic_id(self) -> int: ...
    @idle_attack_graphic_id.setter
    def idle_attack_graphic_id(self, value: int) -> None: ...

    @property
    def special_graphic_id(self) -> int: ...
    @special_graphic_id.setter
    def special_graphic_id(self, value: int) -> None: ...

    @property
    def max_charge(self) -> float: ...
    @max_charge.setter
    def max_charge(self, value: float) -> None: ...

    @property
    def recharge_rate(self) -> float: ...
    @recharge_rate.setter
    def recharge_rate(self, value: float) -> None: ...

    @property
    def charge_event(self) -> int: ...
    @charge_event.setter
    def charge_event(self, value: int) -> None: ...

    @property
    def charge_type(self) -> int: ...
    @charge_type.setter
    def charge_type(self, value: int) -> None: ...

    @property
    def charge_target(self) -> int: ...
    @charge_target.setter
    def charge_target(self, value: int) -> None: ...

    @property
    def charge_projectile_unit_id(self) -> int: ...
    @charge_projectile_unit_id.setter
    def charge_projectile_unit_id(self, value: int) -> None: ...

    @property
    def rear_attack_modifier(self) -> float: ...
    @rear_attack_modifier.setter
    def rear_attack_modifier(self, value: float) -> None: ...

    @property
    def flank_attack_modifier(self) -> float: ...
    @flank_attack_modifier.setter
    def flank_attack_modifier(self, value: float) -> None: ...

    @property
    def attack_priority(self) -> int: ...
    @attack_priority.setter
    def attack_priority(self, value: int) -> None: ...

    @property
    def invulnerability_level(self) -> float: ...
    @invulnerability_level.setter
    def invulnerability_level(self, value: float) -> None: ...

    @property
    def min_conversion_time_mod(self) -> float: ...
    @min_conversion_time_mod.setter
    def min_conversion_time_mod(self, value: float) -> None: ...

    @property
    def max_conversion_time_mod(self) -> float: ...
    @max_conversion_time_mod.setter
    def max_conversion_time_mod(self, value: float) -> None: ...

    @property
    def conversion_chance_mod(self) -> float: ...
    @conversion_chance_mod.setter
    def conversion_chance_mod(self, value: float) -> None: ...

    @property
    def total_projectiles(self) -> float: ...
    @total_projectiles.setter
    def total_projectiles(self, value: float) -> None: ...

    @property
    def max_total_projectiles(self) -> int: ...
    @max_total_projectiles.setter
    def max_total_projectiles(self, value: int) -> None: ...

    @property
    def secondary_projectile_unit_id(self) -> int: ...
    @secondary_projectile_unit_id.setter
    def secondary_projectile_unit_id(self, value: int) -> None: ...

    @property
    def projectile_spawning_area(self) -> Tuple[float, float, float]: ...
    @projectile_spawning_area.setter
    def projectile_spawning_area(self, value: Tuple[float, float, float]) -> None: ...

    @property
    def projectile_spawning_area_width(self) -> float: ...
    @projectile_spawning_area_width.setter
    def projectile_spawning_area_width(self, value: float) -> None: ...

    @property
    def projectile_spawning_area_length(self) -> float: ...
    @projectile_spawning_area_length.setter
    def projectile_spawning_area_length(self, value: float) -> None: ...

    @property
    def projectile_spawning_area_randomness(self) -> float: ...
    @projectile_spawning_area_randomness.setter
    def projectile_spawning_area_randomness(self, value: float) -> None: ...

    @property
    def button_icon_id(self) -> int: ...
    @button_icon_id.setter
    def button_icon_id(self, value: int) -> None: ...

    @property
    def button_short_tooltip_id(self) -> int: ...
    @button_short_tooltip_id.setter
    def button_short_tooltip_id(self, value: int) -> None: ...

    @property
    def button_extended_tooltip_id(self) -> int: ...
    @button_extended_tooltip_id.setter
    def button_extended_tooltip_id(self, value: int) -> None: ...

    @property
    def button_hotkey_action(self) -> int: ...
    @button_hotkey_action.setter
    def button_hotkey_action(self, value: int) -> None: ...

    @property
    def creatable_type(self) -> int: ...
    @creatable_type.setter
    def creatable_type(self, value: int) -> None: ...

    @property
    def hero_mode(self) -> int: ...
    @hero_mode.setter
    def hero_mode(self, value: int) -> None: ...

    @property
    def special_ability(self) -> int: ...
    @special_ability.setter
    def special_ability(self, value: int) -> None: ...

    @property
    def displayed_pierce_armour(self) -> int: ...
    @displayed_pierce_armour.setter
    def displayed_pierce_armour(self, value: int) -> None: ...

    # MovementWrapper
    @property
    def walking_graphic_id(self) -> int: ...
    @walking_graphic_id.setter
    def walking_graphic_id(self, value: int) -> None: ...

    @property
    def running_graphic_id(self) -> int: ...
    @running_graphic_id.setter
    def running_graphic_id(self, value: int) -> None: ...

    @property
    def rotation_speed(self) -> float: ...
    @rotation_speed.setter
    def rotation_speed(self, value: float) -> None: ...

    @property
    def turn_radius(self) -> float: ...
    @turn_radius.setter
    def turn_radius(self, value: float) -> None: ...

    @property
    def rotation_radius(self) -> float: ...
    @rotation_radius.setter
    def rotation_radius(self, value: float) -> None: ...

    @property
    def turn_radius_speed(self) -> float: ...
    @turn_radius_speed.setter
    def turn_radius_speed(self, value: float) -> None: ...

    @property
    def rotation_radius_speed(self) -> float: ...
    @rotation_radius_speed.setter
    def rotation_radius_speed(self, value: float) -> None: ...

    @property
    def max_yaw_per_second_moving(self) -> float: ...
    @max_yaw_per_second_moving.setter
    def max_yaw_per_second_moving(self, value: float) -> None: ...

    @property
    def max_yaw_per_sec_walking(self) -> float: ...
    @max_yaw_per_sec_walking.setter
    def max_yaw_per_sec_walking(self, value: float) -> None: ...

    @property
    def stationary_yaw_revolution_time(self) -> float: ...
    @stationary_yaw_revolution_time.setter
    def stationary_yaw_revolution_time(self, value: float) -> None: ...

    @property
    def standing_yaw_revolution_time(self) -> float: ...
    @standing_yaw_revolution_time.setter
    def standing_yaw_revolution_time(self, value: float) -> None: ...

    @property
    def max_yaw_per_second_stationary(self) -> float: ...
    @max_yaw_per_second_stationary.setter
    def max_yaw_per_second_stationary(self, value: float) -> None: ...

    @property
    def max_yaw_per_sec_standing(self) -> float: ...
    @max_yaw_per_sec_standing.setter
    def max_yaw_per_sec_standing(self, value: float) -> None: ...

    @property
    def tracking_unit_id(self) -> int: ...
    @tracking_unit_id.setter
    def tracking_unit_id(self, value: int) -> None: ...

    @property
    def trailing_unit_id(self) -> int: ...
    @trailing_unit_id.setter
    def trailing_unit_id(self, value: int) -> None: ...

    @property
    def tracking_unit_mode(self) -> int: ...
    @tracking_unit_mode.setter
    def tracking_unit_mode(self, value: int) -> None: ...

    @property
    def trail_mode(self) -> int: ...
    @trail_mode.setter
    def trail_mode(self, value: int) -> None: ...

    @property
    def tracking_unit_density(self) -> float: ...
    @tracking_unit_density.setter
    def tracking_unit_density(self, value: float) -> None: ...

    @property
    def trail_spacing(self) -> float: ...
    @trail_spacing.setter
    def trail_spacing(self, value: float) -> None: ...

    @property
    def old_size_class(self) -> int: ...
    @old_size_class.setter
    def old_size_class(self, value: int) -> None: ...

    @property
    def old_move_algorithm(self) -> int: ...
    @old_move_algorithm.setter
    def old_move_algorithm(self, value: int) -> None: ...

    @property
    def min_collision_size_multiplier(self) -> float: ...
    @min_collision_size_multiplier.setter
    def min_collision_size_multiplier(self, value: float) -> None: ...

    # BehaviorWrapper
    @property
    def default_task_id(self) -> int: ...
    @default_task_id.setter
    def default_task_id(self, value: int) -> None: ...

    @property
    def search_radius(self) -> float: ...
    @search_radius.setter
    def search_radius(self, value: float) -> None: ...

    @property
    def work_rate(self) -> float: ...
    @work_rate.setter
    def work_rate(self, value: float) -> None: ...

    @property
    def task_swap_group(self) -> int: ...
    @task_swap_group.setter
    def task_swap_group(self, value: int) -> None: ...

    @property
    def run_mode(self) -> int: ...
    @run_mode.setter
    def run_mode(self, value: int) -> None: ...

    @property
    def run_pattern(self) -> int: ...
    @run_pattern.setter
    def run_pattern(self, value: int) -> None: ...

    @property
    def drop_site_unit_ids(self) -> DropSitesManager: ...
    @drop_site_unit_ids.setter
    def drop_site_unit_ids(self, value: DropSitesManager) -> None: ...

    @property
    def attack_sound_id(self) -> int: ...
    @attack_sound_id.setter
    def attack_sound_id(self, value: int) -> None: ...

    @property
    def attack_sound(self) -> int: ...
    @attack_sound.setter
    def attack_sound(self, value: int) -> None: ...

    @property
    def move_sound_id(self) -> int: ...
    @move_sound_id.setter
    def move_sound_id(self, value: int) -> None: ...

    @property
    def move_sound(self) -> int: ...
    @move_sound.setter
    def move_sound(self, value: int) -> None: ...

    @property
    def wwise_attack_sound_id(self) -> int: ...
    @wwise_attack_sound_id.setter
    def wwise_attack_sound_id(self, value: int) -> None: ...

    @property
    def wwise_move_sound_id(self) -> int: ...
    @wwise_move_sound_id.setter
    def wwise_move_sound_id(self, value: int) -> None: ...

    # ProjectileWrapper
    @property
    def projectile_type(self) -> int: ...
    @projectile_type.setter
    def projectile_type(self, value: int) -> None: ...

    @property
    def smart_mode(self) -> int: ...
    @smart_mode.setter
    def smart_mode(self, value: int) -> None: ...

    @property
    def hit_mode(self) -> int: ...
    @hit_mode.setter
    def hit_mode(self, value: int) -> None: ...

    @property
    def vanish_mode(self) -> int: ...
    @vanish_mode.setter
    def vanish_mode(self, value: int) -> None: ...

    @property
    def area_effect_specials(self) -> int: ...
    @area_effect_specials.setter
    def area_effect_specials(self, value: int) -> None: ...

    @property
    def projectile_arc(self) -> float: ...
    @projectile_arc.setter
    def projectile_arc(self, value: float) -> None: ...

    # --------------------------------------------------------------------------
    # Collection Accessors (Flattened)
    # --------------------------------------------------------------------------
    @property
    def attacks(self) -> AttacksManager: ...
    @attacks.setter
    def attacks(self, value: List[Any]) -> None: ...
    
    @property
    def armours(self) -> ArmoursManager: ...
    @armours.setter
    def armours(self, value: List[Any]) -> None: ...
    
    @property
    def resource_costs(self) -> CostsManager: ...
    @resource_costs.setter
    def resource_costs(self, value: List[Any]) -> None: ...
    
    @property
    def costs(self) -> CostsManager: ...
    @costs.setter
    def costs(self, value: List[Any]) -> None: ...
    
    @property
    def train_locations(self) -> TrainLocationsManager: ...
    @train_locations.setter
    def train_locations(self, value: List[Any]) -> None: ...
    
    @property
    def drop_sites(self) -> DropSitesManager: ...
    @drop_sites.setter
    def drop_sites(self, value: List[int]) -> None: ...
    
    # --------------------------------------------------------------------------
    # Methods
    # --------------------------------------------------------------------------
    def __init__(self, workspace: GenieWorkspace, unit_id: int, civ_ids: Optional[List[int]] = None) -> None: ...
    
    def invalidate_cache(self) -> None: ...
    
    # Resource Storage
    def resource_1(self, type: int = 0, amount: float = 0.0, flag: int = 0) -> None: ...
    def resource_2(self, type: int = 0, amount: float = 0.0, flag: int = 0) -> None: ...
    def resource_3(self, type: int = 0, amount: float = 0.0, flag: int = 0) -> None: ...
    
    # Attacks
    def add_attack(self, class_: int, amount: int) -> Optional[AttackHandle]: ...
    def get_attack_by_id(self, attack_id: int) -> Optional[AttackHandle]: ...
    def get_attack_by_class(self, class_: int) -> Optional[AttackHandle]: ...
    def remove_attack(self, attack_id: int) -> bool: ...
    def remove_all_attacks(self) -> None: ...
    def set_attack(self, class_: int, amount: int) -> Optional[AttackHandle]: ...
    
    # Armours
    def add_armour(self, class_: int, amount: int) -> Optional[ArmourHandle]: ...
    def get_armour_by_id(self, armour_id: int) -> Optional[ArmourHandle]: ...
    def get_armour_by_class(self, class_: int) -> Optional[ArmourHandle]: ...
    def remove_armour(self, armour_id: int) -> bool: ...
    def set_armour(self, class_: int, amount: int) -> Optional[ArmourHandle]: ...
    
    # Damage Graphics
    def add_damage_graphic(self, graphic_id: int, damage_percent: int, apply_mode: int = 0) -> Optional[DamageGraphicHandle]: ...
    def get_damage_graphic(self, damage_graphic_id: int) -> Optional[DamageGraphicHandle]: ...
    def remove_damage_graphic(self, damage_graphic_id: int) -> bool: ...
    def remove_all_damage_graphics(self) -> None: ...
    # Tasks
    @property
    def add_task(self) -> TaskBuilder: ...
    
    def create_task(
        self,
        task_type: int = 0,
        id: int = 0,
        is_default: int = 0,
        action_type: int = 0,
        class_id: int = -1,
        unit_id: int = -1,
        terrain_id: int = -1,
        resource_in: int = -1,
        resource_out: int = -1,
        work_value_1: float = 0.0,
        work_value_2: float = 0.0,
        work_range: float = 0.0,
        enabled: int = 1,
        **kwargs
    ) -> Optional[TaskHandle]: ...
    
    def get_task(self, task_id: int) -> Optional[TaskHandle]: ...
    def get_tasks_list(self) -> List[TaskHandle]: ...
    def remove_task(self, task_id: int) -> bool: ...
    
    # Train Locations
    def add_train_location(
        self,
        unit_id: int,
        train_time: int = 0,
        button_id: int = 0,
        hot_key_id: int = 0,
        **kwargs
    ) -> Optional[TrainLocationHandle]: ...
    
    def get_train_location(self, train_location_id: int) -> Optional[TrainLocationHandle]: ...
    def remove_train_location(self, train_location_id: int) -> bool: ...
    
    # Drop Sites
    def add_drop_site(self, unit_id: int) -> Optional[DropSiteHandle]: ...
    def get_drop_site(self, drop_site_id: int) -> Optional[DropSiteHandle]: ...
    def remove_drop_site(self, drop_site_id: int) -> bool: ...
