055_atakB 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # atakB
  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. gs 'atakB','uronKrit'
  18. end
  19. if popad < uvorot+uvorKoef:
  20. !нормальное попадание
  21. !атаковал противник
  22. '<B><font color = green>Contact</font></B>'
  23. gs 'atakB','uron'
  24. end
  25. end
  26. if popad <= uvorot:
  27. '<B><font color = red>is washed</font></B>'
  28. end
  29. end
  30. if $ARGS[0] = 'uronKrit':
  31. cla
  32. set damDef = defence/100
  33. set damKoef = damDef * 20/100
  34. set damage = RAND(damDef + damKoef, damDef + damKoef * 2)
  35. gs 'atakB','damage'
  36. end
  37. if $ARGS[0] = 'uron':
  38. cla
  39. set damDef = defence/100
  40. set damKoef = damDef * 20/100
  41. set damage = RAND(damDef - damKoef, damDef + damKoef)
  42. gs 'atakB','damage'
  43. end
  44. if $ARGS[0] = 'damage':
  45. cla
  46. if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
  47. if dospehV > 0: set damageV -= dospehDefV & set dospehEn -= 1
  48. if damage < 0: set damage = 0
  49. Set healthV -= damage
  50. !Set manna -= damageM
  51. if eleSh > 0:
  52. set stunV = RAND(eleSh, eleSh * 3)
  53. '<B><font color = green><<$nameV>> paralyzed <<stunV>> rounds</font></B>'
  54. end
  55. '<B><font color = green>You have caused damage <<damage>> units</font></B>'
  56. !'<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  57. if zerkaloV > 0:
  58. set zerkaloV -= 1
  59. set defence -= damage
  60. '<B><font color = red><<$nameV>> reflected the damage and your defense has received <<damage>> points of damage</font></B>'
  61. end
  62. !xgt 'fight','sta'
  63. end
  64. if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
  65. !set damSum = damage + damageM
  66. !Set defence -= damSum
  67. Set defenceV -= damage
  68. '<B><font color = green>caused damage to your defense <<damage>> Protection of the enemy units</font></B>'
  69. !xgt 'fight','sta'
  70. end
  71. if klonV > 0 and unmaterialV <= 0:
  72. set klonV -= 1
  73. '<B><font color = green>Destroyed enemy clone</font></B>'
  74. !xgt 'fight','sta'
  75. end
  76. if unmaterialV > 0:
  77. set unmaterialV -= 1
  78. '<B><font color = red>Blow your protection passed through the body of the opponent. Opponents do not materials</font></B>'
  79. !xgt 'fight','sta'
  80. end
  81. if barierV > 0:
  82. !барьер именитета для урона
  83. if barierV >= damage:
  84. '<B><font color = red><<$nameV>> easily withstood kick your protection</font></B>'
  85. !xgt 'fight','sta'
  86. end
  87. if barierV < damage:
  88. !Set manna -= damageM
  89. !Set health -= damage
  90. Set healthV -= damage
  91. if eleSh > 0:
  92. set stunV = RAND(eleSh, eleSh * 3)
  93. '<B><font color = green><<$nameV>> paralyzed <<stunV>> rounds</font></B>'
  94. end
  95. '<B><font color = green>caused damage to your defense <<damage>> units</font></B>'
  96. !'<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  97. if zerkaloV > 0:
  98. set zerkaloV -= 1
  99. set defence -= damage
  100. '<B><font color = red>Enemy reflected damage and your defense received <<damage>> points of damage</font></B>'
  101. end
  102. end
  103. !xgt 'fight','sta'
  104. end
  105. end
  106. --- atakB ---------------------------------