コード例 #1
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()
コード例 #2
0
ファイル: CreatorCharacter.py プロジェクト: homer12/dieloli
def inputName_func():
    '''
    请求玩家输入姓名流程
    输入0:进入请求玩家输入昵称流程(玩家姓名为默认或输入姓名流程结果)
    输入1:进入输入姓名流程
    输入2:返回标题菜单
    '''
    GameTime.initTime()
    CacheContorl.characterData['characterId'] = 0
    CacheContorl.characterData['character'][0] = Character.Character()
    flowReturn = 0
    while 1:
        flowReturn = CreatorCharacterPanel.inputNamePanel()
        if flowReturn == 0:
            PyCmd.clr_cmd()
            break
        elif flowReturn == 1:
            PyCmd.clr_cmd()
            CreatorCharacterPanel.startInputNamePanel()
            PyCmd.clr_cmd()
        else:
            break
    if flowReturn == 0:
        inputNickName_func()
    else:
        EraPrint.pnextscreen()
        CacheContorl.nowFlowId = 'title_frame'
コード例 #3
0
ファイル: CreatorCharacter.py プロジェクト: homer12/dieloli
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()
コード例 #4
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
コード例 #5
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()
コード例 #6
0
def inputSexConfirm_func():
    '''
    请求玩家输入性别流程
    输入0:进入询问是否进行详细设置流程(玩家性别为默认,或请求选择性别流程结果)
    输入1:进入选择性别流程
    输入2:返回请求输入自称流程
    '''
    flowReturn = CreatorCharacterPanel.inputSexPanel()
    sexId = CacheContorl.characterData['character'][characterId]['Sex']
    if flowReturn == 0:
        AttrCalculation.setSexCache(sexId)
        sexKeysList = list(TextLoading.getTextData(TextLoading.rolePath,
                                                   'Sex'))
        if sexId == sexKeysList[2]:
            CacheContorl.temporaryCharacter['Features'][
                'Sex'] = TextLoading.getTextData(TextLoading.rolePath,
                                                 'Features')['Sex'][0]
        elif sexId == sexKeysList[3]:
            CacheContorl.temporaryCharacter['Features'][
                'Sex'] = TextLoading.getTextData(TextLoading.rolePath,
                                                 'Features')['Sex'][1]
        PyCmd.clr_cmd()
        attributeGenerationBranch_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        inputSexChoice_func()
    elif flowReturn == 2:
        PyCmd.clr_cmd()
        inputSelfName_func()
コード例 #7
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()
コード例 #8
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()
コード例 #9
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()
コード例 #10
0
def inputName_func():
    CacheContorl.characterData['characterId'] = characterId
    flowReturn = CreatorCharacterPanel.inputNamePanel()
    if flowReturn == 0:
        PyCmd.clr_cmd()
        inputNickName_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        CreatorCharacterPanel.startInputNamePanel()
        PyCmd.clr_cmd()
        inputName_func()
    elif flowReturn == 2:
        CacheContorl.wframeMouse['wFrameRePrint'] = 1
        EraPrint.pnextscreen()
        import script.Design.StartFlow as mainflow
        mainflow.main_func()
    pass
コード例 #11
0
def inputNickName_func():
    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()
    pass
コード例 #12
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()
コード例 #13
0
def inputName_func():
    '''
    请求玩家输入姓名流程
    输入0:进入请求玩家输入昵称流程(玩家姓名为默认或输入姓名流程结果)
    输入1:进入输入姓名流程
    输入2:返回标题菜单
    '''
    CacheContorl.characterData['characterId'] = characterId
    flowReturn = CreatorCharacterPanel.inputNamePanel()
    if flowReturn == 0:
        PyCmd.clr_cmd()
        inputNickName_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        CreatorCharacterPanel.startInputNamePanel()
        PyCmd.clr_cmd()
        inputName_func()
    elif flowReturn == 2:
        EraPrint.pnextscreen()
        CacheContorl.nowFlowId = 'title_frame'
コード例 #14
0
def attributeGenerationBranch_func():
    flowReturn = CreatorCharacterPanel.attributeGenerationBranchPanel()
    if flowReturn == 0:
        PyCmd.clr_cmd()
        detailedSetting_func1()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        SeeCharacterAttr.acknowledgmentAttribute_func()
    elif flowReturn == 2:
        PyCmd.clr_cmd()
        inputSexConfirm_func()
コード例 #15
0
def detailedSetting_func1():
    '''
    询问玩家年龄模板流程
    '''
    flowRetun = CreatorCharacterPanel.detailedSetting1Panel()
    characterSex = CacheContorl.characterData['character'][0].Sex
    sexList = list(TextLoading.getTextData(TextLoading.rolePath, 'Sex'))
    characterAgeTemName = AttrCalculation.getAgeTemList()[flowRetun]
    CacheContorl.characterData['character'][0].Age = AttrCalculation.getAge(characterAgeTemName)
    PyCmd.clr_cmd()
    detailedSetting_func3()
