我无法弄清楚,我已经尝试过并试过了。
::Random Encounters
:ree5000
if %level% geq 1 goto reelvl1
:reelvl1
set /a monsterlvl=(4 * %random%) / 32768 + 1
if %monsterlvl% equ 1 goto monsterlvl1
if %monsterlvl% equ 2 goto monsterlvl2
if %monsterlvl% equ 3 goto monsterlvl3
if %monsterlvl% equ 4 goto monsterlvl4
:monsterlvl1
set /a monstertype=(5 * %random%) / 32768 + 1
if %monstertype% equ 1 set monsdis=Goblin
if %monstertype% equ 2 set monsdis=Imp
if %monstertype% equ 3 set monsdis=Rat
if %monstertype% equ 4 set monsdis=Wolf
if %monstertype% equ 5 set monsdis=Slime
set /a mobhealth=(100 * %random%) / 32768 + 1
if %monstertype% equ 1 set mobhealth=%mobhealth% + 10
if %monstertype% equ 2 set mobhealth=%mobhealth% - 20
if %monstertype% equ 3 set mobhealth=%mobhealth% + 15
if %monstertype% equ 4 set mobhealth=%mobhealth% + 50
if %monstertype% equ 5 set mobhealth=%mobhealth% - 50
if %mobhealth% leq 20 set mobhealth=50
set /a mobstr=(15 * %random%) / 32768 + 1
set /a mobdef=(5 * %random%) / 32768 + 1
goto mobencounter
语法错了吗?难道我做错了什么? 我只是想知道如何解决这个问题,以及将来避免这个问题。