1
0

KGOLfight.qsrc 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. # KGOLfight
  2. minut += 1
  3. gs 'stat'
  4. if otkathirki > 0:otkathirki -= 1
  5. if KGHP < KGHPMAX and KGOLhirka > 0 and otkathirki <= 0:
  6. kghneed = KGHPMAX - KGHP
  7. otkathirki = 3
  8. if KGOLhirka >= kghneed:
  9. KGOLhirka -= kghneed
  10. KGHP = KGHPMAX
  11. else
  12. KGHP = KGOLhirka
  13. KGOLhirka = 0
  14. end
  15. end
  16. if KGOLdist < 0:KGOLdist = 0
  17. if KGOLtimer > 0:
  18. KGOLtimer -= 1
  19. if KGOLtimer <= 0:
  20. KGOLbrona -= KGOLbronaMod
  21. KGOLbronaMod = 0
  22. KGOLstren -= KGOLstrenMod
  23. KGOLstrenMod = 0
  24. KGOLspeed -= KGOLspeedMod
  25. KGOLspeedMod = 0
  26. KGOLvital -= KGOLvitalMod
  27. KGOLvitalMod = 0
  28. KGOLintel -= KGOLintelMod
  29. KGOLintelMod = 0
  30. KGOLwpower -= KGOLwpowerMod
  31. KGOLwpowerMod = 0
  32. end
  33. end
  34. if unvis > 0:'You are invisible'
  35. if poison > 0:poison -= 1 & KGHPV -= KGOLspell4 * 10 & 'The poison causes damage to the enemy <<KGOLspell4 * 10>>'
  36. if firecircle > 0:firecircle -= 1 & KGHPV -= KGOLspell9 * 50 & 'Circle of fire causes damage to the enemy <<KGOLspell9 * 50>>'
  37. 'Life <<KGHP>>, the mana <<KGMana>>'
  38. '<<$KGname>> Life <<KGHPV>>mana <<KGManaV>>'
  39. if KGOLhirka > 0:'Hirka can restore automatically <<KGOLhirka>> health units'
  40. if otkathirki > 0:'Hirka retrace through <<otkathirki>> moves.'
  41. 'Distance <<KGOLdist>>'
  42. if KGOLtimer > 0:'Obkast will act more <<KGOLtimer>> Rounds'
  43. if KGOLcooldown > 0:'Rollback skills completed by <<KGOLcooldown>> Rounds'
  44. !!end of fight
  45. if KGHP <= 0:
  46. KGOLloss += 1
  47. poison = 0
  48. firecircle = 0
  49. pcs_mana -= 100
  50. 'You lost the fight'
  51. act 'Go to Rep.':gt 'KGOLgame'
  52. exit
  53. end
  54. if KGHPV <= 0:
  55. poison = 0
  56. firecircle = 0
  57. KGOLWin += 1
  58. KGOLmoney += KGOLPrizeM
  59. KGOLexp += KGOLPrizeExp
  60. pcs_mana += 100
  61. '<<$KGname>> fell. You win the fight.'
  62. 'You got <<KGOLPrizeM>> coins and <<KGOLPrizeExp>> experience'
  63. if KGOLennumBoss = 1 and boss5lvl = 0:boss5lvl = 1 & KGOLhirka += 5000 & 'With boss tumbled small hirka'
  64. if KGOLennum = 0 and KGOLmqw = 1:KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  65. if KGOLennum = 1 and KGOLmqw = 3:KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  66. if KGOLennum = 2 and KGOLmqw = 5:KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  67. if KGOLennum = 3 and KGOLmqw = 7:KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  68. if KGOLennum = 4 and KGOLmqw = 9:KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  69. if KGOLennum = 5 and KGOLmqw = 11:KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  70. if KGOLennum = 6 and KGOLmqw = 13:KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
  71. act 'Disengage':gt 'KGOLgame'
  72. exit
  73. end
  74. !!initiative
  75. KGOLiniV = rand(KGOLspeedV / 2, KGOLspeedV * 2)
  76. KGOLini = rand(KGOLspeed / 2, KGOLspeed * 2)
  77. if KGOLini = KGOLiniV:
  78. hodrand = rand(0, 1)
  79. if hodrand = 0:KGOLini = 1 & KGOLiniV = 0
  80. if hodrand = 1:KGOLini = 0 & KGOLiniV = 1
  81. end
  82. if KGOLini > KGOLiniV:KGOLiniSUM += 1
  83. if KGOLini < KGOLiniV:KGOLiniSUM -= 1
  84. if KGOLiniSUM > 3:KGOLini = 0 & KGOLiniV = 1 & KGOLiniSUM = 0
  85. if KGOLiniSUM < -3:KGOLini = 1 & KGOLiniV = 0 & KGOLiniSUM = 0
  86. !!moves
  87. if KGOLini > KGOLiniV or unvis > 0:
  88. 'Now your turn'
  89. if KGOLklass = 1:
  90. !!warrior
  91. if KGOLdist < 3:
  92. act 'Attack':
  93. cla
  94. KGOLpower = KGOLstren + KGOLwpower
  95. dynamic $KGOLatk
  96. act 'Further':gt $curloc
  97. end
  98. if KGOLspell > 0 and KGMana >= KGOLspell * 10:
  99. act 'Powerful blow (<<KGOLspell * 10>> mana)':
  100. cla
  101. KGMana -= KGOLspell
  102. KGOLpower = KGOLstren + KGOLwpower+(KGOLspell * 100)
  103. dynamic $KGOLatk
  104. act 'Further':gt $curloc
  105. end
  106. end
  107. if KGOLspell2 > 0 and KGMana >= KGOLspell2 * 10:
  108. act 'Multiple shot (<<KGOLspell2 * 10>> mana)':
  109. cla
  110. KGMana -= KGOLspell2
  111. KGOLpower = KGOLstren + KGOLwpower
  112. KGLOloop = KGOLspell2 + 1
  113. dynamic $KGOLatkKGOLspell2
  114. act 'Further':gt $curloc
  115. end
  116. end
  117. if KGOLspell3 > 0 and KGMana >= KGOLspell3 * 10 and KGOLcooldown <= 0:
  118. act 'Increase armor (<<KGOLspell3 * 10>> mana)':
  119. cla
  120. KGMana -= KGOLspell3
  121. KGOLbronaMod += KGOLspell3 * 5
  122. KGOLtimer += KGOLspell3 + 1
  123. KGOLcooldown += KGOLspell3 + 3
  124. act 'Further':gt $curloc
  125. end
  126. end
  127. end
  128. elseif KGOLklass = 2:
  129. !!thief
  130. if KGOLdist < 5:
  131. act 'Attack':
  132. cla
  133. KGOLpower = KGOLstren + KGOLwpower
  134. dynamic $KGOLatk
  135. act 'Further':gt $curloc
  136. end
  137. if KGOLspell4 > 0 and KGMana >= KGOLspell4 * 10:
  138. act 'Sneaky shot (<<KGOLspell4 * 10>> mana)':
  139. cla
  140. KGMana -= KGOLspell4
  141. KGOLpower = KGOLstren + KGOLwpower+(KGOLspell5 * 100)
  142. dynamic $KGOLatk
  143. act 'Further':gt $curloc
  144. end
  145. end
  146. if KGOLspell5 > 0 and KGMana >= KGOLspell5 * 10:
  147. act 'Poison Blade (<<KGOLspell5 * 10>>mana)':
  148. cla
  149. KGMana -= KGOLspell5
  150. KGOLpower = KGOLstren + KGOLwpower
  151. dynamic $KGOLatkPoison
  152. act 'Further':gt $curloc
  153. end
  154. end
  155. if KGOLspell6 > 0 and KGMana >= KGOLspell6 * 10 and KGOLcooldown <= 0:
  156. act 'Invisibility (<<KGOLspell6 * 10>> mana)':
  157. cla
  158. KGMana -= KGOLspell6
  159. unvis += KGOLspell6 + 1
  160. KGOLcooldown += KGOLspell6 + 3
  161. act 'Further':gt $curloc
  162. end
  163. end
  164. end
  165. elseif KGOLklass = 3:
  166. !!magican
  167. act 'Attack':
  168. cla
  169. KGOLpower = KGOLintel + KGOLwpower
  170. dynamic $KGOLatk
  171. act 'Further':gt $curloc
  172. end
  173. if KGOLspell7 > 0 and KGMana >= KGOLspell7 * 10:
  174. act 'Faerboll (<<KGOLspell7 * 10>> mana)':
  175. cla
  176. KGMana -= KGOLspell7
  177. KGOLpower = rand(KGOLspell7 * 100, KGOLspell7 * 200)
  178. dynamic $KGOLatkFB
  179. act 'Further':gt $curloc
  180. end
  181. end
  182. if KGOLspell8 > 0 and KGMana >= KGOLspell8 * 10:
  183. act 'Dropping (<<KGOLspell5 * 10>> mana)':
  184. cla
  185. KGMana -= KGOLspell5
  186. KGOLdist += rand(KGOLspell5 * 10, KGOLspell5 * 50)
  187. 'You flung the enemy and now the distance between you <<KGOLdist>> meter'
  188. act 'Further':gt $curloc
  189. end
  190. end
  191. if KGOLspell9 > 0 and KGMana >= KGOLspell9 * 10 and KGOLcooldown <= 0:
  192. act 'Circle of fire (<<KGOLspell9 * 10>> mana)':
  193. cla
  194. KGMana -= KGOLspell9
  195. firecircle += KGOLspell9 + 1
  196. KGOLcooldown += KGOLspell9 + 3
  197. 'Everything around you is burning hellfire'
  198. act 'Further':gt $curloc
  199. end
  200. end
  201. elseif KGOLklass = 4:
  202. !!priest
  203. act 'Attack':
  204. cla
  205. KGOLpower = KGOLintel + KGOLwpower
  206. dynamic $KGOLatk
  207. act 'Further':gt $curloc
  208. end
  209. elseif KGOLklass = 5:
  210. !!archer
  211. act 'Attack':
  212. cla
  213. KGOLpower = KGOLspeed + KGOLwpower
  214. dynamic $KGOLatk
  215. act 'Further':gt $curloc
  216. end
  217. else
  218. !!barbarian
  219. if KGOLdist < 2:
  220. act 'Attack':
  221. cla
  222. KGOLpower = KGOLstren + KGOLwpower
  223. dynamic $KGOLatk
  224. act 'Further':gt $curloc
  225. end
  226. end
  227. end
  228. if KGOLdist > 0:
  229. act 'Flee to the enemy':
  230. KGOLdist -= rand(KGOLspeed/20, KGOLspeed/10)
  231. gt $curloc
  232. end
  233. end
  234. act 'Flee from the enemy':
  235. KGOLdist += rand(KGOLspeed/20, KGOLspeed/10)
  236. gt $curloc
  237. end
  238. if KGOLpotionH > 0:
  239. act 'Drink a health potion':
  240. KGOLpotionH -= 1
  241. KGHP += 100
  242. gt $curloc
  243. end
  244. end
  245. if KGOLpotionM > 0:
  246. act 'Drink the potion mana':
  247. KGOLpotionM -= 1
  248. KGMana += 100
  249. gt $curloc
  250. end
  251. end
  252. else
  253. 'Now opponents'
  254. if KGOLdist <= KGOLneedDist:
  255. '<<$KGname>> attacks you'
  256. dynamic $KGOLatkV
  257. else
  258. KGOLdist -= rand(KGOLspeedV/20, KGOLspeedV/10)
  259. '<<$KGname>> running toward you'
  260. end
  261. act 'Further':gt $curloc
  262. end
  263. --- KGOLfight ---------------------------------