批量设计文字游戏。当输入告诉批处理文件的数字时,该人想要什么样的命中,窗口就会关闭。任何帮助都会很好。
这就是我现在所拥有的
@echo off
set /a EHP = 10
set /a BaseDamage = 1
set /a SpecialDamage = 2
set /a SpecialCost = 5
set /p input = .
if %input% == 1 or %input% == hit (
echo you hit the enemy
set /a EHP = %EHP% - %BaseDamage%
)
if %input% == 2 or %input% == kick (
echo you kick the enemy
set /a EHP = %EHP% - %BaseDamage%
)
if %input% == 3 or %input% == special hit (
echo [insert dialoge here]
set /a EHP = %EHP% - %SpecialDamage%
set /a SP = %SP% - %SpecialCost%
)
goto a