# enemy
!Calculation of the enemy''s attack
if $ARGS[0] = 'start':
	cla
	!This block is selected on the basis of the variable program enemy attacks
	if program = 0:
		!Programme of Action of simple attackers fizuhoy
		xgt'enemy','fighter'
	elseif program = 1:
		!Action Programme fizuha and knives
		xgt'enemy','fighter2'
	elseif program = 2:
		!Action Programme fizuha, Knives, fog
		xgt'enemy','fighter3'
	elseif program = 3:
		!Action Programme fizuha, Knives, fog, Clones
		xgt'enemy','fighter4'
	elseif program = 4:
		!Action Programme fizuha, Knives, fog, Clones, paralysis
		xgt'enemy','fighter5'
	elseif program = 5:
		!Action Programme kisame
		xgt'enemy','kisame'
	elseif program = 6:
		!Action Programme Toby
		xgt'enemy','tobi'
	elseif program = 7:
		!Action Programme Toby
		xgt'enemy','gedomazo'
	elseif program = 8:
		!Action Programme firearms
		xgt'enemy','gun'
	elseif program = 9:
		!Action Programme Sasori
		xgt'enemy','sasori'
	elseif program = 10:
		!Action Programme Conan
		xgt'enemy','konan'
	elseif program = 11:
		!Action Programme Hidan
		xgt'enemy','hidan'
	end
end

if $ARGS[0] = 'hidan':
	cla
	if zerkaloV > 0:barierV = 0
	if zerkaloV <= 0:barierV = 5500
	if healthV < vitalV*10 + strenV*5:healthV = vitalV*10 + strenV*5

	if zerkaloV > 0:
		healthV = vitalV*10 + strenV*5
		mannaV = intelV*magikV + magikV*100 + vitalV*10
		willpowerV = willV*10
		pcs_health = pcs_health - 400
		pcs_manna -= 500

		'<b><font color = red><<$boydesc>> shouts "RITUAL BEGINS!" and stands in a circle inscribed in blood on the ground.</font></b>'
		'<b><font color = red>He stabs himself and you feel, pain pierces the body.</font></b>'

		xgt'fight','sta'
		exit
	elseif zerkaloV <= 0 and defence > 0:
		damTipV = 5000
		bonusShV = 100
		hidanAtk = 1

		'<b><font color = red><<$boydesc>> shouts "Your existence offends my God DZHASHINA!" and throws you into a plait trehlezviynuyu driving it with the help of a rope.</font></b>'

		if klon > 0:klon = klon/2 & '<b><font color = red><<$boydesc>> shouts "Crud! I''m like a pig slaughter YOU!"</font></b>'

		xgt'atakA1','atak'
		exit
	elseif zerkaloV <= 0 and defence <= 0:
		damTipV = 300
		bonusShV = 100
		hidanAtk = 1

		'<b><font color = red><<$boydesc>> shouts "You will die a blasphemer!" and throws you into a plait trehlezviynuyu driving it with the help of a rope.</font></b>'

		if klon > 0:klon = 0 & '<b><font color = red>Your clones turned into steam by hitting braids. <<$boydesc>> shouts "I IMMORTAL Ravager! And YOU SHIT!"</font></b>'
		if tuman > 0:tuman = 0 & '<b><font color = red><<$boydesc>> shouts "You''re pathetic in their vain attempt to spryatatsya FROM ME!"</font></b>'

		xgt'atakA1','atak'
		exit
	end
end

