# Kikatak
if $ARGS[0] = 'player':
	defsumV = agilV + reactV + KikDefV
	defkofV = defsumV * 20 / 100
	defV = rand(defsumV - defkofV, defsumV + defkofV)

	if popad >= defV * 2:
		'<b><font color="green">HIT</font></b>'
		damageKrit = damage * 20 / 100
		damage += damageKrit
		healthV -= damage
		pointKik += 1
		'<font color="green">You have dealt <<damage>> points of damage</font>'

		if damage >= healthV * 20 / 100:
			pointKik += 1
			'<font color="green"><<$boy>> falls to the canvas</font>'

			if healthV < (vitalV * 10 + strenV * 5) / 4:
				'<font color="green"><<$boy>> is knocked out. This is a victory!</font>'
				xgt 'enderKik', 'winKO'
				exit
			end
		end
	elseif popad < defV * 2 and popad >= defV:
		'<font color="green">Contact</font>'
		healthV -= damage
		pointKik += 1
		'<font color="green">You have dealt <<damage>> points of damage</font>'

		if damage >= healthV * 20 / 100:
			pointKik += 1
			'<font color="green"><<$boy>> falls to the canvas</font>'

			if healthV < (vitalV * 10 + strenV * 5) / 4:
				'<font color="green"><<$boy>> is knocked out. This is a victory!</font>'
				xgt 'enderKik', 'winKO'
				exit
			end
		end
	elseif popad < defV:
		'<font color="red">Miss</font>'
	end
end

if $ARGS[0] = 'enemy':
	defsum = agil + react + KikDef
	defkof = defsum * 20 / 100
	def = rand(defsum - defkof, defsum + defkof)

	if popad >= def * 2:
		'<b><font color="red">HIT</font></b>'
		damageKrit = damage * 20 / 100
		damage += damageKrit
		health -= damage
		pointKikV += 1
		'<font color="red">You have recieved <<damage>> points of damage</font>'

		if damage >= health * 20 / 100:
			pointKikV += 1
			'<font color="red">You have fallen to the canvas</font>'

			if health < (vital * 10 + stren * 5) / 4:
				'<font color="red">You are knocked out. This means defeat</font>'
				xgt 'enderKik', 'lossKO'
				exit
			end
		end
	elseif popad < def * 2 and popad >= def:
		'<font color="red">Contact</font>'
		health -= damage
		pointKikV += 1
		'<font color="red">You have recieved <<damage>> points of damage</font>'

		if damage >= health * 20 / 100:
			pointKikV += 1
			'<font color="red">You have fallen into the canvas</font>'

			if health < (vital * 10 + stren * 5) / 4:
				'<font color="red">You are knocked out. This means defeat</font>'
				xgt 'enderKik', 'lossKO'
				exit
			end
		end
	elseif popad < def:
		'<font color="green">Miss</font>'
	end
end

--- Kikatak ---------------------------------