コード例 #16
0
def inputSelfName_func():
    '''
    请求玩家输入自称流程
    输入0:进入请求玩家输入性别流程(玩家自称为默认,或输入自称流程结果)
    输入1:进入输入自称流程
    输入2:返回请求输入昵称流程
    '''
    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()
コード例 #17
0
def detailedSetting_func8():
    '''
    询问玩家肥胖程度流程
    '''
    flowReturn = CreatorCharacterPanel.detailedSetting8Panel()
    weightTemData = TextLoading.getTextData(TextLoading.attrTemplatePath,'WeightTem')
    weightTemList = list(weightTemData.keys())
    weightTem = weightTemList[int(flowReturn)]
    CacheContorl.characterData['character'][0].WeigtTem = weightTem
    CacheContorl.characterData['character'][0].BodyFatTem = weightTem
    enterCharacterNature_func()
コード例 #18
0
def detailedSetting_func3():
    '''
    询问玩家性经验程度流程
    '''
    flowReturn = CreatorCharacterPanel.detailedSetting3Panel()
    sexTemDataList = list(TextLoading.getTextData(TextLoading.attrTemplatePath,'SexExperience').keys())
    sexTemDataList.reverse()
    sexTemName = sexTemDataList[flowReturn]
    characterSexExperienceData = AttrCalculation.getSexExperience(sexTemName)
    CacheContorl.characterData['character'][0].SexExperienceTem = sexTemName
    PyCmd.clr_cmd()
    detailedSetting_func8()
コード例 #19
0
def detailedSetting_func4():
    flowReturn = CreatorCharacterPanel.detailedSetting4Panel()
    courageList = featuresList['Courage']
    if flowReturn == 0:
        CacheContorl.featuresList['Courage'] = courageList[0]
    elif flowReturn == 1:
        pass
    elif flowReturn == 2:
        CacheContorl.featuresList['Courage'] = courageList[1]
    CacheContorl.temporaryCharacter['Features'] = CacheContorl.featuresList.copy()
    PyCmd.clr_cmd()
    detailedSetting_func5()
コード例 #20
0
def detailedSetting_func5():
    flowReturn = CreatorCharacterPanel.detailedSetting5Panel()
    dispositionList = featuresList['Disposition']
    if flowReturn == 0:
        CacheContorl.featuresList['Disposition'] = dispositionList[0]
    elif flowReturn == 1:
        pass
    elif flowReturn == 2:
        CacheContorl.featuresList['Disposition'] = dispositionList[1]
    CacheContorl.temporaryCharacter['Features'] = CacheContorl.featuresList.copy()
    PyCmd.clr_cmd()
    detailedSetting_func6()
コード例 #21
0
def detailedSetting_func3():
    flowReturn = CreatorCharacterPanel.detailedSetting3Panel()
    sexTemDataList = ValueHandle.dictKeysToList(TextLoading.getTextData(TextLoading.attrTemplatePath,'SexExperience'))
    sexTemDataList = ValueHandle.reverseArrayList(sexTemDataList)
    sexTemName = sexTemDataList[flowReturn]
    if flowReturn != len(sexTemDataList) - 1:
        CacheContorl.featuresList['Chastity'] = ''
    else:
        pass
    characterSexExperienceData = AttrCalculation.getSexExperience(sexTemName)
    CacheContorl.temporaryCharacter['SexExperience'] = characterSexExperienceData
    CacheContorl.temporaryCharacter['SexGrade'] = AttrCalculation.getSexGrade(characterSexExperienceData)
    PyCmd.clr_cmd()
    detailedSetting_func4()
コード例 #22
0
def detailedSetting_func8():
    flowReturn = CreatorCharacterPanel.detailedSetting8Panel()
    weightTemData = TextLoading.getTextData(TextLoading.attrTemplatePath,'WeightTem')
    weightTemList = ValueHandle.dictKeysToList(weightTemData)
    weightTem = weightTemList[int(flowReturn)]
    characterHeight = CacheContorl.temporaryCharacter['Height']
    characterBmi = AttrCalculation.getBMI(weightTem)
    characterWeight = AttrCalculation.getWeight(characterBmi, characterHeight['NowHeight'])
    characterSex = CacheContorl.temporaryCharacter['Sex']
    characterBodyFat = AttrCalculation.getBodyFat(characterSex,weightTem)
    characterMeasurements = AttrCalculation.getMeasurements(characterSex, characterHeight['NowHeight'], characterWeight,characterBodyFat,weightTem)
    CacheContorl.temporaryCharacter['Weight'] = characterWeight
    CacheContorl.temporaryCharacter['BodyFat'] = characterBodyFat
    CacheContorl.temporaryCharacter['Measurements'] = characterMeasurements
    SeeCharacterAttr.acknowledgmentAttribute_func()
コード例 #23
0
def attributeGenerationBranch_func():
    '''
    询问玩家是否需要详细设置属性流程
    输入0:进入询问玩家年龄段流程
    输入1:进入属性最终确认流程(使用基础模板生成玩家属性)
    输入2:返回请求输入性别流程
    '''
    flowReturn = CreatorCharacterPanel.attributeGenerationBranchPanel()
    if flowReturn == 0:
        PyCmd.clr_cmd()
        detailedSetting_func1()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        CacheContorl.nowFlowId = 'acknowledgment_attribute'
    elif flowReturn == 2:
        PyCmd.clr_cmd()
        inputSexConfirm_func()
