You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

682 lines
19 KiB

6 months ago
import random
Characher_say=0
Characher_name=0
Characher_power=0
Characher_speed=0
Characher_MAXHP=0
Characher_MAXMP=0
Characher_losthp=0
Characher_lostmp=0
Characher_DEF=0
Characher_skill_name=0
Characher_skill_say=0
6 months ago
skill_time=0
6 months ago
monster_name=0
monster_power=0
monster_speed=0
monster_MAXHP=0
monster_losthp=0
monster_lostmp=0
monster_MAXMP=0
monster_DEF_LV=0
monster_skillname=0
monster_find_id=0
monster_id=0
6 months ago
map_name=0
map_id=0
Attack=0
6 months ago
Cost_mp=0
6 months ago
true_Attack=0
sum_Attack=0
6 months ago
fight_times=0
fight_time=0
6 months ago
game_continue=0
map_id=0
map_name=0
map_active_id=0
map_now_id=0
6 months ago
def yami():
global Characher_name
global Characher_power
global Characher_speed
global Characher_MAXHP
global Characher_MAXMP
Characher_name="雅羽千曈"
Characher_power=2
6 months ago
Characher_speed=4
Characher_MAXHP=45
6 months ago
Characher_MAXMP=999
def yara():
global Characher_name
Characher_name="雅羽千晹"
global Characher_power
6 months ago
Characher_power=8
6 months ago
global Characher_speed
Characher_speed=5
global Characher_MAXHP
6 months ago
Characher_MAXHP=75
6 months ago
global Characher_MAXMP
Characher_MAXMP=20
def rin():
global Characher_name
Characher_name="漓音"
global Characher_power
Characher_power=7
global Characher_speed
Characher_speed=7
global Characher_MAXHP
6 months ago
Characher_MAXHP=65
6 months ago
global Characher_MAXMP
Characher_MAXMP=50
def Characher_skill():
global Characher_id
if Characher_id==1:
Characher_skill_yami()
if Characher_id==2:
Characher_skill_yara()
if Characher_id==3:
Characher_skill_rin()
def Characher_skill_yami():
global Characher_id
global Characher_power
global Characher_Attack
global Characher_DEF
global Characher_MP
6 months ago
global true_Attack
6 months ago
global Characher_HP
6 months ago
global Characher_lostmp
6 months ago
global Characher_name
global Characher_skill_say
6 months ago
global Characher_skill_name
6 months ago
global Cost_mp
6 months ago
global skill_time
print ("0.普通攻击")
6 months ago
print ("1.锐枪式(15灵子能)")
print ("2.重锤式(25灵子能)")
print ("3.虹光流(40灵子能)")
print ("4.虹光风暴(100灵子能)")
6 months ago
print ("5.突然白给")
6 months ago
skill_id = eval(input("请选择释放的技能"))
6 months ago
if skill_id==0:
Characher_skill_name="普通攻击"
6 months ago
Characher_skill_say=0
Characher_Attack=Characher_power/5*3
6 months ago
skill_time=1
elif skill_id==1:
6 months ago
Cost_mp=15
Characher_skill_name="锐枪式"
6 months ago
Characher_skill_say=random.randint(1,2)
6 months ago
true_Attack=3*Characher_power
if Cost_mp>Characher_lostmp:
print("剩余灵子能不足将自动释放普通攻击!")
Characher_skill_say = 0
Characher_Attack = Characher_power / 5 * 3
skill_time = 1
else:
Characher_lostmp-=Cost_mp
6 months ago
skill_time=1
elif skill_id==2:
6 months ago
Cost_mp=25
Characher_skill_name="重锤式"
6 months ago
Characher_skill_say=random.randint(1,2)
6 months ago
true_Attack=5*Characher_power
if Cost_mp>Characher_lostmp:
print("剩余灵子能不足将自动释放普通攻击!")
Characher_skill_say = 0
Characher_Attack = Characher_power / 5 * 3
skill_time = 1
else:
Characher_lostmp-=Cost_mp
6 months ago
skill_time=1
elif skill_id==3:
6 months ago
Cost_mp=40
Characher_skill_name="虹光流"
6 months ago
Characher_skill_say=random.randint(1,2)
6 months ago
true_Attack=3*Characher_power
if Cost_mp>Characher_lostmp:
print("剩余灵子能不足将自动释放普通攻击!")
Characher_skill_say = 0
Characher_Attack = Characher_power / 5 * 3
skill_time = 1
else:
Characher_lostmp-=Cost_mp
6 months ago
skill_time=3
6 months ago
elif skill_id==4:
6 months ago
Cost_mp=100
Characher_skill_name="虹光风暴"
true_Attack=4*Characher_power
6 months ago
skill_time=5
6 months ago
if Cost_mp>Characher_lostmp:
print("剩余灵子能不足将自动释放普通攻击!")
Characher_skill_say = 0
Characher_Attack = Characher_power / 5 * 3
skill_time = 1
else:
Characher_lostmp-=Cost_mp
6 months ago
Characher_skill_say=4
6 months ago
elif skill_id==5:
6 months ago
Characher_skill_say=5
6 months ago
Characher_HP-=100000
skill_yami_say()
def skill_yami_say():
global Characher_skill_say
if Characher_skill_say==0:
print("嗯......我会加油的!嘿!")
elif Characher_skill_say==1:
print("冲鸭!")
elif Characher_skill_say==2:
print("要上了哦~")
6 months ago
elif Characher_skill_say==3:
print("哪个笨蛋想出的这种东西啊!!!!")
6 months ago
else:
print("虽然聚集起来很麻烦......但总是要用呢~")
def Characher_skill_yara():
print ("0.普通攻击")
print ("1.崩山")
print ("2.灭尘")
print ("3.寸拳")
print ("4.锻钢剑")
def Characher_skill_rin():
print ("0.普通攻击")
print ("1.家传刀法·寂")
print ("2.紊乱附加")
print ("3.避锋·拔刀")
print ("4.秘技·蝰蛇")
def monster_1():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
6 months ago
global monster_DEF_LV
monster_DEF_LV=0
monster_name="大黄"
6 months ago
monster_id=1
6 months ago
monster_MAXHP=18
monster_MAXMP=5
monster_power=5
monster_DEF_LV=0
monster_speed=3
def monster_2():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name="草球"
monster_id=2
6 months ago
monster_MAXHP=20
monster_MAXMP=1
monster_power=3
6 months ago
monster_DEF_LV=1
6 months ago
monster_speed=3
6 months ago
def monster_3():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name=""
monster_id=3
monster_MAXHP=30
monster_MAXMP=5
monster_power=5
monster_DEF_LV=1
monster_speed=5
def monster_4():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name="野猪"
monster_id=4
monster_MAXHP=50
monster_MAXMP=7
monster_power=4
monster_DEF_LV=2
monster_speed=4
def monster_5():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name=""
monster_id=5
monster_MAXHP=55
monster_MAXMP=10
monster_power=4
monster_DEF_LV=2
monster_speed=5
def monster_6():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name=""
monster_id=6
monster_MAXHP=40
monster_MAXMP=5
monster_power=6
monster_DEF_LV=1
monster_speed=6
def monster_7():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name="蜘蛛"
monster_id=7
monster_MAXHP=45
monster_MAXMP=5
monster_power=4
monster_DEF_LV=1
monster_speed=5
def monster_8():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name=""
monster_id=8
monster_MAXHP=70
monster_MAXMP=15
monster_power=5
monster_DEF_LV=2
monster_speed=4
def monster_9():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name="虚灵武士"
monster_id=9
monster_MAXHP=80
monster_MAXMP=20
monster_power=8
monster_DEF_LV=2
monster_speed=4
def monster_10():
global monster_id
global monster_speed
global monster_MAXHP
global monster_MAXMP
global monster_power
global monster_name
global monster_DEF_LV
monster_name="观察者"
monster_id=10
monster_MAXHP=500
monster_MAXMP=550
monster_power=10
monster_DEF_LV=3
monster_speed=7
6 months ago
def monster_skill():
global monster_id
global monster_power
global monster_skillname
6 months ago
global Attack
global skill_time
6 months ago
if monster_id==1:
a=random.randint(1,3)
if a==1:
monster_skillname=""
6 months ago
Attack=monster_power*2
skill_time=1
6 months ago
elif a==2:
6 months ago
monster_skillname="撞击"
6 months ago
Attack=monster_power*2.5
skill_time=1
6 months ago
elif monster_id==2:
a=random.randint(1,2)
if a==1:
monster_skillname=""
Attack=monster_power*2
skill_time=1
elif a==2:
monster_skillname="撞击"
Attack=monster_power*2.5
skill_time=1
elif a==3:
6 months ago
monster_skillname="草刺"
6 months ago
Attack=monster_power
skill_time=3
6 months ago
def choose_1(CH):
print("1.确定")
print("2.拒绝")
a=int(input(CH))
if a == 1:
return "YES"
if a == 2:
return "NO"
6 months ago
def say():
6 months ago
say_id=random.randint(1,4)
if say_id==1:
return say_id
if say_id==2:
return say_id
if say_id==3:
return say_id
if say_id==4:
return say_id
def monster_found_prompt():
global monster_id
global monster_find_id
global monster_name
global Characher_name
global Characher_true_Attack
if monster_id <= 3:
monster_find_id = random.randint(1, 4)
if monster_find_id == 1 and monster_id == 1:
print(f"一只{monster_name}朝着{Characher_name}滚了过来")
elif monster_find_id == 2:
print(f"一只{monster_name}朝着这里过来了")
elif monster_find_id == 3:
print(f"一只{monster_name}冲过来了!")
6 months ago
def monster_fight_time_now():
6 months ago
global fight_time
global monster_MAXHP
global monster_losthp
global monster_MAXMP
global monster_lostmp
if fight_time==0:
monster_losthp = monster_MAXHP
fight_time+=1
print("{}回合".format(fight_time))
else:
fight_time+=1
print("{}回合".format(fight_time))
6 months ago
def skill_times():
i=0
global skill_time
global true_Attack
global Attack
global sum_Attack
global Characher_skill_name
global monster_skillname
global Characher_name
global monster_name
global monster_DEF_LV
if monster_DEF_LV == 1:
Attack =Attack/10*9
elif monster_DEF_LV == 2:
Attack =Attack/10*8
elif monster_DEF_LV == 3:
Attack =Attack/10*7
if Characher_skill_name!=0 and monster_skillname==0:
print(f"{Characher_name}{monster_name}使用了{Characher_skill_name}")
elif monster_skillname!=0 and Characher_skill_name==0:
print(f"{monster_name}{Characher_name}使用了{monster_skillname}")
for i in range(skill_time):
sum_Attack+=true_Attack+Attack
print(f"造成了{sum_Attack}伤害")
def fight():
t=True
global Characher_name
global Characher_id
global Characher_speed
global Characher_MAXHP
global Characher_losthp
global Characher_MAXMP
global Characher_lostmp
global monster_speed
global monster_MAXHP
global monster_losthp
global monster_MAXMP
global monster_lostmp
global fight_times
global fight_time
global game_continue
global sum_Attack
monster_found_prompt()
while t==True:
if fight_times==0:
Characher_losthp=Characher_MAXHP
Characher_lostmp=Characher_MAXMP
fight_times+=1
else:
fight_times+=1
monster_fight_time_now()
print(f"{Characher_name}血量:{Characher_losthp}/{Characher_MAXHP}")
print(f"{Characher_name}灵子力:{Characher_lostmp}/{Characher_MAXMP}")
print(f"{monster_name}剩余血量:{monster_losthp}")
if Characher_speed>=monster_speed:
Characher_skill()
skill_times()
monster_losthp-=sum_Attack
return_fight_zero()
if monster_losthp<=0:
print("战斗胜利")
game_continue=1
t=False
monster_skill()
skill_times()
Characher_losthp-=sum_Attack
return_fight_zero()
if Characher_losthp<=0:
print(f"{Characher_name}被打扁了!")
print("游戏结束")
t = False
else:
monster_skill()
skill_times()
Characher_losthp-=sum_Attack
return_fight_zero()
print(f"{Characher_name}血量:{Characher_losthp}/{Characher_MAXHP}")
print(f"{Characher_name}灵子力:{Characher_lostmp}/{Characher_MAXMP}")
print(f"{monster_name}剩余血量:{monster_losthp}")
if Characher_losthp<=0:
print(f"{Characher_name}被打扁了!")
print("游戏结束")
t=False
Characher_skill()
skill_times()
monster_losthp-=sum_Attack
return_fight_zero()
if monster_losthp<=0:
print("战斗胜利")
game_continue=1
t=False
return_zero()
6 months ago
def map_now():
6 months ago
global map_name
6 months ago
if map_id==0:
map_0()
6 months ago
elif map_id==1:
6 months ago
map_1()
6 months ago
elif map_id==2:
6 months ago
map_2()
6 months ago
else:
6 months ago
map_3()
print(f"当前区域:{map_name}")
6 months ago
# def map_find():
# global map_id
# map_id=int(input("请选择你需要探索的区域"))
6 months ago
def map_0():
6 months ago
global Characher_id
6 months ago
global map_id
global map_name
6 months ago
map_id=0
6 months ago
map_name="雅家"
if Characher_id==1:
6 months ago
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("雅羽千曈:嗯......这个嘛......以后再说吧~")
6 months ago
6 months ago
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="平原"
6 months ago
6 months ago
def map_find():
global MAP_NO
if MAP_NO==0:
home_find=0
6 months ago
home_find=eval(input("请选择你要探索的区域"))
6 months ago
def return_fight_zero():
global Characher_skill_name
Characher_skill_name=0
global monster_skillname
monster_skillname=0
global skill_time
skill_time=0
global sum_Attack
sum_Attack=0
global Attack
Attack=0
global true_Attack
true_Attack=0
def return_zero():
global Characher_say
Characher_say= 0
global Characher_true_Attack
Characher_true_Attack= 0
global Characher_skill_name
Characher_skill_name= 0
global Characher_skill_say
Characher_skill_say= 0
global monster_name
monster_name= 0
global monster_power
monster_power= 0
global monster_speed
monster_speed= 0
global monster_MAXHP
monster_MAXHP= 0
global monster_losthp
monster_losthp= 0
global monster_lostmp
monster_lostmp= 0
global monster_MAXMP
monster_MAXMP= 0
global monster_Attack
monster_Attack= 0
global monster_DEF_LV
monster_DEF_LV= 0
global monster_skillname
monster_skillname= 0
global monster_find_id
monster_find_id= 0
global monster_id
monster_id= 0
global fight_time
fight_time= 0
6 months ago
print("1.开始游戏")
print("2.继续游戏")
print("3.结束游戏")
choose_begin=int(input("请选择"))
if choose_begin==1:
print("1.雅羽千曈")
print("2.雅羽千晹")
print("3.漓音")
Characher_id = int(input("请选择你的角色:"))
if Characher_id == 1:
print("开始冒险了~")
yami()
elif Characher_id == 2:
print("开始吧。")
yara()
elif (Characher_id == 3):
print("(安静地拿起刀)")
rin()
if choose_1("你好,我是向导梦花")=="YES":
if choose_1("因为这是第一次的测试版,所以并没有额外的新手向导员之类的东西")=="YES":
if choose_1("以后的版本更新这个地方大概会由拾羽凝,也就是千曈千晹的妈妈负责引导吧......") == "YES":
if choose_1("闲话到此为止哦,下面开始进行游戏的大概内容") =="YES":
if choose_1("接下来我将投放一只鸦伶世界的代表怪物'草球作为第一次战斗的对象,没关系,很好打的")=="YES":
6 months ago
monster_2()
6 months ago
fight()
6 months ago
if game_continue==1:
print("看来你已经熟悉游戏的大致流程了,接下来就开始你的冒险吧")
6 months ago
map_0()
6 months ago
map_now()
6 months ago
map_find()
6 months ago
else:
print("是吗......那下次再见")
else:
print("是吗......那下次再见")
else:
print("是吗......那下次再见")
else:
print("是吗......那下次再见")
else:
print("是吗......那下次再见")
# print("1.继续")
# print("2.结束游戏")
# int(input("因为这是第一次的测试版,所以并没有额外的新手向导员之类的东西"))
# print("请选择需要探索的地图")