示例#1
0
def _test_join_to_sex_single_interaction(interaction_sim, interaction_target, sex_category_types):
    '''
    :param interaction_sim: Sim that wants to join to an existing sex interaction
    :param interaction_target: Sim that owns an existing interaction
    '''
    if interaction_target is None or not TurboTypesUtil.Sims.is_sim(interaction_target):
        return False
    if sim_ev(interaction_target).active_sex_handler is None:
        return False
    if not is_sim_ready_for_sex(interaction_sim):
        return False
    active_sex_handler = sim_ev(interaction_target).active_sex_handler
    if sim_ev(interaction_target).active_pre_sex_handler is not None and sim_ev(interaction_target).active_pre_sex_handler.get_identifier() != active_sex_handler.get_identifier():
        return False
    genders_list = list()
    for actor_sim_info in active_sex_handler.get_actors_sim_info_gen():
        genders_list.append(get_sim_sex_gender(actor_sim_info))
    genders_list.append(get_sim_sex_gender(interaction_sim))
    has_animations = False
    for sex_category_type in sex_category_types:
        while has_animations_with_params(sex_category_type, active_sex_handler.get_object_identifier(), genders_list):
            has_animations = True
            break
    if has_animations is False:
        return False
    test_incest_of_sims = () if get_relationship_setting(RelationshipSetting.INCEST_STATE, variable_type=bool) else tuple(active_sex_handler.get_actors_sim_info_gen())
    (min_age_limit, max_age_limit) = get_age_limits_for_sex(tuple(active_sex_handler.get_actors_sim_info_gen()))
    skip_sims_ids = [TurboManagerUtil.Sim.get_sim_id(actor_sim_info) for actor_sim_info in active_sex_handler.get_actors_sim_info_gen()]
    target_sim_id = TurboManagerUtil.Sim.get_sim_id(interaction_sim)
    for sim_id in get_sims_for_sex(relative_sims=test_incest_of_sims, min_sims_age=min_age_limit, max_sims_age=max_age_limit, skip_sims_ids=skip_sims_ids):
        while sim_id == target_sim_id:
            return True
    return False
示例#2
0
def get_sex_pair_score(sim_identifier, target_sim_identifier):
    if sim_identifier is target_sim_identifier:
        return -1
    age_limit = get_age_limits_for_sex((sim_identifier, target_sim_identifier))
    if TurboSimUtil.Age.is_younger_than(
            sim_identifier, age_limit[0]) or TurboSimUtil.Age.is_older_than(
                sim_identifier, age_limit[1]):
        return -1
    if TurboSimUtil.Age.is_younger_than(
            target_sim_identifier,
            age_limit[0]) or TurboSimUtil.Age.is_older_than(
                target_sim_identifier, age_limit[1]):
        return -1
    if TurboSimUtil.Gender.get_gender(
            sim_identifier) not in get_sim_preferenced_genders(
                target_sim_identifier):
        return -1
    if TurboSimUtil.Gender.get_gender(
            target_sim_identifier) not in get_sim_preferenced_genders(
                sim_identifier):
        return -1
    if is_true_family_relationship(sim_identifier, target_sim_identifier):
        return -1
    if not has_sim_trait(sim_identifier,
                         SimTrait.WW_POLYAMOROUS) and not has_sim_trait(
                             sim_identifier, SimTrait.COMMITMENTISSUES):
        sim_significant_relationships = get_sim_relationship_sims(
            sim_identifier)
        if sim_significant_relationships and TurboManagerUtil.Sim.get_sim_id(
                target_sim_identifier) not in sim_significant_relationships:
            return -1
    if get_sex_setting(
            SexSetting.AUTONOMY_RELATIONSHIP_AWARENESS,
            variable_type=bool) and not has_sim_trait(
                target_sim_identifier,
                SimTrait.WW_POLYAMOROUS) and not has_sim_trait(
                    target_sim_identifier, SimTrait.COMMITMENTISSUES):
        target_significant_relationships = get_sim_relationship_sims(
            target_sim_identifier)
        if target_significant_relationships and TurboManagerUtil.Sim.get_sim_id(
                sim_identifier) not in target_significant_relationships:
            return -1
    relationship_score = get_test_relationship_score(
        (sim_identifier, target_sim_identifier), skip_always_accept=True)
    return relationship_score
