Esempio n. 1
0
def changeCharacterClothes(characterId):
    ChangeClothesPanel.seeCharacterWearClothes(characterId)
    inputS = ChangeClothesPanel.seeCharacterWearClothesCmd()
    yrn = FlowHandle.askfor_All(inputS)
    if yrn == '0':
        from script.Flow import Main
        Main.mainFrame_func()
Esempio n. 2
0
def gameHelp_func():
    '''
    查看帮助信息流程
    '''
    inputS = GameHelpPanel.gameHelpPanel()
    yrn = FlowHandle.askfor_All(inputS)
    if yrn == '0':
        CacheContorl.nowFlowId = 'main'
Esempio n. 3
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)
Esempio n. 4
0
def changeCharacterClothes():
    '''
    更换角色服装流程
    '''
    characterId = CacheContorl.characterData['characterId']
    ChangeClothesPanel.seeCharacterWearClothes(characterId)
    inputS = ChangeClothesPanel.seeCharacterWearClothesCmd()
    yrn = FlowHandle.askfor_All(inputS)
    if yrn == '0':
        CacheContorl.nowFlowId = 'main'
Esempio n. 5
0
def seeCharacterClothesList(clothingType: str):
    '''
    查看角色服装列表流程
    Keyword arguments:
    clothingType -- 服装类型
    '''
    clothingTypeList = list(Clothing.clothingTypeTextList.keys())
    while (True):
        nowClothingTypeIndex = clothingTypeList.index(clothingType)
        upTypeId = nowClothingTypeIndex - 1
        if nowClothingTypeIndex == 0:
            upTypeId = len(clothingTypeList) - 1
        nextTypeId = nowClothingTypeIndex + 1
        if nowClothingTypeIndex == len(clothingTypeList) - 1:
            nextTypeId = 0
        upType = clothingTypeList[upTypeId]
        nextType = clothingTypeList[nextTypeId]
        characterId = CacheContorl.characterData['characterId']
        ChangeClothesPanel.seeCharacterClothesInfo(characterId)
        pageMax = getCharacterClothesPageMax(characterId, clothingType)
        inputS = ChangeClothesPanel.seeCharacterClothesPanel(
            characterId, clothingType, pageMax)
        startId = len(inputS)
        inputS += ChangeClothesPanel.seeCharacterClothesCmd(
            startId, clothingType)
        yrn = FlowHandle.askfor_All(inputS)
        yrn = int(yrn)
        PyCmd.clr_cmd()
        nowPageId = int(CacheContorl.panelState["SeeCharacterClothesPanel"])
        if yrn == startId:
            clothingType = upType
        elif yrn == startId + 1:
            if nowPageId == 0:
                CacheContorl.panelState['SeeCharacterClothesPanel'] = str(
                    pageMax)
            else:
                CacheContorl.panelState['SeeCharacterClothesPanel'] = str(
                    nowPageId - 1)
        elif yrn == startId + 2:
            break
        elif yrn == startId + 3:
            if nowPageId == pageMax:
                CacheContorl.panelState['SeeCharacterClothesPanel'] = '0'
            else:
                CacheContorl.panelState['SeeCharacterClothesPanel'] = str(
                    nowPageId + 1)
        elif yrn == startId + 4:
            clothingType = nextType
        else:
            clothingId = list(
                CacheContorl.characterData['character'][characterId]
                ['Clothing'][clothingType].keys())[yrn]
            askSeeClothingInfo(clothingType, clothingId, characterId)
Esempio n. 6
0
def sceneSeeCharacterWearItem(characterId: str):
    '''
    在场景中查看角色穿戴道具列表的流程
    Keyword arguments:
    characterId -- 角色Id
    '''
    while 1:
        nowInputS = WearItemPanel.seeCharacterWearItemPanelForPlayer(
            characterId)
        nowYrn = FlowHandle.askfor_All(nowInputS)
        if nowYrn == nowInputS[:-1]:
            CacheContorl.nowFlowId = 'main'
            break
