Esempio n. 1
0
def inputSexChoice_func():
    '''
    玩家选择性别流程
    输入0-3:选择对应性别(Man/Woman/Futa/Asexual)
    输入4:随机选择一个性别
    输入5:返回请求输入性别流程
    '''
    sex = list(TextLoading.getTextData(TextLoading.rolePath, 'Sex').keys())
    sexMax = len(sex)
    flowReturn = CreatorCharacterPanel.inputSexChoicePanel()
    if flowReturn in range(0,sexMax):
        sexAtr = sex[flowReturn]
        CacheContorl.characterData['character'][0].Sex = sexAtr
        PyCmd.clr_cmd()
        inputSexConfirm_func()
    elif flowReturn == 4:
        rand = random.randint(0, len(sex) - 1)
        sexAtr = sex[rand]
        CacheContorl.characterData.characterData['character'][0].Sex = sexAtr
        PyCmd.clr_cmd()
        inputSexConfirm_func()
    elif flowReturn == 5:
        EraPrint.p('\n')
        PyCmd.clr_cmd()
        inputSexConfirm_func()
Esempio n. 2
0
def seeClothingInfoPanel(characterId:str,clothingType:str,clothingId:str,wearClothingJudge:bool):
    '''
    查看服装详细信息面板
    Keyword arguments:
    characterId -- 角色id
    clothingType -- 服装类型
    clothingId -- 服装id
    '''
    EraPrint.plt(TextLoading.getTextData(TextLoading.stageWordPath,'126'))
    clothingData = CacheContorl.characterData['character'][characterId]['Clothing'][clothingType][clothingId]
    infoList = []
    clothingName = clothingData['Name']
    if wearClothingJudge:
        clothingName += ' ' + TextLoading.getTextData(TextLoading.stageWordPath,'125')
    infoList.append(TextLoading.getTextData(TextLoading.stageWordPath,'128') + clothingName)
    clothingTypeText = Clothing.clothingTypeTextList[clothingType]
    infoList.append(TextLoading.getTextData(TextLoading.stageWordPath,'129') + clothingTypeText)
    evaluationText = TextLoading.getTextData(TextLoading.stageWordPath,'131') + clothingData['Evaluation']
    infoList.append(evaluationText)
    EraPrint.plist(infoList,3,'center')
    EraPrint.sontitleprint(TextLoading.getTextData(TextLoading.stageWordPath,'130'))
    tagTextList = []
    for tag in Clothing.clothingTagTextList:
        tagText = Clothing.clothingTagTextList[tag]
        tagText += str(clothingData[tag])
        tagTextList.append(tagText)
    EraPrint.plist(tagTextList,4,'center')
    EraPrint.sontitleprint(TextLoading.getTextData(TextLoading.stageWordPath,'127'))
    EraPrint.p(clothingData['Describe'])
Esempio n. 3
0
def seeCharacterListPanel(maxPage):
    titleText = TextLoading.getTextData(TextLoading.stageWordPath,'74')
    EraPrint.plt(titleText)
    inputS = []
    pageId = int(CacheContorl.panelState['SeeCharacterListPanel'])
    pageShow = int(GameConfig.characterlist_show)
    maxPage = int(maxPage)
    characterMax = CharacterHandle.getCharacterIndexMax()
    if pageId == maxPage:
        showPageStart = pageShow * pageId
        showPageOver = showPageStart + (characterMax + 1 - showPageStart)
    else:
        showPageOver = pageShow * (pageId + 1)
        showPageStart = showPageOver - pageShow
    for i in range(showPageStart,showPageOver):
        characterId = str(i)
        cmdId = i - showPageStart
        cmdIdText = CmdButtonQueue.idIndex(cmdId)
        cmdText = AttrText.getCharacterAbbreviationsInfo(characterId)
        cmdIdTextIndex = TextHandle.getTextIndex(cmdIdText)
        windowWidth = int(GameConfig.text_width)
        textWidth = windowWidth - cmdIdTextIndex
        cmdText = TextHandle.align(cmdText,'center',textWidth=textWidth)
        cmdText = cmdIdText + ' ' + cmdText
        cmdId = str(cmdId)
        EraPrint.plittleline()
        PyCmd.pcmd(cmdText, cmdId, None)
        inputS.append(cmdId)
        EraPrint.p('\n')
    pageText = '(' + str(pageId) + '/' + str(maxPage) + ')'
    EraPrint.printPageLine(sample = '-',string = pageText)
    EraPrint.p('\n')
    return inputS
