From f025ee56a0aed7a3bd59c7bdc796a7c6b7632dc1 Mon Sep 17 00:00:00 2001 From: xzy Date: Sun, 2 Jun 2024 22:45:33 +0800 Subject: [PATCH] first commit --- 代码测试.py | 78 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 15 deletions(-) diff --git a/代码测试.py b/代码测试.py index 9ccb512..b5ccade 100644 --- a/代码测试.py +++ b/代码测试.py @@ -264,34 +264,81 @@ def monster_fight_time_now(): def map_now(): if map_id==0: map_0() - if map_id==1: + elif map_id==1: map_1() - if map_id==2: + elif map_id==2: map_2() - if map_id==3: + else: map_3() print(f"当前区域:{map_name}") def map_find(): - - global map_id map_id=int(input("请")) def map_0(): - global - + global Characher_id global map_id - map_id=0 global map_name + map_id=0 map_name="雅家" - global Characher_id if Characher_id==1: - home_thing_id=random.randint(1,3) + home_thing_id=random.randint(1,4) + if home_thing_id==1: + NPC_name="拾羽凝" + print("拾羽凝正坐在沙发上笑盈盈地看着你") + elif home_thing_id==2: + NPC_name="雅行苍" + print("雅行苍在客厅凭空一握,仿佛手中真的出现了剑,舞得虎虎生风") + elif home_thing_id==3: + NPC_name="雅羽千晹" + print("雅羽千晹正在鼓捣显像手表里的东西") + else: + NPC_name = "漓音" + print("漓音正躺在沙发上不知道想些什么") + active_id=eval(input("接下来应该做什么呢......")) + print("1.和{}对话".format(NPC_name)) + if active_id==1 and home_thing_id==1: + yuning_say=random.randint(1, 2) + if yuning_say == 1: + print("拾羽凝:千曈~快过来给我抱抱~") + print("雅羽千曈:别再把我当小孩子了!") + elif yuning_say == 2: + print("拾羽凝:出门在外要好好保护自己哦~") + print("雅羽千曈:知道了妈妈~") + if active_id == 1 and home_thing_id==2: + xingcang_say=random.randint(1,2) + if xingcang_say==1: + print("雅行苍:千曈吗......在外面注意安全") + print("雅羽千曈:知道了爸爸~") + elif xingcang_say == 2: + print("雅行苍:遇到了什么事了要及时跟我说。") + print("雅羽千曈:知道了知道了~") + elif active_id==1 and home_thing_id==3 : + print("雅羽千晹:别指望我跟你去干坏事哦。") + print("雅羽千曈:别对我产生这种固有印象啊!") + elif active_id==1 and home_thing_id==4: + rin_say=random.randint(1,4) + if rin_say==1: + print("漓音:曈。(拿出棒棒糖)") + print("雅羽千曈:欸?谢谢!") + if rin_say==2: + print("漓音:(拿出苹果)") + print("雅羽千曈:欸?谢谢!") + if rin_say==3: + print("漓音:真的愿意......成为我的鸦吗?") + print("雅羽千曈:嗯......这个嘛......以后再说吧~") print("1.离开家") - print("2.拾羽凝正坐在沙发上笑盈盈地看着你") - - +def map_1(): + global map_id + global map_name + map_id=1 + map_name="星河镇" +def map_2(): + global map_id + global map_name + map_id=2 + map_name="平原" def fight(): t=True global Characher_name @@ -363,7 +410,7 @@ def map_find(): global MAP_NO if MAP_NO==0: home_find=0 - home_find=eval(input("请选择你要探索的")) + home_find=eval(input("请选择你要探索的区域")) def return_fight_zero(): global Characher_skill_name Characher_skill_name=0 @@ -440,7 +487,8 @@ if choose_begin==1: fight() if game_continue==1: print("看来你已经熟悉游戏的大致流程了,接下来就开始你的冒险吧") - #map_find() + map_0() + map_find() else: print("是吗......那下次再见") else: