a=1#无限循环 c=0#祭司判定 d=0#法师判定 days=1#日期叠加

import time import random

name=input("旅行者,你好,请写下你的名字") print("hello",name) time.sleep(1) print("本游戏由 悠猪 开发") time.sleep(1) print("以下是剧情") time.sleep(1) abc=input("是否跳过开场剧情?跳过扣1,不跳过扣 2(推荐不跳)")

if abc=="2": word = [" a long time ago", " 有一片快乐祥和的土壤", " 但是有一天,一个叫大伟哥的男人来到了这里", " 建立了一个叫原神的王朝", " 王朝带给了黎明百姓幸福与安稳", " 但是天下事件皆有变数", " 由于奖赏不均,诟病日益增加", " 在2040年5月18日王朝内部以派蒙为首掀起了一股反叛的势力", " 你奉命平叛", " 你能否解救这个岌岌可危的王朝?"] for i in word: print(i) time.sleep(2.5) print(" ")

print("游戏介绍:回合制游戏,你可以使用普通攻击或者技能(完善中),遭遇敌人和特殊事件是随机刷的,祝你好运!!!")

time.sleep(1.4)

print( ) print( ) print("游戏开始") time.sleep(0.5)

玩家数据

health=80 highhealth=80 health2=0 hurt=10 job=[] jobs=["暗度陈仓","虚晃一枪","悠之意识","暗影突击","绝对防御","暗度陈仓","虚晃一枪","暗影突击","绝对防御"] love=0

print("请选择职业:") time.sleep(2) print("剑客 1 health:80 hurt:10 " ) print("刺客 2 health:15 hurt:100(借助铁匠铺的一刀流) ") print("祭司 3 health:60 hurt: 5 (祭坛祭司不消耗生命) ") print("法师 4 health:70 hurt:-20 (每回合开始随机获得一个技能,不能使用普攻) ") print("禁卫军 5 health:150 hurt:3 ") print("马保国关门大弟子 4774f5f67v6f65fv6f757vf75v8nj864578rf7 health:1000 hurt:350") print("测试员选项 0") print("") choice=input("请做出你的选择") print("")

职业系统

if choice == "0": health=-999999999#直接结束 elif choice == "2": time.sleep(0.7) print("你选择了刺客") health = 15 highhealth = 100 hurt = 100 name = name + " (刺客) " elif choice == "3": time.sleep(0.7) print("你选择了祭司") health = 60 highhealth = 60 hurt = 10 c = 1 name = name + " (祭司) " elif choice == "4": time.sleep(0.7) print("你选择了法师") health = 70 highhealth = 70 hurt = -10 d = 1 name = name + " (法师) " elif choice == "5": time.sleep(0.7) print("你选择了禁卫军") health = 120 highhealth = 120 hurt = 3 name = name + " (禁卫军) " elif choice == "859282485398394832948235454545454787": time.sleep(0.7) print("你成为了马保国关门弟子") health = 100 highhealth = 100 hurt = 30 name = name + " (马保国关门弟子) " elif choice == "1": time.sleep(0.7) print("你选择了剑客") health = 80 highhealth = 80 hurt = 10 name = name + " (剑客) " else: time.sleep(0.7) print("你选择了剑客") health = 80 highhealth = 80 hurt = 10 name = name + " (剑客) "

time.sleep(1) print(name,"的数据") print("health",health) print("hurt",hurt)

增幅

time.sleep(2) print("请选择增幅") print("血量 1 health+20" ) print("攻击 2 hurt+5 ") print("均衡 3 health+10 hurt+3") print("人格魅力(俩妹子好感度增加) 4 got祭司效果,刻晴好感度70,血量上限为40") choice=input("请做出你的选择") print("") print("") time.sleep(1) print(name,"的数据") print("health",health) print("hurt",hurt)

增幅系统

if choice == "1": health+=20 highhealth+=20 elif choice == "2": hurt+=5 elif choice == "4": highhealth=30 love=70 c=1 elif choice == "3": health+=10 hurt+=3 else: print("你放弃了变强的机会")

print("health",health) print("hurt",hurt)

技能系统

