Exemplo n.º 1
0
def showSceneNameListPanel() -> str:
    '''
    地图下场景名称绘制面板
    '''
    titleText = TextLoading.getTextData(TextLoading.stageWordPath, '86')
    EraPrint.p(titleText)
    panelState = CacheContorl.panelState['SeeSceneNameListPanel']
    if panelState == '0':
        PyCmd.pcmd(panelStateOffText, "SeeSceneNameListPanel")
        EraPrint.p('\n')
        nowMap = CacheContorl.nowMap
        nowPosition = CacheContorl.characterData['character']['0']['Position']
        nowScene = MapHandle.getSceneIdInMapForScenePathOnMapPath(
            nowPosition, nowMap)
        nowMapMapSystemStr = MapHandle.getMapSystemPathStrForList(nowMap)
        sceneNameData = MapHandle.getSceneNameListForMapPath(
            nowMapMapSystemStr)
        sceneNameList = {}
        nullScene = nowScene
        for scene in sceneNameData:
            sceneNameList[scene] = scene + ':' + sceneNameData[scene]
        CmdButtonQueue.optionstr(None, 4, 'center', False, False,
                                 list(sceneNameList.values()), nullScene,
                                 list(sceneNameList.keys()))
    else:
        PyCmd.pcmd(panelStateOnText, 'SeeSceneNameListPanel')
        EraPrint.p('\n')
    EraPrint.plittleline()
    return 'SeeSceneNameListPanel'
Exemplo n.º 2
0
def seeAttrOnEveryTime_func(oldPanel, tooOldFlow=None):
    characterId = CacheContorl.characterData['characterId']
    if oldPanel == 'InScenePanel':
        sceneId = CacheContorl.characterData['character']['0']['Position']
        characterIdList = MapHandle.getSceneCharacterIdList(sceneId)
    else:
        characterIdList = ValueHandle.dictKeysToList(
            CacheContorl.characterData['character'])
    characterIdIndex = characterIdList.index(characterId)
    inputS = []
    seeAttrList = seeAttrInEveryTime_func()
    inputS = inputS + seeAttrList
    askSeeAttr = SeeCharacterAttrPanel.askForSeeAttr()
    inputS = inputS + askSeeAttr
    yrn = GameInit.askfor_All(inputS)
    PyCmd.clr_cmd()
    showAttrHandleData = TextLoading.getTextData(TextLoading.cmdPath,
                                                 'seeAttrPanelHandle')
    characterMax = characterIdList[len(characterIdList) - 1]
    if yrn in showAttrHandleData:
        index = showAttrHandleData.index(yrn)
        index = str(index)
        CacheContorl.panelState['AttrShowHandlePanel'] = index
        seeAttrOnEveryTime_func(oldPanel, tooOldFlow)
    elif yrn in panelList:
        PanelStateHandle.panelStateChange(yrn)
        seeAttrOnEveryTime_func(oldPanel, tooOldFlow)
    elif yrn == '0':
        if characterIdIndex == 0:
            CacheContorl.characterData['characterId'] = characterMax
            seeAttrOnEveryTime_func(oldPanel, tooOldFlow)
        else:
            characterId = characterIdList[characterIdIndex - 1]
            CacheContorl.characterData['characterId'] = characterId
            seeAttrOnEveryTime_func(oldPanel, tooOldFlow)
    elif yrn == '1':
        from script.Flow import Main, SeeCharacterList, InScene
        if oldPanel == 'MainFramePanel':
            SeeCharacterAttrPanel.initShowAttrPanelList()
            CacheContorl.characterData['characterId'] = '0'
            Main.mainFrame_func()
        elif oldPanel == 'SeeCharacterListPanel':
            characterListShow = int(GameConfig.characterlist_show)
            nowPageId = characterIdIndex / characterListShow
            CacheContorl.panelState['SeeCharacterListPanel'] = nowPageId
            SeeCharacterAttrPanel.initShowAttrPanelList()
            SeeCharacterList.seeCharacterList_func(tooOldFlow)
        elif oldPanel == 'InScenePanel':
            SeeCharacterAttrPanel.initShowAttrPanelList()
            CacheContorl.characterData['characterId'] = '0'
            InScene.getInScene_func()
    elif yrn == '2':
        if characterId == characterMax:
            characterId = characterIdList[0]
            CacheContorl.characterData['characterId'] = characterId
            seeAttrOnEveryTime_func(oldPanel, tooOldFlow)
        else:
            characterId = characterIdList[characterIdIndex + 1]
            CacheContorl.characterData['characterId'] = characterId
            seeAttrOnEveryTime_func(oldPanel, tooOldFlow)