Esempio n. 4
0
def seeInstructHeadPanel() -> list:
    '''
    绘制指令面板的头部过滤器面板
    Return arguments:
    list -- 绘制的按钮列表
    '''
    EraPrint.plt(TextLoading.getTextData(TextLoading.stageWordPath, '146'))
    instructData = TextLoading.getTextData(TextLoading.cmdPath,
                                           CmdButtonQueue.instructheadpanel)
    if CacheContorl.instructFilter == {}:
        CacheContorl.instructFilter = {
            instruct: 0
            for instruct in instructData
        }
        CacheContorl.instructFilter['Dialogue'] = 1
    styleData = {
        instructData[instruct]: "selectmenu"
        for instruct in instructData
        if CacheContorl.instructFilter[instruct] == 0
    }
    onStyleData = {
        instructData[instruct]: "onselectmenu"
        for instruct in instructData
        if CacheContorl.instructFilter[instruct] == 0
    }
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '147'))
    return CmdButtonQueue.optionstr(None, len(instructData), 'center', False,
                                    False, list(instructData.values()), '',
                                    list(instructData.keys()), styleData,
                                    onStyleData)
Esempio n. 5
0
def enterCharacterNatureHead():
    '''
    用于确认角色性格的头部面板
    '''
    EraPrint.p('\n')
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '39'))
Esempio n. 6
0
def detailedSetting2Panel():
    EraPrint.p('\n')
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '11'))
    yrn = CmdButtonQueue.optionstr(CmdButtonQueue.detailedsetting2, 5,
                                   'center', True)
    return yrn
Esempio n. 7
0
def inputSexPanel():
    characterId = CacheContorl.characterData['characterId']
    sexId = CacheContorl.characterData['character'][characterId]['Sex']
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '8')[sexId])
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.currencymenu, 1)
    EraPrint.p('\n')
    return yrn
Esempio n. 8
0
def loadGamePanel():
    '''
    载入游戏动画绘制
    '''
    EraPrint.pnextscreen()
    EraPrint.pnextscreen()
    EraPrint.pobo(1 / 3, TextLoading.getTextData(TextLoading.messagePath, '1'))
    EraPrint.p('\n')
Esempio n. 9
0
def inputNickNamePanel():
    characterId = CacheContorl.characterData['characterId']
    CacheContorl.characterData['character'][
        characterId] = CacheContorl.temporaryCharacter.copy()
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '6'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.inputnickname, 1)
    EraPrint.p('\n')
    return yrn
Esempio n. 10
0
def gameHelpPanel():
    PyCmd.clr_cmd()
    titleInfo = TextLoading.getTextData(TextLoading.stageWordPath, '85')
    EraPrint.plt(titleInfo)
    EraPrint.p(TextLoading.getTextData(TextLoading.messagePath, '31'))
    EraPrint.p('\n')
    inputs = CmdButtonQueue.optionint(CmdButtonQueue.gamehelp, askfor=False)
    EraPrint.plittleline()
    return inputs
Esempio n. 11
0
def inputNickNamePanel() -> str:
    '''
    请求玩家输入昵称面板
    '''
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '6'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.inputnickname)
    EraPrint.p('\n')
    return yrn
Esempio n. 12
0
def inputNamePanel() -> str:
    '''
    请求玩家输入姓名面板
    '''
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '4'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.currencymenu)
    EraPrint.p('\n')
    return yrn
Esempio n. 13
0
def inputSexChoicePanel() -> str:
    '''
    玩家性别选择面板
    '''
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '7'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.sexmenu)
    EraPrint.p('\n')
    return yrn
Esempio n. 14
0
def main_func():
    ans = MainPanel.gameMainPanel()
    if ans == 0:
        EraPrint.p('\n')
        newgame_func()
    elif ans == 1:
        loadgame_func()
    elif ans == 2:
        quitgame_func()
Esempio n. 15
0
def seeCharacterItemPanel(characterId:int):
    '''
    查看角色道具面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plt(TextLoading.getTextData(TextLoading.stageWordPath, '38'))
    EraPrint.p(AttrText.getSeeAttrPanelHeadCharacterInfo(characterId))
    UseItemPanel.seeCharacterItemPanel(characterId)
Esempio n. 16
0
def seeCharacterEquipmentPanel(characterId:int):
    '''
    查看角色装备面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plt(TextLoading.getTextData(TextLoading.stageWordPath, '37'))
    EraPrint.p(AttrText.getSeeAttrPanelHeadCharacterInfo(characterId))
    ChangeClothesPanel.seeCharacterWearClothes(characterId,False)
