Esempio n. 1
0
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)
Esempio n. 2
0
def TerminateIfMultiplayerState(event_end_type: EventEndType, state: MultiplayerState):
    instruction_info = (1003, 6)
    return to_numeric(instruction_info, event_end_type, state)
Esempio n. 3
0
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)
Esempio n. 4
0
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)
Esempio n. 5
0
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)
Esempio n. 6
0
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)
Esempio n. 7
0
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)
Esempio n. 8
0
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)
Esempio n. 9
0
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)
Esempio n. 10
0
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)
Esempio n. 11
0
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)
Esempio n. 12
0
def IfDialogChoice(condition: int, dialog_result: DialogResult):
    instruction_info = (3, 27, [0, 0])
    return to_numeric(instruction_info, condition, dialog_result)
Esempio n. 13
0
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)
Esempio n. 14
0
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)
Esempio n. 15
0
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)
Esempio n. 16
0
def Goto(label: Label):
    """ Unconditional GOTO. """
    instruction_info = (1000, 103, [0])
    return to_numeric(instruction_info, label)
Esempio n. 17
0
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)
Esempio n. 18
0
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)
Esempio n. 19
0
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)
Esempio n. 20
0
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)
Esempio n. 21
0
def GotoIfMultiplayerState(label: Label, state: MultiplayerState):
    instruction_info = (1003, 105, [0, 0])
    return to_numeric(instruction_info, label, state)
Esempio n. 22
0
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)
Esempio n. 23
0
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)
Esempio n. 24
0
def SkipLinesIfPlayerGender(skip_lines: int, gender: Gender):
    instruction_info = (1003, 11)
    return to_numeric(instruction_info, skip_lines, gender)
Esempio n. 25
0
def SkipLinesIfMultiplayerState(line_count, state: MultiplayerState):
    instruction_info = (1003, 5)
    return to_numeric(instruction_info, line_count, state)
Esempio n. 26
0
def GotoIfPlayerGender(label: Label, gender: Gender):
    instruction_info = (1003, 12)
    return to_numeric(instruction_info, label, gender)
Esempio n. 27
0
def IfMultiplayerState(condition: int, state: MultiplayerState):
    instruction_info = (3, 6)
    return to_numeric(instruction_info, condition, state)
Esempio n. 28
0
def TerminateIfPlayerGender(event_end_type: EventEndType, gender: Gender):
    instruction_info = (1003, 13)
    return to_numeric(instruction_info, event_end_type, gender)
Esempio n. 29
0
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)
Esempio n. 30
0
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)