Пример #1
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'
Пример #2
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
Пример #3
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
Пример #4
0
def seeCharacterEngravingPanel(characterId):
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '7'))
    panelState = CacheContorl.panelState['CharacterEngravingPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterEngravingPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterEngraving = characterData['Engraving']
        characterEngravingText = AttrText.getEngravingText(characterEngraving)
        EraPrint.plist(characterEngravingText, 3, 'center')
        return 'CharacterEngravingPanel'
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterEngravingPanel')
        EraPrint.p('\n')
        return 'CharacterEngravingPanel'
Пример #5
0
def mainFrame_func():
    '''
    游戏主页控制流程
    '''
    inputS = []
    flowReturn = MainFramePanel.mainFramePanel()
    inputS = inputS + flowReturn
    characterId = CacheContorl.characterData['characterId']
    characterData = AttrHandle.getAttrData(characterId)
    characterName = characterData['Name']
    ans = GameInit.askfor_All(inputS)
    PyCmd.clr_cmd()
    CacheContorl.oldFlowId = 'main'
    if ans == characterName:
        CacheContorl.nowFlowId = 'see_character_attr'
    else:
        CacheContorl.nowFlowId = mainFrameGotoData[ans]
Пример #6
0
def seeCharacterFeaturesPanel(characterId):
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '6'))
    panelState = CacheContorl.panelState['CharacterFeaturesPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterFeatures = characterData['Features']
        characterFeaturesStr = AttrText.getFeaturesStr(characterFeatures)
        EraPrint.p(characterFeaturesStr)
        return 'CharacterFeaturesPanel'
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
        return 'CharacterFeaturesPanel'
    pass
Пример #7
0
def seeCharacterExperiencePanel(characterId):
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '18'))
    panelState = CacheContorl.panelState['CharacterExperiencePanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterExperiencePanel')
        characterData = AttrHandle.getAttrData(characterId)
        EraPrint.p('\n')
        characterSexExperienceList = characterData['SexExperience']
        characterSex = CacheContorl.characterData['character'][characterId][
            'Sex']
        characterSexTextList = AttrText.getSexExperienceText(
            characterSexExperienceList, characterSex)
        EraPrint.plist(characterSexTextList, 4, 'center')
        return 'CharacterExperiencePanel'
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterExperiencePanel')
        EraPrint.p('\n')
        return 'CharacterExperiencePanel'
Пример #8
0
def printHpAndMpBar(characterId:str):
    '''
    绘制角色的hp和mp(有比例图),自动居中处理,结尾换行
    Keyword arguments:
    characterId -- 角色id
    '''
    characterData = AttrHandle.getAttrData(characterId)
    characterHitPoint = characterData['HitPoint']
    characterMaxHitPoint = characterData['HitPointMax']
    hitPointText = TextLoading.getTextData(TextLoading.stageWordPath, '8')
    hitPointBar = ProportionalBar.getProportionalBar(hitPointText, characterMaxHitPoint, characterHitPoint, 'hpbar')
    characterManaPoint = characterData['ManaPoint']
    characterMaxManaPoint = characterData['ManaPointMax']
    manaPointText = TextLoading.getTextData(TextLoading.stageWordPath, '9')
    manaPointBar = ProportionalBar.getProportionalBar(manaPointText, characterMaxManaPoint, characterManaPoint, 'mpbar')
    hpmpBarList = [hitPointBar, manaPointBar]
    EraPrint.p('\n')
    EraPrint.plist(hpmpBarList, 2, 'center')
    EraPrint.p('\n')
