Exemplo n.º 1
0
    def __init__(self, player: PlayerId, x: float, y: float, z: float,
                 reference_id: int, unit_const: int, status: int,
                 rotation: float, initial_animation_frame: int,
                 garrisoned_in_id: int):
        raise_if_not_int_subclass([unit_const])

        self._player: PlayerId = PlayerId(player)
        """
        PLEASE NOTE: This is an internal (read-only) value for ease of access. It accurately represent the actual 
        player controlling the unit but is not directly connected to it. Changing this value will have no impact to your
        scenario.
        To change which player controls this unit, use:
            unit_manager.change_ownership(Unit, to_player)
        """
        self.x: float = x
        self.y: float = y
        self.z: float = z
        self.reference_id: int = reference_id
        self.unit_const: int = unit_const
        self.status: int = status
        self.rotation: float = rotation
        self.initial_animation_frame: int = initial_animation_frame
        self.garrisoned_in_id: int = garrisoned_in_id

        super().__init__()
Exemplo n.º 2
0
    def __init__(
        self,
        condition_type: int = None,
        quantity: int = None,
        attribute: int = None,
        unit_object: int = None,
        next_object: int = None,
        object_list: int = None,
        source_player: IntEnum = None,
        technology: IntEnum = None,
        timer: int = None,
        area_x1: int = None,
        area_y1: int = None,
        area_x2: int = None,
        area_y2: int = None,
        object_group: int = None,
        object_type: int = None,
        ai_signal: int = None,
        inverted: int = None,
        variable: int = None,
        comparison: int = None,
        target_player: IntEnum = None,
        unit_ai_action: int = None,
        xs_function: str = None,
    ):
        raise_if_not_int_subclass([object_list, technology])

        self.condition_type: int = condition_type
        self.quantity: int = quantity
        self.attribute: int = attribute
        self.unit_object: int = unit_object
        self.next_object: int = next_object
        self.object_list: int = object_list
        self.source_player: int = source_player
        self.technology: int = technology
        self.timer: int = timer
        self.area_x1: int = area_x1
        self.area_y1: int = area_y1
        self.area_x2: int = area_x2
        self.area_y2: int = area_y2
        self.object_group: int = object_group
        self.object_type: int = object_type
        self.ai_signal: int = ai_signal
        self.inverted: int = inverted
        self.variable: int = variable
        self.comparison: int = comparison
        self.target_player: int = target_player
        self.unit_ai_action: int = unit_ai_action
        self.xs_function: str = xs_function

        super().__init__()
Exemplo n.º 3
0
    def __init__(
        self,
        effect_type: int = None,
        ai_script_goal: int = None,
        armour_attack_quantity: int = None,
        armour_attack_class: int = None,
        quantity: int = None,
        tribute_list: int = None,
        diplomacy: int = None,
        object_list_unit_id: int = None,
        source_player: int = None,
        target_player: int = None,
        technology: int = None,
        string_id: int = None,
        display_time: int = None,
        trigger_id: int = None,
        location_x: int = None,
        location_y: int = None,
        location_object_reference: int = None,
        area_1_x: int = None,
        area_1_y: int = None,
        area_2_x: int = None,
        area_2_y: int = None,
        object_group: int = None,
        object_type: int = None,
        instruction_panel_position: int = None,
        attack_stance: int = None,
        time_unit: int = None,
        enabled: int = None,
        food: int = None,
        wood: int = None,
        stone: int = None,
        gold: int = None,
        item_id: int = None,
        flash_object: int = None,
        force_research_technology: int = None,
        visibility_state: int = None,
        scroll: int = None,
        operation: int = None,
        object_list_unit_id_2: int = None,
        button_location: int = None,
        ai_signal_value: int = None,
        object_attributes: int = None,
        variable: int = None,
        timer: int = None,
        facet: int = None,
        play_sound: int = None,
        player_color: int = None,
        message: str = None,
        sound_name: str = None,
        selected_object_ids: List[int] = None,
    ):
        raise_if_not_int_subclass(
            [object_list_unit_id, technology, object_list_unit_id_2])

        if selected_object_ids is None:
            selected_object_ids = []

        self.effect_type: int = effect_type
        self.ai_script_goal: int = ai_script_goal
        self.armour_attack_quantity: int = armour_attack_quantity
        self.armour_attack_class: int = armour_attack_class
        self.quantity: int = quantity
        self.tribute_list: int = tribute_list
        self.diplomacy: int = diplomacy
        self.object_list_unit_id: int = object_list_unit_id
        self.source_player: int = source_player
        self.target_player: int = target_player
        self.technology: int = technology
        self.string_id: int = string_id
        self.display_time: int = display_time
        self.trigger_id: int = trigger_id
        self.location_x: int = location_x
        self.location_y: int = location_y
        self.location_object_reference: int = location_object_reference
        self.area_1_x: int = area_1_x
        self.area_1_y: int = area_1_y
        self.area_2_x: int = area_2_x
        self.area_2_y: int = area_2_y
        self.object_group: int = object_group
        self.object_type: int = object_type
        self.instruction_panel_position: int = instruction_panel_position
        self.attack_stance: int = attack_stance
        self.time_unit: int = time_unit
        self.enabled: int = enabled
        self.food: int = food
        self.wood: int = wood
        self.stone: int = stone
        self.gold: int = gold
        self.item_id: int = item_id
        self.flash_object: int = flash_object
        self.force_research_technology: int = force_research_technology
        self.visibility_state: int = visibility_state
        self.scroll: int = scroll
        self.operation: int = operation
        self.object_list_unit_id_2: int = object_list_unit_id_2
        self.button_location: int = button_location
        self.ai_signal_value: int = ai_signal_value
        self.object_attributes: int = object_attributes
        self.variable: int = variable
        self.timer: int = timer
        self.facet: int = facet
        self.play_sound: int = play_sound
        self.player_color: int = player_color
        self.message: str = message
        self.sound_name: str = sound_name
        self.selected_object_ids: List[int] = selected_object_ids

        super().__init__()