1
1

046_init 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. # init
  2. !calculation initiatives
  3. !Be sure to check for mills
  4. !hod variable responsible for who will attack
  5. !<font color="red"><<$name>></font>
  6. 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>'
  7. set initi = react * 20 / 100
  8. set initi -= dospehVes
  9. if initi < 0:set initi = 0
  10. set init = rand(react - initi, react + initi) + initBonus
  11. set initiV = reactV * 20/100
  12. set initiV -= dospehVesV
  13. if initiV < 0:set initiV = 0
  14. set initV = rand(reactV - initiV, reactV + initiV) + initBonusV
  15. if hodtime >= 3 and stun = 0 and stunV = 0 and initBonus = 0:
  16. !the player has already attacked three times
  17. '<font color="red"><<$nameV>> took the initiative</font>'
  18. set hod = 1
  19. set hodtime = 0
  20. exit
  21. end
  22. if hodtimeV >= 3 and stun = 0 and stunV = 0 and initBonusV = 0:
  23. !the enemy attacked three times already
  24. '<font color="green">You took the lead</font>'
  25. set hod = 0
  26. set hodtimeV = 0
  27. exit
  28. end
  29. 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:
  30. !both are not in the camp
  31. if tuman = 0 and tumanV = 0:
  32. !No fog
  33. if init > initV:
  34. !Initiative tackler
  35. '<font color="green">You took the initiative</font>'
  36. set hod = 0
  37. set hodtime += 1
  38. exit
  39. end
  40. if init < initV:
  41. !Initiative has captured the enemy
  42. '<font color="red"><<$nameV>> took the initiative</font>'
  43. set hod = 1
  44. set hodtimeV += 1
  45. exit
  46. end
  47. if init = initV:
  48. set hod = rand(0, 1)
  49. if hod = 0:'<font color="green">You hardly seized the initiative</font>'
  50. if hod = 1:'<font color="red"><<$nameV>> hardly took the initiative</font>'
  51. exit
  52. end
  53. end
  54. if tuman > 0:
  55. !Fog player
  56. set tuman -= 1
  57. set initV = reactV - initiV
  58. if init > initV:
  59. !Initiative tackler
  60. '<font color="green">In your fog <<$nameV>> does not have time for you and you took the initiative</font>'
  61. set hod = 0
  62. set hodtime += 1
  63. exit
  64. end
  65. if init < initV:
  66. !Initiative has captured the enemy
  67. '<font color="red">In spite of your fog <<$nameV>> took the initiative</font>'
  68. set hod = 1
  69. set hodtimeV += 1
  70. exit
  71. end
  72. if init = initV:
  73. set hod = rand(0, 1)
  74. if hod = 0:'<font color="green">You hardly seized the initiative in spite of your fog</font>'
  75. if hod = 1:'<font color="red"><<$nameV>> in spite of your fog still took the initiative</font>'
  76. exit
  77. end
  78. end
  79. if tumanV > 0:
  80. !Fog enemy
  81. set tumanV -= 1
  82. set init = react - initi
  83. if init > initV:
  84. !Initiative tackler
  85. '<font color="green">In spite of the fog, you took the initiative</font>'
  86. set hod = 0
  87. set hodtime += 1
  88. exit
  89. end
  90. if init < initV:
  91. !Initiative has captured the enemy
  92. '<font color="red"><<$nameV>> use your fog easily captures initiative</font>'
  93. set hod = 1
  94. set hodtimeV += 1
  95. exit
  96. end
  97. if init = initV:
  98. set hod = rand(0, 1)
  99. if hod = 0:'<font color="green">You hardly seized the initiative in spite of the fog</font>'
  100. if hod = 1:'<font color="red"><<$nameV>> use your fog took the initiative</font>'
  101. exit
  102. end
  103. end
  104. end
  105. if stun > 0:
  106. !Player in the camp
  107. set stun -= 1
  108. set hod = 1
  109. if tuman > 0:set tuman -= 1
  110. if tumanV > 0:set tumanV -= 1
  111. '<font color="red">You can not move, and <<$nameV>> easily captures initiative</font>'
  112. exit
  113. end
  114. if stunV > 0:
  115. !The enemy in the camp
  116. set stunV -= 1
  117. set hod = 0
  118. if tuman > 0:set tuman -= 1
  119. if tumanV > 0:set tumanV -= 1
  120. '<font color="green"><<$nameV>> can not move and you can easily grab the initiative</font>'
  121. exit
  122. end
  123. --- init ---------------------------------