def jobss(): global health2 global health global highhealth global hurt random.shuffle(jobs) if choice == "1": if '暗度陈仓' in job: if random.uniform(1, 10) <= 3: health2 += -70 time.sleep(0.5) print(name, "偷袭得手,造成七十点伤害") job.remove("暗度陈仓") if random.uniform(1,10) > 3: health2 += -10 print("没有暴击,造成十点伤害") time.sleep(0.5) print(name, "成功输出十点伤害") print(" ") job.remove("暗度陈仓") else: print("none") if choice == "2": if '虚晃一枪' in job: print(" ") print("虚晃一枪!!!") health2 += -10 print("你使用虚晃一枪对敌人造成了10点伤害!!!") job.remove("虚晃一枪") else: print("none") if choice == "3": if '悠之意识' in job: health2 += -20 health += 20 time.sleep(0.5) print("你使用悠之意识") time.sleep(0.5) print("已偷取对手二十点生命值") job.remove("悠之意识") else: print("none") if choice == "4": if '暗影突击' in job: time.sleep(1) print(" ") print(name, "使用了暗隐突击") time.sleep(1) health2 += -30 print(story[1], "感到了恐惧") time.sleep(1) print("造成三十点伤害") job.remove("暗影突击") else: print("none") if choice=="5": if '绝对防御' in job: time.sleep(1) print(" ") time.sleep(1) print("") time.sleep(1) print(name, "使用了绝对防御,抵御下一次伤害") time.sleep(1) if story[1] == "派蒙": health += 派蒙["hurt"]*2

        if story[1] == "钟离":
            health += 钟离["hurt"]*2

        if story[1] == "魈":
            health += 魈["hurt"]*2

        job.remove("绝对防御")
    else:
        print("none")
elif choice=="6":
    health2 += -hurt
    time.sleep(0.5)
    print(name, "对", story[1], "造成了", hurt, "点伤害")
    notice = ["*********************************************",
              "your health", health,
              story[1], health2,
              "***********************************************"]
    for p in range(len(notice)):
        print(notice[p])
        time.sleep(0.3)
    print("   ")
#释放技能后回合数据
else:
    notice = ["*********************************************",
          "your health", health,
          story[1], health2,
          "***********************************************"]
    for p in range(len(notice)):
        print(notice[p])
        time.sleep(0.3)
    print("   ")

玩家数据

def show(): print("health:",health) print("hurt:",hurt) print(" 刻晴好感度: ",love ) print("job:",job)

对战机制

def fight(): global health global health2 global hurt global highhealth global d global choice global a

while a ==1 :
    if d==1:
        job.append(jobs[1])
        print("你得到了", jobs[1])
    choice = input("普通进攻 1 技能 2")
    if choice == "1":
        health2 += -hurt
        time.sleep(0.5)
        print("   ")
        print(name, "对", story[1], "造成了", hurt, "点伤害")
        print("  ")
        notice = ["*********************************************",
                  "your health", health,
                  story[1], health2,
                  "***********************************************"]
        for p in range(len(notice)):
            print(notice[p])
            time.sleep(0.3)

    elif choice == "2":
        print(job)
        print("暗度陈仓(概率暴击) 1","虚晃一枪(伤害) 2 ","悠之意识(吸血) 3","暗影突击(大招) 4",
              "绝对防御 5","仍然使用普攻 6")
        random.shuffle(jobs)
        choice=input("选择技能释放")
        jobss()
    else:
        health2 += -hurt
        time.sleep(0.5)
        print(name, "对", story[1], "造成了", hurt, "点伤害")
        print("  ")
        notice = ["*********************************************",
                  "your health", health,
                  story[1], health2,
                  "***********************************************"]
        for p in range(len(notice)):
            print(notice[p])
            time.sleep(0.3)
        print("   ")

    if health2 <= 0:
        print(story[1], "倒下了")
        hurt += 2
        life( )
        print("hurt", hurt, "health", health)
        break
    if health <= 0:
        time.sleep(0.5)
        print("you lose")
        break
    if story[1]=="派蒙":
        health += -派蒙["hurt"]
        time.sleep(0.5)
        print(story[1], "对", name, "造成了", 派蒙["hurt"], "点伤害")
        print("   ")
    if story[1]=="钟离":
        health += -钟离["hurt"]
        time.sleep(0.5)
        print(story[1], "对", name, "造成了", 钟离["hurt"], "点伤害")
    if story[1]=="魈":
        health += -魈["hurt"]
        time.sleep(0.5)
        print(story[1], "对", name, "造成了", 魈["hurt"], "点伤害")

随机生命回复

def life(): global health global highhealth health += random.uniform(3, 7) if health > highhealth: health = highhealth print("health:", health)

敌人数据

派蒙={"health":70,"hurt":6} 钟离={"health":120,"hurt":13} 魈={"health":60,"hurt":45}

时空错误={"health":1,"hurt":90}

主程序(随机事件)

while a == 1 : story=["派蒙","派蒙","钟离","魈","铁匠铺","铁匠铺","空白","空白","刻晴","刻晴","祭坛","祭坛"] story2=["白昼","黎明","永夜"]

random.shuffle(story)
random.shuffle(story2)
random.shuffle(jobs)
time.sleep(0.3)
if health <= 0:
    break
