048_init 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # init
  2. !Расчет инициативы
  3. !Обязательно проверять наличие станов
  4. !hod переменная отвечающая за то кто будет атаковать
  5. !hod = 0 игрок атакует hod = 1 противник атакует
  6. !<font color = red><<$name>></font>
  7. if GedoMazo = 1 and stunV > 0: set stunV = 0 & set mannaV -= 1000 & '<font color = red><<$nameV>> with a deafening roar, emits large amounts of energy allowing you to attack him again.</font>'
  8. set initi = react * 20/100
  9. set initi -= dospehVes
  10. if initi < 0: set initi = 0
  11. set init = RAND(react - initi, react + initi) + initBonus
  12. set initiV = reactV * 20/100
  13. set initiV -= dospehVesV
  14. if initiV < 0: set initiV = 0
  15. set initV = RAND(reactV - initiV, reactV + initiV) + initBonusV
  16. if hodtime >= 3 and stun = 0 and stunV = 0 and initBonus = 0:
  17. !игрок уже трижды атаковал
  18. '<font color = red><<$nameV>> took the initiative</font>'
  19. set hod = 1
  20. set hodtime = 0
  21. exit
  22. end
  23. if hodtimeV >= 3 and stun = 0 and stunV = 0 and initBonusV = 0:
  24. !противник уже трижды атаковал
  25. '<font color = green>You took the lead</font>'
  26. set hod = 0
  27. set hodtimeV = 0
  28. exit
  29. end
  30. if stun = 0 and stunV = 0 and hodtime < 3 and hodtimeV < 3 or stun = 0 and stunV = 0 and initBonus > 0 or stun = 0 and stunV = 0 and initBonusV > 0:
  31. !оба не в стане
  32. if tuman = 0 and tumanV = 0:
  33. !нет тумана
  34. if init > initV:
  35. !инициативу захватил игрок
  36. '<font color = green>You took the initiative</font>'
  37. set hod = 0
  38. set hodtime += 1
  39. exit
  40. end
  41. if init < initV:
  42. !инициативу захватил противник
  43. '<font color = red><<$nameV>> took the initiative</font>'
  44. set hod = 1
  45. set hodtimeV += 1
  46. exit
  47. end
  48. if init = initV:
  49. set hod = RAND(0,1)
  50. if hod = 0: '<font color = green>You hardly seized the initiative</font>'
  51. if hod = 1: '<font color = red><<$nameV>> hardly took the initiative</font>'
  52. exit
  53. end
  54. end
  55. if tuman > 0:
  56. !туман игрока
  57. set tuman -= 1
  58. set initV = reactV - initiV
  59. if init > initV:
  60. !инициативу захватил игрок
  61. '<font color = green>In your fog <<$nameV>> does not have time for you and you took the initiative</font>'
  62. set hod = 0
  63. set hodtime += 1
  64. exit
  65. end
  66. if init < initV:
  67. !инициативу захватил противник
  68. '<font color = red>In spite of your fog <<$nameV>> took the initiative</font>'
  69. set hod = 1
  70. set hodtimeV += 1
  71. exit
  72. end
  73. if init = initV:
  74. set hod = RAND(0,1)
  75. if hod = 0: '<font color = green>You hardly seized the initiative in spite of your fog</font>'
  76. if hod = 1: '<font color = red><<$nameV>> in spite of your fog still took the initiative</font>'
  77. exit
  78. end
  79. end
  80. if tumanV > 0:
  81. !туман противника
  82. set tumanV -= 1
  83. set init = react - initi
  84. if init > initV:
  85. !инициативу захватил игрок
  86. '<font color = green>In spite of the fog, you took the initiative</font>'
  87. set hod = 0
  88. set hodtime += 1
  89. exit
  90. end
  91. if init < initV:
  92. !инициативу захватил противник
  93. '<font color = red><<$nameV>> use your fog easily captures initiative</font>'
  94. set hod = 1
  95. set hodtimeV += 1
  96. exit
  97. end
  98. if init = initV:
  99. set hod = RAND(0,1)
  100. if hod = 0: '<font color = green>You hardly seized the initiative in spite of the fog</font>'
  101. if hod = 1: '<font color = red><<$nameV>> use your fog took the initiative</font>'
  102. exit
  103. end
  104. end
  105. end
  106. if stun > 0:
  107. !игрок в стане
  108. set stun -= 1
  109. set hod = 1
  110. if tuman > 0: set tuman -= 1
  111. if tumanV > 0: set tumanV -= 1
  112. '<font color = red>You can not move, and <<$nameV>> easily captures initiative</font>'
  113. exit
  114. end
  115. if stunV > 0:
  116. !противник в стане
  117. set stunV -= 1
  118. set hod = 0
  119. if tuman > 0: set tuman -= 1
  120. if tumanV > 0: set tumanV -= 1
  121. '<font color = green><<$nameV>> can not move and you can easily grab the initiative</font>'
  122. exit
  123. end
  124. --- init ---------------------------------