init 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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:stunV = 0 & mannaV -= 1000 & '<font color="red"><<$nameV>> with a deafening roar, emits large amounts of energy allowing you to attack him again.</font>'
  8. initi = react * 20 / 100
  9. initi -= dospehVes
  10. if initi < 0:initi = 0
  11. init = rand(react - initi, react + initi) + initBonus
  12. initiV = reactV * 20 / 100
  13. initiV -= dospehVesV
  14. if initiV < 0:initiV = 0
  15. 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. hod = 1
  20. hodtime = 0
  21. exit
  22. elseif 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. hod = 0
  26. 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. hod = 0
  37. hodtime += 1
  38. exit
  39. elseif init < initV:
  40. !!Initiative has captured the enemy
  41. '<font color="red"><<$nameV>> took the initiative</font>'
  42. hod = 1
  43. hodtimeV += 1
  44. exit
  45. elseif init = initV:
  46. hod = rand(0, 1)
  47. if hod = 0:'<font color="green">You hardly seized the initiative</font>'
  48. if hod = 1:'<font color="red"><<$nameV>> hardly took the initiative</font>'
  49. exit
  50. end
  51. elseif tuman > 0:
  52. !!Fog player
  53. tuman -= 1
  54. initV = reactV - initiV
  55. if init > initV:
  56. !!Initiative tackler
  57. '<font color="green">In your fog <<$nameV>> does not have time for you and you took the initiative</font>'
  58. hod = 0
  59. hodtime += 1
  60. exit
  61. elseif init < initV:
  62. !!Initiative has captured the enemy
  63. '<font color="red">In spite of your fog <<$nameV>> took the initiative</font>'
  64. hod = 1
  65. hodtimeV += 1
  66. exit
  67. elseif init = initV:
  68. hod = rand(0, 1)
  69. if hod = 0:'<font color="green">You hardly seized the initiative in spite of your fog</font>'
  70. if hod = 1:'<font color="red"><<$nameV>> in spite of your fog still took the initiative</font>'
  71. exit
  72. end
  73. elseif tumanV > 0:
  74. !!Fog enemy
  75. tumanV -= 1
  76. init = react - initi
  77. if init > initV:
  78. !!Initiative tackler
  79. '<font color="green">In spite of the fog, you took the initiative</font>'
  80. hod = 0
  81. hodtime += 1
  82. exit
  83. elseif init < initV:
  84. !!Initiative has captured the enemy
  85. '<font color="red"><<$nameV>> use your fog easily captures initiative</font>'
  86. hod = 1
  87. hodtimeV += 1
  88. exit
  89. elseif init = initV:
  90. hod = rand(0, 1)
  91. if hod = 0:'<font color="green">You hardly seized the initiative in spite of the fog</font>'
  92. if hod = 1:'<font color="red"><<$nameV>> use your fog took the initiative</font>'
  93. exit
  94. end
  95. end
  96. end
  97. if stun > 0:
  98. !!Player in the camp
  99. stun -= 1
  100. hod = 1
  101. if tuman > 0:tuman -= 1
  102. if tumanV > 0:tumanV -= 1
  103. '<font color="red">You can not move, and <<$nameV>> easily captures initiative</font>'
  104. exit
  105. elseif stunV > 0:
  106. !!The enemy in the camp
  107. stunV -= 1
  108. hod = 0
  109. if tuman > 0:tuman -= 1
  110. if tumanV > 0:tumanV -= 1
  111. '<font color="green"><<$nameV>> can not move and you can easily grab the initiative</font>'
  112. exit
  113. end
  114. --- init ---------------------------------