425_KGOLfight 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. # KGOLfight
  2. <<<<<<< 425_KGOLfight
  3. minut += 1
  4. gs 'stat'
  5. if otkathirki > 0: otkathirki -= 1
  6. if KGHP < KGHPMAX and KGOLhirka > 0 and otkathirki <= 0:
  7. kghneed = KGHPMAX - KGHP
  8. otkathirki = 3
  9. if KGOLhirka >= kghneed:
  10. KGOLhirka -= kghneed
  11. KGHP = KGHPMAX
  12. else
  13. KGHP = KGOLhirka
  14. KGOLhirka = 0
  15. end
  16. end
  17. if KGOLdist < 0: KGOLdist = 0
  18. if KGOLtimer > 0:
  19. KGOLtimer -= 1
  20. if KGOLtimer <= 0:
  21. KGOLbrona -= KGOLbronaMod
  22. KGOLbronaMod = 0
  23. KGOLstren -= KGOLstrenMod
  24. KGOLstrenMod = 0
  25. KGOLspeed -= KGOLspeedMod
  26. KGOLspeedMod = 0
  27. KGOLvital -= KGOLvitalMod
  28. KGOLvitalMod = 0
  29. KGOLintel -= KGOLintelMod
  30. KGOLintelMod = 0
  31. KGOLwpower -= KGOLwpowerMod
  32. KGOLwpowerMod = 0
  33. end
  34. end
  35. if unvis > 0: 'You are invisible'
  36. if poison > 0: poison -= 1 & KGHPV -= KGOLspell4 * 10 & 'The poison causes damage to the enemy <<KGOLspell4*10>>'
  37. if firecircle > 0: firecircle -= 1 & KGHPV -= KGOLspell9 * 50 & 'Circle of fire causes damage to the enemy <<KGOLspell9*50>>'
  38. 'Life <<KGHP>>, the manna <<KGManna>>'
  39. '<<$KGname>> Life <<KGHPV>>manna <<KGMannaV>>'
  40. if KGOLhirka > 0: 'Hirka can restore automatically <<KGOLhirka>> health units'
  41. if otkathirki > 0: 'Hirka retrace through <<otkathirki>> moves.'
  42. 'Distance <<KGOLdist>>'
  43. if KGOLtimer > 0: 'Obkast will act more <<KGOLtimer>> Rounds'
  44. if KGOLcooldown > 0: 'Rollback skills completed by <<KGOLcooldown>> Rounds'
  45. !конец боя
  46. if KGHP <= 0:
  47. KGOLloss += 1
  48. poison = 0
  49. firecircle = 0
  50. manna -= 100
  51. 'You lost the fight'
  52. act 'Go to Rep.': gt 'KGOLgame'
  53. =======
  54. minut+=1
  55. gs'stat'
  56. if otkathirki>0:otkathirki-=1
  57. if KGHP<KGHPMAX and KGOLhirka>0 and otkathirki<=0:
  58. kghneed=KGHPMAX-KGHP
  59. otkathirki=3
  60. if KGOLhirka>=kghneed:
  61. KGOLhirka-=kghneed
  62. KGHP=KGHPMAX
  63. else
  64. KGHP=KGOLhirka
  65. KGOLhirka=0
  66. end
  67. end
  68. if KGOLdist<0:KGOLdist=0
  69. if KGOLtimer>0:
  70. KGOLtimer-=1
  71. if KGOLtimer<=0:
  72. KGOLbrona-=KGOLbronaMod
  73. KGOLbronaMod=0
  74. KGOLstren-=KGOLstrenMod
  75. KGOLstrenMod=0
  76. KGOLspeed-=KGOLspeedMod
  77. KGOLspeedMod=0
  78. KGOLvital-=KGOLvitalMod
  79. KGOLvitalMod=0
  80. KGOLintel-=KGOLintelMod
  81. KGOLintelMod=0
  82. KGOLwpower-=KGOLwpowerMod
  83. KGOLwpowerMod=0
  84. end
  85. end
  86. if unvis>0:'you are invisible'
  87. if poison>0:poison-=1&KGHPV-=KGOLspell4*10&'The poison causes damage to the enemy <<KGOLspell4*10>>'
  88. if firecircle>0:firecircle-=1&KGHPV-=KGOLspell9*50&'Circle of fire causes damage to the enemy <<KGOLspell9*50>>'
  89. 'life <<KGHP>>, manna <<KGManna>>'
  90. '<<$KGname>> life <<KGHPV>>, manna <<KGMannaV>>'
  91. if KGOLhirka>0:'Khirqa can recover automatically <<KGOLhirka>> health units'
  92. if otkathirki>0:'Khirqa retrace through <<otkathirki>> moves.'
  93. 'distance <<KGOLdist>>'
  94. if KGOLtimer>0:'Obkast will act more <<KGOLtimer>> Rounds'
  95. if KGOLcooldown>0:'Rollback skills completed in <<KGOLcooldown>> Rounds'
  96. !end of the fight
  97. if KGHP<=0:
  98. KGOLloss+=1
  99. poison=0
  100. firecircle=0
  101. manna-=100
  102. 'You lost the fight'
  103. act 'Leave for rep':gt'KGOLgame'
  104. >>>>>>> 425_KGOLfight
  105. exit
  106. end
  107. <<<<<<< 425_KGOLfight
  108. if KGHPV <= 0:
  109. poison = 0
  110. firecircle = 0
  111. KGOLWin += 1
  112. KGOLmoney += KGOLPrizeM
  113. KGOLexp += KGOLPrizeExp
  114. manna += 100
  115. '<<$KGname>> fell. You win the fight.'
  116. 'You got <<KGOLPrizeM>> coins and <<KGOLPrizeExp>> experience'
  117. if KGOLennumBoss = 1 and boss5lvl = 0: boss5lvl = 1 & KGOLhirka += 5000 & 'With boss tumbled small hirka'
  118. if KGOLennum = 0 and KGOLmqw = 1: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  119. if KGOLennum = 1 and KGOLmqw = 3: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  120. if KGOLennum = 2 and KGOLmqw = 5: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  121. if KGOLennum = 3 and KGOLmqw = 7: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  122. if KGOLennum = 4 and KGOLmqw = 9: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  123. if KGOLennum = 5 and KGOLmqw = 11: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  124. if KGOLennum = 6 and KGOLmqw = 13: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  125. act 'Disengage': gt 'KGOLgame'
  126. =======
  127. if KGHPV<=0:
  128. poison=0
  129. firecircle=0
  130. KGOLWin+=1
  131. KGOLmoney+=KGOLPrizeM
  132. KGOLexp+=KGOLPrizeExp
  133. manna+=100
  134. '<<$KGname>> down. You win the fight.'
  135. 'you got <<KGOLPrizeM>> coins and <<KGOLPrizeExp>> experience'
  136. if KGOLennumBoss=1 and boss5lvl=0:boss5lvl=1&KGOLhirka+=5000&'With boss fell out small Khirqa'
  137. if KGOLennum=0 and KGOLmqw=1:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
  138. if KGOLennum=1 and KGOLmqw=3:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
  139. if KGOLennum=2 and KGOLmqw=5:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
  140. if KGOLennum=3 and KGOLmqw=7:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
  141. if KGOLennum=4 and KGOLmqw=9:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
  142. if KGOLennum=5 and KGOLmqw=11:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
  143. if KGOLennum=6 and KGOLmqw=13:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
  144. act 'Out of combat':gt'KGOLgame'
  145. >>>>>>> 425_KGOLfight
  146. exit
  147. end
  148. <<<<<<< 425_KGOLfight
  149. !инициатива
  150. KGOLiniV = RAND(KGOLspeedV/2, KGOLspeedV * 2)
  151. KGOLini = RAND(KGOLspeed/2, KGOLspeed * 2)
  152. if KGOLini = KGOLiniV:
  153. hodrand = RAND(0,1)
  154. if hodrand = 0: KGOLini = 1 & KGOLiniV = 0
  155. if hodrand = 1: KGOLini = 0 & KGOLiniV = 1
  156. end
  157. if KGOLini > KGOLiniV: KGOLiniSUM += 1
  158. if KGOLini < KGOLiniV: KGOLiniSUM -= 1
  159. if KGOLiniSUM > 3: KGOLini = 0 & KGOLiniV = 1 & KGOLiniSUM = 0
  160. if KGOLiniSUM<-3: KGOLini = 1 & KGOLiniV = 0 & KGOLiniSUM = 0
  161. !ходы
  162. if KGOLini > KGOLiniV or unvis > 0:
  163. 'Now your turn'
  164. if KGOLklass = 1:
  165. !воин
  166. if KGOLdist < 3:
  167. act 'Attack':
  168. cla
  169. KGOLpower = KGOLstren + KGOLwpower
  170. dynamic $KGOLatk
  171. act 'Further': gt $curloc
  172. end
  173. if KGOLspell > 0 and KGManna >= KGOLspell * 10:
  174. act 'Powerful blow (<<KGOLspell*10>> manna)':
  175. cla
  176. KGManna -= KGOLspell
  177. KGOLpower = KGOLstren + KGOLwpower+(KGOLspell * 100)
  178. dynamic $KGOLatk
  179. act 'Further': gt $curloc
  180. end
  181. end
  182. if KGOLspell2 > 0 and KGManna >= KGOLspell2 * 10:
  183. act 'Multiple shot (<<KGOLspell2*10>> manna)':
  184. cla
  185. KGManna -= KGOLspell2
  186. KGOLpower = KGOLstren + KGOLwpower
  187. KGLOloop = KGOLspell2 + 1
  188. dynamic $KGOLatkKGOLspell2
  189. act 'Further': gt $curloc
  190. end
  191. end
  192. if KGOLspell3 > 0 and KGManna >= KGOLspell3 * 10 and KGOLcooldown <= 0:
  193. act 'Increase armor (<<KGOLspell3*10>> manna)':
  194. cla
  195. KGManna -= KGOLspell3
  196. KGOLbronaMod += KGOLspell3 * 5
  197. KGOLtimer += KGOLspell3 + 1
  198. KGOLcooldown += KGOLspell3 + 3
  199. act 'Further': gt $curloc
  200. end
  201. end
  202. end
  203. elseif KGOLklass = 2:
  204. !вор
  205. if KGOLdist < 5:
  206. act 'Attack':
  207. cla
  208. KGOLpower = KGOLstren + KGOLwpower
  209. dynamic $KGOLatk
  210. act 'Further': gt $curloc
  211. end
  212. if KGOLspell4 > 0 and KGManna >= KGOLspell4 * 10:
  213. act 'Sneaky shot (<<KGOLspell4*10>> manna)':
  214. cla
  215. KGManna -= KGOLspell4
  216. KGOLpower = KGOLstren + KGOLwpower+(KGOLspell5 * 100)
  217. dynamic $KGOLatk
  218. act 'Further': gt $curloc
  219. end
  220. end
  221. if KGOLspell5 > 0 and KGManna >= KGOLspell5 * 10:
  222. act 'Poison Blade (<<KGOLspell5*10>>manna)':
  223. cla
  224. KGManna -= KGOLspell5
  225. KGOLpower = KGOLstren + KGOLwpower
  226. dynamic $KGOLatkPoison
  227. act 'Further': gt $curloc
  228. end
  229. end
  230. if KGOLspell6 > 0 and KGManna >= KGOLspell6 * 10 and KGOLcooldown <= 0:
  231. act 'Invisibility (<<KGOLspell6*10>> manna)':
  232. cla
  233. KGManna -= KGOLspell6
  234. unvis += KGOLspell6 + 1
  235. KGOLcooldown += KGOLspell6 + 3
  236. act 'Further': gt $curloc
  237. end
  238. end
  239. end
  240. elseif KGOLklass = 3:
  241. !маг
  242. act 'Attack':
  243. cla
  244. KGOLpower = KGOLintel + KGOLwpower
  245. dynamic $KGOLatk
  246. act 'Further': gt $curloc
  247. end
  248. if KGOLspell7 > 0 and KGManna >= KGOLspell7 * 10:
  249. act 'Faerboll (<<KGOLspell7*10>> manna)':
  250. cla
  251. KGManna -= KGOLspell7
  252. KGOLpower = RAND(KGOLspell7 * 100, KGOLspell7 * 200)
  253. dynamic $KGOLatkFB
  254. act 'Further': gt $curloc
  255. end
  256. end
  257. if KGOLspell8 > 0 and KGManna >= KGOLspell8 * 10:
  258. act 'Dropping (<<KGOLspell5*10>> manna)':
  259. cla
  260. KGManna -= KGOLspell5
  261. KGOLdist += RAND(KGOLspell5 * 10, KGOLspell5 * 50)
  262. 'You flung the enemy and now the distance between you <<KGOLdist>> meter'
  263. act 'Further': gt $curloc
  264. end
  265. end
  266. if KGOLspell9 > 0 and KGManna >= KGOLspell9 * 10 and KGOLcooldown <= 0:
  267. act 'Circle of fire (<<KGOLspell9*10>> manna)':
  268. cla
  269. KGManna -= KGOLspell9
  270. firecircle += KGOLspell9 + 1
  271. KGOLcooldown += KGOLspell9 + 3
  272. 'Everything around you is burning hellfire'
  273. act 'Further': gt $curloc
  274. end
  275. end
  276. elseif KGOLklass = 4:
  277. !жрец
  278. act 'Attack':
  279. cla
  280. KGOLpower = KGOLintel + KGOLwpower
  281. dynamic $KGOLatk
  282. act 'Further': gt $curloc
  283. end
  284. elseif KGOLklass = 5:
  285. !лучник
  286. act 'Attack':
  287. cla
  288. KGOLpower = KGOLspeed + KGOLwpower
  289. dynamic $KGOLatk
  290. act 'Further': gt $curloc
  291. end
  292. else
  293. !варвар
  294. if KGOLdist < 2:
  295. act 'Attack':
  296. cla
  297. KGOLpower = KGOLstren + KGOLwpower
  298. dynamic $KGOLatk
  299. act 'Further': gt $curloc
  300. end
  301. end
  302. end
  303. if KGOLdist > 0:
  304. act 'Flee to the enemy':
  305. KGOLdist -= RAND(KGOLspeed/20, KGOLspeed/10)
  306. gt $curloc
  307. end
  308. end
  309. act 'Flee from the enemy':
  310. KGOLdist += RAND(KGOLspeed/20, KGOLspeed/10)
  311. gt $curloc
  312. end
  313. if KGOLpotionH > 0:
  314. act 'Drink a health potion':
  315. KGOLpotionH -= 1
  316. KGHP += 100
  317. gt $curloc
  318. end
  319. end
  320. if KGOLpotionM > 0:
  321. act 'Drink the potion manna':
  322. KGOLpotionM -= 1
  323. KGManna += 100
  324. gt $curloc
  325. end
  326. end
  327. else
  328. 'Now opponents'
  329. if KGOLdist <= KGOLneedDist:
  330. '<<$KGname>> attacks you'
  331. dynamic $KGOLatkV
  332. else
  333. KGOLdist -= RAND(KGOLspeedV/20, KGOLspeedV/10)
  334. '<<$KGname>> running toward you'
  335. end
  336. act 'Further': gt $curloc
  337. end
  338. =======
  339. !initiative
  340. KGOLiniV=RAND(KGOLspeedV/2,KGOLspeedV*2)
  341. KGOLini=RAND(KGOLspeed/2,KGOLspeed*2)
  342. if KGOLini=KGOLiniV:
  343. hodrand=RAND(0,1)
  344. if hodrand=0:KGOLini=1&KGOLiniV=0
  345. if hodrand=1:KGOLini=0&KGOLiniV=1
  346. end
  347. if KGOLini>KGOLiniV:KGOLiniSUM+=1
  348. if KGOLini<KGOLiniV:KGOLiniSUM-=1
  349. if KGOLiniSUM>3:KGOLini=0&KGOLiniV=1&KGOLiniSUM=0
  350. if KGOLiniSUM<-3:KGOLini=1&KGOLiniV=0&KGOLiniSUM=0
  351. !moves
  352. if KGOLini>KGOLiniV or unvis>0:
  353. 'Now your turn'
  354. if KGOLklass=1:
  355. !warrior
  356. if KGOLdist<3:
  357. act 'attack':
  358. cla
  359. KGOLpower=KGOLstren+KGOLwpower
  360. dynamic $KGOLatk
  361. act 'further':gt $curloc
  362. end
  363. if KGOLspell>0 and KGManna>=KGOLspell*10:
  364. act 'powerful blow (<<KGOLspell*10>> manna)':
  365. cla
  366. KGManna-=KGOLspell
  367. KGOLpower=KGOLstren+KGOLwpower+(KGOLspell*100)
  368. dynamic $KGOLatk
  369. act 'further':gt $curloc
  370. end
  371. end
  372. if KGOLspell2>0 and KGManna>=KGOLspell2*10:
  373. act 'multiple punch (<<KGOLspell2*10>> manna)':
  374. cla
  375. KGManna-=KGOLspell2
  376. KGOLpower=KGOLstren+KGOLwpower
  377. KGLOloop=KGOLspell2+1
  378. dynamic $KGOLatkKGOLspell2
  379. act 'further':gt $curloc
  380. end
  381. end
  382. if KGOLspell3>0 and KGManna>=KGOLspell3*10 and KGOLcooldown<=0:
  383. act 'increase armor (<<KGOLspell3*10>> manna)':
  384. cla
  385. KGManna-=KGOLspell3
  386. KGOLbronaMod+=KGOLspell3*5
  387. KGOLtimer+=KGOLspell3+1
  388. KGOLcooldown+=KGOLspell3+3
  389. act 'further':gt $curloc
  390. end
  391. end
  392. end
  393. elseif KGOLklass=2:
  394. !thief
  395. if KGOLdist<5:
  396. act 'attack':
  397. cla
  398. KGOLpower=KGOLstren+KGOLwpower
  399. dynamic $KGOLatk
  400. act 'further':gt $curloc
  401. end
  402. if KGOLspell4>0 and KGManna>=KGOLspell4*10:
  403. act 'sneaky punch (<<KGOLspell4*10>> manna)':
  404. cla
  405. KGManna-=KGOLspell4
  406. KGOLpower=KGOLstren+KGOLwpower+(KGOLspell5*100)
  407. dynamic $KGOLatk
  408. act 'further':gt $curloc
  409. end
  410. end
  411. if KGOLspell5>0 and KGManna>=KGOLspell5*10:
  412. act 'Poison Blade (<<KGOLspell5*10>> manna)':
  413. cla
  414. KGManna-=KGOLspell5
  415. KGOLpower=KGOLstren+KGOLwpower
  416. dynamic $KGOLatkPoison
  417. act 'further':gt $curloc
  418. end
  419. end
  420. if KGOLspell6>0 and KGManna>=KGOLspell6*10 and KGOLcooldown<=0:
  421. act 'invisibility (<<KGOLspell6*10>> manna)':
  422. cla
  423. KGManna-=KGOLspell6
  424. unvis+=KGOLspell6+1
  425. KGOLcooldown+=KGOLspell6+3
  426. act 'further':gt $curloc
  427. end
  428. end
  429. end
  430. elseif KGOLklass=3:
  431. !magician
  432. act 'attack':
  433. cla
  434. KGOLpower=KGOLintel+KGOLwpower
  435. dynamic $KGOLatk
  436. act 'further':gt $curloc
  437. end
  438. if KGOLspell7>0 and KGManna>=KGOLspell7*10:
  439. act 'Faerboll (<<KGOLspell7*10>> manna)':
  440. cla
  441. KGManna-=KGOLspell7
  442. KGOLpower=RAND(KGOLspell7*100,KGOLspell7*200)
  443. dynamic $KGOLatkFB
  444. act 'further':gt $curloc
  445. end
  446. end
  447. if KGOLspell8>0 and KGManna>=KGOLspell8*10:
  448. act 'Dropping (<<KGOLspell5*10>> manna)':
  449. cla
  450. KGManna-=KGOLspell5
  451. KGOLdist+=RAND(KGOLspell5*10,KGOLspell5*50)
  452. 'You flung the enemy and now the distance between you <<KGOLdist>> meters'
  453. act 'further':gt $curloc
  454. end
  455. end
  456. if KGOLspell9>0 and KGManna>=KGOLspell9*10 and KGOLcooldown<=0:
  457. act 'circle of fire (<<KGOLspell9*10>> manna)':
  458. cla
  459. KGManna-=KGOLspell9
  460. firecircle+=KGOLspell9+1
  461. KGOLcooldown+=KGOLspell9+3
  462. 'All around you is burning flames of hell'
  463. act 'further':gt $curloc
  464. end
  465. end
  466. elseif KGOLklass=4:
  467. !priest
  468. act 'attack':
  469. cla
  470. KGOLpower=KGOLintel+KGOLwpower
  471. dynamic $KGOLatk
  472. act 'further':gt $curloc
  473. end
  474. elseif KGOLklass=5:
  475. !archer
  476. act 'attack':
  477. cla
  478. KGOLpower=KGOLspeed+KGOLwpower
  479. dynamic $KGOLatk
  480. act 'further':gt $curloc
  481. end
  482. else
  483. !barbarian
  484. if KGOLdist<2:
  485. act 'attack':
  486. cla
  487. KGOLpower=KGOLstren+KGOLwpower
  488. dynamic $KGOLatk
  489. act 'further':gt $curloc
  490. end
  491. end
  492. end
  493. if KGOLdist>0:
  494. act 'Run to the enemy':
  495. KGOLdist-=RAND(KGOLspeed/20,KGOLspeed/10)
  496. gt $curloc
  497. end
  498. end
  499. act 'Run away from the enemy':
  500. KGOLdist+=RAND(KGOLspeed/20,KGOLspeed/10)
  501. gt $curloc
  502. end
  503. if KGOLpotionH>0:
  504. act 'Drink a health potion':
  505. KGOLpotionH-=1
  506. KGHP+=100
  507. gt $curloc
  508. end
  509. end
  510. if KGOLpotionM>0:
  511. act 'Drink the potion of mana':
  512. KGOLpotionM-=1
  513. KGManna+=100
  514. gt $curloc
  515. end
  516. end
  517. else
  518. 'Now move the enemy'
  519. if KGOLdist<=KGOLneedDist:
  520. '<<$KGname>> attacks you'
  521. dynamic $KGOLatkV
  522. else
  523. KGOLdist-=RAND(KGOLspeedV/20,KGOLspeedV/10)
  524. '<<$KGname>> run to you'
  525. end
  526. act 'further':gt $curloc
  527. end
  528. >>>>>>> 425_KGOLfight
  529. --- KGOLfight ---------------------------------