Advertisement
Guest User

sak

a guest
Dec 11th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.02 KB | None | 0 0
  1. @echo off
  2.  
  3. mode con: cols=100 lines=50
  4. color 07
  5.  
  6. echo Press any key to start the game!
  7. PAUSE >nul
  8.  
  9. #############################################################
  10. :restart
  11. color 2A
  12. cls
  13.  
  14. set /a turn=%random% %% 2
  15.  
  16. set /a maxhealth=400
  17. set /a enemyhealth=%maxhealth%
  18. set /a playerhealth=%maxhealth%
  19. set /a fullhealth=%maxhealth% -1
  20.  
  21. set /a maxenergy=100
  22. set /a enemyenergy=%maxenergy%
  23. set /a playerenergy=%maxenergy%
  24. set /a energyrecovery=%maxenergy% /20
  25. set /a energyrecovered=0
  26.  
  27. #############################################################
  28. :attack
  29. cls
  30.  
  31. set /a critical=%random% %% 10
  32.  
  33. set /a screencolor1=%maxhealth% /2
  34. set /a screencolor2=%maxhealth% /4
  35.  
  36. if %playerhealth% GTR %screencolor1% color 2A
  37. if %playerhealth% LEQ %screencolor1% color 6E
  38. if %playerhealth% LEQ %screencolor2% color 4C
  39.  
  40. if %turn%==1 goto enemyattack
  41.  
  42. if %playerenergy%==0 goto attackskip
  43.  
  44. echo - Player)
  45. echo - Health: %playerhealth%/%maxhealth%
  46. if %energyrecovered%==1 echo - Energy: %playerenergy%/%maxenergy% +%energyrecovery%
  47. if %energyrecovered%==0 echo - Energy: %playerenergy%/%maxenergy%
  48. echo -------------------
  49. echo - Enemy)
  50. echo - Health: %enemyhealth%/%maxhealth%
  51. if %energyrecovered%==1 echo - Energy: %enemyenergy%/%maxenergy% +%energyrecovery%
  52. if %energyrecovered%==0 echo - Energy: %enemyenergy%/%maxenergy%
  53. echo.
  54. echo It's your turn! Use an ability! View abilities by typing "abilitylist"!
  55. echo.
  56.  
  57. set /p ability=
  58.  
  59. if %ability%==strike goto friendlystrike
  60. if %ability%==heal goto friendlyheal
  61. if %ability%==kick goto friendlykick
  62.  
  63. if %ability%==skip goto attackskip
  64. if %ability%==abilitylist goto abilitylist
  65.  
  66. goto attack
  67.  
  68. #############################################################
  69. :friendlystrike
  70. if %playerenergy% LSS 10 goto lowenergy
  71.  
  72. set /a playerenergy=%playerenergy% -10
  73. set /a turn=1
  74. cls
  75.  
  76. set /a damageamount=%random% %%11 +10
  77.  
  78. if %critical%==0 set /a damageamount=%damageamount%*2
  79.  
  80. set /a enemyhealth=%enemyhealth% -%damageamount%
  81.  
  82. echo - Player)
  83. echo - Health: %playerhealth%/%maxhealth%
  84. echo - Energy: %playerenergy%/%maxenergy%
  85. echo -------------------
  86. echo - Enemy)
  87. if %critical%==0 echo - Health: %enemyhealth%/%maxhealth% -%damageamount%
  88. if not %critical%==0 echo - Health: %enemyhealth%/%maxhealth% -%damageamount%
  89. echo - Energy: %enemyenergy%/%maxenergy%
  90. echo.
  91. if %critical%==0 echo You struck your enemy for %damageamount% damage! *CRITICAL*
  92. if not %critical%==0 echo You struck your enemy for %damageamount% damage!
  93. echo.
  94.  
  95. timeout 5 >nul
  96.  
  97. if %enemyhealth% LEQ 0 goto win
  98. goto energyrecovery
  99.  
  100. #############################################################
  101. :friendlykick
  102. if %playerenergy% LSS 50 goto lowenergy
  103.  
  104. set /a playerenergy=%playerenergy% -50
  105. set /a turn=1
  106. cls
  107.  
  108. set /a damageamount=%random% %%31 +30
  109.  
  110. if %critical%==0 set /a damageamount=%damageamount%*2
  111.  
  112. set /a enemyhealth=%enemyhealth% -%damageamount%
  113.  
  114. echo - Player)
  115. echo - Health: %playerhealth%/%maxhealth%
  116. echo - Energy: %playerenergy%/%maxenergy%
  117. echo -------------------
  118. echo - Enemy)
  119. if %critical%==0 echo - Health: %enemyhealth%/%maxhealth% -%damageamount%
  120. if not %critical%==0 echo - Health: %enemyhealth%/%maxhealth% -%damageamount%
  121. echo - Energy: %enemyenergy%/%maxenergy%
  122. echo.
  123. if %critical%==0 echo You kicked your enemy for %damageamount% damage! *CRITICAL*
  124. if not %critical%==0 echo You kicked your enemy for %damageamount% damage!
  125. echo.
  126.  
  127. timeout 5 >nul
  128.  
  129. if %enemyhealth% LEQ 0 goto win
  130. goto energyrecovery
  131.  
  132. #############################################################
  133. :friendlyheal
  134. cls
  135.  
  136. if %playerhealth% GTR %fullhealth% goto healfailed
  137.  
  138. if %playerenergy% LSS 20 goto lowenergy
  139.  
  140. set /a healamount=%random% %%16 +10
  141.  
  142. set /a playerhealth=%playerhealth% + %healamount%
  143.  
  144. if %playerhealth% GTR %maxhealth% goto overheal
  145.  
  146. :healsuccess
  147.  
  148. set /a playerenergy=%playerenergy% -20
  149. set /a turn=1
  150.  
  151. echo - Player)
  152. echo - Health: %playerhealth%/%maxhealth% +%healamount%
  153. echo - Energy: %playerenergy%/%maxenergy%
  154. echo -------------------
  155. echo - Enemy)
  156. echo - Health: %enemyhealth%/%maxhealth%
  157. echo - Energy: %enemyenergy%/%maxenergy%
  158. echo.
  159. echo You healed yourself and recovered %healamount% health!
  160. echo.
  161.  
  162. timeout 5 >nul
  163.  
  164. goto energyrecovery
  165.  
  166. :overheal
  167.  
  168. set /a playerhealth=%playerhealth% -1
  169.  
  170. if %playerhealth%==%maxhealth% goto healsuccess
  171.  
  172. goto overheal
  173.  
  174. :healfailed
  175.  
  176. echo - Player)
  177. echo - Health: %playerhealth%/%maxhealth%
  178. echo - Energy: %playerenergy%/%maxenergy%
  179. echo -------------------
  180. echo - Enemy)
  181. echo - Health: %enemyhealth%/%maxhealth%
  182. echo - Energy: %enemyenergy%/%maxenergy%
  183. echo.
  184. echo Your health is already full!
  185. echo.
  186.  
  187. timeout 5 >nul
  188. goto attack
  189.  
  190. #############################################################
  191. :lowenergy
  192. cls
  193.  
  194. echo - Player)
  195. echo - Health: %playerhealth%/%maxhealth%
  196. echo - Energy: %playerenergy%/%maxenergy%
  197. echo -------------------
  198. echo - Enemy)
  199. echo - Health: %enemyhealth%/%maxhealth%
  200. echo - Energy: %enemyenergy%/%maxenergy%
  201. echo.
  202. echo You don't have enough energy to use this ability!
  203. echo.
  204.  
  205. timeout 5 >nul
  206. goto attack
  207.  
  208. #############################################################
  209. :energyrecovery
  210.  
  211. if %playerenergy% LSS %maxenergy% set /a playerenergy=%playerenergy%+%energyrecovery%
  212. if %enemyenergy% LSS %maxenergy% set /a enemyenergy=%enemyenergy%+%energyrecovery%
  213.  
  214. :energyrecoverysubtract
  215.  
  216. if %playerenergy% GTR %maxenergy% set /a playerenergy=%playerenergy%-5
  217. if %enemyenergy% GTR %maxenergy% set /a enemyenergy=%enemyenergy%-5
  218.  
  219. if %playerenergy% GTR %maxenergy% goto energyrecoverysubtract
  220. if %enemyenergy% GTR %maxenergy% goto energyrecoverysubtract
  221.  
  222. set /a energyrecovered=1
  223. goto attack
  224.  
  225. #############################################################
  226. :attackskip
  227. cls
  228.  
  229. echo - Player)
  230. echo - Health: %playerhealth%/%maxhealth%
  231. echo - Energy: %playerenergy%/%maxenergy%
  232. echo -------------------
  233. echo - Enemy)
  234. echo - Health: %enemyhealth%/%maxhealth%
  235. echo - Energy: %enemyenergy%/%maxenergy%
  236. echo.
  237. if %playerenergy%==0 echo You don't have enough energy to attack this round!
  238. if %playerenergy% GTR 0 echo You skipped this round!
  239. echo.
  240.  
  241. timeout 5 >nul
  242. set /a turn=1
  243. goto energyrecovery
  244.  
  245. #############################################################
  246. :enemyattackskip
  247. cls
  248.  
  249. echo - Player)
  250. echo - Health: %playerhealth%/%maxhealth%
  251. echo - Energy: %playerenergy%/%maxenergy%
  252. echo -------------------
  253. echo - Enemy)
  254. echo - Health: %enemyhealth%/%maxhealth%
  255. echo - Energy: %enemyenergy%/%maxenergy%
  256. echo.
  257. echo Your enemy didn't have enough energy to attack this round!
  258. echo.
  259.  
  260. timeout 5 >nul
  261.  
  262. set /a turn=0
  263. goto energyrecovery
  264.  
  265. #############################################################
  266. :enemyattack
  267. cls
  268.  
  269. if %enemyenergy%==0 goto enemyattackskip
  270.  
  271. echo - Player)
  272. echo - Health: %playerhealth%/%maxhealth%
  273. if %energyrecovered%==1 echo - Energy: %playerenergy%/%maxenergy% +%energyrecovery%
  274. if %energyrecovered%==0 echo - Energy: %playerenergy%/%maxenergy%
  275. echo -------------------
  276. echo - Enemy)
  277. echo - Health: %enemyhealth%/%maxhealth%
  278. if %energyrecovered%==1 echo - Energy: %enemyenergy%/%maxenergy% +%energyrecovery%
  279. if %energyrecovered%==0 echo - Energy: %enemyenergy%/%maxenergy%
  280. echo.
  281. echo It's your enemy's turn!
  282.  
  283. timeout 2 /NOBREAK >nul
  284.  
  285. :enemyabilityfailed
  286. set /a ability=%random% %% 10
  287.  
  288. if %ability%==0 goto enemykick
  289. if %ability%==1 goto enemykick
  290. if %ability%==2 goto enemykick
  291. if %ability%==3 goto enemystrike
  292. if %ability%==4 goto enemystrike
  293. if %ability%==5 goto enemystrike
  294. if %ability%==6 goto enemystrike
  295. if %ability%==7 goto enemystrike
  296. if %ability%==8 goto enemyheal
  297. if %ability%==9 goto enemyheal
  298.  
  299. #############################################################
  300. :enemystrike
  301. if %enemyenergy% LSS 10 goto enemyabilityfailed
  302.  
  303. set /a enemyenergy=%enemyenergy% -10
  304. set /a turn=0
  305. cls
  306.  
  307. set /a damageamount=%random% %%11 +10
  308.  
  309. if %critical%==0 set /a damageamount=%damageamount%*2
  310.  
  311. set /a playerhealth=%playerhealth% -%damageamount%
  312.  
  313. echo - Player)
  314. if %critical%==0 echo - Health: %playerhealth%/%maxhealth% -%damageamount%
  315. if not %critical%==0 echo - Health: %playerhealth%/%maxhealth% -%damageamount%
  316. echo - Energy: %playerenergy%/%maxenergy%
  317. echo -------------------
  318. echo - Enemy)
  319. echo - Health: %enemyhealth%/%maxhealth%
  320. echo - Energy: %enemyenergy%/%maxenergy%
  321. echo.
  322. if %critical%==0 echo Your enemy struck you for %damageamount% damage! *CRITICAL*
  323. if not %critical%==0 echo Your enemy struck you for %damageamount% damage!
  324. echo.
  325.  
  326. timeout 5 >nul
  327.  
  328. if %playerhealth% LEQ 0 goto lose
  329. goto energyrecovery
  330.  
  331. #############################################################
  332. :enemykick
  333. if %enemyenergy% LSS 50 goto enemyabilityfailed
  334.  
  335. set /a enemyenergy=%enemyenergy% -50
  336. set /a turn=0
  337. cls
  338.  
  339. set /a damageamount=%random% %%31 +30
  340.  
  341. if %critical%==0 set /a damageamount=%damageamount%*2
  342.  
  343. set /a playerhealth=%playerhealth% -%damageamount%
  344.  
  345. echo - Player)
  346. if %critical%==0 echo - Health: %playerhealth%/%maxhealth% -%damageamount%
  347. if not %critical%==0 echo - Health: %playerhealth%/%maxhealth% -%damageamount%
  348. echo - Energy: %playerenergy%/%maxenergy%
  349. echo -------------------
  350. echo - Enemy)
  351. echo - Health: %enemyhealth%/%maxhealth%
  352. echo - Energy: %enemyenergy%/%maxenergy%
  353. echo.
  354. if %critical%==0 echo Your enemy kicked you for %damageamount% damage! *CRITICAL*
  355. if not %critical%==0 echo Your enemy kicked you for %damageamount% damage!
  356. echo.
  357.  
  358. timeout 5 >nul
  359.  
  360. if %playerhealth% LEQ 0 goto lose
  361. goto energyrecovery
  362.  
  363. #############################################################
  364. :enemyheal
  365.  
  366. if %enemyhealth% GTR %fullhealth% goto enemyabilityfailed
  367.  
  368. if %enemyenergy% LSS 20 goto enemyabilityfailed
  369.  
  370. cls
  371.  
  372. set /a healamount=%random% %%16 +10
  373.  
  374. set /a enemyhealth=%enemyhealth% + %healamount%
  375.  
  376. if %enemyhealth% GTR %maxhealth% goto enemyoverheal
  377.  
  378. :enemyhealsuccess
  379.  
  380. set /a enemyenergy=%enemyenergy% -20
  381. set /a turn=0
  382.  
  383. echo - Player)
  384. echo - Health: %playerhealth%/%maxhealth%
  385. echo - Energy: %playerenergy%/%maxenergy%
  386. echo -------------------
  387. echo - Enemy)
  388. echo - Health: %enemyhealth%/%maxhealth% +%healamount%
  389. echo - Energy: %enemyenergy%/%maxenergy%
  390. echo.
  391. echo Your enemy healed himself and recovered %healamount% health!
  392. echo.
  393.  
  394. timeout 5 >nul
  395.  
  396. goto energyrecovery
  397.  
  398. :enemyoverheal
  399.  
  400. set /a enemyhealth=%enemyhealth% -1
  401.  
  402. if %enemyhealth%==%maxhealth% goto enemyhealsuccess
  403.  
  404. goto enemyoverheal
  405.  
  406. #############################################################
  407. :win
  408. color 2A
  409. cls
  410. echo You won! Press any key to restart the game!
  411.  
  412. PAUSE >nul
  413. goto restart
  414.  
  415. :lose
  416. color 4C
  417. cls
  418. echo You lost! Press any key to restart the game!
  419.  
  420. PAUSE >nul
  421. goto restart
  422.  
  423. #############################################################
  424. :abilitylist
  425. cls
  426.  
  427. echo Abilities:
  428. echo.
  429. echo Kick - Kick your enemy, deals 30-60 damage. (Cost: 50 energy)
  430. echo Heal - Heal yourself, recovers 15-25 health. (Cost: 20 energy)
  431. echo Strike - Strike your enemy, deals 10-20 damage. (Cost: 10 energy)
  432. echo Skip - Skips the current round, no effects. (Cost: 0 energy)
  433. echo.
  434. echo Press any key to return.
  435. echo.
  436.  
  437. PAUSE >nul
  438. goto attack
  439.  
  440. ##############################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement