atakB.qsrc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # atakB
  2. menu_off = 1
  3. if $ARGS[0] = 'atak':
  4. cla
  5. !payment hit dodge
  6. poSp = speed*20/100
  7. uvAg = agilV*20/100
  8. poBox = pcs_react*20/100
  9. uvBox = reactV*20/100
  10. popad = RAND(pcs_react-poBox,pcs_react+poBox) + RAND(speed-poSp,speed+poSp) + bonusSh
  11. uvorot = RAND(reactV-uvBox,reactV+uvBox) + RAND(agilV-uvAg,agilV+uvAg)
  12. uvorKoef = uvorot*50/100
  13. popKoef = popad*50/100
  14. if popad > uvorot:
  15. if popad >= uvorot+uvorKoef:
  16. !Crete, very direct hit
  17. '<b><font color = green>Critical hits</font></b>'
  18. gs'atakB','uronKrit'
  19. elseif popad < uvorot+uvorKoef:
  20. !Normal hit
  21. !He attacks the enemy
  22. '<b><font color = green>EYE</font></b>'
  23. gs'atakB','uron'
  24. end
  25. elseif popad <= uvorot:
  26. '<b><font color = red>LOST</font></b>'
  27. end
  28. end
  29. if $ARGS[0] = 'uronKrit':
  30. cla
  31. damDef = defence/100
  32. damKoef = damDef*20/100
  33. damage = RAND(damDef+damKoef,damDef+damKoef*2)
  34. gs'atakB','damage'
  35. end
  36. if $ARGS[0] = 'uron':
  37. cla
  38. damDef = defence/100
  39. damKoef = damDef*20/100
  40. damage = RAND(damDef-damKoef,damDef+damKoef)
  41. gs'atakB','damage'
  42. end
  43. if $ARGS[0] = 'damage':
  44. cla
  45. if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
  46. if dospehV > 0:damageV = damageV - dospehDefV & dospehEn = dospehEn - 1
  47. if damage < 0:damage = 0
  48. healthV = healthV - damage
  49. !pcs_manna = pcs_manna - damageM
  50. if eleSh > 0:
  51. stunV = RAND(eleSh,eleSh*3)
  52. '<b><font color = green><<$boydesc>> paralyzed <<stunV>> Rounds</font></b>'
  53. end
  54. '<b><font color = green>You have caused damage <<damage>> units</font></b>'
  55. !'<b><font color = red>Your manna harmed <<damageM>> units</font></b>'
  56. if zerkaloV > 0:
  57. zerkaloV = zerkaloV - 1
  58. defence = defence - damage
  59. '<b><font color = red><<$boydesc>> It reflected the damage and your defense received <<damage>> points of damage</font></b>'
  60. end
  61. !xgt'fight','sta'
  62. end
  63. if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
  64. !damSum = damage + damageM
  65. !defence = defence - damSum
  66. defenceV = defenceV - damage
  67. '<b><font color = green>Your defense caused damage <<damage>> Protection of enemy units</font></b>'
  68. !xgt'fight','sta'
  69. end
  70. if klonV > 0 and unmaterialV <= 0:
  71. klonV = klonV - 1
  72. '<b><font color = green>Destroyed enemy clone</font></b>'
  73. !xgt'fight','sta'
  74. end
  75. if unmaterialV > 0:
  76. unmaterialV = unmaterialV - 1
  77. '<b><font color = red>Blow your protection passed through the body of the enemy. Opponents do not materials</font></b>'
  78. !xgt'fight','sta'
  79. end
  80. if barierV > 0:
  81. !imeniteta barrier for damage
  82. if barierV >= damage:
  83. '<b><font color = red><<$boydesc>> easily weathered blow your protection</font></b>'
  84. !xgt'fight','sta'
  85. elseif barierV < damage:
  86. !pcs_manna = pcs_manna - damageM
  87. !pcs_health = pcs_health - damage
  88. healthV = healthV - damage
  89. if eleSh > 0:
  90. stunV = RAND(eleSh,eleSh*3)
  91. '<b><font color = green><<$boydesc>> paralyzed <<stunV>> Rounds</font></b>'
  92. end
  93. '<b><font color = green>Your defense caused damage <<damage>> units</font></b>'
  94. !'<b><font color = red>Your manna harmed <<damageM>> units</font></b>'
  95. if zerkaloV > 0:
  96. zerkaloV = zerkaloV - 1
  97. defence = defence - damage
  98. '<b><font color = red>Opponent reflected damage and your defense received <<damage>> points of damage</font></b>'
  99. end
  100. end
  101. !xgt'fight','sta'
  102. end
  103. end
  104. --- atakB ---------------------------------