1
0

init 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. # init
  2. !!calculation initiatives
  3. !!Be sure to check for mills
  4. !!hod variable responsible for who will attack
  5. !!hod = 0 player attacks hod = 1 enemy attacks
  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. !!the player has already attacked three times
  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. !!the enemy attacked three times already
  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. !!both are not in the camp
  32. if tuman = 0 and tumanV = 0:
  33. !!No fog
  34. if init > initV:
  35. !!Initiative tackler
  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. !!Initiative has captured the enemy
  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. !!Fog player
  57. set tuman -= 1
  58. set initV = reactV - initiV
  59. if init > initV:
  60. !!Initiative tackler
  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. !!Initiative has captured the enemy
  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. !!Fog enemy
  82. set tumanV -= 1
  83. set init = react - initi
  84. if init > initV:
  85. !!Initiative tackler
  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. !!Initiative has captured the enemy
  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. !!Player in the camp
  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. !!The enemy in the camp
  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 ---------------------------------