init 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # init
  2. !Calculation initiative
  3. !Be sure to check for mills
  4. !hod variable is responsible for who will attack
  5. !hod = 0 player attacks hod = 1 enemy attacks
  6. !<font color = red><<$pcs_nickname>> </font>
  7. if GedoMazo = 1 and stunV > 0:stunV = 0 & mannaV = mannaV - 1000 & '<font color = red><<$boydesc>> with a deafening roar,, It allocates a large amount of energy which allows him to attack you again.</font>'
  8. initi = pcs_react*20/100
  9. initi = initi - dospehVes
  10. if initi < 0:initi = 0
  11. init = RAND(pcs_react-initi,pcs_react+initi) + initBonus
  12. initiV = reactV*20/100
  13. initiV = 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><<$boydesc>> I 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 opponent three times already attacked
  24. '<font color = green>You seized the initiative</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. !neither 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 = hodtime + 1
  38. exit
  39. elseif init < initV:
  40. !the initiative has captured the enemy
  41. '<font color = red><<$boydesc>> He seized the initiative</font>'
  42. hod = 1
  43. hodtimeV = hodtimeV + 1
  44. exit
  45. elseif init = initV:
  46. hod = RAND(0,1)
  47. if hod = 0:'<font color = green>You hardly took the initiative</font>'
  48. if hod = 1:'<font color = red><<$boydesc>> hardly seized the initiative</font>'
  49. exit
  50. end
  51. elseif tuman > 0:
  52. !fog player
  53. tuman = tuman - 1
  54. initV = reactV-initiV
  55. if init > initV:
  56. !initiative tackler
  57. '<font color = green>In your fog <<$boydesc>> I do not have time for you, and you took the initiative</font>'
  58. hod = 0
  59. hodtime = hodtime + 1
  60. exit
  61. elseif init < initV:
  62. !the initiative has captured the enemy
  63. '<font color = red>Although your fog <<$boydesc>> He seized the initiative</font>'
  64. hod = 1
  65. hodtimeV = 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><<$boydesc>> despite your fog still took the initiative</font>'
  71. exit
  72. end
  73. elseif tumanV > 0:
  74. !fog opponent
  75. tumanV = tumanV - 1
  76. init = pcs_react-initi
  77. if init > initV:
  78. !initiative tackler
  79. '<font color = green>Despite the fog, You took the initiative</font>'
  80. hod = 0
  81. hodtime = hodtime + 1
  82. exit
  83. elseif init < initV:
  84. !the initiative has captured the enemy
  85. '<font color = red><<$boydesc>> Using a mist easily captures initiative</font>'
  86. hod = 1
  87. hodtimeV = 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><<$boydesc>> Using a mist seized the initiative</font>'
  93. exit
  94. end
  95. end
  96. end
  97. if stun > 0:
  98. !player in the camp
  99. stun = stun - 1
  100. hod = 1
  101. if tuman > 0:tuman = tuman - 1
  102. if tumanV > 0:tumanV = tumanV - 1
  103. '<font color = red>You can not move, and <<$boydesc>> easy to seize the initiative</font>'
  104. exit
  105. elseif stunV > 0:
  106. !the enemy in the camp
  107. stunV = stunV - 1
  108. hod = 0
  109. if tuman > 0:tuman = tuman - 1
  110. if tumanV > 0:tumanV = tumanV - 1
  111. '<font color = green><<$boydesc>> It can not move and you can easily grab the initiative</font>'
  112. exit
  113. end
  114. --- init ---------------------------------