Beispiel #1
0
def seeCharacterInfoPanel():
    '''
    查看当前互动对象信息面板
    '''
    characterInfo = TextLoading.getTextData(TextLoading.stageWordPath, '77')
    EraPrint.p(characterInfo)
    characterId = CacheContorl.characterData['characterId']
    characterData = CacheContorl.characterData['character'][characterId]
    characterName = characterData.Name
    EraPrint.p(characterName)
    EraPrint.p(' ')
    sex = characterData.Sex
    sexText = TextLoading.getTextData(TextLoading.stageWordPath,
                                      '2') + AttrText.getSexText(sex)
    EraPrint.p(sexText)
    EraPrint.p(' ')
    intimateInfo = TextLoading.getTextData(TextLoading.stageWordPath, '16')
    gracesInfo = TextLoading.getTextData(TextLoading.stageWordPath, '17')
    characterIntimateText = intimateInfo + f'{characterData.Intimate}'
    characterGracesText = gracesInfo + f'{characterData.Graces}'
    EraPrint.p(characterIntimateText)
    EraPrint.p(' ')
    EraPrint.p(characterGracesText)
    stateText = AttrText.getStateText(characterId)
    EraPrint.p(' ')
    EraPrint.p(stateText)
    EraPrint.plittleline()
def seeCharacterMainAttrPanel(characterId:int):
    '''
    查看角色主属性面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    title1 = TextLoading.getTextData(TextLoading.stageWordPath, '1')
    EraPrint.plt(title1)
    characterIdText = f"{TextLoading.getTextData(TextLoading.stageWordPath, '0')}{characterId}"
    characterData = CacheContorl.characterData['character'][characterId]
    name = characterData.Name
    nickName = characterData.NickName
    characterName = TextLoading.getTextData(TextLoading.stageWordPath,'13') + name
    characterNickName = TextLoading.getTextData(TextLoading.stageWordPath,'12') + nickName
    sex = characterData.Sex
    sexText = TextLoading.getTextData(TextLoading.stageWordPath, '2') + AttrText.getSexText(sex)
    nameText = characterIdText + ' ' + characterName + ' ' + characterNickName + ' ' + sexText
    hpBar = AttrPrint.getHpOrMpBar(characterId,'HitPoint',GameConfig.text_width / 2 - 4)
    EraPrint.plist([nameText,hpBar],2,'center')
    EraPrint.pl()
    stateText = AttrText.getStateText(characterId)
    mpBar = AttrPrint.getHpOrMpBar(characterId,'ManaPoint',GameConfig.text_width / 2 - 4)
    EraPrint.plist([stateText,mpBar],2,'center')
    EraPrint.pl()
    EraPrint.plittleline()
    statureText = AttrText.getStatureText(characterId)
    EraPrint.pl(statureText)
    EraPrint.pline('.')
    EraPrint.pl(AttrText.getCharacterDormitoryPathText(characterId))
    EraPrint.plittleline()
    characterSpecies = f"{TextLoading.getTextData(TextLoading.stageWordPath, '15')}{characterData.Species}"
    characterAge = f"{TextLoading.getTextData(TextLoading.stageWordPath, '3')}{characterData.Age}"
    birthdayText = f"{TextLoading.getTextData(TextLoading.stageWordPath,'140')}{characterData.Birthday['month']}{TextLoading.getTextData(TextLoading.stageWordPath,'60')}{characterData.Birthday['day']}{TextLoading.getTextData(TextLoading.stageWordPath,'61')}"
    EraPrint.plist([characterSpecies,characterAge,birthdayText],3,'center')
    EraPrint.pline('.')
    characterIntimate = f"{TextLoading.getTextData(TextLoading.stageWordPath, '16')}{characterData.Intimate}"
    characterGraces = f"{TextLoading.getTextData(TextLoading.stageWordPath, '17')}{characterData.Graces}"
    EraPrint.plist([characterIntimate,characterGraces],2,'center')
    EraPrint.pline('.')
    characterChest = characterData.Chest['NowChest']
    chestGroup = AttrCalculation.judgeChestGroup(characterChest)
    chestText = TextLoading.getTextData(TextLoading.stageWordPath,'141') + TextLoading.getTextData(TextLoading.stageWordPath,'142')[chestGroup]
    EraPrint.plist([chestText],1,'center')
    EraPrint.pline('.')
    characterHeight = characterData.Height['NowHeight']
    characterWeight = characterData.Weight
    characterHeightText = str(round(characterHeight,2))
    characterWeightText = str(round(characterWeight,2))
    characterHeightInfo = TextLoading.getTextData(TextLoading.stageWordPath,'80') + characterHeightText
    characterWeightInfo = TextLoading.getTextData(TextLoading.stageWordPath,'81') + characterWeightText
    EraPrint.plist([characterHeightInfo,characterWeightInfo],2,'center')
    EraPrint.pline('.')
    characterMeasurements = characterData.Measurements
    characterBust = str(round(characterMeasurements['Bust'],2))
    characterWaist = str(round(characterMeasurements['Waist'],2))
    characterHip = str(round(characterMeasurements['Hip'],2))
    characterBustInfo = TextLoading.getTextData(TextLoading.stageWordPath,'82') + characterBust
    characterWaistInfo = TextLoading.getTextData(TextLoading.stageWordPath,'83') + characterWaist
    characterHipInfo = TextLoading.getTextData(TextLoading.stageWordPath,'84') + characterHip
    EraPrint.plist([characterBustInfo,characterWaistInfo,characterHipInfo],3,'center')
    EraPrint.pline('.')
Beispiel #3
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'