Esempio n. 17
0
def detailedSetting8Panel() -> str:
    '''
    询问玩家肥胖程度面板
    '''
    EraPrint.p('\n')
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '29'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.detailedsetting8)
    return yrn
Esempio n. 18
0
def inputSelfNamePanel():
    characterId = CacheContorl.characterData['characterId']
    PyCmd.clr_cmd()
    CacheContorl.characterData['character'][
        characterId] = CacheContorl.temporaryCharacter.copy()
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '14'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.inputselfname, 1)
    EraPrint.p('\n')
    return yrn
Esempio n. 19
0
def inputNamePanel():
    characterId = CacheContorl.characterData['characterId']
    CacheContorl.characterData['character'][
        characterId] = CacheContorl.temporaryCharacter.copy()
    AttrCalculation.setDefaultCache()
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '4'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.currencymenu, 1)
    EraPrint.p('\n')
    return yrn
Esempio n. 20
0
def seeSceneCharacterListPanel():
    inputS = []
    seeCharacterText = TextLoading.getTextData(TextLoading.messagePath,'26')
    EraPrint.p(seeCharacterText)
    EraPrint.p('\n')
    scenePath = CacheContorl.characterData['character']['0']['Position']
    nameList = MapHandle.getSceneCharacterNameList(scenePath,True)
    nameList = getNowPageNameList(nameList)
    inputS = CmdButtonQueue.optionstr('',cmdColumn=10,cmdSize='center',askfor=False,cmdListData=nameList)
    return inputS
Esempio n. 21
0
def inputSelfNamePanel() -> str:
    '''
    请求玩家输入自称面板
    '''
    PyCmd.clr_cmd()
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '14'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.inputselfname)
    EraPrint.p('\n')
    return yrn
Esempio n. 22
0
def seeCharacterWearClothes(characterId:str):
    '''
    查看角色已穿戴服装列表面板
    Keyword arguments:
    characterId -- 角色id
    '''
    sceneInfo = TextLoading.getTextData(TextLoading.stageWordPath,'79')
    EraPrint.plt(sceneInfo)
    characterInfo = AttrText.getCharacterAbbreviationsInfo(characterId)
    EraPrint.p(characterInfo)
Esempio n. 23
0
def ownCharcterMove(targetScene):
    moveNow = characterMove('0', targetScene)
    if moveNow == 'Null':
        nullMessage = TextLoading.getTextData(TextLoading.messagePath, '30')
        EraPrint.p(nullMessage)
        Update.gameUpdateFlow()
        InScene.getInScene_func()
    elif moveNow == 'End':
        Update.gameUpdateFlow()
        InScene.getInScene_func()
    else:
        ownCharcterMove(targetScene)
Esempio n. 24
0
def jumpCharacterListPagePanel() -> str:
    '''
    角色列表页面跳转控制面板
    '''
    messageText = TextLoading.getTextData(TextLoading.messagePath, '32')
    nameListMax = int(GameConfig.in_scene_see_player_max)
    characterMax = CharacterHandle.getCharacterIndexMax()
    pageMax = math.floor(characterMax / nameListMax)
    EraPrint.p('\n' + messageText + '(0-' + str(pageMax) + ')')
    ans = InputQueue.waitInput(0, pageMax)
    EraPrint.p(ans)
    return ans
Esempio n. 25
0
def printHpAndMpBar(characterId: str):
    '''
    绘制角色的hp和mp(有比例图),自动居中处理,结尾换行
    Keyword arguments:
    characterId -- 角色id
    '''
    hpBar = getHpOrMpBar(characterId, 'HitPoint',
                         GameConfig.text_width / 2 - 4)
    mpBar = getHpOrMpBar(characterId, 'ManaPoint',
                         GameConfig.text_width / 2 - 4)
    EraPrint.p('\n')
    EraPrint.plist([hpBar, mpBar], 2, 'center')
    EraPrint.p('\n')