示例#3
0
def _test_join_to_sex_multiple_interaction(interaction_sim, interaction_target, sex_category_types):
    if interaction_target is None or not TurboTypesUtil.Sims.is_sim(interaction_target):
        return False
    if sim_ev(interaction_sim).active_sex_handler is None:
        return False
    active_sex_handler = sim_ev(interaction_sim).active_sex_handler
    if sim_ev(interaction_target).active_pre_sex_handler is not None and sim_ev(interaction_target).active_pre_sex_handler.get_identifier() != active_sex_handler.get_identifier():
        return False
    if sim_ev(interaction_target).active_sex_handler is None or sim_ev(interaction_sim).active_sex_handler is sim_ev(interaction_target).active_sex_handler:
        test_incest_of_sims = () if get_relationship_setting(RelationshipSetting.INCEST_STATE, variable_type=bool) else tuple(active_sex_handler.get_actors_sim_info_gen())
        (min_age_limit, max_age_limit) = get_age_limits_for_sex(tuple(active_sex_handler.get_actors_sim_info_gen()))
        skip_sims_ids = [TurboManagerUtil.Sim.get_sim_id(actor_sim_info) for actor_sim_info in active_sex_handler.get_actors_sim_info_gen()]
        target_sim_id = TurboManagerUtil.Sim.get_sim_id(interaction_target)
        has_target_sim = False
        for sim_id in get_nearby_sims_for_sex(active_sex_handler.get_los_position(), radius=16, relative_sims=test_incest_of_sims, min_sims_age=min_age_limit, max_sims_age=max_age_limit, skip_sims_ids=skip_sims_ids):
            while sim_id == target_sim_id:
                has_target_sim = True
                break
        if interaction_sim is not interaction_target and has_target_sim is False:
            return False
        for sex_category_type in sex_category_types:
            while get_animation_max_amount_of_actors(sex_category_type, active_sex_handler.get_object_identifier()[0]) > active_sex_handler.get_actors_amount() or get_animation_max_amount_of_actors(sex_category_type, active_sex_handler.get_object_identifier()[1]) > active_sex_handler.get_actors_amount():
                return True
    return False