if $ARGS[0] = 'konan':
	cla
	if round < 6:
		mannaV = mannaV - 10
		damTipV = 500

		'<b><font color = red><<$boydesc>> fold marks in his hands and you are flying sheets of paper.</font></b>'

		if klon > 0:klon = 0 & '<b><font color = red>Your clones turned into steam by hitting paper.</font></b>'

		xgt'atakA1','atak'
		exit
	elseif round >= 6:
		if unmaterialV > 5 and defence > 0:
			mannaV = mannaV - 250
			damTipV = 15000
			bonusShV = 100

			'<b><font color = red><<$boydesc>> He takes to the air on the white wings and breaking out of its paper wings falls on you in a flood of flying with terrible speed paper swords.</font></b>'

			if klon > 0:klon = 0 & '<b><font color = red>Your clones turned into steam by hitting paper.</font></b>'

			xgt'atakA1','atak'
			exit
		elseif unmaterialV > 5 and defence <= 0:
			mannaV = mannaV - 20
			damTipV = 450

			'<b><font color = red><<$boydesc>> creates paper boomerangs that fly in your direction.</font></b>'

			xgt'atakA1','atak'
			exit
		elseif defenceV <= 0 and unmaterialV <= 5:
			mannaV = mannaV - 250
			defenceV = defenceV + 3000
			defenceMV = defenceMV + 3000
			defenceWV = defenceWV + 3000

			'<b><font color = red>Conan shoots up on its paper wings like an angel. Around it starts spinning paper creating her protection.</font></b>'

			xgt'fight','sta'
			exit
		elseif unmaterialV <= 2 and konanD < 3:
			mannaV = mannaV - 150
			konanD = konanD + 1

			'<b><font color = red>Conan stops meditating in the air.</font></b>'

			xgt'fight','sta'
			exit
		elseif konanD >= 3:
			mannaV = mannaV - 250
			konanD = 0
			unmaterialV = 20

			'<b><font color = red>Conan disintegrates in the air into thousands of sheets of paper.</font></b>'

			xgt'fight','sta'
			exit
		end
	end
end

if $ARGS[0] = 'sasori':
	cla
	if SasoriBody > 1:damTipV = 1000
	if SasoriBody = 1:damTipV = 2000
	poisonAV = 1
	defenceV = defenceV + 10
	defenceMV = defenceMV + 20
	defenceWV = defenceWV + 50
	mannaV = mannaV - 10

	if SasoriBody = 1 and defence > 0:
		defSasori = defence*20/100
		defence = defence - defSasori
		'<b><font color = red>On top of falling rain of steel needles greatly weakening your defense.</font></b>'
	end

	'<b><font color = red><<$boydesc>> It is shooting at you by a cloud of poisonous spines.</font></b>'

	if klon > 0:klon = 0 & '<b><font color = red>Your clones turned into steam from the blow needle.</font></b>'

	xgt'atakA1','atak'
end

if $ARGS[0] = 'gedomazo':
	cla
	if klon <= 0 and tuman <= 0:
		magweapbonusV = 5000

		'<b><font color = red><<$boydesc>> with a furious roar of effort on you for its huge stone fist.</font></b>'

		xgt'atak','enemy'
		exit
	elseif klon > 0 or tuman > 0:
		klon = 0
		tuman = 0
		mannaV = mannaV - 500

		'<b><font color = red><<$boydesc>> issue a terrible roar and shock wave sweeps the air over the battlefield.</font></b>'

		xgt'fight','sta'
		exit
	end
end

