.bat Roguelike (работает)

Эй, мне нужна помощь, надеюсь, кто-то может.

список вещей, которые мне нужны •Hp, Strhp, str, def fixed (классы и расы не подходят друг другу; в примере Dwarf 100 л. с., и он выбирает Клерика в качестве класса, чтобы получить бонус +5 л. с.) либо дает мне 5 л.с., либо 100 л.с., • Создание твердой карты, по которой игрок может ходить (ASCII) (я создал карту, но она движется только вместе с игроком.) • Враг на карте (движение противника или возможность сражаться) (немного сложнее)

 @echo off
    TITLE RL

    :title
    cls
    echo ========================
    echo 1) New game
    echo 2) Exit
    echo =========================
    set /p input=

    if %input% equ 1 goto Race
    if %input% equ 2 goto exit
    goto title

    :Race
    cls
    echo ==========================
    echo Dwarf 
    echo Elf
    echo Gnome
    echo Man
    echo ==========================
    echo Halfling
    echo Drow
    echo Orc
    echo Troll
    echo ===========================
    echo Half-elf
    echo Half-orc
    echo Half-troll

    echo ===========================
    set /p race=

    if %race% equ Drow goto Class
    if %race% equ Orc goto Class
    if %race% equ Troll goto Class
    if %race% equ Half-elf goto Class
    if %race% equ Half-orc goto Class
    if %race% equ Half-troll goto Class
    if %race% equ Dwarf goto Class
    if %race% equ Elf goto Class
    if %race% equ Gnome goto Class
    if %race% equ Man goto Class
    goto Race

    :Class
    cls
    echo ============================
 echo Necromancer
 echo Mage
 echo Priest
 echo Archmage
 echo Warpriest 
 echo Warlock
 echo Wizard
 echo ============================
 echo Ranger
 echo.
 echo Alchemist
 echo ============================
 echo Rogue
 echo Cleric
 echo Warrior
 echo Barbarian
 echo Knight 
 echo Berserker
 echo Paladin
 echo ============================
 set /p class= 

 if %class% equ Necromancer goto Name
 if %class% equ Mage goto Name
 if %class% equ Priest goto Name
 if %class% equ Archmage goto Name
 if %class% equ Warpriest goto Name
 if %class% equ Warlock goto Name
 if %class% equ Wizard goto Name
 if %class% equ Ranger goto Name
 if %class% equ Alchemist goto Name
 if %class% equ Rogue goto Name
 if %class% equ Cleric goto Name
 if %class% equ Warrior goto Name
 if %class% equ Knight goto Name
 if %class% equ Berserker goto Name
 if %class% equ Paladin goto Name
if %class% equ Barbarian goto Name
if %class% equ Warrior goto Name
if %class% equ Cleric goto Name
if %class% equ Rogue goto Name
if %class% equ Wizard goto Name
goto Class

:Name
cls
echo ==============================
echo What is your name?
echo ==============================
set /p name=
goto gender

:gender
cls
echo ==============================
echo What is your gender?
echo ==============================
set /p gender=
goto level