Esempio n. 26
0
def askForChangeSavePagePanel(startId):
    cmdList = TextLoading.getTextData(TextLoading.cmdPath, "changeSavePage")
    savePanelPage = str(CacheContorl.panelState['SeeSaveListPanel'])
    maxSavePanelPage = str(CacheContorl.maxSavePage)
    savePageText = '(' + savePanelPage + '/' + maxSavePanelPage + ')'
    EraPrint.printPageLine(sample='-', string=savePageText)
    EraPrint.p('\n')
    yrn = CmdButtonQueue.optionint(None,
                                   3,
                                   askfor=False,
                                   cmdSize='center',
                                   startId=startId,
                                   cmdListData=cmdList)
    return yrn
Esempio n. 27
0
def seeScenePanel():
    '''
    当前场景信息面板
    '''
    titleText = TextLoading.getTextData(TextLoading.stageWordPath, '75')
    EraPrint.plt(titleText)
    timeText = GameTime.getDateText()
    EraPrint.p(timeText)
    EraPrint.p(' ')
    scenePath = CacheContorl.characterData['character'][0].Position
    scenePathStr = MapHandle.getMapSystemPathStrForList(scenePath)
    mapList = MapHandle.getMapHierarchyListForScenePath(scenePath, [])
    mapPathText = ''
    mapList.reverse()
    for nowMap in mapList:
        nowMapMapSystemStr = MapHandle.getMapSystemPathStrForList(nowMap)
        mapName = CacheContorl.mapData[nowMapMapSystemStr]['MapName']
        mapPathText += mapName + '-'
    sceneData = CacheContorl.sceneData[scenePathStr].copy()
    sceneName = mapPathText + sceneData['SceneName']
    sceneInfoHead = TextLoading.getTextData(TextLoading.stageWordPath, '76')
    sceneInfo = sceneInfoHead + sceneName
    EraPrint.p(sceneInfo)
    panelState = CacheContorl.panelState['SeeSceneCharacterListPage']
    switch = panelStateOnText
    if panelState == '0':
        switch = panelStateOffText
    sceneCharacterList = sceneData['SceneCharacterData']
    if len(sceneCharacterList) > 1:
        EraPrint.p(' ')
        PyCmd.pcmd(switch, 'SeeSceneCharacterListPage')
    EraPrint.plittleline()
Esempio n. 28
0
def seeCharacterWearItemPanelForPlayer(characterId: int) -> list:
    '''
    用于场景中查看穿戴道具列表的控制面板
    Keyword arguments:
    characterId -- 角色Id
    changeButton -- 将角色穿戴道具列表绘制成按钮的开关
    '''
    EraPrint.plt(TextLoading.getTextData(TextLoading.stageWordPath, '40'))
    EraPrint.p(AttrText.getSeeAttrPanelHeadCharacterInfo(characterId))
    EraPrint.pline('.')
    if characterId == 0:
        return seeCharacterWearItemPanel(characterId, True)
    else:
        return seeCharacterWearItemPanel(characterId, False)
Esempio n. 29
0
def seeScenePanel():
    '''
    当前场景信息面板
    '''
    titleText = TextLoading.getTextData(TextLoading.stageWordPath, '75')
    EraPrint.plt(titleText)
    timeText = GameTime.getDateText()
    EraPrint.p(timeText)
    EraPrint.p(' ')
    scenePath = CacheContorl.characterData['character']['0']['Position']
    scenePathStr = MapHandle.getMapSystemPathStrForList(scenePath)
    sceneData = CacheContorl.sceneData[scenePathStr].copy()
    sceneName = sceneData['SceneName']
    sceneInfoHead = TextLoading.getTextData(TextLoading.stageWordPath, '76')
    sceneInfo = sceneInfoHead + sceneName
    EraPrint.p(sceneInfo)
    panelState = CacheContorl.panelState['SeeSceneCharacterListPage']
    switch = panelStateOnText
    if panelState == '0':
        switch = panelStateOffText
    sceneCharacterList = sceneData['SceneCharacterData']
    if len(sceneCharacterList) > 1:
        EraPrint.p(' ')
        PyCmd.pcmd(switch, 'SeeSceneCharacterListPage')
    EraPrint.plittleline()
Esempio n. 30
0
def inputSelfName_func():
    flowReturn = CreatorCharacterPanel.inputSelfNamePanel()
    if flowReturn == 0:
        PyCmd.clr_cmd()
        inputSexConfirm_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        CreatorCharacterPanel.startInputSelfName()
        PyCmd.clr_cmd()
        inputSelfName_func()
    elif flowReturn == 2:
        EraPrint.p('\n')
        PyCmd.clr_cmd()
        inputNickName_func()
    pass