if $ARGS[0] = 'tobi':
	cla
	!Toby software attacks
	if unmaterialV <= 0 and IzanagiV = 0 and GedoMazo = 0:
		*clr
		'<b><font color = red><<$boydesc>> put his fingers to his lips and said quietly, "KUCHIE SAINT BUT JITSU".</font></b>'
		'<b><font color = red>You will see a giant stone statue of a demon and threw herself at you in attack.</font></b>'

		GedoMazo = 1
		gs 'boyStat', 168
		!The stats
		strenV = 1000
		speedV = 100
		agilV = 90
		reactV = 100
		vitalV = 5000
		intelV = 50
		willV = 50
		!Skills
		magikV = 1
		boxingV = 100
		shootV = 100
		!Parameters
		healthV = vitalV*10 + strenV*5
		mannaV = intelV*magikV + magikV*100 + vitalV*10
		willpowerV = willV*10
		BonusAtakV = 0
		BonusDefV = 0
		!Action Programme
		barierV = 1500
		program = 7
		xgt'fight','start'
		exit
	elseif unmaterialV <= 2 and IzanagiV = 0 and GedoMazo > 0 and TobiStena = 0:
		mannaV = mannaV - 500
		TobiStena = 1
		defenceV = defenceV + 25000

		'<b><font color = red><<$boydesc>> Arcanum makes his skin blackens solidifying his body and creating protection 25000 units.</font></b>'

		barierV = 2000

		xgt'fight','sta'
		exit
	elseif unmaterialV <= 2 and IzanagiV = 0 and GedoMazo > 0 and TobiStena = 1:
		mannaV = mannaV + 6000
		TobiStena = 2

		'<b><font color = red><<$boydesc>> Arcanum and makes you feel like its magical energy increases sharply.</font></b>'

		xgt'fight','sta'
		exit
	elseif stun > 0:
		magweapbonusV = 2000

		'<b><font color = red><<$boydesc>> said triumphantly, "NOW you''re dead".</font></b>'
		'<b><font color = red>It grabs you by the throat and raises his hand in the air.</font></b>'
		'<b><font color = red>His fingers were like steel and they squeeze your throat with terrible force.</font></b>'

		xgt'atak','enemy'
		exit
	elseif defence >= 5000:
		defence = 0
		defenceM = 0
		defenceActPar = 0
		defenceActParM = 0
		defenceAct = 0
		defenceActM = 0
		defAtk = 0
		mannaV = mannaV - 100
		stunV = 1

		'<b><font color = red><<$boydesc>> Close your eyes and you will see, of it as a tear ran down a drop of blood.</font></b>'
		'<b><font color = red>He opened his eyes became completely red with black streaks and said Amaterasu</font></b>'
		'<b><font color = red>In your face black devouring flames rushed to destroy your lightning protection.</font></b>'

		xgt'fight','sta'
		exit
	elseif tuman > 0:
		tumanV = tumanV + tuman
		tuman = 0

		'<b><font color = red><<$boydesc>> adds magic signs hands and your fog coming under his control enveloping you review.</font></b>'
		'<b><font color = red>He attacks you.</font></b>'

		xgt'atak','enemy'
		exit
	elseif unmaterialV > 0 and klon <= 0:
		stunnerV = 1
		mannaV = mannaV - 20
		magweapbonusV = 800

		'<b><font color = red><<$boydesc>> attacks have gathered manna in the arm.</font></b>'

		xgt'atak','enemy'
		exit
	elseif unmaterialV > 0 and klon > 0:
		klon = 0
		stunV = 1

		'<b><font color = red><<$boydesc>> adds signs hands and all your clones simply turn into steam.</font></b>'

		xgt'atak','enemy'
		exit
	elseif unmaterialV <= 0 and tobizanagi < 2:
		mannaV = mannaV - 250
		tobizanagi = tobizanagi + 1
		!unmaterialV = 10

		'<b><font color = red><<$boydesc>> adds signs hands.</font></b>'

		xgt'fight','sta'
		exit
	elseif unmaterialV <= 0 and tobizanagi = 2:
		mannaV = mannaV - 250
		tobizanagi = 0
		unmaterialV = 20
		stunV = 1

		'<b><font color = red><<$boydesc>> signs and puts his hands around his eyes twisted vortex.</font></b>'

		xgt'fight','sta'
		exit
	end
end

if $ARGS[0] = 'kisame':
	cla
	!software attacks Kisame
	if defenceV <= 0 and kisamePro = 0:
		kisamePro = 1
		mannaV = mannaV - 150
		defenceV = defenceV + 1500
		defenceMV = defenceMV + 1500
		defenceWV = defenceWV + 1500
		defenceActParV = 500
		defenceActParMV = 500
		defenceActV = 10
		defenceActMV = 10

		'<b><font color = red><<$boydesc>> fold marks around his hands and formed a water sphere of protecting it from damage.</font></b>'

		xgt'fight','sta'
		exit
	elseif defenceV <= 1000 and kisamePro > 0:
		mannaV = mannaV - 500
		defenceV = defenceV + 5000
		defenceMV = defenceMV + 5000
		defenceWV = defenceWV + 5000
		defenceActParV = 500
		defenceActParMV = 500
		defenceActV = 10
		defenceActMV = 10
		defAtkMV = 10

		'<b><font color = red><<$boydesc>> adds signs hands and space around it begins to sink into the water.</font></b>'

		if klon > 0:klon = 0 & '<b><font color = red>Your clones turned into steam from the impact of water.</font></b>'

		xgt'fight','sta'
		exit
	elseif defenceV > 1000:
		kisameRAND = RAND(0,3)
		if kisameRAND = 0:
			klonV = klonV + 3

			'<b><font color = red><<$boydesc>> adds signs hands.</font></b>'

			xgt'fight','sta'
			exit
		elseif kisameRAND > 0:
			mannaV = mannaV - 250
			damTipV = 1500
			damTipMV = 2500
			bonusShV = 50

			'<b><font color = red><<$boydesc>> fold marks in his hands and you are flying out of the water by a shark.</font></b>'

			if klon > 0:klon = 0 & '<b><font color = red>Your clones turned into steam from the impact of water.</font></b>'

			xgt'atakA1','atak'
			exit
		end
	end

	'<b><font color = red><<$boydesc>> attacks.</font></b>'

	xgt'enemy','fighter'
end

if $ARGS[0] = 'gun':
	cla
	!program directly attacks
	!gs'atak'
	damTipV = 1500

	'<b><font color = red><<$boydesc>> shooting at you.</font></b>'

	xgt'atakA1','atak'
end

if $ARGS[0] = 'fighter':
	cla
	!program directly attacks
	!gs'atak'
	xgt'atak','enemy'
end

if $ARGS[0] = 'fighter2':
	cla
	!program directly attacks
	deystrand = RAND(0,1)
	if deystrand = 0:
		xgt'atak','enemy'
	elseif deystrand = 1:
		knifeV = RAND(1,3)

		'<b><font color = red><<$boydesc>> throws in you <<knifeV>> knives</font></b>'

		xgt'atak','enemy'
	end
end

if $ARGS[0] = 'fighter3':
	cla
	!program directly attacks
	if tuman = 0 and tumanV < 5 and mannaV > 10:
		mannaV = mannaV - 10
		tumanV = tumanV + 10

		'<b><font color = red><<$boydesc>> produces a fog on the battlefield.</font></b>'

		xgt'fight','sta'
		exit
	end

	deystrand = RAND(0,1)
	if deystrand = 0:
		xgt'atak','enemy'
	elseif deystrand = 1:
		knifeV = RAND(1,3)

		'<b><font color = red><<$boydesc>> throws in you <<knifeV>> knives</font></b>'

		xgt'atak','enemy'
	end
end

if $ARGS[0] = 'fighter4':
	cla
	!program directly attacks
	if tuman = 0 and tumanV < 5 and mannaV > 10:
		mannaV = mannaV - 10
		tumanV = tumanV + 10

		'<b><font color = red><<$boydesc>> produces a fog on the battlefield.</font></b>'

		xgt'fight','sta'
		exit
	elseif klonV < 1 and mannaV > 15:
		mannaV = mannaV - 15
		klonV = klonV + 1

		'<b><font color = green>LOST</font></b>'

		xgt'fight','sta'
		exit
	end

	deystrand = RAND(0,1)
	if deystrand = 0:
		xgt'atak','enemy'
	elseif deystrand = 1:
		knifeV = RAND(1,3)

		'<b><font color = red><<$boydesc>> throws in you <<knifeV>> knives</font></b>'

		xgt'atak','enemy'
	end
end

if $ARGS[0] = 'fighter5':
	cla
	!program directly attacks
	if tuman = 0 and tumanV < 5 and mannaV > 10:
		mannaV = mannaV - 10
		tumanV = tumanV + 10

		'<b><font color = red><<$boydesc>> produces a fog on the battlefield.</font></b>'

		xgt'fight','sta'
		exit
	elseif klonV < 1 and mannaV > 15:
		mannaV = mannaV - 15
		klonV = klonV + 1

		'<b><font color = green>LOST</font></b>'

		xgt'fight','sta'
		exit
	elseif stun < 1 and pcs_manna > 20:
		stunnerV = 1
		mannaV = mannaV - 20

		'<b><font color = red><<$boydesc>> attacks you Gouge.</font></b>'

		xgt'atak','enemy'
	end

	deystrand = RAND(0,1)
	if deystrand = 0:
		xgt'atak','enemy'
	elseif deystrand = 1:
		knifeV = RAND(1,3)

		'<b><font color = red><<$boydesc>> throws in you <<knifeV>> knives</font></b>'

		xgt'atak','enemy'
	end
end

--- enemy ---------------------------------

