056_atakB1 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # atakB1
  2. if $ARGS[0] = 'atak':
  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) + bonusShV
  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 = green>critical hits</font></B>'
  17. gs 'atakB1','uronKrit'
  18. end
  19. if popad < uvorot+uvorKoef:
  20. !нормальное попадание
  21. !атаковал противник
  22. '<B><font color = green>Contact</font></B>'
  23. gs 'atakB1','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 = defenceV/100
  33. set damKoef = damDef * 20/100
  34. set damage = RAND(damDef + damKoef, damDef + damKoef * 2)
  35. gs 'atakB1','damage'
  36. end
  37. if $ARGS[0] = 'uron':
  38. cla
  39. set damDef = defenceV/100
  40. set damKoef = damDef * 20/100
  41. set damage = RAND(damDef - damKoef, damDef + damKoef)
  42. gs 'atakB1','damage'
  43. end
  44. if $ARGS[0] = 'damage':
  45. cla
  46. if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
  47. if dospeh > 0: set damage -= dospehDefV & set dospehEn -= 1
  48. if damage < 0: set damage = 0
  49. Set health -= damage
  50. !Set manna -= damageM
  51. if eleShV > 0:
  52. set stun = RAND(eleShV, eleShV * 3)
  53. '<B><font color = red>Protection of the enemy paralyze you <<stun>> rounds</font></B>'
  54. end
  55. '<B><font color = red>Protection of the enemy caused you damage <<damage>> units</font></B>'
  56. !'<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  57. if zerkalo > 0:
  58. set zerkalo -= 1
  59. set defenceV -= damage
  60. '<B><font color = green>You are reflected damage from the defense and protection of the enemy received <<damage>> points of damage</font></B>'
  61. end
  62. !xgt 'fight','sta'
  63. end
  64. if defence > 0 and klon <= 0 and unmaterial <= 0:
  65. !set damSum = damage + damageM
  66. !Set defence -= damSum
  67. Set defence -= damage
  68. '<B><font color = red>your defense harmed <<damage>> units from the defense</font></B>'
  69. !xgt 'fight','sta'
  70. end
  71. if klon > 0 and unmaterial <= 0:
  72. set klon -= 1
  73. '<B><font color = red>destroy your clone</font></B>'
  74. !xgt 'fight','sta'
  75. end
  76. if unmaterial > 0:
  77. set unmaterial -= 1
  78. '<B><font color = green>Beat the defense went through you. YOU is not material</font></B>'
  79. !xgt 'fight','sta'
  80. end
  81. if barier > 0:
  82. !барьер именитета для урона
  83. if barier >= damage:
  84. '<B><font color = green>You can easily withstand the impact of the defense</font></B>'
  85. !xgt 'fight','sta'
  86. end
  87. if barier < damage:
  88. !Set manna -= damageM
  89. !Set health -= damage
  90. Set health -= damage
  91. if eleShV > 0:
  92. set stun = RAND(eleShV, eleShV * 3)
  93. '<B><font color = red>Protection of the enemy paralyze you <<stun>> rounds</font></B>'
  94. end
  95. '<B><font color = red>You have harmed <<damage>> units from the defense</font></B>'
  96. !'<B><font color = red>caused damage your manna <<damageM>> units</font></B>'
  97. if zerkalo > 0:
  98. set zerkalo -= 1
  99. set defenceV -= damage
  100. '<B><font color = green>You are repelled enemy damage and protection received <<damage>> points of damage</font></B>'
  101. end
  102. end
  103. !xgt 'fight','sta'
  104. end
  105. end
  106. --- atakB1 ---------------------------------