1
0

055_atakM 4.6 KB

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