054_atakB1 3.5 KB

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