def IfActionButtonInRegion(condition: int, action_button_id: int, region: RegionInt): """ Probably a simplified version of IfDialogPromptActivated. """ instruction_info = (3, 24, [0, -1, -1]) return to_numeric(instruction_info, condition, action_button_id, region)
def TerminateIfMultiplayerState(event_end_type: EventEndType, state: MultiplayerState): instruction_info = (1003, 6) return to_numeric(instruction_info, event_end_type, state)
def DefineLabel(label: Union[Label, int]): if isinstance(Label, int) and not 0 <= label <= 9: raise ValueError("Label index must be between 0 and 9, inclusive.") instruction_info = (1014, label) return to_numeric(instruction_info)
def GotoIfMapPresenceState(label: Label, game_map: MapOrSequence, state: bool): instruction_info = (1003, 107, [0, 0, 0, 0]) area_id, block_id = tuple(game_map) return to_numeric(instruction_info, label, state, area_id, block_id)
def GotoIfObjectDestructionState(label: Label, obj: ObjectInt, state: bool): """ Note change in argument order. """ instruction_info = (1005, 101, [0, 0, -1]) return to_numeric(instruction_info, label, state, obj)
def TerminateIfClientTypeCountComparison(event_end_type: EventEndType, client_type: ClientType, comparison_type: ComparisonType, value: int): """ Value from 0 to 4. """ instruction_info = (1003, 16, [0, 0, 0, 0]) return to_numeric(instruction_info, event_end_type, client_type, comparison_type, value)
def GotoIfFlagRangeState(label: Label, state: RangeState, flag_type: FlagType, flag_range: FlagRangeOrSequence): instruction_info = (1003, 103) first_flag, last_flag = tuple(flag_range) return to_numeric(instruction_info, label, state, flag_type, first_flag, last_flag)
def IfCharacterDrawGroupState(condition: int, character: CharacterInt, state: bool): """ Tests if character's draw group is currently active or inactive. """ instruction_info = (4, 15, [0, 0, 0]) return to_numeric(instruction_info, condition, character, state)
def GotoIfConditionState(label: Label, required_state: bool, input_condition: int): instruction_info = (1000, 101, [0, 0, 0]) return to_numeric(instruction_info, label, required_state, input_condition)
def IfPlayGoState(condition: int, playgo_state: PlayGoState): """ No idea what PlayGo state is but this doesn't sound like it would be used very often. """ instruction_info = (3, 28, [0, 0]) return to_numeric(instruction_info, condition, playgo_state)
def IfClientTypeCountComparison(condition: int, client_type: ClientType, comparison_type: ComparisonType, value): """ Value should only range between 0 and 4 (the maximum number of clients). """ instruction_info = (3, 29, [0, 0, 0, 0]) return to_numeric(instruction_info, condition, client_type, comparison_type, value)
def IfDialogChoice(condition: int, dialog_result: DialogResult): instruction_info = (3, 27, [0, 0]) return to_numeric(instruction_info, condition, dialog_result)
def IfPlayerInsightAmountComparison(condition: int, value: int, comparison_type: ComparisonType): """ Note change in argument order. """ instruction_info = (3, 26, [0, 0, 0]) return to_numeric(instruction_info, condition, value, comparison_type)
def IfPlayerArmorType(condition: int, armor_type: ArmorType, required_armor_range_first: ArmorInt, required_armor_range_last: ArmorInt): instruction_info = (3, 25, [0, ]) return to_numeric(instruction_info, condition, armor_type, required_armor_range_first, required_armor_range_last)
def SkipLinesIfClientTypeCountComparison(skip_lines: int, client_type: ClientType, comparison_type: ComparisonType, value: int): """ Value from 0 to 4. """ instruction_info = (1003, 14, [0, 0, 0, 0]) return to_numeric(instruction_info, skip_lines, client_type, comparison_type, value)
def Goto(label: Label): """ Unconditional GOTO. """ instruction_info = (1000, 103, [0]) return to_numeric(instruction_info, label)
def GotoIfClientTypeCountComparison(label: Label, client_type: ClientType, comparison_type: ComparisonType, value: int): """ Value from 0 to 4. """ instruction_info = (1003, 15, [0, 0, 0, 0]) return to_numeric(instruction_info, label, client_type, comparison_type, value)
def GotoIfValueComparison(label: Label, comparison_type: ComparisonType, left: int, right: int): instruction_info = (1000, 105) return to_numeric(instruction_info, label, comparison_type, left, right)
def GotoIfFlagState(label: Label, state: bool, flag_type: FlagType, flag: FlagInt): instruction_info = (1003, 101) return to_numeric(instruction_info, label, state, flag_type, flag)
def GotoIfFinishedConditionState(label: Label, required_state: bool, input_condition: int): """ Finished version. """ instruction_info = (1000, 107, [0, 0, 0]) return to_numeric(instruction_info, label, required_state, input_condition)
def GotoIfMultiplayerState(label: Label, state: MultiplayerState): instruction_info = (1003, 105, [0, 0]) return to_numeric(instruction_info, label, state)
def TerminateIfCoopClientCountComparison(event_end_type: EventEndType, comparison_type: ComparisonType, value: int): instruction_info = (1003, 10, [0, 0, 0]) return to_numeric(instruction_info, event_end_type, comparison_type, value)
def GotoIfCoopClientCountComparison(label: Label, comparison_type: ComparisonType, value: int): instruction_info = (1003, 109, [0, 0, 0]) return to_numeric(instruction_info, label, comparison_type, value)
def SkipLinesIfPlayerGender(skip_lines: int, gender: Gender): instruction_info = (1003, 11) return to_numeric(instruction_info, skip_lines, gender)
def SkipLinesIfMultiplayerState(line_count, state: MultiplayerState): instruction_info = (1003, 5) return to_numeric(instruction_info, line_count, state)
def GotoIfPlayerGender(label: Label, gender: Gender): instruction_info = (1003, 12) return to_numeric(instruction_info, label, gender)
def IfMultiplayerState(condition: int, state: MultiplayerState): instruction_info = (3, 6) return to_numeric(instruction_info, condition, state)
def TerminateIfPlayerGender(event_end_type: EventEndType, gender: Gender): instruction_info = (1003, 13) return to_numeric(instruction_info, event_end_type, gender)
def PlayCutsceneAndSetTimePeriod(cutscene: int, cutscene_type: CutsceneType, player_id: int, time_period_id: int): """ Probably used when you examine Laurence's skull, etc. """ instruction_info = (2002, 7, [-1, 0, -1, 0]) return to_numeric(instruction_info, cutscene, cutscene_type, player_id, time_period_id)
def IfDamageType(condition: int, attacked_entity: AnimatedInt, attacking_character: CharacterInt, damage_type: DamageType): """ Similar to IsAttackedBy, but requires a certain damage type. """ instruction_info = (3, 23, [0, 0, -1, 0]) return to_numeric(instruction_info, condition, attacked_entity, attacking_character, damage_type)