# init !!calculation initiatives !!Be sure to check for mills !!hod variable responsible for who will attack !!hod = 0 player attacks hod = 1 enemy attacks !!<<$name>> if GedoMazo = 1 and stunV > 0:stunV = 0 & mannaV -= 1000 & '<<$nameV>> with a deafening roar, emits large amounts of energy allowing you to attack him again.' initi = react * 20 / 100 initi -= dospehVes if initi < 0:initi = 0 init = rand(react - initi, react + initi) + initBonus initiV = reactV * 20 / 100 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 '<<$nameV>> took the initiative' hod = 1 hodtime = 0 exit elseif hodtimeV >= 3 and stun = 0 and stunV = 0 and initBonusV = 0: !!the enemy attacked three times already 'You took the lead' 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: !!both are not in the camp if tuman = 0 and tumanV = 0: !!No fog if init > initV: !!Initiative tackler 'You took the initiative' hod = 0 hodtime += 1 exit elseif init < initV: !!Initiative has captured the enemy '<<$nameV>> took the initiative' hod = 1 hodtimeV += 1 exit elseif init = initV: hod = rand(0, 1) if hod = 0:'You hardly seized the initiative' if hod = 1:'<<$nameV>> hardly took the initiative' exit end elseif tuman > 0: !!Fog player tuman -= 1 initV = reactV - initiV if init > initV: !!Initiative tackler 'In your fog <<$nameV>> does not have time for you and you took the initiative' hod = 0 hodtime += 1 exit elseif init < initV: !!Initiative has captured the enemy 'In spite of your fog <<$nameV>> took the initiative' hod = 1 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:'<<$nameV>> in spite of your fog still took the initiative' exit end elseif tumanV > 0: !!Fog enemy tumanV -= 1 init = react - initi if init > initV: !!Initiative tackler 'In spite of the fog, you took the initiative' hod = 0 hodtime += 1 exit elseif init < initV: !!Initiative has captured the enemy '<<$nameV>> use your fog easily captures initiative' hod = 1 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:'<<$nameV>> use your fog took the initiative' exit end end end if stun > 0: !!Player in the camp stun -= 1 hod = 1 if tuman > 0:tuman -= 1 if tumanV > 0:tumanV -= 1 'You can not move, and <<$nameV>> easily captures initiative' exit elseif stunV > 0: !!The enemy in the camp stunV -= 1 hod = 0 if tuman > 0:tuman -= 1 if tumanV > 0:tumanV -= 1 '<<$nameV>> can not move and you can easily grab the initiative' exit end --- init ---------------------------------