Advertisement
Guest User

game.com

a guest
Nov 29th, 2011
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.07 KB | None | 0 0
  1. $!********************************************
  2. $!* Keszito neve: Kovacs Marton *
  3. $!* Email: tetra@elte.hu *
  4. $!* Elkeszites datuma: 20061201 *
  5. $!* Feladat sorszama: 4. *
  6. $!* A szkript szabadon terjesztheto, *
  7. $!* felhasznalhato es modosmthato, *
  8. $!* az eredeti forras es keszito *
  9. $!* feltuntetesevel.(GNU???) *
  10. $!* Verzio: 0.7 *
  11. $!* Fejlesztesekert kerdezd: tetra@elte.hu *
  12. $!********************************************
  13. $
  14. $
  15. $ !inicializalas
  16. $ !parameterek...
  17. $
  18. $ LF[0,8]=10
  19. $ CR[0,8]=13
  20. $ TAB[0,8]=9
  21. $
  22. $ set terminal /insert
  23. $ set terminal /width=80
  24. $
  25. $ if f$ed(P1,"trim,compress,upcase") .eqs. "MAIL"
  26. $ then
  27. $
  28. $ MAIL /subject="VMS BEADANDO 4" 'f$env("procedure")' maulis
  29. $
  30. $ QUESTION_ON_MAIL:
  31. $ read /prompt="Kuldtem levelet. Szeretnel jatszani?(igen/nem) " sys$command temp
  32. $
  33. $ hossz=f$len(temp)
  34. $ if hossz .eq. 0 then goto QUESTION_ON_MAIL
  35. $
  36. $ temp=f$ed(temp,"lowercase")
  37. $
  38. $ if temp .eqs. f$ex(0,hossz,"nem") then exit
  39. $
  40. $ if .not. temp .eqs. f$ex(0,hossz,"igen") then goto QUESTION_ON_MAIL
  41. $
  42. $ p1=p2
  43. $ p2=p3
  44. $ p3=p4
  45. $ p4=p5
  46. $
  47. $ endif
  48. $
  49. $ teszt_e:
  50. $
  51. $ read /prompt="Jatekosok szama(2/4): " sys$command playernum
  52. $
  53. $ if playernum .eqs. "2" .or. playernum .eqs. "4" then goto teszt_v
  54. $
  55. $ say "Nem megfelelo ertek! 2 vagy 4 jatekos lehet!"
  56. $
  57. $ goto teszt_e
  58. $
  59. $ teszt_v:
  60. $
  61. $ dir1="1-2,2-2,2-1,3-1,3-2,3-3,2-3,1-3"
  62. $ dir2="20-29,19-29,19-30,18-30,18-29,18-28,19-28,20-28"
  63. $
  64. $ FelArm=0
  65. $ FelDef=4
  66. $ FelDmg=1
  67. $ FelAtt=2
  68. $ FelHP=2
  69. $ FelMov=4
  70. $ InfArm=2
  71. $ InfDef=7
  72. $ InfDmg=3
  73. $ InfAtt=3
  74. $ InfHP=3
  75. $ InfMov=2
  76. $ ArmArm=3
  77. $ ArmDef=9
  78. $ ArmDmg=4
  79. $ ArmAtt=4
  80. $ ArmHP=5
  81. $ ArmMov=1
  82. $
  83. $ enabled=0
  84. $ aktplayer=1
  85. $
  86. $ if p1 .eqs. ""
  87. $ then
  88. $ jatekos1="1"
  89. $ else
  90. $ jatekos1=f$ex(0,5,p1)
  91. $ endif
  92. $
  93. $ if p2 .eqs. ""
  94. $ then
  95. $ jatekos2="2"
  96. $ else
  97. $ jatekos2=f$ex(0,5,p2)
  98. $ endif
  99. $
  100. $ if p3 .eqs. ""
  101. $ then
  102. $ jatekos3="3"
  103. $ else
  104. $ jatekos3=f$ex(0,5,p3)
  105. $ endif
  106. $
  107. $ if p4 .eqs. ""
  108. $ then
  109. $ jatekos4="4"
  110. $ else
  111. $ jatekos4=f$ex(0,5,p4)
  112. $ endif
  113. $
  114. $ details1=LF + CR
  115. $ details2=LF + CR
  116. $ details3=LF + CR
  117. $
  118. $ baseHP1=20
  119. $ baseHP2=20
  120. $ income0=0
  121. $ income1=2
  122. $ income2=2
  123. $ money1=5
  124. $ money2=3
  125. $ farmlist="|2-9.1.0|2-22.2.0|6-6.1.0|6-25.2.0|7-1.1.0|7-30.2.0|8-13.2.0|8-18.2.0|13-13.2.0|13-18.2.0|14-1.2.0|14-30.1.0|15-6.2.0|15-25.1.0|19-9.2.0|19-22.1.0|1-30.3.0|20-1.3.0"
  126. $
  127. $ bsor1="01B1 "
  128. $ bsor2="02 "
  129. $ bsor3="03 "
  130. $ bsor4="04 "
  131. $ bsor5="05 "
  132. $ bsor6="06 "
  133. $ bsor7="07 "
  134. $ bsor8="08 "
  135. $ bsor9="09 "
  136. $ bsor10="10 "
  137. $ bsor11="11 "
  138. $ bsor12="12 "
  139. $ bsor13="13 "
  140. $ bsor14="14 "
  141. $ bsor15="15 "
  142. $ bsor16="16 "
  143. $ bsor17="17 "
  144. $ bsor18="18 "
  145. $ bsor19="19 "
  146. $ bsor20="20B2 "
  147. $
  148. $
  149. $
  150. $ if playernum .eq. 4
  151. $ then
  152. $
  153. $ bsor1="01B1|| || || || || || || || || || || || || || B3"
  154. $ bsor20="20B4++--++--++--++--++--++--++--++--++--++--++--++--++--++--B2"
  155. $
  156. $ income3=2
  157. $ income4=2
  158. $ money3=3
  159. $ money4=3
  160. $ baseHP3=20
  161. $ baseHP4=20
  162. $
  163. $ dir3="1-29,2-29,2-30,3-30,3-29,3-28,2-28,1-28"
  164. $ dir4="20-2,19-2,19-1,18-1,18-2,18-3,19-3,20-3"
  165. $
  166. $ farmlist="|2-9.1.0|2-22.1.0|6-6.1.0|6-25.1.0|7-1.1.0|7-30.1.0|8-13.2.0|8-18.2.0|13-13.2.0|13-18.2.0|14-1.1.0|14-30.1.0|15-6.1.0|15-25.1.0|19-9.1.0|19-22.1.0"
  167. $
  168. $ endif
  169. $
  170. $ esemeny="Ha nem tudsz valamit(a jatekkal kapcsolatban), Help! Jo szorakozast!"
  171. $
  172. $ selected=""
  173. $
  174. $ gosub STATCLEAR
  175. $
  176. $ gosub MAPRESET
  177. $
  178. $ gosub UNITCLEAR
  179. $
  180. $ cls
  181. $
  182. $!++++++++++++++++++++MAIN PROC:++++++++++++++++++++
  183. $
  184. $ oo_ciklus:
  185. $
  186. $ gosub REDRAW
  187. $
  188. $ read /prompt="Parancs: " sys$command order
  189. $
  190. $ gosub translate
  191. $
  192. $ goto oo_ciklus
  193. $
  194. $
  195. $ !Itt a main vege
  196. $
  197. $
  198. $ !++++++++++++++++++++COMMAND-ERTELMEZO PROC++++++++++++++++++++
  199. $ !lehetseges commandok: Select, Doit, Endturn, Buyunit, Getmani, Help, EXit
  200. $
  201. $ translate:
  202. $
  203. $ order=f$edit(order,"compress,trim, lowercase") + " "
  204. $ temp=f$el(0," ",order)
  205. $ hossz=f$length(temp)
  206. $
  207. $ if hossz .eq. 0 then goto endtranssub
  208. $
  209. $ esemeny=""
  210. $
  211. $ if temp .eqs. f$ex(0, hossz, "select") then goto SELECT
  212. $ if temp .eqs. f$ex(0, hossz, "doit") then goto DOIT
  213. $ if temp .eqs. f$ex(0, hossz, "endturn") then goto ENDTURN
  214. $ if temp .eqs. f$ex(0, hossz, "buyunit") then goto BUYUNIT
  215. $ if temp .eqs. f$ex(0, hossz, "getmani") then goto GETMANI
  216. $ if temp .eqs. f$ex(0, hossz, "help") then goto HELP
  217. $ if temp .eqs. f$ex(0, hossz, "exit") then goto EXIT
  218. $ if temp .eqs. f$ex(0, hossz, "more") then goto MORE
  219. $
  220. $ esemeny="Ismeretlen parancs! Probald: Help!"
  221. $
  222. $ goto endtranssub
  223. $
  224. $
  225. $ !+++++SELECT ELJARASA+++++
  226. $
  227. $ SELECT:
  228. $
  229. $!haszn?t v?toz?: tempcol, tempsor: megadott ?t?ek. enabled: tud-e valamit kezdeni a kiv?asztottal a cs??$
  230. $ enabled=0
  231. $ esemeny=""
  232. $
  233. $ temp=f$el(1," ",order)
  234. $ tempsor=f$int(f$el(0,",",temp))
  235. $ tempcol=f$int(f$el(1,",",temp))
  236. $
  237. $ if "INTEGER".eqs.f$ty(tempsor) .and. "INTEGER".eqs.f$ty(tempcol) .and. tempsor.ge.1 .and. tempsor.le.20 .and. tempsor.ge.1 .and. tempsor.le.30
  238. $ then
  239. $
  240. $ gosub STATCLEAR
  241. $
  242. $ col=tempcol*2
  243. $ selected=""
  244. $ enabled=0
  245. $ k=1
  246. $ !ellen?z?iklus: szerepel-e a megadott helyen egys??
  247. $
  248. $ gosub WHOSTHERE
  249. $
  250. $ if i .ne. 0
  251. $ then
  252. $
  253. $ selecteddetails=unit'i''j'
  254. $
  255. $ k=1
  256. $ temp=f$el(2,"|",selecteddetails)
  257. $
  258. $ statusload_eleje:
  259. $
  260. $ if temp .eqs. "|" then goto statusload_vege
  261. $
  262. $ status'k'=temp
  263. $
  264. $ k=k+1
  265. $
  266. $ temp=f$element(k+1,"|",unit'i''j')
  267. $
  268. $ goto statusload_eleje
  269. $
  270. $ statusload_vege:
  271. $
  272. $ k=k+1
  273. $
  274. $ status'k'="Tulajdonos:" + f$str(jatekos'i')
  275. $
  276. $ selected=f$str(tempsor) + "|" + f$str(tempcol)
  277. $
  278. $ esemeny=selected + " egyseg kijelolve"
  279. $
  280. $ if aktplayer .eq. i then enabled=1
  281. $
  282. $ endif
  283. $
  284. $ !farmkijeloles, akar egyseg alatt is
  285. $
  286. $ gosub WHATSTHERE
  287. $
  288. $ if f$ex(0,1,i) .eqs. "F"
  289. $ then
  290. $
  291. $ temp=f$el(f$ex(1,2,i),"|",farmlist)
  292. $ k=k+1
  293. $
  294. $ status'k'="FARM"
  295. $ k=k+1
  296. $ status'k'="Hozama: " + f$str(f$el(1,".",temp))
  297. $ k=k+1
  298. $ status'k'="Tualjdonos: " + f$el(2, ".", temp)
  299. $ esemeny=esemeny + f$str(tempsor) + ":" + f$str(tempcol) + "-s farm kijelolve"
  300. $
  301. $ endif
  302. $ !Baziskijeloles:
  303. $
  304. $ if f$ex(0,1,i) .eqs. "B"
  305. $ then
  306. $
  307. $ temp=f$ex(1,1,i)
  308. $
  309. $ status1="BAZIS"
  310. $ status2="Tulajdonos: " + f$str(temp)
  311. $ status3="Penze: " + f$str(money'temp')
  312. $ status4="Bevetele: " + f$str(income'temp')
  313. $ status5="Eletpont: " + f$str(BaseHP'temp')
  314. $
  315. $ endif
  316. $
  317. $ else
  318. $
  319. $ esemeny="Select hibas parameterezese! Probald: Help!"
  320. $
  321. $ endif
  322. $
  323. $ goto endtranssub
  324. $
  325. $
  326. $
  327. $ !+++++ DOIT +++++++++++++++++++++
  328. $
  329. $ DOIT:
  330. $
  331. $ temp=""
  332. $
  333. $ order=f$ed(f$el(1," ",order),"lowercase")
  334. $
  335. $ if enabled .eq. 0
  336. $ then
  337. $
  338. $ esemeny="Nincs sajat egyseg kijelolve!"
  339. $
  340. $ else
  341. $
  342. $ tempsor=f$el(0,"|",selected)
  343. $ tempcol=f$el(1,"|",selected)
  344. $
  345. $ hossz=f$len(order)
  346. $
  347. $ if hossz.gt.0 .and. (order.eqs.f$ex(0,hossz,"fel") .and. tempsor.gt.1 .or. order.eqs.f$ex(0,hossz,"jobbra") .and. tempcol.lt.30 .or. order.eqs.f$ex(0,hossz,"balra") .and. tempcol.gt.1 .or. order.eqs.f$ex(0,hossz,"le") .and. tempsor.lt.20)
  348. $ then
  349. $
  350. $ order=f$ex(0,1,order)
  351. $
  352. $ destsor=tempsor-(order.eqs."f")+(order.eqs."l")
  353. $ destcol=tempcol-(order.eqs."b")+(order.eqs."j")
  354. $
  355. $ gosub WHOSTHERE
  356. $
  357. $ ki=j
  358. $
  359. $ tempsor=destsor
  360. $ tempcol=destcol
  361. $
  362. $ gosub WHOSTHERE
  363. $
  364. $ if i .eq. 0
  365. $ then
  366. $
  367. $ gosub WHATSTHERE
  368. $
  369. $ if f$ex(0,1,i) .eqs. "B"
  370. $ then
  371. $
  372. $ if f$el(9,"|",unit'aktplayer''ki') .eqs. "Tamadott-e: nem" .and. f$ex(1,1,i) .ne. aktplayer
  373. $ then
  374. $
  375. $ temp=f$str(aktplayer)+","+f$str(ki)+","+"8"+","+"Lepes:0/"+f$str(f$el(1,"/",f$el(8,"|",unit'aktplayer''ki')))
  376. $
  377. $ gosub XCHG
  378. $
  379. $ temp=f$str(aktplayer) + "," + f$str(ki) + ",9,Tamadott-e: igen"
  380. $
  381. $ gosub XCHG
  382. $
  383. $ status8="Tamadott-e: igen"
  384. $
  385. $ temp=f$el(1,":",f$el(6,"|",unit'aktplayer''ki')) + "," + f$str(f$el(1,":",f$el(5,"|",unit'aktplayer''ki'))) + ",8,4"
  386. $
  387. $ gosub ATTACK
  388. $
  389. $ if temp .nes. "L"
  390. $ then
  391. $
  392. $ esemeny="Az egyseg talalatot ert el a bazissal szemben,"
  393. $
  394. $ if temp .le. 0
  395. $ then
  396. $
  397. $ esemeny=esemeny + " de a talalat lepergett a pancelzatrol..."
  398. $
  399. $ else
  400. $
  401. $ i=f$ex(1,1,i)
  402. $
  403. $ baseHP'i'=baseHP'i' - temp
  404. $
  405. $ if baseHP'i' .le. 0
  406. $ then
  407. $
  408. $ esemeny=esemeny + " A bazis elpusztult. RIP " + f$str(i) + ". jatekos..."
  409. $
  410. $ else
  411. $
  412. $ esemeny=esemeny + " A bazis " + f$str(temp) + " veszteseget szenvedett. Maradt " + f$str(baseHP'i')
  413. $
  414. $ endif
  415. $
  416. $ endif
  417. $
  418. $ else
  419. $
  420. $ esemeny="Az egyseg nem talalta el a bazist!"
  421. $
  422. $ endif
  423. $
  424. $ else
  425. $
  426. $ if f$ex(1,1,i) .eq. aktplayer
  427. $ then
  428. $
  429. $ esemeny="Sajat bazist tamadsz... megorultel!?"
  430. $
  431. $ else
  432. $
  433. $ esemeny="Az egyseg mar tamadott a korben..."
  434. $
  435. $ endif
  436. $
  437. $ endif
  438. $
  439. $ else
  440. $
  441. $ tvp=f$el(0,"/",f$el(1,":",f$el(8,"|",unit'aktplayer''ki')))
  442. $
  443. $ if tvp .gt. 0
  444. $ then
  445. $
  446. $ temp=f$el(0,"|",selected) + "|" + f$el(1,"|",selected)
  447. $ unit'aktplayer''ki'=unit'aktplayer''ki' - temp
  448. $
  449. $ temp=f$str(tempsor) + "|" + f$str(tempcol)
  450. $ unit'aktplayer''ki'=temp + unit'aktplayer''ki'
  451. $
  452. $ esemeny="Az egyseg bemozgott: " + f$str(f$el(0,"|",selected)) + "," + f$str(f$el(1,"|",selected)) + " -> " + f$str(tempsor) + "," + f$str(tempcol)
  453. $
  454. $ selected=temp
  455. $
  456. $ if f$ex(0,1,i) .eqs. "F"
  457. $ then
  458. $
  459. $ income'aktplayer'=income'aktplayer' + f$el(1,".",f$el(f$ex(1,1,i),"|",farmlist))
  460. $ temp=f$el(2,".",f$el(f$ex(1,1,i),"|",farmlist))
  461. $
  462. $ income'temp'=income'temp'-f$el(1,".",f$el(f$ex(1,1,i),"|",farmlist))
  463. $
  464. $ if temp .ne. aktplayer then esemeny=esemeny + ". A farm elfoglalva!"
  465. $
  466. $ temp="|" + f$el(f$ex(1,1,i),"|",farmlist)
  467. $
  468. $ farmlist=farmlist - temp
  469. $
  470. $ temp=temp-f$el(2,".",temp)
  471. $
  472. $ farmlist=farmlist + temp + f$str(aktplayer)
  473. $
  474. $ endif
  475. $
  476. $ temp=f$str(aktplayer)+","+f$str(ki)+","+"8"+","+"Lepes:"+f$str(tvp-1)+"/"+f$str(f$el(1,"/",f$el(8,"|",unit'aktplayer''ki')))
  477. $
  478. $ gosub XCHG
  479. $
  480. $ else
  481. $
  482. $ esemeny="Nincs eleg lepespontja az egysegnek!"
  483. $
  484. $ endif
  485. $
  486. $ endif
  487. $
  488. $ else
  489. $
  490. $ if i .eq. aktplayer
  491. $ then
  492. $
  493. $ esemeny="Sajat egyseget nem tamadhatsz!!!"
  494. $
  495. $ else
  496. $
  497. $ if f$el(9,"|",unit'aktplayer''ki') .eqs. "Tamadott-e: nem"
  498. $ then
  499. $
  500. $ temp=f$str(aktplayer)+","+f$str(ki)+","+"8"+","+"Lepes:0/"+f$str(f$el(1,"/",f$el(8,"|",unit'aktplayer''ki')))
  501. $
  502. $ gosub XCHG
  503. $
  504. $ temp=f$str(aktplayer) + "," + f$str(ki) + ",9,Tamadott-e: igen"
  505. $
  506. $ gosub XCHG
  507. $
  508. $ temp=f$str(f$el(1,":",f$el(6,"|",unit'aktplayer''ki'))) + "," + f$str(f$el(1,":",f$el(5,"|",selecteddetails))) + "," + f$str(f$el(1,":",f$el(4,"|",unit'i''j'))) + "," + f$str(f$el(1,":",f$el(3,"|",unit'i''j')))
  509. $
  510. $ gosub ATTACK
  511. $
  512. $ if temp .eqs. "L"
  513. $ then
  514. $
  515. $ esemeny="Az egysegnek nem sikerult talalatot elernie."
  516. $
  517. $ else
  518. $
  519. $ esemeny="Az egyseg talalatot ert el,"
  520. $
  521. $ if temp .le. 0
  522. $ then
  523. $
  524. $ esemeny=esemeny + " de az nem ment at a pancelzaton :P"
  525. $
  526. $ else
  527. $
  528. $ HP=f$el(0,"/",f$el(1,":",f$el(7,"|",unit'i''j')))
  529. $
  530. $ HP=HP - temp
  531. $
  532. $ if HP .le. 0
  533. $ then
  534. $
  535. $ esemeny=esemeny + " es osszezuzta az ellenfelet. Yeah."
  536. $
  537. $!ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
  538. $ XP=f$el(10,":",unit'aktplayer''ki')
  539. $
  540. $ Lvl=f$el(1,":",f$el(10,"|",unit'aktplayer''ki')) + 1
  541. $
  542. $ XP=XP + 2 * f$el(1,":",f$el(10,"|",unit'i''j'))
  543. $
  544. $ temp=f$str(aktplayer) + "," + f$str(ki) + ",11,XP:" + f$str(XP)
  545. $
  546. $ gosub XCHG
  547. $
  548. $ if_lu_b:
  549. $
  550. $ if XP .lt. Lvl * Lvl then goto if_lu_e
  551. $
  552. $ temp=f$str(aktplayer) + "," + f$str(ki)
  553. $
  554. $ gosub LU
  555. $
  556. $ Lvl=Lvl + 1
  557. $
  558. $ goto if_lu_b
  559. $
  560. $ if_lu_e:
  561. $
  562. $ temp=f$str(aktplayer) + "," + f$str(ki) + ",10,Szint:" + f$str(Lvl-1)
  563. $
  564. $ gosub XCHG
  565. $!-------------------------------------------------------
  566. $ unit'i''j'=""
  567. $
  568. $ else
  569. $
  570. $ esemeny=esemeny + " az okozott serules " + f$str(temp) + ", maradt " + f$str(HP)
  571. $
  572. $ temp=f$str(i) + "," + f$str(j) + "," + "7" + "," + "HP:" + f$str(HP) + "/" + f$str(f$el(1,"/",f$el(7,"|",unit'i''j')))
  573. $
  574. $ gosub XCHG
  575. $
  576. $ endif
  577. $
  578. $ endif
  579. $
  580. $ endif
  581. $
  582. $!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  583. $ else
  584. $
  585. $ esemeny="Az egyseg mar tamadott ebben a korben!"
  586. $
  587. $ endif
  588. $
  589. $
  590. $ endif
  591. $
  592. $ endif
  593. $
  594. $!statupload:
  595. $ status2=f$el(3,"|",unit'aktplayer''ki')
  596. $ status3=f$el(4,"|",unit'aktplayer''ki')
  597. $ status4=f$el(5,"|",unit'aktplayer''ki')
  598. $ status5=f$el(6,"|",unit'aktplayer''ki')
  599. $ status6=f$el(7,"|",unit'aktplayer''ki')
  600. $ status7=f$el(8,"|",unit'aktplayer''ki')
  601. $ status8=f$el(9,"|",unit'aktplayer''ki')
  602. $ status9=f$el(10,"|",unit'aktplayer''ki')
  603. $ status10=f$el(11,"|",unit'aktplayer''ki')
  604. $
  605. $ else
  606. $
  607. $ esemeny="Doit hibas paramaterezese, vagy palya szele! Probald: Help"
  608. $
  609. $ endif
  610. $
  611. $ endif
  612. $
  613. $
  614. $ goto endtranssub
  615. $
  616. $
  617. $
  618. $!+++++ ENDTURN ++++++++++++++++++
  619. $
  620. $ ENDTURN:
  621. $
  622. $ gosub STATCLEAR
  623. $
  624. $ last_player=aktplayer
  625. $
  626. $ details1=details2
  627. $ details2=details3
  628. $ details3=LF + CR
  629. $
  630. $ aktplayer=aktplayer+1
  631. $ if aktplayer .gt. playernum then aktplayer=1
  632. $
  633. $ if baseHP'aktplayer' .le. 0 then goto ENDTURN
  634. $
  635. $ if last_player.eq.aktplayer
  636. $ then
  637. $
  638. $ esemeny=f$str(jatekos'aktplayer') + "nyerte a jatekot. grat :)"
  639. $ goto exit
  640. $
  641. $ endif
  642. $
  643. $ selected=""
  644. $ enabled=0
  645. $
  646. $ money'aktplayer'=money'aktplayer'+income'aktplayer'
  647. $
  648. $ esemeny=f$str(jatekos'aktplayer') + " kore kovetkezik."
  649. $ status1="Penz: " + f$str(money'aktplayer')
  650. $ status2="Bevetel: " + f$str(income'aktplayer')
  651. $ status3="Bazis HP: " + f$str(baseHP'aktplayer')
  652. $
  653. $ !////////////////////////////////////FELTOLTES ELEJE
  654. $ i=0
  655. $
  656. $ charge_b:
  657. $
  658. $ if i .gt. 30 then goto charge_e
  659. $
  660. $ if unit'aktplayer''i' .nes. ""
  661. $ then
  662. $
  663. $ maxHP=f$el(7,"|",unit'aktplayer''i')
  664. $
  665. $ HP=f$el(1,":",f$el(0,"/",maxHP))
  666. $
  667. $ maxHP=f$el(1,"/",maxHP)
  668. $
  669. $ maxTVP=f$el(8,"|",unit'aktplayer''i')
  670. $
  671. $ TVP=f$el(0,"/",maxTVP)
  672. $
  673. $ maxTVP=f$el(1,"/",maxTVP)
  674. $
  675. $ if HP .lt. maxHP
  676. $ then
  677. $
  678. $ HP=HP + 1 + maxHP/4
  679. $
  680. $ if HP .gt. maxHP then HP=maxHP
  681. $
  682. $ temp=f$str(aktplayer) + "," + f$str(i) + ",7,HP:" + f$str(HP) + "/" + f$str(maxHP)
  683. $
  684. $ gosub XCHG
  685. $
  686. $ endif
  687. $
  688. $ if TVP .lt. maxTVP
  689. $ then
  690. $
  691. $ TVP=maxTVP
  692. $
  693. $ temp=f$str(aktplayer) + "," + f$str(i) + "," + "8,Lepes:" + f$str(TVP) + "/" + f$str(TVP)
  694. $
  695. $ gosub XCHG
  696. $
  697. $ endif
  698. $
  699. $ if f$el(9,"|",unit'aktplayer''i') .eqs. "Tamadott-e: igen"
  700. $ then
  701. $
  702. $ temp=f$str(aktplayer) + "," + f$str(i) + "," + "9,Tamadott-e: nem"
  703. $
  704. $ gosub XCHG
  705. $
  706. $ endif
  707. $
  708. $ endif
  709. $
  710. $ i=i+1
  711. $
  712. $ goto charge_b
  713. $
  714. $ charge_e:
  715. $ !/////////////////////////////////////FELTOLTES VEGE
  716. $
  717. $ goto endtranssub
  718. $
  719. $
  720. $
  721. $ !+++++BUYUNIT++++++++++++++++++++
  722. $
  723. $ BUYUNIT:
  724. $
  725. $ order=f$el(1," ",order)
  726. $
  727. $ if f$le(order) .eq. 0
  728. $ then
  729. $
  730. $ esemeny="Lehetseges parameterek: Felderito, Gyalogos, Vertes"
  731. $
  732. $ else
  733. $
  734. $ gosub FINDPLACE
  735. $
  736. $ if temp .eqs. ""
  737. $ then
  738. $
  739. $ esemeny="Nincs hely az erkezo egysegnek!"
  740. $
  741. $ else
  742. $
  743. $ gosub FINDSLOT
  744. $
  745. $ if j .eq. 31
  746. $ then
  747. $
  748. $ esemeny="Tul sok egyseged van!!!"
  749. $
  750. $ else
  751. $
  752. $ if order .eqs. f$ex(0,hossz,"felderito")
  753. $ then
  754. $
  755. $ temp=temp + "|Tipus:Felderito|Pancel:''FelArm'|Vedelem:''FelDef'|Sebzes:''FelDmg'|Tamadas:''FelAtt'|HP:''FelHP'/''FelHP'|Lepes:0/''FelMov'|Tamadott-e: igen|Szint:1|XP:1"
  756. $
  757. $ order=3
  758. $
  759. $ else
  760. $
  761. $ if order .eqs. f$ex(0,hossz,"gyalogos")
  762. $ then
  763. $
  764. $ temp=temp + "|Tipus:Gyalogos|Pancel:''InfArm'|Vedelem:''InfDef'|Sebzes:''InfDmg'|Tamadas:''InfAtt'|HP:''InfHP'/''InfHP'|Lepes:0/''InfMov'|Tamadott-e: igen|Szint:1|XP:1"
  765. $
  766. $ order=5
  767. $
  768. $ else
  769. $
  770. $ if order .eqs. f$ex(0,hossz,"vertes")
  771. $ then
  772. $
  773. $ temp=temp + "|Tipus:Vertes|Pancel:''ArmArm'|Vedelem:''ArmDef'|Sebzes:''ArmDmg'|Tamadas:''ArmAtt'|HP:''ArmHP'/''ArmHP'|Lepes:0/''ArmMov'|Tamadott-e: igen|Szint:1|XP:1"
  774. $
  775. $ order=7
  776. $
  777. $ else
  778. $
  779. $ esemeny="Lehetseges parameterek: Felderito, Gyalogos, Vertes"
  780. $
  781. $ endif
  782. $
  783. $ endif
  784. $
  785. $ endif
  786. $
  787. $ if esemeny .eqs. ""
  788. $ then
  789. $
  790. $ if order .gt. money'aktplayer'
  791. $ then
  792. $
  793. $ esemeny="Nincs eleg penzed... meg " + f$str(order - money'aktplayer') + " kene. Beveteled: " + f$str(income'aktplayer')
  794. $
  795. $ else
  796. $
  797. $ money'aktplayer'=money'aktplayer'-order
  798. $
  799. $ details3=details3 + "A " + f$str(aktplayer) + "-s jatekos kikepzett egy " + f$el(1,":",f$el(2,"|",temp)) + "t." + LF + CR
  800. $
  801. $ unit'aktplayer''j'=temp
  802. $
  803. $ endif
  804. $
  805. $ endif
  806. $
  807. $ endif
  808. $
  809. $ endif
  810. $
  811. $ endif
  812. $
  813. $ goto endtranssub
  814. $
  815. $
  816. $ !+++++GETMANI(MANI) ELJARASA+++++
  817. $
  818. $ GETMANI:
  819. $!ez majd at lesz(lehet) alakitva
  820. $ esemeny="Az aktualis jatekosnak(" + f$str(jatekos'aktplayer') + ") " + f$str(money'aktplayer') + " penze van"
  821. $
  822. $ goto endtranssub
  823. $
  824. $
  825. $!++++++HELP(HELP) ELJARASA+++++++++
  826. $
  827. $ HELP:
  828. $
  829. $ cls
  830. $ temp=f$ed(f$el(1," ",order),"lowercase")
  831. $
  832. $ hossz=f$len(temp)
  833. $
  834. $ if hossz .eq. 0 then goto STANDARD_HELP
  835. $
  836. $ if temp .eqs. f$ex(0, hossz, "select") then goto SELECT_HELP
  837. $ if temp .eqs. f$ex(0, hossz, "doit") then goto DOIT_HELP
  838. $ if temp .eqs. f$ex(0, hossz, "endturn") then goto ENDTURN_HELP
  839. $ if temp .eqs. f$ex(0, hossz, "buyunit") then goto BUYUNIT_HELP
  840. $ if temp .eqs. f$ex(0, hossz, "getmani") then goto GETMANI_HELP
  841. $ if temp .eqs. f$ex(0, hossz, "help") then goto STANDARD_HELP
  842. $ if temp .eqs. f$ex(0, hossz, "exit") then goto EXIT_HELP
  843. $ if temp .eqs. f$ex(0, hossz, "more") then goto MORE_HELP
  844. $ if temp .eqs. f$ex(0, hossz, "szintlepes") then goto LU_HELP
  845. $ if temp .eqs. f$ex(0, hossz, "harc") then goto HARC_HELP
  846. $ if temp .eqs. f$ex(0, hossz, "jelmagyarazat") then goto DISPLAY_HELP
  847. $
  848. $ say "Nem ismertem fel, mint lehetseges opciot..." + LF
  849. $
  850. $ STANDARD_HELP:
  851. $
  852. $ say "HELP" + LF
  853. $ say TAB + "Ez a jetek HELP resze. Rovid leirast kapsz a jatekrol, majd a" + LF + CR + TAB + "reszletesebben kerdezheto topikok felsorolasa kovetkezik." + LF
  854. $ say TAB + TAB + "$ A program egy korokre osztott, parancssoros, karaktergrafikas" + LF + CR + TAB + TAB + "strategiai jatek, kozepkori stilusban." + LF + CR + TAB + TAB + "A cel az ellenfel bazisanak lerombolasa"
  855. $ say TAB + TAB + "$ A program parameterezheto a jatekosok neveivel, 5 karakterre" + LF + CR + TAB + TAB + "csonkitva(a program elvegzi a csonkitast)"
  856. $ say TAB + TAB + "$ Bovebb informacio a kovetekezokrol(a parancsok nagybetuig" + LF + CR + TAB + TAB + "rovidithetoek):" + LF
  857. $ say TAB + "Select" + TAB + "Doit" + TAB + "Endturn" + TAB + "Buyunit" + TAB + "Getmani" + TAB + "Help" + TAB + "EXit" + LF + CR + TAB + "More" + TAB + "HArc" + TAB + "SZintlepes" + TAB + "Jelmagyrazat"
  858. $ say ""
  859. $
  860. $ goto END_HELP
  861. $
  862. $ SELECT_HELP:
  863. $
  864. $ say "SELECT" + LF
  865. $ say TAB + "Ezzel az utasitassal lehet kijelolni a falvakat, egysegeket," + LF + CR + TAB + "bazisokat, akar egymas alatt is."
  866. $ say TAB + "Az adatokrol, amiket szolgaltathat:" + LF + CR + TAB + "Bazis: azt hiszem, evidens, tulajdonosa, annak penze es bevetele" + LF + CR + TAB + "Falu: a tulajdonosrol: ha 0, akkor meg nincs neki(ez konnyen"
  867. $ say TAB + "valtozhat :))" + LF + CR + TAB + "Egysegek: az egyes ertekekrol bovebben a Doit parancsnal," + LF + CR + TAB + "a harc resznel valamint a szintlepesnel." + LF
  868. $
  869. $ goto END_HELP
  870. $
  871. $ DOIT_HELP:
  872. $
  873. $ say "DOIT" + LF
  874. $ say "Szintaxis: Doit Jobbra/Fel/Balra/Le. Nagybetuig roviditheto." + LF
  875. $ say TAB + "A parancs csak sajat egyseg kijelolese utan mukodokepes, ekkor" + CR + LF + TAB + "az adott iranyba vegrehajthato tevekenyseget kiserli meg: tamad," + LF + CR + TAB + "vagy mozog."
  876. $ say TAB + "Mozogni akkor tud, ha a lepeseinek a szama 0 felett van, ilyenkor" + LF + CR + TAB + "csokken eggyel, tamadni ha abban a korban meg nem tamadott(es nem" + LF + CR + TAB + "az elso kore van). Ekkor abban a korben mar nem lephet."
  877. $ say TAB + "A harc szabalyairol tovabbi informaciokat a help Harc reszenel."
  878. $
  879. $ goto END_HELP
  880. $
  881. $ ENDTURN_HELP:
  882. $
  883. $ say "ENDTURN" + LF
  884. $ say "Szintaxis: Endturn. Nagybetuig roviditheto." + LF
  885. $ say TAB + "A parancs a kor befejezesere szolgal."
  886. $ say TAB + "A kor elejen vegrehajtodo tevekenysegek:"
  887. $ say TAB + TAB + "$ A jatekos penzt kap a bevetelei utan"
  888. $ say TAB + TAB + "$ Az egysegek feltoltodnek:"
  889. $ say TAB + TAB + TAB + "a) maximum lepesszamra"
  890. $ say TAB + TAB + TAB + "b) (ujra) tudnak tamadni"
  891. $ say TAB + TAB + TAB + "c) 1/4-nyi HP-t visszatoltenek maximumig" + LF
  892. $
  893. $ goto END_HELP
  894. $
  895. $ BUYUNIT_HELP:
  896. $
  897. $ say "BUYUNIT" + LF
  898. $ say "Szintaktika: Buyunit <Felderito/Gyalogos/Vertes>; nagybetuig roviditheto" + LF
  899. $ say TAB + "A parancs egyseg vasarlasara szolgal, amely harom fajta" + LF + CR + TAB + "lehet: Felderito, Gyalogos es Vertes." + LF + CR + TAB + "Az egysegek a bazisod ketto sugaru kornyezeteben jelennek meg," + LF + CR + TAB + "ha van helyuk." + LF
  900. $ say TAB + "Alapertekek" + LF + CR + TAB + TAB + "Felderito: Gyalogos: Vertes:"
  901. $ say TAB + "Ar:" + TAB + TAB + "3 5 7"
  902. $ say TAB + "Pancel:" + TAB + TAB + "''FelArm' ''InfArm' ''ArmArm'"
  903. $ say TAB + "Vedelem:" + TAB + "''FelDef' ''InfDef' ''ArmDef'"
  904. $ say TAB + "Sebzes:" + TAB + TAB + "''FelDmg' ''InfDmg' ''ArmDmg'"
  905. $ say TAB + "Tamadas:" + TAB + "''FelAtt' ''InfAtt' ''ArmAtt'"
  906. $ say TAB + "Hp:" + TAB + TAB + "''FelHP' ''InfHP' ''ArmHP'"
  907. $ say TAB + "Lepes:" + TAB + TAB + "''FelMov' ''InfMov' ''ArmMov'"
  908. $
  909. $ say TAB + "/Megjegyzes: az egysegek nem tamadhatnak az elso korukben./" + LF
  910. $
  911. $ goto END_HELP
  912. $
  913. $ GETMANI_HELP:
  914. $
  915. $ say "GETMANI" + LF
  916. $ say "Szintaktika: Getmani. Nagybetuig roviditheto." + LF
  917. $ say "/Jelenleg csak visszaadja a meglevo penzmag erteket, kesobb fejleszteseket tervezek a paranccsal kapcsolatban/" + LF
  918. $
  919. $ goto END_HELP
  920. $
  921. $ EXIT_HELP:
  922. $
  923. $ say "EXIT" + LF
  924. $ say "Szintaktika: EXit. Nagybetuig roviditheto." + LF
  925. $ say TAB + "Befejezi a program futasat."
  926. $ say TAB + "/Fejlesztesi lehetoseg: mentes opcio/" + LF
  927. $
  928. $ goto END_HELP
  929. $
  930. $ MORE_HELP:
  931. $
  932. $ say "MORE" + LF
  933. $ say "Szintaktika: More. Nagybetuig roviditheto" + LF
  934. $ say "Kiirja tomor es elsore kicsit erthetetlen formaban az elmult 3 kor esemenyeinek reszleteit, ahol szuksegesnek veltem. Segitsetek, hol mit irjon meg!" + LF
  935. $
  936. $ goto END_HELP
  937. $
  938. $ LU_HELP:
  939. $
  940. $ say "LEVEL UP" + LF
  941. $ say TAB + "Szintet akkor lepnek az egysegek, ha az XP mennyiseg elerte" + LF + CR + TAB + "a kovetkezo szint negyzetet(bonyolult? :))"
  942. $ say TAB + "XP-t akkor kapnak az egysegek, ha legyoznek egy masikat, ekkor az" + LF + CR + TAB + "ellen szintjenek ketszereset kapja meg tapasztalatkent."
  943. $ say TAB + "Szintlepeskor a kovetkezo ertekek adodnak az eddigiekhez(tortresz" + LF + CR + TAB + "csak paros szinteken!):"
  944. $ say TAB + TAB + ">> Felderito: 2/0,5/ 2/ 1/ 2/0,5"
  945. $ say TAB + TAB + ">> Gyalogos: 3/1,5/ 3/ 2/ 1/1,5"
  946. $ say TAB + TAB + ">> Vertes: 3,5/ 2/ 4/ 3/0,5/ 2"
  947. $ say TAB + TAB + "Magyarazat: Def/Dmg/Att/ HP/Mov/Arm" + LF
  948. $
  949. $ goto END_HELP
  950. $
  951. $ HARC_HELP:
  952. $
  953. $ say "HARC" + LF
  954. $ say "Ez a kis leiras a harcrendszerrol keszult. Hogy te is ertsed miert halmeg az egyik, mikor a masik eletben marad. Az elet kegyetlen... :)" + LF
  955. $ say TAB + "Tamadaskor a talalat a att+att*x >= def esetben kovetkezik be."
  956. $ say TAB + "//A kepletben az att a tamado Tamadas erteke, a def a vedekezo fel" + LF + CR + TAB + "Vedelem erteke, x pedig egy 0,01 es 1 kozotti szam//"
  957. $ say TAB + "A HP veszteseg egyszeruen a sebzes es a pancelzat kulonbsegenek a pozitiv resze." + LF
  958. $
  959. $ goto END_HELP
  960. $
  961. $ DISPLAY_HELP:
  962. $
  963. $ say "MEGJELENITES" + LF
  964. $ say "Maga a tabla egy 20x30-s matrix, dolgozom meg a jobb atlathatosagon..."
  965. $ say "Jelenleg(v0.7) egy 2-s bontasu raccsal probalom a koordinatakat lathatova tenni... minden otletre vevo vagyok! :)"
  966. $ say "Mivel ket karakteren kell megjelenitenem minden informaciot, nem biztos, hogy" + LF + CR + "egyertelmuek a jeloleseim. Akkor kovetkezzek egy kis magyarazat..." + LF
  967. $ say TAB + "@n:" + TAB + "Falu, n-l jelolve az altala szolgaltatott bevetelt."
  968. $ say TAB + "Bn:" + TAB + "Bazis, n-l a tulajdonosat jelolve."
  969. $ say TAB + "F/G/Vn:" + TAB + "Egyseg, n itt is a tulajt jeloli(gondoltam meg a szintre, de ket karakter...)" + LF
  970. $
  971. $ goto END_HELP
  972. $
  973. $ END_HELP:
  974. $ read /prompt="Nyomj enter a folytatashoz..." sys$command order
  975. $
  976. $ order="h " + f$str(order)
  977. $
  978. $ if f$len(order) .ne. 2 then goto HELP
  979. $
  980. $ goto endtranssub
  981. $
  982. $
  983. $!+++++EXIT(EXIT) ELJARASA+++++
  984. $
  985. $!//////Ide majd a ment? kell
  986. $
  987. $ EXIT:
  988. $
  989. $ say "Kosz, hogy engem valasztottal!!!"
  990. $ say "********************************************************************************"
  991. $ say "*------------------------------------------------------------------------------*"
  992. $ say "*--++++++------------+++++-------+++++----------+++++++++++------------++++----*"
  993. $ say "*--+++++++------------+++++-----+++++-----------+++++++++++------------++++----*"
  994. $ say "*--+++--+++------------+++++---+++++------------++++-------------------++++----*"
  995. $ say "*--+++--+++-------------+++++-+++++-------------++++-------------------++++----*"
  996. $ say "*--+++-+++---------------+++++++++--------------+++++++++--------------++++----*"
  997. $ say "*--++++--------------------+++++----------------+++++++++--------------++++----*"
  998. $ say "*--++++++------------------+++++----------------++++-------------------++++----*"
  999. $ say "*--+++--+++----------------+++++----------------++++---------------------------*"
  1000. $ say "*--+++---+++---------------+++++----------------++++--------------------++-----*"
  1001. $ say "*--+++---+++---------------+++++----------------+++++++++++------------++++----*"
  1002. $ say "*--++++++++----------------+++++----------------+++++++++++-------------++-----*"
  1003. $ say "*------------------------------------------------------------------------------*"
  1004. $ say "********************************************************************************"
  1005. $
  1006. $ exit
  1007. $
  1008. $
  1009. $ endtranssub:
  1010. $
  1011. $ return
  1012. $
  1013. $!+++++++++++++++++++MORE+++++++++++++++++++
  1014. $
  1015. $ MORE:
  1016. $
  1017. $ say "1: ",details1,"2: ",details2,"3: ",details3
  1018. $ read /prompt="Nyomj entert a folyatatashoz!" sys$command temp
  1019. $
  1020. $ return
  1021. $
  1022. $ !++++++++++++++++++++?RARAJZOL? PROC++++++++++++++++++++
  1023. $
  1024. $
  1025. $ REDRAW:
  1026. $
  1027. $ gosub MAPRESET
  1028. $
  1029. $!farmberajzolo
  1030. $ i=f$el(1,"|",farmlist)
  1031. $ temp=1
  1032. $
  1033. $ farmdraw_b:
  1034. $
  1035. $ if i .eqs. "|" then goto farmdraw_e
  1036. $
  1037. $ sor'f$el(0,"-",i)'=f$ex(0,(f$el(1,"-",f$el(0,".",i)))*2,sor'f$el(0,"-",i)') + "@" + f$el(1,".",i) + f$ex(2+(f$el(1,"-",f$el(0,".",i)))*2,60,sor'f$el(0,"-",i)')
  1038. $
  1039. $ temp=temp+1
  1040. $ i=f$el(temp,"|",farmlist)
  1041. $
  1042. $ goto farmdraw_b
  1043. $
  1044. $ farmdraw_e:
  1045. $!egysegberajzolo
  1046. $ i=1
  1047. $
  1048. $ drc_outer_b:
  1049. $
  1050. $ if i .gt. playernum then goto drc_outer_e
  1051. $
  1052. $ j=0
  1053. $
  1054. $ drc_inner_b:
  1055. $
  1056. $ if j .gt. 30 then goto drc_inner_e
  1057. $
  1058. $ if unit'i''j' .nes. ""
  1059. $ then
  1060. $
  1061. $ tempsor=f$el(0,"|",unit'i''j')
  1062. $ tempcol=f$el(1,"|",unit'i''j')
  1063. $ sor'tempsor'=f$ex(0,tempcol*2,sor'tempsor') + f$ex(6,1,f$el(2,"|",unit'i''j')) + f$str(i) + f$ex(2+tempcol*2,60,sor'tempsor')
  1064. $
  1065. $ endif
  1066. $
  1067. $ j=j+1
  1068. $
  1069. $ goto drc_inner_b
  1070. $
  1071. $ drc_inner_e:
  1072. $
  1073. $ i=i+1
  1074. $
  1075. $ goto drc_outer_b
  1076. $
  1077. $ drc_outer_e:
  1078. $
  1079. $ cls
  1080. $ i=1
  1081. $ say " 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 6 7 8 930"
  1082. $ say " +------------------------------------------------------------"
  1083. $
  1084. $
  1085. $ drc_eleje:
  1086. $
  1087. $ if i .gt. 20 then goto drc_vege
  1088. $
  1089. $ temp=f$ex(0,2,sor'i') + "|" + f$ex(2,60,sor'i') + " " + status'i'
  1090. $
  1091. $ say temp
  1092. $
  1093. $ i=i+1
  1094. $
  1095. $ goto drc_eleje
  1096. $
  1097. $ drc_vege:
  1098. $
  1099. $ say esemeny
  1100. $
  1101. $ return
  1102. $
  1103. $
  1104. $ !++++++++++++++++++++++++++++++++
  1105. $ !+++ Kitorli a statusmezoket ++++
  1106. $ !++++++++++++++++++++++++++++++++
  1107. $
  1108. $ STATCLEAR:
  1109. $
  1110. $ z=1
  1111. $ statclear_b:
  1112. $
  1113. $ if z .gt. 20 then goto statclear_e
  1114. $
  1115. $ status'z'=""
  1116. $
  1117. $ z=z+1
  1118. $
  1119. $ goto statclear_b
  1120. $
  1121. $ statclear_e:
  1122. $
  1123. $ del/sy z
  1124. $
  1125. $ return
  1126. $
  1127. $
  1128. $ !+++++++++++++++++++++++++++++++++
  1129. $ !+++ reseteli a mozgo sorokat ++++
  1130. $ !+++++++++++++++++++++++++++++++++
  1131. $
  1132. $ MAPRESET:
  1133. $
  1134. $ z=1
  1135. $ mapreset_b:
  1136. $
  1137. $ if z .gt. 20 then goto mapreset_e
  1138. $
  1139. $ sor'z'=bsor'z'
  1140. $
  1141. $ z=z+1
  1142. $
  1143. $ goto mapreset_b
  1144. $
  1145. $ mapreset_e:
  1146. $
  1147. $ del/sy z
  1148. $
  1149. $ return
  1150. $
  1151. $
  1152. $
  1153. $ !++++++++++++++++++++++++++++++
  1154. $ !+++ kitorli a unitmezoket ++++
  1155. $ !++++++++++++++++++++++++++++++
  1156. $
  1157. $ UNITCLEAR:
  1158. $
  1159. $ z=1
  1160. $
  1161. $ uclear_out_b:
  1162. $
  1163. $ if z .gt. playernum then goto uclear_out_e
  1164. $
  1165. $ z1=0
  1166. $
  1167. $ uclear_inner_b:
  1168. $
  1169. $ if z1 .gt. 30 then goto uclear_inner_e
  1170. $
  1171. $ unit'z''z1'=""
  1172. $
  1173. $ z1=z1+1
  1174. $
  1175. $ goto uclear_inner_b
  1176. $
  1177. $ uclear_inner_e:
  1178. $
  1179. $ z=z+1
  1180. $
  1181. $ goto uclear_out_b
  1182. $
  1183. $ uclear_out_e:
  1184. $
  1185. $ del/sy z
  1186. $ del/sy z1
  1187. $
  1188. $ return
  1189. $
  1190. $
  1191. $ !++++++++++++++++++++++++++++++++++++++++++++++++++++
  1192. $ !+++ ++++++
  1193. $ !+++ temp=jatekos,egysegszam,hanyadikslot,mire ++++++
  1194. $ !+++ Kicsereli unit tomb egy elemet(nem koord ++++++
  1195. $ !+++ ++++++
  1196. $ !++++++++++++++++++++++++++++++++++++++++++++++++++++
  1197. $
  1198. $
  1199. $ XCHG:
  1200. $
  1201. $ tmpi=f$el(0,",",temp)
  1202. $ tmpj=f$el(1,",",temp)
  1203. $ tmpk=f$el(2,",",temp)
  1204. $ tmpstr=f$el(3,",",temp)
  1205. $ tmpc=1
  1206. $ temp2=""
  1207. $
  1208. $ temp=f$el(1,"|",unit'tmpi''tmpj')
  1209. $
  1210. $ temp2=f$el(0,"|",unit'tmpi''tmpj')
  1211. $
  1212. $ xchg_b:
  1213. $
  1214. $ if temp .eqs. "|" then goto xchg_e
  1215. $
  1216. $ if tmpk .eq. tmpc
  1217. $ then
  1218. $
  1219. $ temp2=temp2 + "|" + f$str(tmpstr)
  1220. $
  1221. $ else
  1222. $
  1223. $ temp2=temp2 + "|" + f$str(temp)
  1224. $
  1225. $ endif
  1226. $
  1227. $ tmpc=tmpc+1
  1228. $
  1229. $ temp=f$el(tmpc,"|",unit'tmpi''tmpj')
  1230. $
  1231. $ goto xchg_b
  1232. $
  1233. $ xchg_e:
  1234. $
  1235. $ unit'tmpi''tmpj'=temp2
  1236. $
  1237. $ del/sy temp2
  1238. $ del/sy tmpc
  1239. $ del/sy tmpi
  1240. $ del/sy tmpj
  1241. $ del/sy tmpk
  1242. $ del/sy tmpstr
  1243. $
  1244. $ return
  1245. $
  1246. $
  1247. $
  1248. $ !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1249. $ !++++ +++++++++++
  1250. $ !++++ ELJARAS, AMI MEGHATAROZZA, HA EGYSEG VAN OTT +++++++++++
  1251. $ !++++ parameter: tempcol, tempsor +++++++
  1252. $ !++++ visszaad: i, j(unit'i''j' ha van, i=0 egyebkent) +++++++
  1253. $ !++++ +++++++
  1254. $ !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1255. $ WHOSTHERE:
  1256. $
  1257. $ i=1
  1258. $ van=0
  1259. $
  1260. $ testcouter_eleje:
  1261. $
  1262. $ if i .gt. playernum then goto testcouter_vege
  1263. $
  1264. $ j=0
  1265. $
  1266. $ testcinner_eleje:
  1267. $
  1268. $ if j .gt. 30 then goto testcinner_vege
  1269. $
  1270. $ if f$int(f$el(0,"|",unit'i''j')) .eq. tempsor .and. f$int(f$el(1,"|",unit'i''j')) .eq. tempcol then van=1
  1271. $
  1272. $ if van .ne. 0 then goto testcouter_vege
  1273. $
  1274. $ j=j+1
  1275. $
  1276. $ goto testcinner_eleje
  1277. $
  1278. $ testcinner_vege:
  1279. $
  1280. $ i=i+1
  1281. $
  1282. $ goto testcouter_eleje
  1283. $
  1284. $ testcouter_vege:
  1285. $
  1286. $ if van .eq. 0
  1287. $ then
  1288. $
  1289. $ i=0
  1290. $
  1291. $ endif
  1292. $
  1293. $ return
  1294. $
  1295. $
  1296. $
  1297. $
  1298. $ !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1299. $ !++++ +++++++++++++
  1300. $ !++++ ELJARAS, AMI MEGHATAROZZA, HA EPULET VAN OTT +++++++++++++
  1301. $ !++++ parameter: tempcol, tempsor ++
  1302. $ !++++ visszaad: F+farm szama ha farm,B+jatekos szama, ha bazis ++
  1303. $ !++++ ++
  1304. $ !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1305. $ WHATSTHERE:
  1306. $
  1307. $ i=""
  1308. $
  1309. $ if tempsor .eq. 1 .and. tempcol .eq. 1 then i="B1"
  1310. $ if tempsor .eq. 20 .and. tempcol .eq. 30 then i="B2"
  1311. $
  1312. $ if playernum .gt. 2
  1313. $ then
  1314. $
  1315. $ if tempsor .eq. 1 .and. tempcol .eq. 30 then i="B3"
  1316. $ if tempsor .eq. 20 .and. tempcol .eq. 1 then i="B4"
  1317. $
  1318. $ endif
  1319. $
  1320. $ if i .eqs. ""
  1321. $ then
  1322. $
  1323. $ j=1
  1324. $ temp=f$element(1,"|",farmlist)
  1325. $
  1326. $ farmtest_eleje:
  1327. $
  1328. $ if temp .eqs. "|" .or. i .nes. "" then goto farmtest_vege
  1329. $
  1330. $ if tempsor .eq. f$el(0,"-",temp) .and. tempcol .eq. f$el(0,".",f$el(1,"-",temp)) then i="F"+f$str(j)
  1331. $
  1332. $ j=j+1
  1333. $
  1334. $ temp=f$element(j,"|",farmlist)
  1335. $
  1336. $ goto farmtest_eleje
  1337. $
  1338. $ farmtest_vege:
  1339. $
  1340. $ endif
  1341. $
  1342. $ return
  1343. $
  1344. $ !+++++++++++++++++++++++++++
  1345. $ !+++ Ures slotot talal +++++
  1346. $ !+++ az uj egysegnek +++++
  1347. $ !+++++++++++++++++++++++++++
  1348. $
  1349. $ FINDSLOT:
  1350. $
  1351. $ j=0
  1352. $
  1353. $ findslot_b:
  1354. $
  1355. $ if j .gt. 30 .or. unit'aktplayer''j' .eqs. "" then goto findslot_e
  1356. $
  1357. $ j=j + 1
  1358. $
  1359. $ goto findslot_b
  1360. $
  1361. $ findslot_e:
  1362. $
  1363. $ return
  1364. $
  1365. $ !+++++++++++++++++++++++++
  1366. $ !+++ Ures helyet talal +++
  1367. $ !+++ a bazis kornyeken +++
  1368. $ !+++++++++++++++++++++++++
  1369. $
  1370. $ FINDPLACE:
  1371. $
  1372. $ temp=dir'aktplayer'
  1373. $
  1374. $ h=0
  1375. $ ures=0
  1376. $
  1377. $ findplace_b:
  1378. $
  1379. $ tempsor=f$el(0,"-",f$el(h,",",temp))
  1380. $
  1381. $ tempcol=f$el(1,"-",f$el(h,",",temp))
  1382. $!say "tempsor:" + f$str(tempsor) + LF + CR + "tempcol:" + f$str(tempcol) + LF + CR + f$str(h)
  1383. $ if tempsor .eqs. "," .or. ures .eq. 1 then goto findplace_e
  1384. $!ezt meg at kell majd irni...
  1385. $
  1386. $! tempsor=f$el(0,"-",f$el(j,",",temp))
  1387. $
  1388. $! tempcol=f$el(1,"-",f$el(j,",",temp))
  1389. $
  1390. $ gosub WHOSTHERE
  1391. $
  1392. $ if i .eq. 0
  1393. $ then
  1394. $
  1395. $ temp=f$str(tempsor) + "|" + f$str(tempcol)
  1396. $ ures=1
  1397. $
  1398. $ endif
  1399. $
  1400. $ h=h+1
  1401. $
  1402. $ goto findplace_b
  1403. $
  1404. $ findplace_e:
  1405. $
  1406. $ if ures .eq. 0 then temp=""
  1407. $
  1408. $ return
  1409. $
  1410. $
  1411. $ !++++++++++++++++++++++++++++++++++++++++++++++++++++
  1412. $ !+++ +++++++++++++
  1413. $ !+++ temp=tamadas,sebzes,vedelem,pancel +++++++++++++
  1414. $ !+++ Levezenyli a tamadast +++++++++++++
  1415. $ !+++ ++++++++++++++++++++++++++
  1416. $ !++++++++++++++++++++++++++++++++++++++++++++++++++++
  1417. $
  1418. $ ATTACK:
  1419. $
  1420. $ att=f$el(0,",",temp)
  1421. $ def=f$el(2,",",temp)
  1422. $ dmg=f$el(1,",",temp)
  1423. $ arm=f$el(3,",",temp)
  1424. $
  1425. $ temp=f$el(1,".",f$ti()) + 1
  1426. $
  1427. $ details3=details3 + "A tamado dobas erteke " + f$str(temp)
  1428. $
  1429. $ temp=temp*att/100+att-def
  1430. $
  1431. $ details3=details3 + ", ezzel a tamadas erteke " + f$str(temp)
  1432. $
  1433. $ if temp .gt. 0
  1434. $ then
  1435. $
  1436. $ temp=f$int(dmg) - f$int(arm)
  1437. $
  1438. $ details3=details3 + ". A sebzes " + f$str(dmg) + "-" + f$str(arm) + ": " + f$str(temp) + LF + CR
  1439. $
  1440. $ else
  1441. $
  1442. $ details3=details3 + ", igy nem talalt..." + LF + CR
  1443. $
  1444. $ temp="L"
  1445. $
  1446. $ endif
  1447. $
  1448. $ del/sy att
  1449. $ del/sy def
  1450. $ del/sy dmg
  1451. $ del/sy arm
  1452. $
  1453. $ return
  1454. $
  1455. $
  1456. $ !+++++++++++++++++++
  1457. $ !+++ Szintlepes ++++
  1458. $ !+++++++++++++++++++
  1459. $
  1460. $ LU:
  1461. $
  1462. $ li=f$el(0,",",temp)
  1463. $ lj=f$el(1,",",temp)
  1464. $
  1465. $ temp=unit'li''lj'
  1466. $ type=f$el(0,"|",f$el(1,":",temp))
  1467. $ att=f$el(1,":",f$el(6,"|",temp))
  1468. $ def=f$el(1,":",f$el(4,"|",temp))
  1469. $ dmg=f$el(1,":",f$el(5,"|",temp))
  1470. $ arm=f$el(1,":",f$el(3,"|",temp))
  1471. $ HP=f$el(0,"/",f$el(1,":",f$el(7,"|",temp)))
  1472. $ mHP=f$el(1,"/",f$el(7,"|",temp))
  1473. $ TVP=f$el(0,"/",f$el(1,":",f$el(8,"|",temp)))
  1474. $ mTVP=f$el(1,"/",f$el(8,"|",temp))
  1475. $ ifatt=f$el(9,"|",temp)
  1476. $ temp=f$el(0,":",temp) + ":" + type + "|Pancel:"
  1477. $
  1478. $ if type .eqs. "Felderito"
  1479. $ then
  1480. $
  1481. $ patt=2
  1482. $ pdef=2
  1483. $ pdmg=0
  1484. $ if Lvl then dmg=dmg + 1
  1485. $ parm=0
  1486. $ if Lvl then arm=arm + 1
  1487. $ pHP=1
  1488. $ pTVP=2
  1489. $
  1490. $ else
  1491. $
  1492. $ if type .eqs. "Gyalogos"
  1493. $ then
  1494. $
  1495. $ patt=3
  1496. $ pdef=3
  1497. $ pdmg=1
  1498. $ if Lvl then dmg=dmg + 1
  1499. $ parm=1
  1500. $ if Lvl then arm=arm + 1
  1501. $ pHP=2
  1502. $ pTVP=1
  1503. $
  1504. $ else
  1505. $
  1506. $ patt=4
  1507. $ pdef=3
  1508. $ if Lvl then def=def + 1
  1509. $ pdmg=2
  1510. $ parm=2
  1511. $ pHP=3
  1512. $ pTVP=0
  1513. $ if Lvl
  1514. $ then
  1515. $ mTVP=mTVP + 1
  1516. $ TVP=TVP + 1
  1517. $ endif
  1518. $
  1519. $ endif
  1520. $
  1521. $ endif
  1522. $
  1523. $ att=att + patt
  1524. $ def=def + pdef
  1525. $ dmg=dmg + pdmg
  1526. $ arm=arm + parm
  1527. $ HP=HP + pHP
  1528. $ mHP=mHP + pHP
  1529. $ TVP=TVP + pTVP
  1530. $ mTVP=mTVP + pTVP
  1531. $
  1532. $ unit'li''lj'=temp + f$str(arm) + "|Vedelem:" + f$str(def) + "|Sebzes:" + f$str(dmg) + "|Tamadas:" + f$st(att) + "|HP:" + f$st(HP) + "/" + f$st(mHP) + "|Lepes:" + f$st(TVP) + "/" + f$st(mTVP) + "|" + ifatt + "|Szint:" + f$st(Lvl)+"|XP:"+f$st(XP)
  1533. $
  1534. $ del/sy li
  1535. $ del/sy lj
  1536. $
  1537. $ return
  1538. $
  1539. $
  1540.  
  1541.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement