Exemplo n.º 1
0
def see_character_status_panel(character_id: str):
    """
    查看角色状态面板
    Keyword arguments:
    character_id -- 角色Id
    """
    status_text_data = text_loading.get_text_data(
        constant.FilePath.STAGE_WORD_PATH, "134"
    )
    character_data = cache_contorl.character_data["character"][character_id]
    status_data = character_data.status
    for state_type in status_data:
        era_print.son_title_print(status_text_data[state_type])
        now_status_data = status_data[state_type].copy()
        if state_type == "SexFeel":
            if character_data.sex == "Man":
                del now_status_data["VaginaDelight"]
                del now_status_data["ClitorisDelight"]
                del now_status_data["VaginaLubrication"]
            elif character_data.sex == "Woman":
                del now_status_data["PenisDelight"]
            elif character_data.sex == "Asexual":
                del now_status_data["VaginaDelight"]
                del now_status_data["ClitorisDelight"]
                del now_status_data["VaginaLubrication"]
                del now_status_data["PenisDelight"]
        now_status_text_list = [
            status_text_data[state] + ":" + str(now_status_data[state])
            for state in now_status_data
        ]
        size = 7
        if len(now_status_text_list) < size:
            size = len(now_status_text_list)
        era_print.list_print(now_status_text_list, size, "center")
    era_print.line_feed_print()
def see_character_social_contact_panel(character_id: int):
    """
    查看角色社交信息面板
    Keyword arguments:
    character_id -- 角色Id
    """
    social_contact_text_data = text_loading.get_text_data(
        constant.FilePath.STAGE_WORD_PATH, "144"
    )
    character_social_contact = cache_contorl.character_data[
        character_id
    ].social_contact
    for social in social_contact_text_data:
        era_print.son_title_print(social_contact_text_data[social])
        if character_social_contact[social] == {}:
            era_print.normal_print(
                text_loading.get_text_data(
                    constant.FilePath.MESSAGE_PATH, "40"
                )
            )
        else:
            size = 10
            if len(character_social_contact[social]) < 10:
                size = len(character_social_contact[social])
            name_list = [
                cache_contorl.character_data[character_id].name
                for character_id in character_social_contact[social]
            ]
            era_print.list_print(name_list, size, "center")
Exemplo n.º 3
0
def see_clothing_info_panel(
    character_id: str,
    clothing_type: str,
    clothing_id: str,
    wear_clothing_judge: bool,
):
    """
    查看服装详细信息面板
    Keyword arguments:
    character_id -- 角色id
    clothing_type -- 服装类型
    clothing_id -- 服装id
    """
    era_print.little_title_print(
        text_loading.get_text_data(constant.FilePath.STAGE_WORD_PATH, "126")
    )
    clothing_data = cache_contorl.character_data[character_id].clothing[
        clothing_type
    ][clothing_id]
    info_list = []
    clothing_name = clothing_data["Name"]
    if wear_clothing_judge:
        clothing_name += " " + text_loading.get_text_data(
            constant.FilePath.STAGE_WORD_PATH, "125"
        )
    info_list.append(
        text_loading.get_text_data(constant.FilePath.STAGE_WORD_PATH, "128")
        + clothing_name
    )
    clothing_type_text = clothing.clothing_type_text_list[clothing_type]
    info_list.append(
        text_loading.get_text_data(constant.FilePath.STAGE_WORD_PATH, "129")
        + clothing_type_text
    )
    evaluation_text = (
        text_loading.get_text_data(constant.FilePath.STAGE_WORD_PATH, "131")
        + clothing_data["Evaluation"]
    )
    info_list.append(evaluation_text)
    era_print.list_print(info_list, 3, "center")
    era_print.son_title_print(
        text_loading.get_text_data(constant.FilePath.STAGE_WORD_PATH, "130")
    )
    tag_text_list = []
    for tag in clothing.clothing_tag_text_list:
        tag_text = clothing.clothing_tag_text_list[tag]
        tag_text += str(clothing_data[tag])
        tag_text_list.append(tag_text)
    era_print.list_print(tag_text_list, 4, "center")
    era_print.son_title_print(
        text_loading.get_text_data(constant.FilePath.STAGE_WORD_PATH, "127")
    )
    era_print.normal_print(clothing_data["Describe"])