示例#4
0
def open_start_sex_sims_picker_dialog(origin_position, pre_sex_handler):
    @exception_watch()
    def sim_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.SimPickerDialog.get_response_result(dialog):
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        selected_sim_id = TurboUIUtil.SimPickerDialog.get_tag_result(dialog)
        if not selected_sim_id:
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        selected_sim_info = TurboManagerUtil.Sim.get_sim_info(
            int(selected_sim_id))
        if selected_sim_info is None:
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        is_sim_sex_allowed = is_sim_allowed_for_animation(
            tuple(pre_sex_handler.get_actors_sim_info_gen()) +
            (selected_sim_info, ), pre_sex_handler.get_interaction_type())
        if not is_sim_sex_allowed:
            display_not_allowed_message(is_sim_sex_allowed)
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        pre_sex_handler.add_sim(selected_sim_id)
        open_start_sex_animations_picker_dialog(pre_sex_handler)
        return True

    creator_sim_info = TurboManagerUtil.Sim.get_sim_info(
        pre_sex_handler.get_creator_sim_id())
    test_incest_of_sims = () if get_relationship_setting(
        RelationshipSetting.INCEST_STATE,
        variable_type=bool) else (creator_sim_info, )
    (min_age_limit, max_age_limit) = get_age_limits_for_sex(
        (creator_sim_info, ))
    skip_males = not has_animations_with_params(
        pre_sex_handler.get_interaction_type(),
        pre_sex_handler.get_object_identifier(),
        (get_sim_sex_gender(creator_sim_info), SexGenderType.MALE))
    skip_females = not has_animations_with_params(
        pre_sex_handler.get_interaction_type(),
        pre_sex_handler.get_object_identifier(),
        (get_sim_sex_gender(creator_sim_info), SexGenderType.FEMALE))
    skip_cmales = not has_animations_with_params(
        pre_sex_handler.get_interaction_type(),
        pre_sex_handler.get_object_identifier(),
        (get_sim_sex_gender(creator_sim_info), SexGenderType.CMALE))
    skip_cfemales = not has_animations_with_params(
        pre_sex_handler.get_interaction_type(),
        pre_sex_handler.get_object_identifier(),
        (get_sim_sex_gender(creator_sim_info), SexGenderType.CFEMALE))
    sims_list = list(
        get_nearby_sims_for_sex(
            origin_position,
            radius=16,
            relative_sims=test_incest_of_sims,
            min_sims_age=min_age_limit,
            max_sims_age=max_age_limit,
            skip_males=skip_males,
            skip_females=skip_females,
            skip_cmales=skip_cmales,
            skip_cfemales=skip_cfemales,
            skip_sims_ids=(pre_sex_handler.get_creator_sim_id(), )))
    if has_animations_with_params(pre_sex_handler.get_interaction_type(),
                                  pre_sex_handler.get_object_identifier(),
                                  (get_sim_sex_gender(creator_sim_info), )):
        sims_list.insert(0, pre_sex_handler.get_creator_sim_id())
    if not sims_list:
        display_ok_dialog(text=780195446,
                          text_tokens=(get_sex_category_stbl_name(
                              pre_sex_handler.get_interaction_type()),
                                       creator_sim_info),
                          title=get_sex_category_animations_stbl_name(
                              pre_sex_handler.get_interaction_type()))
        clear_sims_sex_extra_data(
            tuple(pre_sex_handler.get_actors_sim_info_gen()))
        return
    display_sim_picker_dialog(text=906772330,
                              title=get_sex_category_animations_stbl_name(
                                  pre_sex_handler.get_interaction_type()),
                              sims_id_list=sims_list,
                              callback=sim_picker_callback)
示例#5
0
def open_start_random_sex_sims_picker_dialog(origin_position, pre_sex_handler):
    @exception_watch()
    def random_sex_sim_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.SimPickerDialog.get_response_result(dialog):
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        picked_sim_id = TurboUIUtil.SimPickerDialog.get_tag_result(dialog)
        if not picked_sim_id:
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        picked_sim = TurboManagerUtil.Sim.get_sim_info(int(picked_sim_id))
        if picked_sim is None:
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        pre_sex_handler.add_sim(picked_sim)
        random_animation = get_random_animation(
            pre_sex_handler.get_object_identifier(),
            tuple(pre_sex_handler.get_actors_sim_info_gen()))
        if random_animation is None:
            display_ok_dialog(text=2459296019, title=1890248379)
            return False
        pre_sex_handler.set_animation_instance(random_animation)
        start_sex_interaction_from_pre_sex_handler(pre_sex_handler)
        return True

    creator_sim_info = TurboManagerUtil.Sim.get_sim_info(
        pre_sex_handler.get_creator_sim_id())
    test_incest_of_sims = () if get_relationship_setting(
        RelationshipSetting.INCEST_STATE,
        variable_type=bool) else (creator_sim_info, )
    (min_age_limit, max_age_limit) = get_age_limits_for_sex(
        (creator_sim_info, ))
    skip_males = True
    skip_females = True
    skip_cmales = True
    skip_cfemales = True
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_males = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.MALE))
        if skip_males is False:
            break
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_females = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.FEMALE))
        if skip_females is False:
            break
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_cmales = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.CMALE))
        if skip_cmales is False:
            break
    for sex_category_type in (SexCategoryType.TEASING, SexCategoryType.HANDJOB,
                              SexCategoryType.FOOTJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.VAGINAL, SexCategoryType.ANAL):
        skip_cfemales = not has_animations_with_params(
            sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), SexGenderType.CFEMALE))
        if skip_cfemales is False:
            break
    sims_list = list(
        get_nearby_sims_for_sex(
            origin_position,
            radius=16,
            relative_sims=test_incest_of_sims,
            min_sims_age=min_age_limit,
            max_sims_age=max_age_limit,
            skip_males=skip_males,
            skip_females=skip_females,
            skip_cmales=skip_cmales,
            skip_cfemales=skip_cfemales,
            skip_sims_ids=(pre_sex_handler.get_creator_sim_id(), )))
    for sex_category_type in (SexCategoryType.HANDJOB, SexCategoryType.ORALJOB,
                              SexCategoryType.TEASING, SexCategoryType.VAGINAL,
                              SexCategoryType.ANAL, SexCategoryType.FOOTJOB):
        if has_animations_with_params(
                sex_category_type, pre_sex_handler.get_object_identifier(),
            (get_sim_sex_gender(creator_sim_info), )):
            sims_list.insert(0, pre_sex_handler.get_creator_sim_id())
            break
    if not sims_list:
        display_ok_dialog(text=2459296019, title=1890248379)
        clear_sims_sex_extra_data(
            tuple(pre_sex_handler.get_actors_sim_info_gen()))
        return
    if len(get_available_sex_animations()) <= 4:
        display_ok_dialog(text=1066517691, title=3113927949)
    display_sim_picker_dialog(text=906772330,
                              title=1890248379,
                              sims_id_list=sims_list,
                              callback=random_sex_sim_picker_callback)