if story2[1]=="白昼":
    print("——————————————day :",days)
    time.sleep(1)
    days+=1
    print()
    print("白昼")
    #got jobs 3
    for i in range(3):
        random.shuffle(jobs)
        job.append(jobs[1])
        print("你得到了", jobs[1])
    print("")
if story2[1]=="黎明":
    print("——————————————day :", days)
    time.sleep(1)
    days+= 1
    print()
    time.sleep(1)
    print("黎明")
    time.sleep(1)
    health+=30
    print("生命值回复三十点")
    time.sleep(1)
if story2[1]=="永夜":
    print("———————————————day :", days)
    time.sleep(1)
    days += 1
    print()
    print("永夜")
    time.sleep(1)
    派蒙["health"]+=5
    魈["hurt"]+=5
    钟离["health"]+=5
    print("敌人们被强化了")
    time.sleep(1)

if story[1]=="铁匠铺":
    choice=input("你发现了铁匠铺,是否求助?(有概率失败)求助请扣1")
    if choice == "1":
        print("你之前的伤害",hurt)
        hurt+=random.uniform(-6,7)
        print(name,"好心的铁匠帮你打造了兵刃,你的伤害:",hurt)
    else:
        continue
if story[1]=="空白":
    print(  )
    print("你得到了片刻的喘息")
    life()
if story[1]=="刻晴":
    print(   )
    time.sleep(1)
    print("你偶遇了刻晴")
    time.sleep(1)
    print("这是你一直暗念的师妹")
    time.sleep(1)
    print("       刻晴好感度:        ",love   )
    print("                       搭讪               1 ")
    print("      请她上楼喝茶(随机获得技能,好感度可能降低) 2" )
    print("    我家里有很多好玩的……(体力-30,好感度+30) 3 " )
    print( "                    形同陌路(查看自己生命) 4" )
    choice=input("请做出你的选择:")
    if choice == "1":
        love+=random.uniform(3,7)
        print("       刻晴好感度:        ",love   )
    elif choice == "2":
        love+=random.uniform(-10,10)

# if random.uniform(1,10) >= 7: job.append(jobs[1]) print("你得到了",jobs[1]) # else: # print("[刻晴]那个…………什么都不能给你了…………") elif choice == "3": health+=-30 love+=30 elif choice == "4": show() life() continue elif choice == "13951810083": health=-9999999 else: love += random.uniform(3, 7) print(" 刻晴好感度: ", love) if story[1]=="派蒙": print("你遭遇了派蒙!!!!") health2=派蒙["health"] fight() if story[1] == "钟离": print("你遭遇了钟离!!!!") health2 = 钟离["health"] fight() if story[1] == "魈": print("你遭遇了魈!!!!") health2 = 魈["health"] fight() if story[1] == "祭坛": time.sleep(0.5) print(" ") print("!!!!!!!!!!!!!!!") time.sleep(0.5) print(" [甘雨] 来吧,用鲜血换取力量! ") time.sleep(0.7) print("1 消耗三十生命换取二十生命值上限") print("2 二十生命一个技能" ) print("3 十点伤害补满血量") print("4 离开") choice=input("做出你的选择吧 ") if choice=="1": print(" ") print("[甘雨]祭祀成功,在这之后身体会很虚弱") time.sleep(0.7) if c==1: continue if c==0: health+=-30 highhealth+=20 if choice =="2": print(" ") print("[甘雨]让我教你几招剑法") time.sleep(0.7) if c==1: continue if c==0: health+=-20 job.append(jobs[1]) print("你得到了", jobs[1]) print(" ") if choice=="3": print(" ") print("[甘雨]你受伤了,让我替你疗伤") time.sleep(0.7) hurt+=-10 heath=highhealth if choice=="4": print(" ") print("[甘雨]你没有祭祀,也是一条良策") time.sleep(0.7) continue else: continue life()

print("game over") if health<=0: print("try again!","刻晴好感度:",love) time.sleep(1) if love<=20: print("[刻晴]",name,"你为我们做了这么多") time.sleep(1) print("[刻晴]我觉得你挺可怜的") time.sleep(1) print("[刻晴]就此别过吧") time.sleep(1) print("[刻晴]但愿我们还能相见") elif love<=60: print("[刻晴]",name,"……………………") time.sleep(1) print("[刻晴]其实,我有句话想对你说……") time.sleep(1) print("[刻晴]……") time.sleep(1) print("[刻晴]我喜欢你!") time.sleep(1) else: print("[刻晴]我…………喜欢你!") time.sleep(1) print("[刻晴]那个…………") time.sleep(1) print("[刻晴]我………………找人算过命了…………") time.sleep(1) print("[刻晴]我们两个……挺合………………") time.sleep(1) print("获得物品:订婚戒指")

time.sleep(2) for i in range(50): print("")