Пример #9
0
def seeCharacterFeaturesPanel(characterId: str) -> str:
    '''
    查看角色特征面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '6'))
    panelState = CacheContorl.panelState['CharacterFeaturesPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterFeatures = characterData['Features']
        characterFeaturesStr = AttrText.getFeaturesStr(characterFeatures)
        EraPrint.p(characterFeaturesStr)
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
    return 'CharacterFeaturesPanel'
Пример #10
0
def printHpAndMpBar(characterId):
    characterData = AttrHandle.getAttrData(characterId)
    characterHitPoint = characterData['HitPoint']
    characterMaxHitPoint = characterData['HitPointMax']
    hitPointText = TextLoading.getTextData(TextLoading.stageWordPath, '8')
    hitPointBar = ProportionalBar.getProportionalBar(hitPointText,
                                                     characterMaxHitPoint,
                                                     characterHitPoint,
                                                     'hpbar')
    characterManaPoint = characterData['ManaPoint']
    characterMaxManaPoint = characterData['ManaPointMax']
    manaPointText = TextLoading.getTextData(TextLoading.stageWordPath, '9')
    manaPointBar = ProportionalBar.getProportionalBar(manaPointText,
                                                      characterMaxManaPoint,
                                                      characterManaPoint,
                                                      'mpbar')
    hpmpBarList = [hitPointBar, manaPointBar]
    EraPrint.p('\n')
    EraPrint.plist(hpmpBarList, 2, 'center')
    EraPrint.p('\n')
Пример #11
0
def seeCharacterLevelPanel(characterId: str) -> str:
    '''
    查看角色技能等级面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '5'))
    panelState = CacheContorl.panelState['CharacterLevelPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterLevelPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterSexGradeList = characterData['SexGrade']
        characterSex = CacheContorl.characterData['character'][characterId][
            'Sex']
        characterSexGradeTextList = AttrText.getSexGradeTextList(
            characterSexGradeList, characterSex)
        EraPrint.plist(characterSexGradeTextList, 4, 'center')
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterLevelPanel')
        EraPrint.p('\n')
    return 'CharacterLevelPanel'
Пример #12
0
def seeCharacterMainAttrPanel(characterId):
    title1 = TextLoading.getTextData(TextLoading.stageWordPath, '1')
    EraPrint.plt(title1)
    characteridText = TextLoading.getTextData(TextLoading.stageWordPath,
                                              '0') + characterId
    EraPrint.p(characteridText)
    panelState = CacheContorl.panelState['CharacterMainAttrPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterMainAttrPanel', None)
        EraPrint.p('\n')
        attrListString = []
        characterData = AttrHandle.getAttrData(characterId)
        characterSexId = characterData['Sex']
        characterSex = AttrText.getSexText(characterSexId)
        characterAge = characterData['Age']
        characterName = characterData['Name']
        fixCharacterName = TextLoading.getTextData(TextLoading.stageWordPath,
                                                   '13')
        characterName = fixCharacterName + characterName
        attrListString.append(characterName)
        characterSelfName = characterData['SelfName']
        fixCharacterSelfName = TextLoading.getTextData(
            TextLoading.stageWordPath, '11')
        characterSelfName = fixCharacterSelfName + characterSelfName
        attrListString.append(characterSelfName)
        characterNickName = characterData['NickName']
        characterNickName = TextLoading.getTextData(TextLoading.stageWordPath,
                                                    '12') + characterNickName
        attrListString.append(characterNickName)
        relationship = characterData['Relationship']
        relationship = TextLoading.getTextData(TextLoading.stageWordPath,
                                               '14') + relationship
        attrListString.append(relationship)
        characterSpecies = characterData['Species']
        characterSpecies = TextLoading.getTextData(TextLoading.stageWordPath,
                                                   '15') + characterSpecies
        attrListString.append(characterSpecies)
        characterSex = TextLoading.getTextData(TextLoading.stageWordPath,
                                               '2') + characterSex
        attrListString.append(characterSex)
        characterAge = TextLoading.getTextData(TextLoading.stageWordPath,
                                               '3') + str(characterAge)
        attrListString.append(characterAge)
        EraPrint.p('\n')
        characterSan = characterData['San']
        characterSan = TextLoading.getTextData(TextLoading.stageWordPath,
                                               '10') + characterSan
        attrListString.append(characterSan)
        characterHeight = characterData['Height']['NowHeight']
        characterWeight = characterData['Weight']
        characterMeasurements = characterData['Measurements']
        characterHeightText = str(round(characterHeight, 2))
        characterWeightText = str(round(characterWeight, 2))
        characterBust = str(round(characterMeasurements['Bust'], 2))
        characterWaist = str(round(characterMeasurements['Waist'], 2))
        characterHip = str(round(characterMeasurements['Hip'], 2))
        characterHeightInfo = TextLoading.getTextData(
            TextLoading.stageWordPath, '80') + characterHeightText
        attrListString.append(characterHeightInfo)
        characterWeightInfo = TextLoading.getTextData(
            TextLoading.stageWordPath, '81') + characterWeightText
        attrListString.append(characterWeightInfo)
        characterBustInfo = TextLoading.getTextData(TextLoading.stageWordPath,
                                                    '82') + characterBust
        characterWaistInfo = TextLoading.getTextData(TextLoading.stageWordPath,
                                                     '83') + characterWaist
        characterHipInfo = TextLoading.getTextData(TextLoading.stageWordPath,
                                                   '84') + characterHip
        characterIntimate = characterData['Intimate']
        characterIntimate = TextLoading.getTextData(TextLoading.stageWordPath,
                                                    '16') + characterIntimate
        attrListString.append(characterIntimate)
        characterGraces = characterData['Graces']
        characterGraces = TextLoading.getTextData(TextLoading.stageWordPath,
                                                  '17') + characterGraces
        attrListString.append(characterGraces)
        attrListString.append(characterBustInfo)
        attrListString.append(characterWaistInfo)
        attrListString.append(characterHipInfo)
        EraPrint.plist(attrListString, 4, 'center')
        EraPrint.p('\n')
        AttrPrint.printHpAndMpBar(characterId)
        return 'CharacterMainAttrPanel'
    else:
        characterName = CacheContorl.characterData['character'][characterId][
            'Name']
        EraPrint.p(' ' + characterName + ' ')
        PyCmd.pcmd(panelStateOnText, 'CharacterMainAttrPanel', None)
        EraPrint.p('\n')
        return 'CharacterMainAttrPanel'