Exemple #1
0
def main_play():
    global tgroup, tworld, tscene
    game.clr_cmd()
    game.pline()
    string = game.align('剧情进度:', 14) + lib.value_bar(tworld.当前进度,
                                                     tworld.data['剧情容量'])
    string += game.align('下一剧情:' + tscene.名称, 30, 'right')
    game.pl(string)
    for p in tgroup.所有人物:
        prefix = p.姓名 + '|体力:'
        prefix = game.align(prefix, 14)
        game.pl(prefix + lib.value_bar(p.当前体力, p.体力上限))

    string = '----------------------------------' + '设置剧情 ' + ': ' + tscene.名称 + ' --------------------------------'
    game.pl(string, style='title')
    game.call_event('设置剧情_' + tscene.名称, arg=(tscene.data, ))
    string = '---------------------------------------------------------------------------------------'
    game.pl(string, style='title')

    def begin_scene():
        global tscene
        game.call_event('进行剧情_' + tworld.当前剧情['名称'],
                        arg=(tgroup, tworld, tscene))
        tworld.下一剧情()
        if tworld.当前进度 <= tworld.data['剧情容量']:
            tscene = Target_scene(tworld.当前剧情)
        main_play()

    if tworld.当前进度 <= tworld.data['剧情容量']:
        game.pcmd('[100] 开始剧情', 100, begin_scene)
    else:
        game.p('[100] 开始剧情', style='grey')
    game.pl()
    game.pcmd('[999] 结束试炼', 999, main_func)
Exemple #2
0
 def begin_scene():
     global tscene
     game.call_event('进行剧情_' + tworld.当前剧情['名称'],
                     arg=(tgroup, tworld, tscene))
     tworld.下一剧情()
     if tworld.当前进度 <= tworld.data['剧情容量']:
         tscene = Target_scene(tworld.当前剧情)
     main_play()
Exemple #3
0
def event_func_生成世界_基础世界(tpl):
    game.pl('生成世界_基础世界:' + tpl['世界名称'], style='notice')
    tpl['剧情列表'] = []
    tpl['剧情配置'] = []
    for i in range(0, tpl['剧情容量']):
        tpl['剧情列表'].append(game.call_event('生成剧情_赤手蠢贼'))
    game.pl('剧情列表:', 'notice')
    game.pl(tpl['剧情列表'])
    return tpl
Exemple #4
0
def event_func_生成世界_基础世界(tpl):
    game.pl('生成世界_基础世界:'+tpl['世界名称'], style='notice')
    tpl['剧情列表']=[]
    tpl['剧情配置']=[]
    for i in range(0,tpl['剧情容量']):
        tpl['剧情列表'].append(game.call_event('生成剧情_赤手蠢贼'))
    game.pl('剧情列表:','notice')
    juqingstr=' '.join([s['名称'] for s in tpl['剧情列表']])
    game.pl(juqingstr)
    return tpl
Exemple #5
0
def _create_world(type_id):
    tpl = copy.deepcopy(game.data['世界'][type_id])
    tpl = game.call_event('生成世界_' + tpl['世界名称'], arg=(tpl,))
    # 是否创建世界
    game.pl("创建世界:" + tpl['世界名称'] + "?","notice")
    ans = lib.yes_or_no()
    game.pl()
    if ans == True:
        tpl['ID'] = lib.get_id()
        game.data['世界列表'].append(tpl)
    world_manager()
Exemple #6
0
def display_world(w):
    game.clr_cmd()
    game.pline()
    game.set_default_flow(display_world, arg=(w,))
    string = '----------------------------------' + '设置世界' + '---------------------------------------------'
    game.pl(string, style='title')
    string = game.align('ID', 4) + game.align('世界类型', 15) + game.align('剧情容量', 15) + game.align('构建点数', 15)
    game.pl(string)
    string = game.align(w['ID'], 4) + game.align(w['世界名称'], 15) \
             + game.align(w['剧情容量'], 15) + game.align(w['构建点数'], 15)
    game.pl(string)
    game.pl('------------------------------------')
    game.call_event('设置世界_' + w['世界名称'], arg=(w,))

    for scene_num in range(0, w['剧情容量']):
        s = w['剧情列表'][scene_num]
        string = '----------------------------------' + '设置剧情 ' + str(scene_num) + ' :' + s[
            '名称'] + ' --------------------------------'
        game.pl(string, style='title')
        game.call_event('设置剧情_' + s['名称'], arg=(s,))

    string = '---------------------------------------------------------------------------------------'
    game.pl(string, style='title')
    game.pcmd('[099]  退出管理', 99, world_manager)
Exemple #7
0
 def begin_scene():
     game.call_event('进行剧情_' + tworld.当前剧情['名称'],
                     arg=(tgroup, tworld, tscene))
     main_play()