您好,欢迎访问三七文档
‘将这句话删去,再将拓展名改为vbs即可使用dimli1,xing1,li2,xing2,xue1,xue2,attli1=0li2=0xue1=20xue2=Inputbox(血量)att=Inputbox(攻击)att=Int(att)dorandomizeifli1=0andli2=0thenxing1=0elseifli1=0andli20thenxing1=Int(Rnd*2)elseifli14thenxing1=Int(Rnd*3)elseifli1=5thenxing1=4elseifli2=0thenxing1=Int(Rnd*3)*2elsexing1=Int(Rnd*4)endifxing2=Inputbox(0——蓄力、1——闪避、2——攻击、3——箭击、4——引弓满月、9——逃跑)xing2=Int(xing2)if(xing24orxing20)thenxing2=1endififxing1=0thenmsgbox(敌方行动:蓄力)elseifxing1=1thenmsgbox敌方行动:闪避elseifxing1=2thenmsgbox敌方行动:攻击elseifxing1=3thenmsgbox敌方行动:箭击elseifxing1=4thenmsgbox敌方行动:引弓满月endififxing1=0and(xing2=0orxing2=1)thenli1=li1+1elseifxing1=2andxing2=0thenmsgbox(受伤)xue2=xue2-4li1=li1-1elseifxing1=2andxing20thenli1=li1-1elseifxing1=3andxing2=0andli12thenmsgbox(受伤)li1=li1-3xue2=xue2-7elseifxing1=3andxing2=2andli12thenmsgbox(受伤)li1=li1-3xue2=xue2-7elseifxing1=3andxing2=1thenli1=li1-3elseifxing1=4andxing2=4andli2=5thenli1=li1-5li2=li2-5elseifxing1=4and(xing2=0orxing2=1orxing4orxing0)thenli1=li1-5msgbox(受伤)xue2=xue2-10elseifxing1=4andxing2=2thenli1=li1-5msgbox(受伤)xue2=xue2-10elseifxing1=4andxing2=3thenli1=li1-5li2=li2-3msgbox(受伤)xue2=xue2-10endififxing2=0and(xing1=0orxing1=1)thenli2=li2+1elseifxing2=2andxing1=0andli20thenmsgbox(攻击成功)xue1=xue1-attli2=li2-1elseifxing2=2andxing10thenli2=li2-1elseifxing2=3and(xing1=0orxing1=2)andli22thenmsgbox(攻击成功)xue1=xue1-7li2=li2-3elseifxing2=3andxing1=1thenli2=li2-3elseifxing2=4andli24and(xing1=0orxing1=1)thenli2=li2-5msgbox(攻击成功)xue1=xue1-10elseifxing2=4andli24andxing1=2thenli2=li2-5msgbox(攻击成功)xue1=xue1-10elseifxing2=4andli24andxing1=3thenli2=li2-5li1=li1-3msgbox(攻击成功)xue1=xue1-10elseifxing2=9andxing1=3thenmsgbox(受到追击)xue2=xue2-8elseifxing2=9andxing1=4thenmsgbox(受到追击)xue2=xue2-12elseifxing2=4andxing14andli2=5thenli2=li2-5msgbox(攻击成功)xue2=xue2-10endififxue1=0thenmsgbox(Youwin)msgbox(HP:&xue2)exitdoelseifxue2=0thenmsgbox(Youlose)exitdoelseifxing2=9andxue20thenmsgbox(逃跑成功)msgbox(HP:&xue2)exitdoendifloop
本文标题:vbs小游戏
链接地址:https://www.777doc.com/doc-5264456 .html