Exemplo n.º 3
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()
Exemplo n.º 4
0
def detailedSetting_func6():
    flowReturn = CreatorCharacterPanel.detailedSetting6Panel()
    selfConfidenceList = featuresList['SelfConfidence']
    CacheContorl.featuresList['SelfConfidence'] = selfConfidenceList[flowReturn]
    CacheContorl.temporaryCharacter['Features'] = CacheContorl.featuresList.copy()
    PyCmd.clr_cmd()
    detailedSetting_func7()
Exemplo n.º 5
0
def askForMainFrame(ansList):
    characterId = CacheContorl.characterData['characterId']
    characterData = AttrHandle.getAttrData(characterId)
    characterName = characterData['Name']
    ans = GameInit.askfor_All(ansList)
    PyCmd.clr_cmd()
    if ans == characterName:
        mainFrameSeeAttrPanel()
    elif ans == '0':
        InScene.getInScene_func()
    elif ans == '1':
        SeeCharacterList.seeCharacterList_func('MainFramePanel')
    elif ans == '2':
        ChangeClothes.changeCharacterClothes(characterId)
    elif ans == '3':
        Shop.shopMainFrame_func()
    elif ans == '4':
        GameSetting.changeGameSetting_func()
    elif ans == '5':
        GameHelp.gameHelp_func()
    elif ans == '6':
        SaveHandleFrame.establishSave_func('MainFramePanel')
    elif ans == '7':
        SaveHandleFrame.loadSave_func('MainFramePanel')
        pass
Exemplo n.º 6
0
def acknowledgmentAttribute_func():
    '''
    创建角色时用于查看角色属性的流程
    '''
    while (True):
        characterId = CacheContorl.characterData['characterId']
        CharacterHandle.initCharacterList()
        inputS = []
        seeAttrInEveryTime_func()
        flowReturn = SeeCharacterAttrPanel.inputAttrOverPanel()
        inputS = flowReturn + inputS
        characterId = CacheContorl.characterData['characterId']
        yrn = GameInit.askfor_All(inputS)
        showAttrHandleData = TextLoading.getTextData(TextLoading.cmdPath,
                                                     'seeAttrPanelHandle')
        PyCmd.clr_cmd()
        if yrn in panelList:
            PanelStateHandle.panelStateChange(yrn)
        elif yrn == '0':
            GameStartFlow.initGameStart()
            break
        elif yrn == '1':
            CacheContorl.wframeMouse['wFrameRePrint'] = 1
            EraPrint.pnextscreen()
            CacheContorl.nowFlowId = 'title_frame'
            break
        elif yrn in showAttrHandleData:
            CacheContorl.panelState['AttrShowHandlePanel'] = str(
                showAttrHandleData.index(yrn))
Exemplo n.º 7
0
def enterCharacterNature_func():
    '''
    请求玩家确认性格流程
    '''
    CacheContorl.characterData['character'][0].initAttr()
    while 1:
        PyCmd.clr_cmd()
        CreatorCharacterPanel.enterCharacterNatureHead()
        inputS = SeeNaturePanel.seeCharacterNatureChangePanel(0)
        inputS += CreatorCharacterPanel.enterCharacterNatureEnd()
        yrn = GameInit.askfor_All(inputS)
        if yrn in CacheContorl.characterData['character'][0].Nature:
            if CacheContorl.characterData['character'][0].Nature[yrn] < 50:
                CacheContorl.characterData['character'][0].Nature[
                    yrn] = random.uniform(50, 100)
            else:
                CacheContorl.characterData['character'][0].Nature[
                    yrn] = random.uniform(0, 50)
        elif int(yrn) == 0:
            CacheContorl.characterData['character'][0].initAttr()
            CacheContorl.nowFlowId = 'acknowledgment_attribute'
            break
        elif int(yrn) == 1:
            CacheContorl.characterData['character'][
                0].Nature = Nature.getRandomNature()
