# init !Calculation initiative !Be sure to check for mills !hod variable is responsible for who will attack !hod = 0 player attacks hod = 1 enemy attacks !<<$pcs_nickname>> if GedoMazo = 1 and stunV > 0:stunV = 0 & mannaV = mannaV - 1000 & '<<$boydesc>> with a deafening roar,, It allocates a large amount of energy which allows him to attack you again.' initi = react*20/100 initi = initi - dospehVes if initi < 0:initi = 0 init = RAND(react-initi,react+initi) + initBonus initiV = reactV*20/100 initiV = initiV - dospehVesV if initiV < 0:initiV = 0 initV = RAND(reactV-initiV,reactV+initiV) + initBonusV if hodtime >= 3 and stun = 0 and stunV = 0 and initBonus = 0: !the player has already attacked three times '<<$boydesc>> I took the initiative' hod = 1 hodtime = 0 exit elseif hodtimeV >= 3 and stun = 0 and stunV = 0 and initBonusV = 0: !the opponent three times already attacked 'You seized the initiative' hod = 0 hodtimeV = 0 exit end 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: !neither in the camp if tuman = 0 and tumanV = 0: !no fog if init > initV: !initiative tackler 'You took the initiative' hod = 0 hodtime = hodtime + 1 exit elseif init < initV: !the initiative has captured the enemy '<<$boydesc>> He seized the initiative' hod = 1 hodtimeV = hodtimeV + 1 exit elseif init = initV: hod = RAND(0,1) if hod = 0:'You hardly took the initiative' if hod = 1:'<<$boydesc>> hardly seized the initiative' exit end elseif tuman > 0: !fog player tuman = tuman - 1 initV = reactV-initiV if init > initV: !initiative tackler 'In your fog <<$boydesc>> I do not have time for you, and you took the initiative' hod = 0 hodtime = hodtime + 1 exit elseif init < initV: !the initiative has captured the enemy 'Although your fog <<$boydesc>> He seized the initiative' hod = 1 hodtimeV = hodtimeV + 1 exit elseif init = initV: hod = RAND(0,1) if hod = 0:'You hardly seized the initiative in spite of your fog' if hod = 1:'<<$boydesc>> despite your fog still took the initiative' exit end elseif tumanV > 0: !fog opponent tumanV = tumanV - 1 init = react-initi if init > initV: !initiative tackler 'Despite the fog, You took the initiative' hod = 0 hodtime = hodtime + 1 exit elseif init < initV: !the initiative has captured the enemy '<<$boydesc>> Using a mist easily captures initiative' hod = 1 hodtimeV = hodtimeV + 1 exit elseif init = initV: hod = RAND(0,1) if hod = 0:'You hardly seized the initiative in spite of the fog' if hod = 1:'<<$boydesc>> Using a mist seized the initiative' exit end end end if stun > 0: !player in the camp stun = stun - 1 hod = 1 if tuman > 0:tuman = tuman - 1 if tumanV > 0:tumanV = tumanV - 1 'You can not move, and <<$boydesc>> easy to seize the initiative' exit elseif stunV > 0: !the enemy in the camp stunV = stunV - 1 hod = 0 if tuman > 0:tuman = tuman - 1 if tumanV > 0:tumanV = tumanV - 1 '<<$boydesc>> It can not move and you can easily grab the initiative' exit end --- init ---------------------------------