当前位置:DOS资源站资料中心批处理教程 → 射击游戏!超酷菜单,超酷控制

射击游戏!超酷菜单,超酷控制

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2008-5-18 21:11:22

@echo off
:all start
mode con: cols=32 lines=23
title 射击小游戏——By Defanive
setlocal enabledelayedexpansion
set l1=┏┉┉┉┉┉┉┓
set m1=┋ 新的游戏 ┋
set k1=┗┉┉┉┉┉┉┛
set l2=┏┉┉┉┉┉┉┓
set m2=┋ 游戏说明 ┋
set k2=┗┉┉┉┉┉┉┛
set l3=┏┉┉┉┉┉┉┓
set m3=┋ 制作说明 ┋
set k3=┗┉┉┉┉┉┉┛
set l4=┏┉┉┉┉┉┉┓
set m4=┋ 离开游戏 ┋
set k4=┗┉┉┉┉┉┉┛
set s1=  
set s2=
set s3=
set s4=
set cho=1
:menu
cls
echo.
echo   ┏┉┉┉┉┉┉┉┉┉┉┓
echo   ┋          ┋
echo   ┋   射击小游戏   ┋
echo   ┋   Defanive   ┋
echo   ┋          ┋
echo   ┗┉┉┉┉┉┉┉┉┉┉┛
echo.
echo.
echo %s1%%l1%
echo %s1%%m1%
echo %s1%%k1%
echo %s2%%l2%
echo %s2%%m2%
echo %s2%%k2%
echo %s3%%l3%
echo %s3%%m3%
echo %s3%%k3%
echo %s4%%l4%
echo %s4%%m4%
echo %s4%%k4%
choice /n /c WSJ
if errorlevel 3 goto mshoot
if errorlevel 2 goto mdown
if errorlevel 1 goto mup
:mdown
set/a chon=cho+1
if defined l%chon% (
set s%cho%=
set s%chon%=  
set cho=%chon%
)
goto menu
:mup
set/a chon=cho-1
if defined l%chon% (
set s%cho%=
set s%chon%=  
set cho=%chon%
)
goto menu
:mshoot
if %cho%==1 goto start
if %cho%==2 goto gamehelp
if %cho%==3 goto madehelp
if %cho%==4 exit
:gamehelp
cls
echo.
echo   ┏┉┉┉┉┉┉┉┉┉┉┓
echo   ┋          ┋
echo   ┋   射击小游戏   ┋
echo   ┋   Defanive   ┋
echo   ┋          ┋
echo   ┗┉┉┉┉┉┉┉┉┉┉┛
echo.
echo.
echo    AD键分别控制左右移动
echo    WS键分别控制上下移动
echo    J键控制射击
echo    ■为玩家,□为敌人
echo.
echo    当玩家与敌人重叠时射击得
echo  分,如果未重叠时射击或者距离
echo  上一次移动超过一秒扣分。五十
echo  分过关。
echo.
pause>nul
goto menu
:madehelp
cls
echo.
echo   ┏┉┉┉┉┉┉┉┉┉┉┓
echo   ┋          ┋
echo   ┋   射击小游戏   ┋
echo   ┋   Defanive   ┋
echo   ┋          ┋
echo   ┗┉┉┉┉┉┉┉┉┉┉┛
echo.
echo.
echo    作者:Defanive
echo    团队:SC TeAm
echo.
echo    这个作品是突然心血来潮
echo  做的。Choice完全替代了Set/p
echo  的麻烦。
echo.
echo    本作品没有加密,是为了新
echo  手学习的方便。请珍惜作者的劳
echo  动成果,不随便纂改。
echo.
echo    仅用于Mybat论坛交流
pause>nul
goto menu
:start
mode con: cols=15 lines=10
for /l %%a in (1,1,25) do (
set a%%a=█
)
set a1=■
set now=1
set score=0
call :em
:loop
cls
echo ┏┉┉┉┉┉┓
echo ┋%a1%%a2%%a3%%a4%%a5%┋
echo ┋%a6%%a7%%a8%%a9%%a10%┋
echo ┋%a11%%a12%%a13%%a14%%a15%┋
echo ┋%a16%%a17%%a18%%a19%%a20%┋
echo ┋%a21%%a22%%a23%%a24%%a25%┋
echo ┗┉┉┉┉┉┛
echo 您的分数:%score%
choice /n /c ADWSJT /t 1 /d T
if errorlevel 6 goto timeout
if errorlevel 5 goto shoot
if errorlevel 4 goto down
if errorlevel 3 goto up
if errorlevel 2 goto right
if errorlevel 1 goto left
:shoot
if !a%now%!==□ (
set a%now%=■
set/a score+=1
if %score%==50 goto win
call :em
) else (
set/a score-=1
)
goto loop
:down
set/a next=now+5
if defined a%next% (
if not !a%now%!==□ (
set a%now%=█
) else (
set a%now%=□
)
set now=%next%
if not !a%next%!==□ (
set a%next%=■
) else (
set a%next%=□
)
)
goto loop
:up
set/a next=now-5
if defined a%next% (
if not !a%now%!==□ (
set a%now%=█
) else (
set a%now%=□
)
set now=%next%
if not !a%next%!==□ (
set a%next%=■
) else (
set a%next%=□
)
)
goto loop
:right
set/a next=now+1
if defined a%next% (
if not !a%now%!==□ (
set a%now%=█
) else (
set a%now%=□
)
set now=%next%
if not !a%next%!==□ (
set a%next%=■
) else (
set a%next%=□
)
)
goto loop
:left
set/a next=now-1
if defined a%next% (
if not !a%now%!==□ (
set a%now%=█
) else (
set a%now%=□
)
set now=%next%
if not !a%next%!==□ (
set a%next%=■
) else (
set a%next%=□
)
)
goto loop
:timeout
set a%em%=█
set a%now%=■
set/a score-=1
call :em
goto loop
:win
cls
echo.
echo.
echo.
echo.
echo   WINNER
echo.
echo.
echo.
pause>nul
goto all start
:em
set/a em=%random%%%25+1
if %now%==%em% (
call :em
) else (
set a%em%=□
)

所需要文件下载点击下载此文件