Exemplo n.º 4
0
def main_frame_panel() -> list:
    """
    游戏主菜单
    """
    cmd_list = []
    character_id = cache_contorl.character_data[0].target_character_id
    character_data = cache_contorl.character_data[character_id]
    title_text = text_loading.get_text_data(constant.FilePath.STAGE_WORD_PATH,
                                            "64")
    era_print.little_title_print(title_text)
    date_text = game_time.get_date_text()
    era_print.normal_print(date_text)
    era_print.normal_print(" ")
    week_date_text = game_time.get_week_day_text()
    era_print.normal_print(week_date_text)
    era_print.normal_print(" ")
    character_name = character_data.name
    py_cmd.pcmd(character_name, character_name, None)
    cmd_list.append(character_name)
    era_print.normal_print(" ")
    gold_text = attr_text.get_gold_text(character_id)
    era_print.line_feed_print(gold_text)
    attr_print.print_hp_and_mp_bar(character_id)
    main_menu_text = text_loading.get_text_data(
        constant.FilePath.STAGE_WORD_PATH, "68")
    era_print.son_title_print(main_menu_text)
    era_print.line_feed_print("\n")
    ask_for_main_menu = cmd_button_queue.option_int(constant.CmdMenu.MAIN_MENU,
                                                    3,
                                                    "left",
                                                    askfor=False,
                                                    cmd_size="center")
    cmd_list = cmd_list + ask_for_main_menu
    system_menu_text = text_loading.get_text_data(
        constant.FilePath.STAGE_WORD_PATH, "69")
    era_print.son_title_print(system_menu_text)
    era_print.line_feed_print()
    system_menu_start_id = len(ask_for_main_menu)
    ask_for_system_menu = cmd_button_queue.option_int(
        constant.CmdMenu.SYSTEM_MENU,
        4,
        "left",
        askfor=False,
        cmd_size="center",
        start_id=system_menu_start_id,
    )
    cmd_list = cmd_list + ask_for_system_menu
    return cmd_list
Exemplo n.º 5
0
def see_character(character_id: str, judge: bool) -> list:
    """
    用于任何时候查看角色性格信息面板
    Keyword arguments:
    character_id -- 角色Id
    judge -- 绘制按钮校验
    Return arguments:
    list -- 按钮列表
    """
    nature_text_data = text_loading.get_game_data(
        constant.FilePath.NATURE_PATH)
    character_nature = cache_contorl.character_data[character_id].nature
    cmd_list = []
    for nature in nature_text_data:
        nature_text = nature_text_data[nature]["Name"]
        if "Good" in nature_text:
            now_nature_values = [
                character_nature[son_nature]
                for son_nature in nature_text_data[nature]["Factor"]
            ]
            now_nature_value = sum(now_nature_values)
            now_nature_max = len(now_nature_values) * 100
            if now_nature_value < now_nature_max / 2:
                nature_text = nature_text["Bad"]
            else:
                nature_text = nature_text["Good"]
        era_print.son_title_print(nature_text)
        info_list = [
            nature_text_data[nature]["Factor"][son_nature][judge_nature_good(
                character_nature[son_nature])]
            for son_nature in nature_text_data[nature]["Factor"]
        ]
        if judge:
            now_son_list = [son for son in nature_text_data[nature]["Factor"]]
            cmd_list += now_son_list
            cmd_button_queue.option_str(
                None,
                len(now_son_list),
                "center",
                False,
                False,
                info_list,
                "",
                now_son_list,
            )
        else:
            era_print.list_print(info_list, len(info_list), "center")
    return cmd_list
Exemplo n.º 6
0
def see_character_knowledge_panel(character_id: str):
    """
    查看角色技能信息面板
    Keyword arguments:
    character_id -- 角色Id
    """
    knowledge_text_data = text_loading.get_game_data(
        constant.FilePath.KNOWLEDGE_PATH)
    character_knowledge = cache_contorl.character_data["character"][
        character_id].knowledge
    for knowledge in knowledge_text_data:
        era_print.son_title_print(knowledge_text_data[knowledge]["Name"])
        if knowledge in character_knowledge:
            info_list = [
                knowledge_text_data[knowledge]["Knowledge"][skill]["Name"] +
                ":" + attr_text.get_level_color_text(
                    character_knowledge[knowledge][skill])
                for skill in character_knowledge[knowledge]
            ]
            era_print.list_print(info_list, 6, "center")