atakA 6.5 KB

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