053_atakA 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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 ---------------------------------