我正在批量制作游戏。我知道那批不是很强大,但这是我的第一场比赛。无论如何,我正在做一个 if 声明,如果您通过 1 号门,您将活着,但如果您通过 2 号门,您将死去。不幸的是,当我通过任何一扇门时,程序都会重新启动。在这里,我将向您展示我的代码:
`@echo off
color 02
::stats
set Badasspts=0
:Beginning
echo Hello what is your name?
set /p name=
echo Hello %name%!
echo You have two doors to go through. Which one? Possible answers: 1 or 2
set /p answer1=
if answer1==1 goto youLive
if answer1==2 goto youDie
:youDie
echo Behind this door is an alligator pit you accidentally fall in and die!
goto Beginning
:youLive
echo Well... well... well... you live this time but now ummm... A wild monster appears. What do you do? Possible answers: hug, attack
set /p hugAttck=
if hugAttack==hug goto hug
if hugAttack==attack goto attack1
:hug
echo You hug that cute furry monster soooo hard that he dies. Plus 1 BADASS points!!!!
pause`
注意:我正在使用 Notepad++ 编程。它还没有完成,所以是的。