atakA.qsrc 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. # atakA
  2. menu_off = 1
  3. if $ARGS[0] = 'atak':
  4. cla
  5. !payment hit dodge
  6. poSp = speed * 20 / 100
  7. uvAg = agilV * 20 / 100
  8. poBox = pcs_react * 20 / 100
  9. uvBox = reactV * 20 / 100
  10. popad = RAND(pcs_react - poBox,pcs_react + poBox) + RAND(speed - poSp,speed + poSp) + bonusSh
  11. uvorot = RAND(reactV - uvBox,reactV + uvBox) + RAND(agilV - uvAg,agilV + uvAg)
  12. uvorKoef = uvorot * 50 / 100
  13. popKoef = popad * 50 / 100
  14. if popad > uvorot:
  15. if popad >= uvorot + uvorKoef:
  16. !Crete, very direct hit
  17. '<b><font color = green>Critical hits</font></b>'
  18. xgt'atakA','uronKrit'
  19. elseif popad < uvorot+uvorKoef:
  20. !Normal hit
  21. !He attacks the enemy
  22. '<b><font color = green>EYE</font></b>'
  23. xgt'atakA','uron'
  24. end
  25. elseif popad <= uvorot:
  26. '<b><font color = red>LOST</font></b>'
  27. xgt'fight','sta'
  28. end
  29. end
  30. if $ARGS[0] = 'uronKrit':
  31. cla
  32. damKoef = damTip*20/100
  33. damage = RAND(damTip+damKoef,damTip+damKoef*2)
  34. if damTipM > 0:
  35. damKoefM = damTipM*20/100
  36. damageM = RAND(damTipM+damKoefM,damTipM+damKoefM*2)
  37. end
  38. xgt'atakA','damage'
  39. end
  40. if $ARGS[0] = 'uron':
  41. cla
  42. damKoef = damTip*20/100
  43. damage = RAND(damTip-damKoef,damTip+damKoef)
  44. if damTipM > 0:
  45. damKoefM = damTipM*20/100
  46. damageM = RAND(damTipM-damKoefM,damTipM+damKoefM)
  47. end
  48. xgt'atakA','damage'
  49. end
  50. if $ARGS[0] = 'damage':
  51. cla
  52. if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
  53. if dospehV > 0:damageV = damageV - dospehDefV & dospehEn = dospehEn - 1
  54. if damage < 0:damage = 0
  55. healthV = healthV - damage
  56. if damTipM > 0:
  57. manaV = manaV - damageM
  58. pcs_mana = pcs_mana + damageM
  59. '<b><font color = green>You swallowed <<damageM>> mana enemy units.</font></b>'
  60. end
  61. !pcs_mana = pcs_mana - damageM
  62. if eleSh > 0:
  63. stunV = RAND(eleSh,eleSh*3)
  64. '<b><font color = green><<$boydesc>> paralyzed <<stunV>> Rounds</font></b>'
  65. end
  66. '<b><font color = green>You have caused damage <<damage>> units</font></b>'
  67. !'<b><font color = red>Your mana harmed <<damageM>> units</font></b>'
  68. if zerkaloV > 0:
  69. zerkaloV = zerkaloV - 1
  70. pcs_health = pcs_health - damage
  71. '<b><font color = red><<$boydesc>> reflected the damage and you get <<damage>> points of damage</font></b>'
  72. end
  73. xgt'fight','sta'
  74. end
  75. if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
  76. !damSum = damage + damageM
  77. !defence = defence - damSum
  78. defenceV = defenceV - damage
  79. '<b><font color = green>You have caused damage <<damage>> Protection of enemy units</font></b>'
  80. xgt'fight','sta'
  81. end
  82. if klonV > 0 and unmaterialV <= 0:
  83. klonV = klonV - 1
  84. '<b><font color = green>Destroyed enemy clone</font></b>'
  85. xgt'fight','sta'
  86. end
  87. if unmaterialV > 0:
  88. unmaterialV = unmaterialV - 1
  89. '<b><font color = red>Your blow has passed through the body of the enemy. Opponents do not materials</font></b>'
  90. xgt'fight','sta'
  91. end
  92. if barierV > 0:
  93. !imeniteta barrier for damage
  94. if barierV >= damage:
  95. '<b><font color = red><<$boydesc>> easily weathered blow your</font></b>'
  96. xgt'fight','sta'
  97. elseif barierV < damage:
  98. !pcs_mana = pcs_mana - damageM
  99. !pcs_health = pcs_health - damage
  100. damage = damage - barierV
  101. healthV = healthV - damage
  102. if damTipM > 0:
  103. manaV = manaV - damageM
  104. pcs_mana = pcs_mana + damageM
  105. '<b><font color = green>You swallowed <<damageM>> mana enemy units.</font></b>'
  106. end
  107. if eleSh > 0:
  108. stunV = RAND(eleSh,eleSh*3)
  109. '<b><font color = green><<$boydesc>> paralyzed <<stunV>> Rounds</font></b>'
  110. end
  111. '<b><font color = green>You have caused damage <<damage>> units</font></b>'
  112. !'<b><font color = red>Your mana harmed <<damageM>> units</font></b>'
  113. if zerkaloV > 0:
  114. zerkaloV = zerkaloV - 1
  115. pcs_health = pcs_health - damage
  116. '<b><font color = red>Opponent reflected damage and you get <<damage>> points of damage</font></b>'
  117. end
  118. end
  119. xgt'fight','sta'
  120. end
  121. end
  122. if $ARGS[0] = 'atakW':
  123. cla
  124. !payment hit dodge
  125. poSp = speed * 20 / 100
  126. uvAg = agilV * 20 / 100
  127. poBox = pcs_react * 20 / 100
  128. uvBox = reactV * 20 / 100
  129. popad = RAND(pcs_react - poBox,pcs_react + poBox) + RAND(speed - poSp,speed + poSp)
  130. uvorot = RAND(reactV - uvBox,reactV + uvBox) + RAND(agilV - uvAg,agilV + uvAg)
  131. uvorKoef = uvorot * 50 / 100
  132. popKoef = popad * 50 / 100
  133. if popad > uvorot:
  134. if popad >= uvorot+uvorKoef:
  135. !Crete, very direct hit
  136. '<b><font color = red>Critical hits</font></b>'
  137. xgt'atakA','uronKritW'
  138. elseif popad < uvorot+uvorKoef:
  139. !Normal hit
  140. '<b><font color = red>EYE</font></b>'
  141. xgt'atakA','uronW'
  142. end
  143. elseif popad <= uvorot:
  144. '<b><font color = green>LOST</font></b>'
  145. xgt'fight','sta'
  146. end
  147. end
  148. if $ARGS[0] = 'uronKritW':
  149. cla
  150. damKoef = damTip*20/100
  151. damage = RAND(damTip+damKoef,damTip+damKoef*2)
  152. damKoefM = damTipM*20/100
  153. damageM = RAND(damTipM+damKoefM,damTipM+damKoefM*2)
  154. xgt'atakA','damageW'
  155. end
  156. if $ARGS[0] = 'uronW':
  157. cla
  158. damKoef = damTip*20/100
  159. damage = RAND(damTip-damKoef,damTip+damKoef)
  160. damKoefM = damTipM*20/100
  161. damageM = RAND(damTipM-damKoefM,damTipM+damKoefM)
  162. xgt'atakA','damageW'
  163. end
  164. if $ARGS[0] = 'damageW':
  165. cla
  166. if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
  167. if dospehV > 0:damageV = damageV - dospehDefV & dospehEn = dospehEn - 1
  168. if damage < 0:damage = 0
  169. healthV = healthV - damage
  170. manaV = manaV - damageM
  171. '<b><font color = green>You harmed <<damage>> units</font></b>'
  172. '<b><font color = green>You have caused damage to the enemy mana <<damageM>> units</font></b>'
  173. if zerkaloV > 0:
  174. zerkaloV = zerkaloV - 1
  175. pcs_health = pcs_health - damage
  176. '<b><font color = red><<$boydesc>> reflected the damage and you get <<damage>> points of damage</font></b>'
  177. end
  178. xgt'fight','sta'
  179. end
  180. if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
  181. damSum = damage + damageM
  182. defenceV = defenceV - damSum
  183. !defenceV = defenceV - damage
  184. '<b><font color = green>You have caused damage <<damSum>> Protection of enemy units</font></b>'
  185. xgt'fight','sta'
  186. end
  187. if klonV > 0 and unmaterialV <= 0:
  188. klonV = klonV - 1
  189. '<b><font color = green>Destroyed enemy clone</font></b>'
  190. xgt'fight','sta'
  191. end
  192. if unmaterialV > 0:
  193. unmaterialV = unmaterialV - 1
  194. '<b><font color = red>Your blow has passed through the body of the enemy. Opponents do not materials</font></b>'
  195. xgt'fight','sta'
  196. end
  197. if barierV > 0:
  198. !imeniteta barrier for damage
  199. if barierV >= damage:
  200. '<b><font color = red><<$boydesc>> easily weathered blow your</font></b>'
  201. xgt'fight','sta'
  202. elseif barierV < damage:
  203. manaV = manaV - damageM
  204. healthV = healthV - damage
  205. !healthV = healthV - damage
  206. '<b><font color = green>You have caused damage <<damage>> units</font></b>'
  207. '<b><font color = green>You have caused damage to the enemy mana <<damageM>> units</font></b>'
  208. if zerkaloV > 0:
  209. zerkaloV = zerkaloV - 1
  210. pcs_health = pcs_health - damage
  211. '<b><font color = red>Opponent reflected damage and you get <<damage>> points of damage</font></b>'
  212. end
  213. end
  214. xgt'fight','sta'
  215. end
  216. end
  217. --- atakA ---------------------------------