示例#6
0
def open_join_sims_picker_dialog(pre_sex_handler,
                                 sex_category_type,
                                 selected_sims_ids=()):
    @exception_watch()
    def join_sims_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.SimPickerDialog.get_response_result(dialog):
            return False
        picked_sims_ids = TurboUIUtil.SimPickerDialog.get_tag_results(dialog)
        if not picked_sims_ids:
            return False
        picked_sims = list()
        for sim_id in picked_sims_ids:
            sim_info = TurboManagerUtil.Sim.get_sim_info(int(sim_id))
            if sim_info is None:
                return False
            picked_sims.append(sim_info)
        for sim_info in picked_sims:
            pre_sex_handler.add_sim(sim_info)
        genders_list = list()
        for sim_info in pre_sex_handler.get_actors_sim_info_gen():
            genders_list.append(get_sim_sex_gender(sim_info))
        if sex_category_type is not None:
            sex_allowed = is_sim_allowed_for_animation(tuple(picked_sims),
                                                       sex_category_type,
                                                       is_joining=True)
            if not sex_allowed:
                display_not_allowed_message(sex_allowed)
                return False
            has_animations = False
            if has_animations_with_params(
                    sex_category_type, pre_sex_handler.get_object_identifier(),
                    genders_list):
                has_animations = True
            if has_animations is False:
                display_ok_dialog(text=2693069513,
                                  title=get_sex_category_animations_stbl_name(
                                      sex_category_type))
                return False
            open_join_sex_animations_picker_dialog(pre_sex_handler,
                                                   picked_sims,
                                                   sex_category_type)
        else:
            random_animation = get_random_animation(
                pre_sex_handler.get_object_identifier(),
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            if random_animation is None:
                display_ok_dialog(text=2693069513, title=1890248379)
                return False
            pre_sex_handler.set_animation_instance(random_animation)
            join_sex_interaction_from_pre_sex_handler(pre_sex_handler,
                                                      picked_sims)
        return True

    if sex_category_type is not None:
        max_amount_of_actors = max(
            get_animation_max_amount_of_actors(
                sex_category_type,
                pre_sex_handler.get_object_identifier()[0]),
            get_animation_max_amount_of_actors(
                sex_category_type,
                pre_sex_handler.get_object_identifier()[1]))
    else:
        max_amount_of_actors = 48
    if max_amount_of_actors <= 0:
        if sex_category_type is not None:
            display_ok_dialog(
                text=443330929,
                text_tokens=(get_sex_category_animations_stbl_name(
                    sex_category_type), ),
                title=get_sex_category_animations_stbl_name(sex_category_type))
        else:
            display_ok_dialog(text=3121278879, title=1890248379)
        return
    creator_sim = TurboManagerUtil.Sim.get_sim_info(
        pre_sex_handler.get_creator_sim_id())
    test_incest_of_sims = () if get_relationship_setting(
        RelationshipSetting.INCEST_STATE, variable_type=bool) else tuple(
            pre_sex_handler.get_actors_sim_info_gen())
    (min_age_limit, max_age_limit) = get_age_limits_for_sex(
        tuple(pre_sex_handler.get_actors_sim_info_gen()))
    skip_sims_ids = [
        TurboManagerUtil.Sim.get_sim_id(actor_sim_info)
        for actor_sim_info in pre_sex_handler.get_actors_sim_info_gen()
    ]
    sims_list = tuple(
        get_nearby_sims_for_sex(pre_sex_handler.get_los_position(),
                                radius=16,
                                relative_sims=test_incest_of_sims,
                                min_sims_age=min_age_limit,
                                max_sims_age=max_age_limit,
                                skip_sims_ids=skip_sims_ids))
    if not sims_list:
        display_ok_dialog(
            text=2721401338,
            text_tokens=(get_sex_category_stbl_name(sex_category_type),
                         creator_sim),
            title=get_sex_category_animations_stbl_name(sex_category_type))
        return
    display_sim_picker_dialog(
        text=747723284,
        title=get_sex_category_animations_stbl_name(sex_category_type),
        sims_id_list=sims_list,
        selected_sims_id_list=selected_sims_ids,
        selectable_amount=max_amount_of_actors -
        pre_sex_handler.get_sims_amount(),
        sim=creator_sim,
        callback=join_sims_picker_callback)
def get_relationship_score(sim_identifier,
                           target_sim_identifier,
                           skip_always_accept=False):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)
    target_sim_info = TurboManagerUtil.Sim.get_sim_info(target_sim_identifier)
    is_npc_exclusive = TurboSimUtil.Sim.is_npc(
        sim_info) and TurboSimUtil.Sim.is_npc(target_sim_info)
    if get_sex_setting(
            SexSetting.ALWAYS_ACCEPT_STATE, variable_type=bool
    ) and is_npc_exclusive is False and skip_always_accept is False:
        return 1000
    if has_sim_trait(sim_info, SimTrait.WW_SEXUALLY_ABSTINENT):
        return -1000
    if has_sim_trait(sim_info, SimTrait.BASEMENTAL_IS_A_DRUG_DEALER) and (
            has_sim_buff(target_sim_info,
                         SimBuff.BASEMENTAL_COCAINE_SEX_PAYMENT_HIDDEN)
            or has_sim_buff(target_sim_info,
                            SimBuff.BASEMENTAL_AMPHETAMINE_SEX_PAYMENT_HIDDEN)
            or has_sim_buff(target_sim_info,
                            SimBuff.BASEMENTAL_MDMA_SEX_PAYMENT_HIDDEN)):
        return 1000
    if has_sim_trait(
            sim_info,
            SimTrait.BASEMENTAL_IS_A_COCAINE_DRUG_DEALER) and has_sim_buff(
                target_sim_info,
                SimBuff.BASEMENTAL_COCAINE_SEX_PAYMENT_HIDDEN):
        return 1000
    if has_sim_trait(
            sim_info,
            SimTrait.BASEMENTAL_IS_A_AMPHETAMINE_DRUG_DEALER) and has_sim_buff(
                target_sim_info,
                SimBuff.BASEMENTAL_AMPHETAMINE_SEX_PAYMENT_HIDDEN):
        return 1000
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.BASEMENTAL_DEALER_COCAINE_COMPANION
    ) and has_relationship_bit_with_sim(
            target_sim_info, sim_info,
            SimRelationshipBit.BASEMENTAL_DEALER_COCAINE_COMPANION):
        return 1000
    score = 0
    if is_npc_exclusive:
        pre_sex_handler = sim_ev(sim_info).active_pre_sex_handler or sim_ev(
            target_sim_info).active_pre_sex_handler
        if pre_sex_handler is not None and (pre_sex_handler.is_manual_sex() or
                                            pre_sex_handler.is_autonomy_sex()):
            return 1000
        if get_sex_setting(SexSetting.AUTONOMY_LEVEL,
                           variable_type=int) == SexAutonomyLevelSetting.LOW:
            score += 3
        elif get_sex_setting(
                SexSetting.AUTONOMY_LEVEL,
                variable_type=int) == SexAutonomyLevelSetting.NORMAL:
            score += 6
        elif get_sex_setting(
                SexSetting.AUTONOMY_LEVEL,
                variable_type=int) == SexAutonomyLevelSetting.HIGH:
            score += 20
        age_limit = get_age_limits_for_sex((sim_info, ))
        if TurboSimUtil.Age.is_younger_than(
                target_sim_info,
                age_limit[0]) or TurboSimUtil.Age.is_older_than(
                    target_sim_info, age_limit[1]):
            return -1000
        preferred_genders = get_sim_preferenced_genders(sim_info)
        if TurboSimUtil.Gender.get_gender(
                target_sim_info) in preferred_genders:
            score += 5
        else:
            score += -5
    if is_true_family_relationship(sim_info, target_sim_info):
        score += -50
    current_charisma_skill_level = get_sim_skill_level(
        sim_info, SimSkill.ADULTMAJOR_CHARISMA)
    if 1 <= current_charisma_skill_level <= 2:
        score += 2
    if 3 <= current_charisma_skill_level <= 4:
        score += 3
    if 5 <= current_charisma_skill_level <= 6:
        score += 6
    if 7 <= current_charisma_skill_level <= 8:
        score += 8
    if 9 <= current_charisma_skill_level <= 10:
        score += 12
    if has_sim_trait(sim_info, SimTrait.ALLURING):
        score += 4
    if get_relationship_setting(RelationshipSetting.JEALOUSY_STATE,
                                variable_type=bool) and not has_sim_trait(
                                    sim_info, SimTrait.WW_POLYAMOROUS):
        current_significant_sims = get_sim_relationship_sims(sim_info)
        if current_significant_sims:
            if TurboManagerUtil.Sim.get_sim_id(
                    target_sim_info) in current_significant_sims:
                score += 6 if not has_sim_trait(
                    sim_info, SimTrait.COMMITMENTISSUES) else 3
            else:
                score += -10 if not has_sim_trait(
                    sim_info, SimTrait.COMMITMENTISSUES) else -5
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_ROMANCE_STEAMY):
        score += 12
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_ROMANCE_AMOROUS):
        score += 7
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.FRIENDSHIP_BFF_BROMANTICPARTNER):
        score += 6
    if has_relationship_bit_with_sim(sim_info, target_sim_info,
                                     SimRelationshipBit.FRIENDSHIP_BFF):
        score += 5
    if has_relationship_bit_with_sim(sim_info, target_sim_info,
                                     SimRelationshipBit.FRIENDSHIP_BFF_EVIL):
        score += 4
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_ROMANCE_SUGGESTIVE):
        score += 5
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FRIENDSHIP_FRIENDLY):
        score += 4
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FUN_FUNNY):
        score += 4
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FUN_HILARIOUS):
        score += 4
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_RETAIL_MILDLYINTERESTED):
        score += 1
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_RETAIL_UNINTERESTED):
        score += 1
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_RETAIL_VERYINTERESTED):
        score += 1
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FRIENDSHIP_DISTASTEFUL):
        score += -5
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FUN_BORING):
        score += -5
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FUN_TEDIOUS):
        score += -8
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FUN_INSUFFERABLYTEDIOUS):
        score += -15
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FRIENDSHIP_OFFENSIVE):
        score += -20
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_AWKWARDNESS_AWKWARD):
        score += -23
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_AWKWARDNESS_VERYAWKWARD):
        score += -23
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.SOCIALCONTEXT_FRIENDSHIP_ABHORRENT):
        score += -25
    current_desire_level = get_sim_desire_level(sim_info)
    if current_desire_level >= 85:
        score += 10
    elif current_desire_level >= 50:
        score += 7
    current_friendship_rel_amount = get_relationship_with_sim(
        sim_info, target_sim_info, RelationshipTrackType.FRIENDSHIP)
    if -100 <= current_friendship_rel_amount <= -70:
        score += -10
    if -70 <= current_friendship_rel_amount <= -30:
        score += -5
    if -30 <= current_friendship_rel_amount <= -15:
        score += -2
    if -15 <= current_friendship_rel_amount <= 25:
        score += 4
    if 25 <= current_friendship_rel_amount <= 60:
        score += 8
    if 60 <= current_friendship_rel_amount <= 100:
        score += 10
    current_romantic_rel_amount = get_relationship_with_sim(
        sim_info, target_sim_info, RelationshipTrackType.ROMANCE)
    if -100 <= current_romantic_rel_amount <= -50:
        score += -6
    if -50 <= current_romantic_rel_amount <= 0:
        score += -3
    if 25 <= current_romantic_rel_amount <= 50:
        score += 10
    if 50 <= current_romantic_rel_amount <= 100:
        score += 25
    if has_sim_mood(sim_info, SimMood.FLIRTY):
        score += 7
    if has_sim_mood(sim_info, SimMood.DAZED):
        score += 7
    if has_sim_mood(sim_info, SimMood.CONFIDENT):
        score += 4
    if has_sim_mood(sim_info, SimMood.HAPPY):
        score += 4
    if has_sim_mood(sim_info, SimMood.PLAYFUL):
        score += 3
    if has_sim_mood(sim_info, SimMood.ENERGIZED):
        score += 2
    if has_sim_mood(sim_info, SimMood.FINE):
        score += 2
    if has_sim_mood(sim_info, SimMood.INSPIRED):
        score += 2
    if has_sim_mood(sim_info, SimMood.FOCUSED):
        score += 2
    if has_sim_mood(sim_info, SimMood.INSPIRED):
        score += 2
    if has_sim_mood(sim_info, SimMood.ANGRY):
        score += -3
    if has_sim_mood(sim_info, SimMood.STRESSED):
        score += -5
    if has_sim_mood(sim_info, SimMood.UNCOMFORTABLE):
        score += -5
    if has_sim_mood(sim_info, SimMood.BORED):
        score += -6
    if has_sim_mood(sim_info, SimMood.SAD):
        score += -10
    if has_sim_mood(sim_info, SimMood.EMBARRASSED):
        score += -13
    if has_sim_trait(
            sim_info,
            SimTrait.WW_SEXUALLY_ALLURING) and has_relationship_bit_with_sim(
                sim_info, target_sim_info, SimRelationshipBit.HAS_MET):
        score += 50
    if has_sim_trait(
            sim_info,
            SimTrait.EVIL) and get_sim_relationship_sims(target_sim_info):
        score += 4
    if has_sim_trait(sim_info, SimTrait.LONER):
        score += 3
    if has_sim_trait(sim_info, SimTrait.BRO) and has_sim_trait(
            target_sim_info, SimTrait.BRO):
        score += 1
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_PASSIONATE):
        score += 10
    if has_sim_buff(sim_info, SimBuff.CLUBS_PERKS_SOCIALBONUS_ROMANTIC):
        score += 10
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_FEARLESS):
        score += 5
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_ELATED):
        score += 5
    if has_sim_buff(sim_info, SimBuff.FESTIVAL_BLOSSOM_TEAGLOW_SAKURA):
        score += 5
    if has_sim_buff(
            sim_info, SimBuff.BASEMENTAL_MDMA_HIGH_ON_SUPER_QUALITY
    ) or (has_sim_buff(sim_info, SimBuff.BASEMENTAL_MDMA_HIGH_ON_HIGH_QUALITY)
          or has_sim_buff(
              sim_info,
              SimBuff.BASEMENTAL_MDMA_HIGH_ON_GOOD_1_QUALITY)) or has_sim_buff(
                  sim_info, SimBuff.BASEMENTAL_MDMA_HIGH_ON_GOOD_2_QUALITY):
        score += 3
    if has_sim_buff(
            sim_info,
            SimBuff.BASEMENTAL_COCAINE_HIGH_ON_HIGH_QUALITY) or has_sim_buff(
                sim_info, SimBuff.BASEMENTAL_COCAINE_HIGH_ON_MEDIUM_QUALITY):
        score += 3
    if has_sim_buff(
            sim_info,
            SimBuff.BASEMENTAL_MDMA_HIGH_ON_MEDIUM_QUALITY) or has_sim_buff(
                sim_info, SimBuff.BASEMENTAL_MDMA_HIGH_ON_LOW_QUALITY):
        score += 2
    if has_sim_buff(
            sim_info, SimBuff.BASEMENTAL_COCAINE_VERY_HIGH_ON_HIGH_QUALITY
    ) or has_sim_buff(sim_info,
                      SimBuff.BASEMENTAL_COCAINE_VERY_HIGH_ON_MEDIUM_QUALITY):
        score += 3
    if has_sim_buff(sim_info, SimBuff.BASEMENTAL_ALCOHOL_TIPSY):
        score += 1
    elif has_sim_buff(sim_info, SimBuff.BASEMENTAL_ALCOHOL_DRUNK):
        score += 2
    elif has_sim_buff(sim_info, SimBuff.BASEMENTAL_ALCOHOL_WASTED):
        score += 3
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_HUMILIATED) or has_sim_buff(
            sim_info, SimBuff.MOODHIDDEN_MORTIFIED):
        score += 1
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_PUMPED):
        score += 1
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_INTHEZONE):
        score += 1
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_IMAGINATIVE) or has_sim_buff(
            sim_info,
            SimBuff.MOODHIDDEN_MUSER_TRAITREPLACEMENT) or has_sim_buff(
                sim_info, SimBuff.MOODHIDDEN_MUSERER_TRAITREPLACEMENT):
        score += 1
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_SILLY) or has_sim_buff(
            sim_info, SimBuff.MOODHIDDEN_HYSTERICAL):
        score += 1
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_DEPRESSED) or has_sim_buff(
            sim_info, SimBuff.MOODHIDDEN_GLOOMIER):
        score += -5
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_STRESSED):
        score += -5
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_MISERABLE):
        score += -5
    if has_sim_buff(sim_info, SimBuff.MOODHIDDEN_ENRAGED) or (has_sim_buff(
            sim_info, SimBuff.MOODHIDDEN_FURIOUS) or has_sim_buff(
                sim_info, SimBuff.MOODHIDDEN_HOTHEAD2)) or has_sim_buff(
                    sim_info, SimBuff.MOODHIDDEN_HOTHEAD3):
        score += -5
    if has_sim_buff(target_sim_info, SimBuff.OBJECT_DRINK_FLIRTY):
        score += 10
    if has_sim_buff(target_sim_info, SimBuff.BROKENUPORDIVORCED_HIDDEN):
        score += -5
    if has_relationship_bit_with_sim(
            sim_info, target_sim_info,
            SimRelationshipBit.ROMANTIC_HASBEENUNFAITHFUL):
        score += -8
    if len(
            get_sim_ids_with_relationsip_bit(
                sim_info,
                SimRelationshipBit.SHORTTERM_JUSTBROKEUPORDIVORCED)) > 0:
        score += -18
    if has_sim_situation_job(
            sim_info,
            SimSituationJob.RESTAURANTDINER_SUB_NPC_BADDATE_ANGRYSIM):
        score += -25
    current_higiene_motive = get_sim_motive_value(sim_info, SimMotive.HYGIENE)
    if current_higiene_motive <= -50:
        score += -12
    if current_higiene_motive == -100:
        score += -8
    return score