057_atakM 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. # atakM
  2. if $ARGS[0] = 'atakVmanna':
  3. cla
  4. !расчет попадания уворота
  5. set poSp = speedV * 20/100
  6. set uvAg = agil * 20/100
  7. set poBox = reactV * 20/100
  8. set uvBox = react * 20/100
  9. set popad = RAND(reactV - poBox, reactV + poBox) + RAND(speedV-poSp, speedV + poSp)
  10. set uvorot = RAND(react - uvBox, react + uvBox) + RAND(agil-uvAg, agil + 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 = red>critical hits</font></B>'
  17. xgt 'atakM','uronKritV'
  18. end
  19. if popad < uvorot+uvorKoef:
  20. !нормальное попадание
  21. !атаковал противник
  22. '<B><font color = red>Contact</font></B>'
  23. xgt 'atakM','uronV'
  24. end
  25. end
  26. if popad <= uvorot:
  27. '<B><font color = green>is washed</font></B>'
  28. xgt 'fight','sta'
  29. end
  30. end
  31. if $ARGS[0] = 'uronKritV':
  32. cla
  33. set damage = RAND(1000,2000)
  34. set damageM = RAND(1000,2000)
  35. if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
  36. if dospeh > 0: set damage -= dospehDef & set dospehEn -= 1
  37. if damage < 0: set damage = 0
  38. Set health -= damage
  39. Set manna -= damageM
  40. '<B><font color = red>caused damage your health <<damage>> units</font></B>'
  41. '<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  42. if zerkalo > 0:
  43. set zerkalo -= 1
  44. set healthV -= damage
  45. '<B><font color = green>You are repelled damage and <<$nameV>> to give <<damage>> points of damage</font></B>'
  46. end
  47. xgt 'fight','sta'
  48. end
  49. if defence > 0 and klon <= 0 and unmaterial <= 0:
  50. set damSum = damage + damageM
  51. Set defence -= damSum
  52. '<B><font color = red>Protection of your harmed <<damSum>> units</font></B>'
  53. xgt 'fight','sta'
  54. end
  55. if klon > 0 and unmaterial <= 0:
  56. set klon -= 1
  57. '<B><font color = red>destroy your clone, you have more <<Klon>> clones</font></B>'
  58. xgt 'fight','sta'
  59. end
  60. if unmaterial > 0:
  61. set unmaterial -= 1
  62. '<B><font color = green>Strike the enemy flew right through your body. YOU is not material</font></B>'
  63. xgt 'fight','sta'
  64. end
  65. if barier > 0:
  66. !барьер именитета для урона
  67. if barier >= damage:
  68. '<B><font color = green>You can easily withstood the impact of the opponent</font></B>'
  69. xgt 'fight','sta'
  70. end
  71. if barier < damage:
  72. Set manna -= damageM
  73. Set health -= damage
  74. '<B><font color = red>You harmed <<damage>> units</font></B>'
  75. '<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  76. if zerkalo > 0:
  77. set zerkalo -= 1
  78. set healthV -= damage
  79. '<B><font color = green>You are repelled damage and <<$nameV>> to give <<damage>> points of damage</font></B>'
  80. end
  81. end
  82. xgt 'fight','sta'
  83. end
  84. end
  85. if $ARGS[0] = 'uronV':
  86. cla
  87. set damage = RAND(500,1000)
  88. set damageM = RAND(500,1000)
  89. if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
  90. if dospeh > 0: set damage -= dospehDef & set dospehEn -= 1
  91. if damage < 0: set damage = 0
  92. Set health -= damage
  93. Set manna -= damageM
  94. '<B><font color = red>caused damage your health <<damage>> units</font></B>'
  95. '<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  96. if zerkalo > 0:
  97. set zerkalo -= 1
  98. set healthV -= damage
  99. '<B><font color = green>You are repelled damage and <<$nameV>> to give <<damage>> points of damage</font></B>'
  100. end
  101. xgt 'fight','sta'
  102. end
  103. if defence > 0 and klon <= 0 and unmaterial <= 0:
  104. set damSum = damage + damageM
  105. Set defence -= damSum
  106. '<B><font color = red>Protection of your harmed <<damSum>> units</font></B>'
  107. xgt 'fight','sta'
  108. end
  109. if klon > 0 and unmaterial <= 0:
  110. set klon -= 1
  111. '<B><font color = red>destroy your clone, you have more <<Klon>> clones</font></B>'
  112. xgt 'fight','sta'
  113. end
  114. if unmaterial > 0:
  115. set unmaterial -= 1
  116. '<B><font color = green>Strike the enemy flew right through your body. YOU is not material</font></B>'
  117. xgt 'fight','sta'
  118. end
  119. if barier > 0:
  120. !барьер именитета для урона
  121. if barier >= damage:
  122. '<B><font color = green>You can easily withstood the impact of the opponent</font></B>'
  123. xgt 'fight','sta'
  124. end
  125. if barier < damage:
  126. Set manna -= damageM
  127. Set health -= damage
  128. '<B><font color = red>You harmed <<damage>> units</font></B>'
  129. '<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  130. if zerkalo > 0:
  131. set zerkalo -= 1
  132. set healthV -= damage
  133. '<B><font color = green>You are repelled damage and <<$nameV>> to give <<damage>> points of damage</font></B>'
  134. end
  135. end
  136. xgt 'fight','sta'
  137. end
  138. end
  139. --- atakM ---------------------------------