:level
cls
if %Race% equ Dwarf set health=105
if %Race% equ Elf set health=115
if %Race% equ Gnome set health=105
if %Race% equ Man set health=100
if %Race% equ Halfling set health=105
if %Race% equ Drow set health=110
if %Race% equ Orc set health=105
if %Race% equ Troll set health=100
if %race% equ Half elf set health=105
if %Race% equ Half orc set health=100
if %Race% equ Half troll set health=100
if %Race% equ Dwarf set Strhp=105
if %Race% equ Elf set Strhp=110
if %Race% equ Gnome set Strhp=105
if %Race% equ Man set Strhp=100
if %Race% equ Halfling set Strhp=105
if %Race% equ Drow set Strhp=110
if %Race% equ Orc set Strhp=105
if %Race% equ Troll set Strhp=100
if %Race% equ Half elf set Strhp=105
if %Race% equ Half orc set Strhp=100
if %Race% equ Half troll set Strhp=100
if %Class% equ Necromancer set /a health= %health% + 5
if %Class% equ Mage set /a health= %health% + 10
if %Class% equ Priest set /a health= %health% + 15
if %Class% equ Archmage set /a health= %health% + 5
if %Class% equ Warpriest set /a health= %health% + 5
if %Class% equ Warlock set /a health= %health% + 3
if %Class% equ Wizard set /a health= %health% + 10
if %Class% equ Ranger set /a health= %health% + 4
if %Class% equ Alchemist set /a health= %health% + 5
if %Class% equ Rogue set /a health= %health% + 1
if %Class% equ Cleric set /a health= %health% + 5
if %Class% equ Warrior set /a health= %health% + 0
if %Class% equ Barbarian set /a health= %health% + 0
if %Class% equ Knight set /a health= %health% + 2
if %Class% equ Berserker set /a health= %health% + 0
if %Class% equ Paladin set /a health= %health% + 5
if %Class% equ Necromancer set /a Strhp= %Strhp% + 5
if %Class% equ Mage set /a Strhp= %Strhp% + 10
if %Class% equ Priest set /a Strhp= %Strhp% + 15
if %Class% equ Archmage set /a Strhp= %Strhp% + 5
if %Class% equ Warpriest set /a Strhp= %Strhp% + 5
if %Class% equ Warlock set /a Strhp= %Strhp% + 3
if %Class% equ Wizard set /a Strhp= %Strhp% + 10
if %Class% equ Ranger set /a Strhp= %Strhp% + 4
if %Class% equ Alchemist set /a Strhp= %Strhp% + 5
if %Class% equ Rogue set /a Strhp= %Strhp% + 1
if %Class% equ Cleric set /a Strhp= %Strhp% + 5
if %Class% equ Warrior set /a Strhp= %Strhp% + 0
if %Class% equ Barbarian set /a Strhp= %Strhp% + 0
if %Class% equ Knight set /a Strhp= %Strhp% + 2
if %Class% equ Berserker set /a Strhp= %Strhp% + 0 
if %Class% equ Paladin set /a Strhp= %Strhp% + 5
if %Class% equ Necromancer set str=2
if %Class% equ Mage set str=3
if %Class% equ Priest set str=2
if %Class% equ Archmage set str=6
if %Class% equ Warpriest set str=5
if %Class% equ Warlock set str=3
if %Class% equ Wizard set str=8
if %Class% equ Ranger set str=7
if %Class% equ Alchemist set str=3
if %Class% equ Rogue set str=5
if %Class% equ Cleric set str=8
if %Class% equ Warrior set str=10
if %Class% equ Barbarian set str=11
if %Class% equ Knight set str=9
if %Class% equ Berserker set str=12
if %Class% equ Paladin set str=10
if %Class% equ Necromancer set def=4
if %Class% equ Mage set def=4
if %Class% equ Priest set def=2
if %Class% equ Archmage set def=7
if %Class% equ Warpriest set def=6
if %Class% equ Warlock set def=4
if %Class% equ Wizard set def=6
if %Class% equ Ranger set def=6
if %Class% equ Alchemist set def=3
if %Class% equ Rogue set def=3
if %Class% equ Cleric set def=10
if %Class% equ Warrior set def=7
if %Class% equ Barbarian set def=7
if %Class% equ Knight set def=8
if %Class% equ Berserker set def=6
if %Class% equ Paladin set def= 10
if %Class% equ Necromancer set wep=Staff of the living dead
if %Class% equ Mage set wep=Blinding Stave of power
if %Class% equ Priest set wep=quarterstaff of holy light
if %Class% equ Archmage set wep=Fiery polearm of mastery
if %Class% equ Warpriest set wep=Holy sword of light
if %Class% equ Warlock set wep=Unholy skulldagger of ghouls
if %Class% equ Wizard set wep=Frosty quarterstaff of the elements
if %Class% equ Ranger set wep=Skeleton longbow of doom
if %Class% equ Alchemist set wep=Assortment of potions and herbs
if %Class% equ Rogue set wep=Golden dragonstooth of accuracy
if %Class% equ Cleric set wep=Holy warhammer of Might
if %Class% equ Warrior set wep=Flaming longsword of fury
if %Class% equ Barbarian set wep=Battle-axe of the forgotten
if %Class% equ Knight set wep=Wall sheild of the king and The broadsword of the dragonslayer
if %Class% equ Berserker set wep=Dual warhammers of the forsaken
if %Class% equ Paladin set wep=Divine broadsword of rightesnous
if %race% equ Dwarf set /a str= %str% + 10
if %race% equ Elf set /a str= %str% + 3
if %race% equ Gnome set /a str= %str% + 2
if %race% equ Man set /a str= %str% + 5
if %race% equ Halfling set /a str= %str% + 2
if %race% equ Drow set /a str= %str% + 6
if %race% equ Orc set /a str= %str% + 10
if %race% equ Troll set /a str= %str% + 15
if %race% equ Half elf set /a str= %str% + 4
if %race% equ Half orc set /a str= %str% + 7
if %race% equ Half troll set /a str= %str% + 9
if %race% equ Dwarf set /a def= %def% + 5
if %race% equ Elf set /a def= %def% + 5
if %race% equ Gnome set /a def= %def% + 2
if %race% equ Man set /a def= %def% + 2
if %race% equ Halfling set /a def= %def% + 3
if %race% equ Drow set /a def= %def% + 5
if %race% equ Orc set /a def= %def% + 7
if %race% equ Troll set /a def= %def% + 10
if %race% equ Half elf set /a def= %def% + 4
if %race% equ Half orc set /a def= %def% + 5
if %race% equ Half troll set /a def= %def% + 9
if %Class% equ Rogue set /a gold= %gold% + 25
set pots=1
set gold=25
set c1=@

@echo off
setlocal enableextensions enabledelayedexpansion

set haut=        
set larg=

:boucle
cls
echo =====================================================
echo %name%, a %gender% %Race% %Class%                 
echo %wep%                                          
echo G:%gold% Str/%str% Def/%def% Hp:%health%/%Strhp% 
echo =====================================================
for %%a in ( !haut! ) do echo.
call:aff
Set "Key="
For /F "delims=" %%# In ('Xcopy /W "%~f0" "%~f0" 2^>Nul') Do If Not Defined Key Set "Key=%%#"
Set "Key=%Key:~-1%"
if /i %key%==q (exit /b)
if /i %key%==8 goto:UP
if /i %key%==2 goto:DOWN
if /i %key%==4 goto:LEFT
if /i %key%==6 goto:RIGHT

:LEFT
set larg=!larg:~0,-1!
goto boucle

:RIGHT
set larg= !larg!
goto boucle

:UP
set haut=!haut:~0,-2!
goto boucle

:DOWN
set haut=!haut! a
goto boucle


:aff
echo !larg!%c1%

0 ответов

Другие вопросы по тегам