1
0

051_atakA 7.1 KB

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