Batch file 我很难找出这个伪随机遭遇引擎的任何问题

Batch file 我很难找出这个伪随机遭遇引擎的任何问题,batch-file,Batch File,我就是想不出来,我试了又试 ::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 %m

我就是想不出来,我试了又试

::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
语法错了吗?我做错什么了吗?
我只是想知道如何解决这个问题,避免将来出现问题。

您的问题到底是什么?有错误信息吗?它应该做什么?它应该做什么?我发现了:当设置
mobhealth
使用
set/a