Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Mini RPG v0.3 Beta
- color 0D
- setlocal EnableDelayedExpansion
- REM v0.3 Beta - Connor
- REM Added PIN security and debug features for testing
- echo ================================
- echo Mini RPG v0.3 Beta Access
- echo ================================
- echo.
- set /p access_code="Enter beta access code: "
- if "!access_code!" NEQ "55555" (
- echo Access denied. Contact Connor for beta access.
- timeout /t 3 >nul
- exit /b
- )
- echo Beta access granted!
- timeout /t 1 >nul
- set VERSION=0.3
- set px=2
- set py=1
- set coins=0
- set health=20
- set max_health=20
- set level=1
- set xp=0
- set debug_mode=1
- REM Using same terrain data - consistency across versions
- set "terrain[0][0]=0" & set "terrain[0][1]=7" & set "terrain[0][2]=4" & set "terrain[0][3]=4" & set "terrain[0][4]=5"
- set "terrain[1][0]=8" & set "terrain[1][1]=5" & set "terrain[1][2]=9" & set "terrain[1][3]=7" & set "terrain[1][4]=0"
- set "terrain[2][0]=1" & set "terrain[2][1]=3" & set "terrain[2][2]=0" & set "terrain[2][3]=6" & set "terrain[2][4]=1"
- set "terrain[3][0]=7" & set "terrain[3][1]=5" & set "terrain[3][2]=3" & set "terrain[3][3]=2" & set "terrain[3][4]=7"
- REM Beta item distribution
- set "items[2][2]=C" & set "items[0][3]=C" & set "items[1][4]=C" & set "items[3][0]=C"
- set "items[3][1]=H" & set "items[0][0]=H"
- set "items[2][4]=E" & set "items[3][3]=E" & set "items[1][1]=E"
- set "items[0][2]=S" & set "items[2][0]=X"
- :main_game_loop
- cls
- if %debug_mode%==1 (
- echo ================================
- echo Mini RPG v%VERSION% [DEBUG BUILD]
- echo Level %level% ^| HP: %health%/%max_health% ^| XP: %xp%/10 ^| Coins: %coins%
- echo Position: [%px%,%py%] ^| Debug: ON
- echo ================================
- ) else (
- echo Mini RPG v%VERSION% - HP:%health% Coins:%coins% Lvl:%level%
- )
- echo.
- echo Terrain Reference:
- echo [0]Plains [1]Forest [2]Mountain [3]Swamp [4]Desert [5]Hills [6]Cave [7]Rocky [8]Volcano [9]Ice
- echo Items: C=Coin H=Health E=Enemy S=Special X=Mystery
- echo.
- REM World rendering
- for /L %%row in (0,1,3) do (
- set "display_row= "
- for /L %%col in (0,1,4) do (
- if %%row==%py% if %%col==%px% (
- set "display_row=!display_row! P "
- ) else (
- call set current_terrain=%%terrain[%%row][%%col]%%
- call set current_item=%%items[%%row][%%col]%%
- if defined current_item (
- set "display_row=!display_row! !current_item! "
- ) else (
- set "display_row=!display_row! !current_terrain! "
- )
- )
- )
- echo !display_row!
- )
- REM Current location info
- call set here_terrain=%%terrain[%py%][%px%]%%
- echo.
- echo Location: Terrain type !here_terrain!
- call :describe_terrain !here_terrain!
- echo.
- if %debug_mode%==1 (
- set /p user_input="Command [WASD=move, H=heal, T=teleport, I=info, Q=quit]: "
- ) else (
- set /p user_input="Command [WASD=move, I=info, Q=quit]: "
- )
- REM Command processing
- if /I "!user_input!"=="Q" exit /b
- if /I "!user_input!"=="I" call :show_info & pause & goto main_game_loop
- REM Debug commands
- if %debug_mode%==1 (
- if /I "!user_input!"=="H" (
- set /a health+=5
- if %health% GTR %max_health% set health=%max_health%
- echo [DEBUG] Health restored to %health%
- timeout /t 1 >nul
- goto main_game_loop
- )
- if /I "!user_input!"=="T" (
- echo [DEBUG] Teleport to coordinates:
- set /p new_x="X (0-4): " & set /p new_y="Y (0-3): "
- if !new_x! GEQ 0 if !new_x! LEQ 4 if !new_y! GEQ 0 if !new_y! LEQ 3 (
- set px=!new_x! & set py=!new_y!
- echo Teleported to [!new_x!,!new_y!]
- )
- timeout /t 1 >nul
- goto main_game_loop
- )
- )
- REM Movement
- set old_px=%px% & set old_py=%py%
- if /I "!user_input!"=="W" set /a py-=1
- if /I "!user_input!"=="A" set /a px-=1
- if /I "!user_input!"=="S" set /a py+=1
- if /I "!user_input!"=="D" set /a px+=1
- REM Boundary validation
- if %px% LSS 0 set px=0 & echo Hit western boundary
- if %px% GTR 4 set px=4 & echo Hit eastern boundary
- if %py% LSS 0 set py=0 & echo Hit northern boundary
- if %py% GTR 3 set py=3 & echo Hit southern boundary
- REM Terrain effects on movement
- call set moved_terrain=%%terrain[%py%][%px%]%%
- if !moved_terrain!==8 (
- echo Volcanic terrain burns you!
- set /a health-=2
- timeout /t 1 >nul
- )
- if !moved_terrain!==9 (
- echo Icy terrain freezes you!
- set /a health-=1
- timeout /t 1 >nul
- )
- REM Process items at current location
- call set found_item=%%items[%py%][%px%]%%
- if defined found_item (
- call :process_item !found_item!
- set items[%py%][%px%]=
- )
- REM XP/Level progression
- if %xp% GEQ 10 (
- set /a level+=1
- set /a xp-=10
- set /a max_health+=3
- set /a health+=3
- echo *** LEVEL UP! Now level %level% ***
- echo Max health increased to %max_health%!
- timeout /t 2 >nul
- )
- REM Death check
- if %health% LEQ 0 (
- echo.
- echo ===============================
- echo GAME OVER - You died!
- echo Final Stats: Level %level%
- echo Coins collected: %coins%
- echo ===============================
- pause
- exit /b
- )
- REM Random beta events - testing new mechanics
- set /a random_event=!RANDOM! %% 30
- if !random_event!==0 (
- echo [BETA EVENT] System glitch detected...
- set /a health=%health% REM This line does nothing but looks like a bug
- timeout /t 1 >nul
- )
- goto main_game_loop
- :process_item
- set item_type=%1
- if "%item_type%"=="C" (
- set /a coins+=2
- set /a xp+=1
- echo Found 2 coins! XP +1
- )
- if "%item_type%"=="H" (
- set /a health+=7
- if %health% GTR %max_health% set health=%max_health%
- echo Health potion! Restored 7 HP
- )
- if "%item_type%"=="E" (
- echo Enemy encounter!
- call :beta_combat
- )
- if "%item_type%"=="S" (
- echo *** SPECIAL ITEM FOUND! ***
- set /a coins+=5
- set /a xp+=3
- set /a health+=5
- if %health% GTR %max_health% set health=%max_health%
- echo Gained: 5 coins, 3 XP, 5 health!
- )
- if "%item_type%"=="X" (
- echo Mystery box opened!
- set /a mystery_result=!RANDOM! %% 4
- if !mystery_result!==0 set /a coins+=3 & echo Mystery reward: 3 coins!
- if !mystery_result!==1 set /a health+=4 & echo Mystery reward: 4 health!
- if !mystery_result!==2 set /a xp+=2 & echo Mystery reward: 2 XP!
- if !mystery_result!==3 set /a health-=2 & echo Mystery trap: -2 health!
- )
- timeout /t 2 >nul
- goto :eof
- :beta_combat
- echo ========= BETA COMBAT =========
- set enemy_health=8
- set combat_round=1
- :combat_loop
- echo Round %combat_round% - Enemy HP: %enemy_health% ^| Your HP: %health%
- set /p battle_action="[A]ttack, [D]efend, [F]lee: "
- if /I "!battle_action!"=="F" (
- echo You escaped!
- goto :eof
- )
- if /I "!battle_action!"=="D" (
- echo You defend and take reduced damage...
- set /a damage_taken=1 + !RANDOM! %% 2
- ) else (
- set /a player_damage=3 + !RANDOM! %% 4
- echo You attack for %player_damage% damage!
- set /a enemy_health-=%player_damage%
- if !enemy_health! LEQ 0 (
- echo *** VICTORY! ***
- set /a coins+=4
- set /a xp+=2
- echo Rewards: 4 coins, 2 XP
- timeout /t 2 >nul
- goto :eof
- )
- set /a damage_taken=2 + !RANDOM! %% 3
- )
- echo Enemy attacks for %damage_taken% damage!
- set /a health-=%damage_taken%
- set /a combat_round+=1
- if %health% LEQ 0 goto :eof
- timeout /t 1 >nul
- goto combat_loop
- :describe_terrain
- set terrain_id=%1
- if %terrain_id%==0 echo Peaceful grasslands stretch before you
- if %terrain_id%==1 echo Dense forest with towering trees
- if %terrain_id%==2 echo Rocky mountain terrain - difficult to traverse
- if %terrain_id%==3 echo Murky swampland - watch your step
- if %terrain_id%==4 echo Arid desert - the heat is overwhelming
- if %terrain_id%==5 echo Rolling hills provide good visibility
- if %terrain_id%==6 echo Cave entrance - darkness lies within
- if %terrain_id%==7 echo Rocky outcroppings and loose stones
- if %terrain_id%==8 echo Active volcanic area - DANGEROUS!
- if %terrain_id%==9 echo Frozen wasteland - bitterly cold
- goto :eof
- :show_info
- echo ===============================
- echo PLAYER INFORMATION
- echo ===============================
- echo Position: [%px%,%py%]
- echo Level: %level% ^| XP: %xp%/10
- echo Health: %health%/%max_health%
- echo Coins: %coins%
- echo.
- echo Beta build v%VERSION% - Debug mode: %debug_mode%
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment