# 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>> lets out a deafening roar. It rejuvenates a large amount of energy which allows him to attack you again.'
initi = pcs_react*20/100
initi = initi - dospehVes
if initi < 0:initi = 0
init = RAND(pcs_react-initi,pcs_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>> 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 take 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 take the initiative.'
hod = 0
hodtime = hodtime + 1
exit
elseif init < initV:
!the initiative has captured the enemy
'<<$boydesc>> took the initiative.'
hod = 1
hodtimeV = hodtimeV + 1
exit
elseif init = initV:
hod = RAND(0,1)
if hod = 0:'You barely take the initiative.'
if hod = 1:'<<$boydesc>> barely took the initiative.'
exit
end
elseif tuman > 0:
!fog player
tuman = tuman - 1
initV = reactV-initiV
if init > initV:
!initiative tackler
'Blinded by the mist <<$boydesc>> can''t find you, giving you the initiative.'
hod = 0
hodtime = hodtime + 1
exit
elseif init < initV:
!the initiative has captured the enemy
'<<$boydesc>> could find you through the mist. He takes the initiative.'
hod = 1
hodtimeV = hodtimeV + 1
exit
elseif init = initV:
hod = RAND(0,1)
if hod = 0:'You were barely able to take the initiative despite the mist.'
if hod = 1:'Despite the mist <<$boydesc>> still took the initiative.'
exit
end
elseif tumanV > 0:
!fog opponent
tumanV = tumanV - 1
init = pcs_react-initi
if init > initV:
!initiative tackler
'Despite the mist, you managed to take the initiative.'
hod = 0
hodtime = hodtime + 1
exit
elseif init < initV:
!the initiative has captured the enemy
'<<$boydesc>> The enemy easily gains the initiative.'
hod = 1
hodtimeV = hodtimeV + 1
exit
elseif init = initV:
hod = RAND(0,1)
if hod = 0:'You barely managed to take the initiative despite the mist.'
if hod = 1:'<<$boydesc>> The enemy easily gains the initiative by using the mist.'
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 takes 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>> can not move and you easily take the initiative.'
exit
end
--- init ---------------------------------