1
0

atakB.qsrc 3.3 KB

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