Exemplo n.º 8
0
def seeCharacterEquipmentPanel(characterId: str) -> str:
    '''
    查看角色装备面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '37'))
    panelState = CacheContorl.panelState['CharacterEquipmentPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterEquipmentPanel')
        characterData = AttrHandle.getAttrData(characterId)
        EraPrint.p('\n')
        EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '39'))
        EraPrint.p('\n')
        characterClothingList = characterData['Clothing']
        characterClothingText = AttrText.getClothingText(characterClothingList)
        EraPrint.plist(characterClothingText, 4, 'center')
        EraPrint.p('\n')
        EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '40'))
        EraPrint.p('\n')
        characterSexItemList = characterData['SexItem']
        characterSexItemText = AttrText.getSexItemText(characterSexItemList)
        EraPrint.plist(characterSexItemText, 5, 'center')
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterEquipmentPanel', None)
        EraPrint.p('\n')
    return 'CharacterEquipmentPanel'
Exemplo n.º 9
0
def detailedSetting_func1():
    flowRetun = CreatorCharacterPanel.detailedSetting1Panel()
    characterSex = CacheContorl.characterData['character']['0']['Sex']
    sexList = list(TextLoading.getTextData(TextLoading.rolePath, 'Sex'))
    if flowRetun == 0:
        CacheContorl.featuresList['Age'] = featuresList["Age"][3]
    elif flowRetun == 4:
        if characterSex == sexList[0]:
            CacheContorl.featuresList['Age'] = featuresList["Age"][0]
        elif characterSex == sexList[1]:
            CacheContorl.featuresList['Age'] = featuresList["Age"][1]
        else:
            CacheContorl.featuresList['Age'] = featuresList["Age"][2]
        PyCmd.clr_cmd()
    CacheContorl.temporaryCharacter['Features'] = CacheContorl.featuresList.copy()
    characterAgeTemName = AttrCalculation.getAgeTemList()[flowRetun]
    characterAge = AttrCalculation.getAge(characterAgeTemName)
    characterTem = characterSex
    characterHeigt = AttrCalculation.getHeight(characterTem,characterAge,CacheContorl.temporaryCharacter['Features'])
    characterBmi = AttrCalculation.getBMI('Ordinary')
    characterWeight = AttrCalculation.getWeight(characterBmi,characterHeigt['NowHeight'])
    characterBodyFat = AttrCalculation.getBodyFat(characterSex,'Ordinary')
    characterMeasurements = AttrCalculation.getMeasurements(characterSex,characterHeigt['NowHeight'],characterWeight,characterBodyFat,'Ordinary')
    CacheContorl.temporaryCharacter['Age'] = characterAge
    CacheContorl.temporaryCharacter['Height'] = characterHeigt
    CacheContorl.temporaryCharacter['Weight'] = characterWeight
    CacheContorl.temporaryCharacter['BodyFat'] = characterBodyFat
    CacheContorl.temporaryCharacter['Measurements'] = characterMeasurements
    PyCmd.clr_cmd()
    detailedSetting_func2()
Exemplo n.º 10
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
Exemplo n.º 11
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()
Exemplo n.º 12
0
def seeScene_func(judge):
    inputS = []
    InScenePanel.seeScenePanel()
    if judge == '0':
        inputS = inputS + InScenePanel.seeSceneCharacterListPanel()
    InScenePanel.changeSceneCharacterListPanel()
    scenePath = CacheContorl.characterData['character']['0']['Position']
    sceneCharacterNameList = MapHandle.getSceneCharacterNameList(scenePath)
    if len(sceneCharacterNameList) == 1:
        CacheContorl.characterData['characterId'] = '0'
    InScenePanel.seeCharacterInfoPanel()
    inSceneCmdList1 = InScenePanel.inSceneButtonPanel()
    inputS = inputS + inSceneCmdList1
    startId1 = len(inSceneCmdList1)
    yrn = GameInit.askfor_All(inputS)
    PyCmd.clr_cmd()
    if yrn in sceneCharacterNameList:
        CacheContorl.characterData[
            'characterId'] = MapHandle.getCharacterIdByCharacterName(
                yrn, scenePath)
        seeScene_func(judge)
    elif yrn == '0':
        from script.Flow import SeeMap
        nowMap = MapHandle.getMapForPath(
            CacheContorl.characterData['character']['0']['Position'])
        CacheContorl.nowMap = nowMap
        SeeMap.seeMapFlow()
    elif yrn == '1':
        SeeCharacterAttr.seeAttrOnEveryTime_func('InScenePanel')
    elif yrn == '2':
        CacheContorl.characterData['characterId'] = '0'
        SeeCharacterAttr.seeAttrOnEveryTime_func('InScenePanel')
Exemplo n.º 13
0
def mainFramePanel():
    cmdList = []
    characterId = CacheContorl.characterData['characterId']
    characterData = AttrHandle.getAttrData(characterId)
    titleText = TextLoading.getTextData(TextLoading.stageWordPath, '64')
    EraPrint.plt(titleText)
    dateText = GameTime.getDateText()
    EraPrint.p(dateText)
    EraPrint.p(' ')
    weekDateText = GameTime.getWeekDayText()
    EraPrint.p(weekDateText)
    EraPrint.p(' ')
    characterName = characterData['Name']
    PyCmd.pcmd(characterName,characterName,None)
    cmdList.append(characterName)
    EraPrint.p(' ')
    goldText = AttrText.getGoldText(characterId)
    EraPrint.p(goldText)
    EraPrint.p('\n')
    AttrPrint.printHpAndMpBar(characterId)
    mainMenuText = TextLoading.getTextData(TextLoading.stageWordPath,'68')
    EraPrint.sontitleprint(mainMenuText)
    EraPrint.p('\n')
    askForMainMenu = CmdButtonQueue.optionint(CmdButtonQueue.mainmenu, 4, 'left', askfor=False, cmdSize='center')
    cmdList = cmdList + askForMainMenu
    systemMenuText = TextLoading.getTextData(TextLoading.stageWordPath,'69')
    EraPrint.sontitleprint(systemMenuText)
    EraPrint.p('\n')
    systemMenuStartId = len(askForMainMenu)
    askForSystemMenu = CmdButtonQueue.optionint(CmdButtonQueue.systemmenu, 4, 'left', askfor=False, cmdSize='center', startId=systemMenuStartId)
    cmdList = cmdList + askForSystemMenu
    return cmdList
Exemplo n.º 14
0
def detailedSetting_func7():
    flowReturn = CreatorCharacterPanel.detailedSetting7Panel()
    friendsList = featuresList['Friends']
    CacheContorl.featuresList['Friends'] = friendsList[flowReturn]
    CacheContorl.temporaryCharacter['Features'] = CacheContorl.featuresList.copy()
    PyCmd.clr_cmd()
    detailedSetting_func8()
Exemplo n.º 15
0
def acknowledgmentAttributeAns(inputList):
    characterId = CacheContorl.characterData['characterId']
    yrn = GameInit.askfor_All(inputList)
    showAttrHandleData = TextLoading.getTextData(TextLoading.cmdPath,
                                                 'seeAttrPanelHandle')
    PyCmd.clr_cmd()
    if yrn in panelList:
        PanelStateHandle.panelStateChange(yrn)
        acknowledgmentAttribute_func()
    elif yrn == '0':
        GameTime.initTime()
        AttrCalculation.setAttrOver(characterId)
        CharacterHandle.initCharacterList()
        SeeCharacterAttrPanel.initShowAttrPanelList()
        characterPosition = CacheContorl.characterData['character'][
            characterId]['Position']
        MapHandle.characterMoveScene(['0'], characterPosition, characterId)
        from script.Flow import Main
        Main.mainFrame_func()
    elif yrn == '1':
        CacheContorl.wframeMouse['wFrameRePrint'] = 1
        EraPrint.pnextscreen()
        SeeCharacterAttrPanel.initShowAttrPanelList()
        from script.Design import StartFlow
        StartFlow.main_func()
    elif yrn in showAttrHandleData:
        index = showAttrHandleData.index(yrn)
        index = str(index)
        CacheContorl.panelState['AttrShowHandlePanel'] = index
        acknowledgmentAttribute_func()
Exemplo n.º 16
0
def getInScene_func():
    '''
    用于进入场景界面的流程
    '''
    PyCmd.clr_cmd()
    scenePath = CacheContorl.characterData['character'][0].Position
    scenePathStr = MapHandle.getMapSystemPathStrForList(scenePath)
    MapHandle.sortSceneCharacterId(scenePathStr)
    CacheContorl.nowMap = MapHandle.getMapForPath(scenePath)
    sceneData = CacheContorl.sceneData[scenePathStr].copy()
    sceneCharacterList = sceneData['SceneCharacterData']
    if 0 not in sceneCharacterList:
        characterIdList = [0]
        sceneCharacterList = sceneCharacterList + characterIdList
        CacheContorl.sceneData[scenePathStr][
            'SceneCharacterData'] = sceneCharacterList
    if len(sceneCharacterList
           ) > 1 and CacheContorl.characterData['characterId'] == 0:
        nowNameList = MapHandle.getSceneCharacterNameList(scenePathStr)
        nowNameList.remove(CacheContorl.characterData['character'][0].Name)
        CacheContorl.characterData[
            'characterId'] = MapHandle.getCharacterIdByCharacterName(
                nowNameList[0], scenePathStr)
        if CacheContorl.oldCharacterId != 0:
            CacheContorl.characterData[
                'characterId'] = CacheContorl.oldCharacterId
            CacheContorl.oldCharacterId = 0
    if len(sceneCharacterList) > 1:
        seeScene_func(True)
    else:
        seeScene_func(False)
Exemplo n.º 17
0
def inputNickName_func():
    '''
    请求玩家输入昵称流程
    输入0:进入请求玩家输入自称流程(玩家昵称为默认或输入玩家昵称流程结果)
    输入1:进入输入昵称流程
    输入2:使用玩家姓名作为昵称
    输入3:返回请求输入姓名流程
    '''
    flowReturn = CreatorCharacterPanel.inputNickNamePanel()
    if flowReturn == 0:
        PyCmd.clr_cmd()
        inputSelfName_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        CreatorCharacterPanel.startInputNickNamePanel()
        PyCmd.clr_cmd()
        inputNickName_func()
    elif flowReturn == 2:
        PyCmd.clr_cmd()
        CacheContorl.temporaryCharacter[
            'NickName'] = CacheContorl.temporaryCharacter['Name']
        inputNickName_func()
    elif flowReturn == 3:
        PyCmd.clr_cmd()
        inputName_func()
Exemplo n.º 18
0
def mouseCheckPush():
    '''
    更正鼠标点击状态数据映射
    '''
    PyCmd.focusCmd()
    if CacheContorl.wframeMouse['mouseLeaveCmd'] == 0:
        MainFrame.send_input()
        CacheContorl.wframeMouse['mouseLeaveCmd'] = 1
Exemplo n.º 19
0
def attributeGenerationBranchPanel():
    characterId = CacheContorl.characterData['characterId']
    AttrCalculation.setAttrDefault(characterId)
    PyCmd.clr_cmd()
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '9'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.currencymenu, 1)
    return yrn
Exemplo n.º 20
0
def confirmationOverlaySave_func(oldPanel, saveId):
    cmdList = SaveHandleFramePanel.confirmationOverlaySavePanel()
    yrn = GameInit.askfor_All(cmdList)
    PyCmd.clr_cmd()
    if yrn == '0':
        SaveHandle.establishSave(saveId)
        establishSave_func(oldPanel)
    else:
        establishSave_func(oldPanel)
Exemplo n.º 21
0
def attributeGenerationBranchPanel() -> str:
    '''
    玩家确认进行详细设置面板
    '''
    PyCmd.clr_cmd()
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messagePath, '9'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.currencymenu)
    return yrn
Exemplo n.º 22
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
Exemplo n.º 23
0
def startFrame():
    '''
    游戏主流程
    '''
    FlowHandle.initCache()
    while (True):
        nowFlowId = CacheContorl.nowFlowId
        PyCmd.clr_cmd()
        flowData[nowFlowId]()
Exemplo n.º 24
0
def seeMapFlow():
    '''
    地图查看流程
    '''
    while (True):
        PyCmd.clr_cmd()
        inputS = []
        mapCmd = SeeMapPanel.seeMapPanel()
        startId1 = len(mapCmd)
        inputS = inputS + mapCmd
        movePathCmdData = SeeMapPanel.seeMovePathPanel()
        movePathCmd = movePathCmdData['inputS']
        movePathList = movePathCmdData['scenePathList']
        showSceneNameListCmd = SeeMapPanel.showSceneNameListPanel()
        seeMapCmd = SeeMapPanel.backScenePanel(startId1)
        inputS = inputS + seeMapCmd + movePathCmd + [showSceneNameListCmd]
        yrn = FlowHandle.askfor_All(inputS)
        backButton = str(startId1)
        nowPosition = CacheContorl.characterData['character'][0].Position
        nowPositionMap = MapHandle.getMapForPath(nowPosition)
        upMapButton = 'Null'
        downMapButton = 'Null'
        if nowPositionMap != [] and CacheContorl.nowMap != []:
            upMapButton = str(int(startId1) + 1)
        if nowPositionMap != CacheContorl.nowMap:
            if upMapButton == 'Null':
                downMapButton = str(int(startId1) + 1)
            else:
                downMapButton = str(int(startId1) + 2)
        nowMap = CacheContorl.nowMap.copy()
        if yrn in mapCmd:
            nowTargetPath = MapHandle.getScenePathForMapSceneId(nowMap, yrn)
            CharacterMove.ownCharcterMove(nowTargetPath)
            break
        elif yrn == backButton:
            CacheContorl.nowMap = []
            CacheContorl.nowFlowId = 'in_scene'
            break
        elif yrn in movePathCmd:
            moveListId = movePathCmd.index(yrn)
            moveId = movePathList[moveListId]
            nowTargetPath = MapHandle.getScenePathForMapSceneId(nowMap, moveId)
            CharacterMove.ownCharcterMove(nowTargetPath)
            break
        elif upMapButton != 'Null' and yrn == upMapButton:
            upMapPath = MapHandle.getMapForPath(nowMap)
            CacheContorl.nowMap = upMapPath
        elif downMapButton != 'Null' and yrn == downMapButton:
            characterPosition = CacheContorl.characterData['character'][
                0].Position
            downMapSceneId = MapHandle.getMapSceneIdForScenePath(
                CacheContorl.nowMap, characterPosition)
            nowMap.append(downMapSceneId)
            CacheContorl.nowMap = nowMap
        elif yrn == showSceneNameListCmd:
            PanelStateHandle.panelStateChange(showSceneNameListCmd)
Exemplo n.º 25
0
def seeCharacterWearClothes(characterId:str,changeButton:bool):
    '''
    查看角色穿戴服装列表面板
    Keyword arguments:
    characterId -- 角色id
    changeButton -- 将服装列表绘制成按钮的开关
    '''
    EraPrint.p('\n')
    characterClothingData = CacheContorl.characterData['character'][characterId]['Clothing']
    characterPutOnList = CacheContorl.characterData['character'][characterId]['PutOn']
    clothingTextData = {}
    tagTextIndex = 0
    for i in range(len(Clothing.clothingTypeTextList.keys())):
        clothingType = list(Clothing.clothingTypeTextList.keys())[i]
        clothingId = characterPutOnList[clothingType]
        if clothingId == '':
            clothingTextData[clothingType] = 'None'
        else:
            clothingData = characterClothingData[clothingType][clothingId]
            clothingText = Clothing.clothingTypeTextList[clothingType] + ':' + clothingData['Evaluation'] + clothingData['Tag'] + clothingData['Name']
            clothingTextData[clothingText] = {}
            for tag in Clothing.clothingTagTextList:
                tagText = Clothing.clothingTagTextList[tag] + str(clothingData[tag])
                clothingTextData[clothingText][tagText] = 0
                nowTagTextIndex = TextHandle.getTextIndex(tagText)
                if nowTagTextIndex > tagTextIndex:
                    tagTextIndex = nowTagTextIndex
    longClothingTextIndex = TextHandle.getTextIndex(max(clothingTextData.keys(),key=TextHandle.getTextIndex))
    i = 0
    inputS = []
    for clothingText in clothingTextData:
        drawText = ''
        EraPrint.plittleline()
        if clothingTextData[clothingText] == 'None':
            drawText = Clothing.clothingTypeTextList[clothingText] + ':' + TextLoading.getTextData(TextLoading.stageWordPath,'117')
        else:
            nowClothingTextIndex = TextHandle.getTextIndex(clothingText)
            drawText += clothingText + ' '
            if nowClothingTextIndex < longClothingTextIndex:
                drawText += ' ' * (longClothingTextIndex - nowClothingTextIndex)
            for tagText in clothingTextData[clothingText]:
                nowTagTextIndex = TextHandle.getTextIndex(tagText)
                if nowTagTextIndex < tagTextIndex:
                    drawText += ' ' + tagText + ' ' * (tagTextIndex - nowTagTextIndex)
                else:
                    drawText += ' ' + tagText
        if changeButton:
            idInfo = CmdButtonQueue.idIndex(i)
            cmdText = idInfo + drawText
            PyCmd.pcmd(cmdText,i,None)
        else:
            EraPrint.p(drawText)
        i += 1
        inputS.append(str(i))
        EraPrint.p('\n')
    return inputS
Exemplo n.º 26
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
Exemplo n.º 27
0
def askForLoadSave_func(oldPanel, saveId):
    cmdList = SaveHandleFramePanel.askLoadSavePanel()
    yrn = GameInit.askfor_All(cmdList)
    PyCmd.clr_cmd()
    if yrn == '0':
        confirmationLoadSave_func(oldPanel, saveId)
    elif yrn == '1':
        confirmationRemoveSave_func(saveId, 'LoadSavePanel', oldPanel)
    elif yrn == '2':
        loadSave_func(oldPanel)
Exemplo n.º 28
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
Exemplo n.º 29
0
def confirmationLoadSave_func(oldPanel, saveId):
    cmdList = SaveHandleFramePanel.confirmationLoadSavePanel()
    yrn = GameInit.askfor_All(cmdList)
    PyCmd.clr_cmd()
    if yrn == '0':
        SaveHandle.inputLoadSave(saveId)
        import script.Flow.Main as mainframe
        mainframe.mainFrame_func()
    else:
        loadSave_func(oldPanel)
Exemplo n.º 30
0
def detailedSetting_func2():
    ansList = TextLoading.getTextData(TextLoading.cmdPath, 'detailedSetting2')
    flowReturn = CreatorCharacterPanel.detailedSetting2Panel()
    if flowReturn == ansList[len(ansList)-1]:
        PyCmd.clr_cmd()
        detailedSetting_func3()
    else:
        PyCmd.clr_cmd()
        AttrCalculation.setAnimalCache(flowReturn)
        detailedSetting_func3()