コード例 #24
0
def inputSexConfirm_func():
    flowReturn = CreatorCharacterPanel.inputSexPanel()
    sexId = CacheContorl.characterData['character'][characterId]['Sex']
    if flowReturn == 0:
        AttrCalculation.setSexCache(sexId)
        sexKeysList = list(TextLoading.getTextData(TextLoading.rolePath,'Sex'))
        if sexId == sexKeysList[2]:
            CacheContorl.temporaryCharacter['Features']['Sex'] = TextLoading.getTextData(TextLoading.rolePath, 'Features')['Sex'][0]
        elif sexId == sexKeysList[3]:
            CacheContorl.temporaryCharacter['Features']['Sex'] = TextLoading.getTextData(TextLoading.rolePath, 'Features')['Sex'][1]
        PyCmd.clr_cmd()
        attributeGenerationBranch_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        inputSexChoice_func()
    elif flowReturn == 2:
        PyCmd.clr_cmd()
        inputNickName_func()
コード例 #25
0
def inputSexConfirm_func():
    '''
    请求玩家输入性别流程
    输入0:进入询问是否进行详细设置流程(玩家性别为默认,或请求选择性别流程结果)
    输入1:进入选择性别流程
    输入2:返回请求输入自称流程
    '''
    flowReturn = CreatorCharacterPanel.inputSexPanel()
    sexId = CacheContorl.characterData['character'][0].Sex
    if flowReturn == 0:
        PyCmd.clr_cmd()
        attributeGenerationBranch_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        inputSexChoice_func()
    elif flowReturn == 2:
        PyCmd.clr_cmd()
        inputSelfName_func()
コード例 #26
0
def detailedSetting_func3():
    '''
    询问玩家性经验程度流程
    '''
    flowReturn = CreatorCharacterPanel.detailedSetting3Panel()
    sexTemDataList = list(
        TextLoading.getTextData(TextLoading.attrTemplatePath,
                                'SexExperience').keys())
    sexTemDataList.reverse()
    sexTemName = sexTemDataList[flowReturn]
    if flowReturn != len(sexTemDataList) - 1:
        CacheContorl.featuresList['Chastity'] = ''
    characterSexExperienceData = AttrCalculation.getSexExperience(sexTemName)
    CacheContorl.temporaryCharacter[
        'SexExperience'] = characterSexExperienceData
    CacheContorl.temporaryCharacter['SexGrade'] = AttrCalculation.getSexGrade(
        characterSexExperienceData)
    PyCmd.clr_cmd()
    detailedSetting_func4()
コード例 #27
0
def inputSexChoice_func():
    sex = list(TextLoading.getTextData(TextLoading.rolePath, 'Sex').keys())
    sexMax = len(sex)
    flowReturn = CreatorCharacterPanel.inputSexChoicePanel()
    if flowReturn in range(0,sexMax):
        sexAtr = sex[flowReturn]
        CacheContorl.temporaryCharacter['Sex'] = sexAtr
        CacheContorl.characterData['character'][characterId] = CacheContorl.temporaryCharacter.copy()
        PyCmd.clr_cmd()
        inputSexConfirm_func()
    elif flowReturn == 4:
        rand = random.randint(0, len(sex) - 1)
        sexAtr = sex[rand]
        CacheContorl.temporaryCharacter['Sex'] = sexAtr
        CacheContorl.characterData['character'][characterId] = CacheContorl.temporaryCharacter.copy()
        PyCmd.clr_cmd()
        inputSexConfirm_func()
    elif flowReturn == 5:
        EraPrint.p('\n')
        PyCmd.clr_cmd()
        inputSexConfirm_func()
コード例 #28
0
def detailedSetting_func8():
    '''
    询问玩家肥胖程度流程
    '''
    flowReturn = CreatorCharacterPanel.detailedSetting8Panel()
    weightTemData = TextLoading.getTextData(TextLoading.attrTemplatePath,
                                            'WeightTem')
    weightTemList = list(weightTemData.keys())
    weightTem = weightTemList[int(flowReturn)]
    characterHeight = CacheContorl.temporaryCharacter['Height']
    characterBmi = AttrCalculation.getBMI(weightTem)
    characterWeight = AttrCalculation.getWeight(characterBmi,
                                                characterHeight['NowHeight'])
    characterSex = CacheContorl.temporaryCharacter['Sex']
    characterBodyFat = AttrCalculation.getBodyFat(characterSex, weightTem)
    characterMeasurements = AttrCalculation.getMeasurements(
        characterSex, characterHeight['NowHeight'], characterWeight,
        characterBodyFat, weightTem)
    CacheContorl.temporaryCharacter['Weight'] = characterWeight
    CacheContorl.temporaryCharacter['BodyFat'] = characterBodyFat
    CacheContorl.temporaryCharacter['Measurements'] = characterMeasurements
    CacheContorl.nowFlowId = 'acknowledgment_attribute'