Esempio n. 7
0
def seeMapFlow():
    PyCmd.clr_cmd()
    inputS = []
    mapCmd = SeeMapPanel.seeMapPanel()
    startId1 = len(mapCmd)
    inputS = inputS + mapCmd
    movePathCmdData = SeeMapPanel.seeMovePathPanel()
    movePathCmd = movePathCmdData['inputS']
    movePathList = movePathCmdData['scenePathList']
    seeMapCmd = SeeMapPanel.backScenePanel(startId1)
    inputS = inputS + seeMapCmd + movePathCmd
    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
    if yrn in mapCmd:
        nowTargetPath = MapHandle.getScenePathForMapSceneId(nowMap,yrn)
        CharacterMove.ownCharcterMove(nowTargetPath)
    elif yrn == backButton:
        CacheContorl.nowMap = []
        import script.Flow.InScene as inscene
        inscene.getInScene_func()
    elif yrn in movePathCmd:
        moveListId = movePathCmd.index(yrn)
        moveId = movePathList[moveListId]
        nowTargetPath = MapHandle.getScenePathForMapSceneId(nowMap,moveId)
        CharacterMove.ownCharcterMove(nowTargetPath)
    elif upMapButton != 'Null' and yrn == upMapButton:
        upMapPath = MapHandle.getMapForPath(nowMap)
        CacheContorl.nowMap = upMapPath
        seeMapFlow()
    elif downMapButton != 'Null' and yrn == downMapButton:
        characterPosition = CacheContorl.characterData['character']['0']['Position']
        downMapSceneId = MapHandle.getMapSceneIdForScenePath(CacheContorl.nowMap,characterPosition)
        downMapPath = nowMap.append(downMapSceneId)
        CacheContorl.nowMap = downMapPath
        seeMapFlow()
Esempio n. 8
0
def wearCharacterItem():
    '''
    查看并更换角色穿戴道具流程
    '''
    characterId = CacheContorl.characterData['characterId']
    while 1:
        inputs = WearItemPanel.seeCharacterWearItemPanelForPlayer(characterId)
        startId = len(inputs)
        inputs += WearItemPanel.seeCharacterWearItemCmdPanel(startId)
        yrn = FlowHandle.askfor_All(inputs)
        PyCmd.clr_cmd()
        if yrn == str(len(inputs) - 1):
            CacheContorl.nowFlowId = 'main'
            break
        else:
            wearItemInfoTextData = TextLoading.getTextData(
                TextLoading.stageWordPath, '49')
            changeWearItem(list(wearItemInfoTextData.keys())[int(yrn)])
Esempio n. 9
0
def changeCharacterClothes():
    '''
    更换角色服装流程
    '''
    characterId = CacheContorl.characterData['characterId']
    characterClothingData = CacheContorl.characterData['character'][characterId].Clothing
    ChangeClothesPanel.seeCharacterWearClothesInfo(characterId)
    cmdList1 = ChangeClothesPanel.seeCharacterWearClothes(characterId,True)
    startId = len(characterClothingData.keys())
    inputS = ChangeClothesPanel.seeCharacterWearClothesCmd(startId)
    inputS = cmdList1 + inputS
    yrn = FlowHandle.askfor_All(inputS)
    PyCmd.clr_cmd()
    if yrn == str(startId):
        CacheContorl.nowFlowId = 'main'
    else:
        clothingType = list(Clothing.clothingTypeTextList.keys())[int(yrn)]
        seeCharacterClothesList(clothingType)
Esempio n. 10
0
def changeWearItem(itemType: str) -> bool:
    '''
    更换角色穿戴道具流程
    Keyword arguments:
    itemType -- 道具类型
    '''
    characterId = CacheContorl.characterData['characterId']
    maxPage = getCharacterWearItemPageMax(characterId)
    inputS = WearItemPanel.seeCharacterWearItemListPanel(
        characterId, itemType, maxPage)
    if inputS == []:
        return
    yrn = FlowHandle.askfor_All(inputS)
    if yrn == inputS[:-1]:
        return
    else:
        CacheContorl.characterData['character'][characterId].WearItem['Wear'][
            itemType] = list(
                CacheContorl.characterData['character']
                [characterId].WearItem['Item'][itemType].keys())[int(yrn)]
Esempio n. 11
0
def gameHelp_func():
    inputS = GameHelpPanel.gameHelpPanel()
    yrn = FlowHandle.askfor_All(inputS)
    if yrn == '0':
        from script.Flow import Main
        Main.mainFrame_func()