atakA 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. !He attacks the enemy
  21. '<b><font color = green>EYE</font></b>'
  22. xgt'atakA','uron'
  23. end
  24. elseif popad <= uvorot:
  25. '<b><font color = red>LOST</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 = damageV - dospehDefV & dospehEn = dospehEn - 1
  53. if damage < 0:damage = 0
  54. healthV = healthV - damage
  55. if damTipM > 0:
  56. mannaV = mannaV - damageM
  57. manna = manna + damageM
  58. '<b><font color = green>You swallowed <<damageM>> manna enemy units.</font></b>'
  59. end
  60. !manna = manna - damageM
  61. if eleSh > 0:
  62. stunV = RAND(eleSh,eleSh*3)
  63. '<b><font color = green><<$boy>> 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>Your manna harmed <<damageM>> units</font></b>'
  67. if zerkaloV > 0:
  68. zerkaloV = zerkaloV - 1
  69. health = health - damage
  70. '<b><font color = red><<$boy>> reflected the damage and you get <<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 = defence - damSum
  77. defenceV = defenceV - damage
  78. '<b><font color = green>You have caused damage <<damage>> Protection of enemy units</font></b>'
  79. xgt'fight','sta'
  80. end
  81. if klonV > 0 and unmaterialV <= 0:
  82. klonV = klonV - 1
  83. '<b><font color = green>Destroyed enemy clone</font></b>'
  84. xgt'fight','sta'
  85. end
  86. if unmaterialV > 0:
  87. unmaterialV = unmaterialV - 1
  88. '<b><font color = red>Your blow has passed through the body of the enemy. 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><<$boy>> easily weathered blow your</font></b>'
  95. xgt'fight','sta'
  96. elseif barierV < damage:
  97. !manna = manna - damageM
  98. !health = health - damage
  99. damage = damage - barierV
  100. healthV = healthV - damage
  101. if damTipM > 0:
  102. mannaV = mannaV - damageM
  103. manna = manna + damageM
  104. '<b><font color = green>You swallowed <<damageM>> manna enemy units.</font></b>'
  105. end
  106. if eleSh > 0:
  107. stunV = RAND(eleSh,eleSh*3)
  108. '<b><font color = green><<$boy>> 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>Your manna harmed <<damageM>> units</font></b>'
  112. if zerkaloV > 0:
  113. zerkaloV = zerkaloV - 1
  114. health = health - damage
  115. '<b><font color = red>Opponent reflected damage and you get <<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. elseif popad < uvorot+uvorKoef:
  138. !Normal hit
  139. '<b><font color = red>EYE</font></b>'
  140. xgt'atakA','uronW'
  141. end
  142. elseif popad <= uvorot:
  143. '<b><font color = green>LOST</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 = damageV - dospehDefV & dospehEn = dospehEn - 1
  167. if damage < 0:damage = 0
  168. healthV = healthV - damage
  169. mannaV = mannaV - damageM
  170. '<b><font color = green>You 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 = zerkaloV - 1
  174. health = health - damage
  175. '<b><font color = red><<$boy>> reflected the damage and you get <<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 = defenceV - damSum
  182. !defenceV = defenceV - damage
  183. '<b><font color = green>You have caused damage <<damSum>> Protection of enemy units</font></b>'
  184. xgt'fight','sta'
  185. end
  186. if klonV > 0 and unmaterialV <= 0:
  187. klonV = klonV - 1
  188. '<b><font color = green>Destroyed enemy clone</font></b>'
  189. xgt'fight','sta'
  190. end
  191. if unmaterialV > 0:
  192. unmaterialV = unmaterialV - 1
  193. '<b><font color = red>Your blow has passed through the body of the enemy. 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><<$boy>> easily weathered blow your</font></b>'
  200. xgt'fight','sta'
  201. elseif barierV < damage:
  202. mannaV = mannaV - damageM
  203. healthV = healthV - damage
  204. !healthV = 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 = zerkaloV - 1
  209. health = health - damage
  210. '<b><font color = red>Opponent reflected damage and you get <<damage>> points of damage</font></b>'
  211. end
  212. end
  213. xgt'fight','sta'
  214. end
  215. end
  216. --- atakA ---------------------------------