# initKik
set init = speed + reakt
set initKoef = init * 20/100
set initi = rand(initi - initKoef, initi + initKoef)
set initV = speedV + reaktV
set initKoefV = initV * 20/100
set initiV = rand(initiV - initKoefV, initiV + initKoefV)

if initi > initiV and hodtime < 3 and ionce = 0 or hodtimeV >= 3 and ionce = 0:
	set hod = 0
	set hodtime += 1

	if hodtimeV >= 3:set hodtimeV = 0

	'<font color="green">You took the initiative</font>'

	set ionce = 1
end

if initi < initiV and hodtimeV < 3 and ionce = 0 or hodtime >= 3 and ionce = 0:
	set hod = 1
	set hodtimeV += 1

	if hodtime >= 3:set hodtime = 0

	'<font color="red"><<$nameV>> took the initiative</font>'
	set ionce = 1
end

if initi = initiV and hodtime < 3 and hodtimeV < 3 and ionce = 0:
	set inrand = rand(0, 1)
	set ionce = 1

	if inrand = 0:
		set hod = 0
		set hodtime += 1
		'<font color="green">You took the lead</font>'
	end

	if inrand = 1:
		set hod = 1
		set hodtimeV += 1
		'<font color="red"><<$nameV>> took the initiative</font>'
	end
end

if initi = initiV and hodtime >= 3 and ionce = 0 or initi = initiV and hodtimeV >= 3 and ionce = 0:
	set hodtime = 0
	set hodtimeV = 0
	set inrand = rand(0, 1)
	set ionce = 1

	if inrand = 0:
		set hod = 0
		set hodtime += 1
		'<font color="green">You took the lead</font>'
	end

	if inrand = 1:
		set hod = 1
		set hodtimeV += 1
		'<font color="red"><<$nameV>> took the initiative</font>'
	end
end

--- initKik ---------------------------------

