# enemy
!Расчет атаки противника

if $ARGS[0] = 'start':
cla
!в этом блоке на основании переменной выбирается программа атаки противника
	if program = 0:
	!программа действий простых атакеров физухой
	xgt 'enemy','fighter'
	end
	if program = 1:
	!программа действий физуха и ножи
	xgt 'enemy','fighter2'
	end
	if program = 2:
	!программа действий физуха, ножи, туман
	xgt 'enemy','fighter3'
	end
	if program = 3:
	!программа действий физуха, ножи, туман, клоны
	xgt 'enemy','fighter4'
	end
	if program = 4:
	!программа действий физуха, ножи, туман, клоны, паралич
	xgt 'enemy','fighter5'
	end
	if program = 5:
	!программа действий Кисаме
	xgt 'enemy','kisame'
	end
	if program = 6:
	!программа действий Тоби
	xgt 'enemy','tobi'
	end
	if program = 7:
	!программа действий Тоби
	xgt 'enemy','gedomazo'
	end
	if program = 8:
	!программа действий Огнестрела
	xgt 'enemy','gun'
	end
	if program = 9:
	!программа действий Сасори
	xgt 'enemy','sasori'
	end
	if program = 10:
	!программа действий Конан
	xgt 'enemy','konan'
	end
	if program = 11:
	!программа действий Хидан
	xgt 'enemy','hidan'
	end

end

if $ARGS[0] = 'hidan':
cla
	if zerkaloV > 0: set barierV = 0
	if zerkaloV <= 0: set barierV = 5500
if healthV < vitalV*10 + strenV*5: set healthV = vitalV * 10 + strenV * 5
	if zerkaloV > 0:
	set healthV = vitalV * 10 + strenV * 5
	set mannaV = intelV * magikV + magikV * 100 + vitalV * 10
	set willpowerV = willV * 10
	set health -= 400
	set manna -= 500
	'<B><font color = red><<$nameV>> yells "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 like the pain pierces the body.</font></B>'
	xgt 'fight','sta'
	exit
	end
	if zerkaloV <= 0 and defence > 0:
	set damTipV = 5000
	set bonusShV = 100
	set hidanAtk = 1
	'<B><font color = red><<$nameV>> yells "Your existence offends DZHASHINA MY GOD!" and throws you in his scythe trehlezviynuyu driving it by a line.</font></B>'
	if klon > 0: set klon = klon / 2 & '<B><font color = red><<$nameV>> yells "Mraz I slaughter YOU LIKE A PIG!"</font></B>'
	xgt 'atakA1','atak'
	exit
	end
	if zerkaloV <= 0 and defence <= 0:
	set damTipV = 300
	set bonusShV = 100
	set hidanAtk = 1
	'<B><font color = red><<$nameV>> yells "You will die a blasphemer!" and throws you in his scythe trehlezviynuyu driving it by a line.</font></B>'
	if klon > 0: set klon = 0 & '<B><font color = red>Your clones turned into steam from the blow spit. <<$nameV>> yells "I IMMORTAL Ravager! And YOU SHIT!"</font></B>'
	if tuman > 0: set tuman = 0 & '<B><font color = red><<$nameV>> yells "You´re pathetic in their vain attempts SPRYATATSYA FROM ME!"</font></B>'
	xgt 'atakA1','atak'
	exit
	end
end

if $ARGS[0] = 'konan':
cla
	if round < 6:
	set mannaV -= 10
	set damTipV = 500
	'<B><font color = red><<$nameV>> adds signs hands and you are flying sheets of paper.</font></B>'
	if klon > 0: set klon = 0 & '<B><font color = red>Your clones turned into steam from hitting the paper.</font></B>'
	xgt 'atakA1','atak'
	exit
	end
	if round >= 6:
		if unmaterialV > 5 and defence > 0:
		set mannaV -= 250
		set damTipV = 15000
		set bonusShV = 100
		'<B><font color = red><<$nameV>> takes to the air on the white wings and pulled out from her wings paper falls on you in a flood of flying with terrible speed paper swords.</font></B>'
		if klon > 0: set klon = 0 & '<B><font color = red>Your clones turned into steam from hitting the paper.</font></B>'
		xgt 'atakA1','atak'
		exit
		end
		if unmaterialV > 5 and defence <= 0:
		set mannaV -= 20
		set damTipV = 450
		'<B><font color = red><<$nameV>> creates a paper boomerangs that fly in your direction.</font></B>'
		xgt 'atakA1','atak'
		exit
		end
		if defenceV <= 0 and unmaterialV <= 5:
		set mannaV -= 250
		set defenceV += 3000
		set defenceMV += 3000
		set defenceWV += 3000
		'<B><font color = red>Conan shoots up to its paper wings like an angel. Around it starts spinning paper creating her protection.</font></B>'
		xgt 'fight','sta'
		exit
		end
		if unmaterialV <= 2 and konanD < 3:
		set mannaV -= 150
		set konanD += 1
		'<B><font color = red>Conan stops meditating in the air.</font></B>'
		xgt 'fight','sta'
		exit
		end
		if konanD >= 3:
		set mannaV -= 250
		set konanD = 0
		set unmaterialV = 20
		'<B><font color = red>Conan crumbles in the air for thousands of sheets of paper.</font></B>'
		xgt 'fight','sta'
		exit
		end
	end
end

if $ARGS[0] = 'sasori':
cla
if SasoriBody > 1: set damTipV = 1000
if SasoriBody = 1: set damTipV = 2000
set poisonAV = 1
set defenceV += 10
set defenceMV += 20
set defenceWV += 50
set mannaV -= 10
	if SasoriBody = 1 and defence > 0:
	set defSasori = defence * 20/100
	set defence -= defSasori
	'<B><font color = red>of rain falls on top of steel needles greatly weaken your defenses.</font></B>'
	end
'<B><font color = red><<$nameV>> shoots at you the whole cloud of poisonous spines.</font></B>'
if klon > 0: set 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:
	set magweapbonusV = 5000
	'<B><font color = red><<$nameV>> with a furious roar of effort on you for its huge stone fist.</font></B>'
	xgt 'atak','enemy'
	exit
	end
	if klon > 0 or tuman > 0:
	set klon = 0
	set tuman = 0
	set mannaV -= 500
	'<B><font color = red><<$nameV>> makes a terrible roar and air shock wave sweeps over the battlefield.</font></B>'
	xgt 'fight','sta'
	exit
	end

end

if $ARGS[0] = 'tobi':
cla
!программа атаки Тоби
	if unmaterialV <= 0 and IzanagiV = 0 and GedoMazo = 0:
	*clr
	'<B><font color = red><<$nameV>> fingers to his lips and said quietly, "KUCHIE SAINT BUT JITSU."</font></B>'
	'<B><font color = red>you will see Huge stone statue of a demon, and you rushed to the attack.</font></B>'
	set GedoMazo = 1
	set $nameV = 'Gedo Mazo'
	!Статы
	set strenV = 1000
	set speedV = 100
	set agilV = 90
	set reactV = 100
	set vitalV = 5000
	set intelV = 50
	set willV = 50
	!Навыки
	set magikV = 1
	set boxingV = 100
	set shootV = 100
	!Параметры
	set healthV = vitalV * 10 + strenV * 5
	set mannaV = intelV * magikV + magikV * 100 + vitalV * 10
	set willpowerV = willV * 10
	set BonusAtakV = 0
	set BonusDefV = 0
	!программа действий
	set barierV = 1500
	set program = 7
	xgt 'fight','start'
	exit
	end

	if unmaterialV <= 2 and IzanagiV = 0 and GedoMazo > 0 and TobiStena = 0:
	set mannaV -= 500
	set TobiStena = 1
	set defenceV += 25000
	'<B><font color = red><<$nameV>> makes Arcanum and reinforcing the skin blackens his body and creating protection of 25,000 units.</font></B>'
	set barierV = 2000
	xgt 'fight','sta'
	exit
	end

	if unmaterialV <= 2 and IzanagiV = 0 and GedoMazo > 0 and TobiStena = 1:
	set mannaV += 6000
	set TobiStena = 2
	'<B><font color = red><<$nameV>> makes the magic sign and you feel like it´s magical energy increases sharply.</font></B>'
	xgt 'fight','sta'
	exit
	end


	if stun > 0:
	set magweapbonusV = 2000
	'<B><font color = red><<$nameV>> triumphantly said, "Now you´re dead."</font></B>'
	'<B><font color = red>He grabs you by the throat and lifts his hand in the air.</font></B>'
	'<B><font color = red>His fingers like steel and they squeeze your throat with terrible force.</font></B>'
	xgt 'atak','enemy'
	exit
	end

	if defence >= 5000:
	set defence = 0
	set defenceM = 0
	set defenceActPar = 0
	set defenceActParM = 0
	set defenceAct = 0
	set defenceActM = 0
	set defAtk = 0
	set mannaV -= 100
	set stunV = 1
	'<B><font color = red><<$nameV>> close your eyes and you saw of him as a tear ran down a drop of blood.</font></B>'
	'<B><font color = red>He opened his eyes become completely red with black veins and said Amaterasu</font></B>'
	'<B><font color = red>In your face rushed black devouring flames destroy your lightning protection.</font></B>'
	xgt 'fight','sta'
	exit
	end
	if tuman > 0:
	set tumanV += tuman
	set tuman = 0
	'<B><font color = red><<$nameV>> adds the magic signs your hands and mist coming under his control enveloping the review of you.</font></B>'
	'<B><font color = red>He will attack you.</font></B>'
	xgt 'atak','enemy'
	exit
	end
	if unmaterialV > 0 and klon <= 0:
	set stunnerV = 1
	set mannaV -= 20
	set magweapbonusV = 800
	'<B><font color = red><<$nameV>> attacks you gathered the manna in the hand.</font></B>'
	xgt 'atak','enemy'
	exit
	end
	if unmaterialV > 0 and klon > 0:
	set klon = 0
	set stunV = 1
	'<B><font color = red><<$nameV>> adds signs hands and all your clones just turn into steam.</font></B>'
	xgt 'atak','enemy'
	exit
	end
	if unmaterialV <= 0 and tobizanagi < 2:
	set mannaV -= 250
	set tobizanagi += 1
	!set unmaterialV = 10
	'<B><font color = red><<$nameV>> adds the characters by hand.</font></B>'
	xgt 'fight','sta'
	exit
	end
	if unmaterialV <= 0 and tobizanagi = 2:
	set mannaV -= 250
	set tobizanagi = 0
	set unmaterialV = 20
	set stunV = 1
	'<B><font color = red><<$nameV>> folds his hands and marks around his eyes twisted vortex.</font></B>'
	xgt 'fight','sta'
	exit
	end

end

if $ARGS[0] = 'kisame':
cla
!программа атаки Кисаме
	if defenceV <= 0 and kisamePro = 0:
	set kisamePro = 1
	set mannaV -= 150
	set defenceV += 1500
	set defenceMV += 1500
	set defenceWV += 1500
	set defenceActParV = 500
	set defenceActParMV = 500
	set defenceActV = 10
	set defenceActMV = 10
	'<B><font color = red><<$nameV>> adds the marks around his hands and formed water sphere protecting it from damage.</font></B>'
	xgt 'fight','sta'
	exit
	end
	if defenceV <= 1000 and kisamePro > 0:
	set mannaV -= 500
	set defenceV += 5000
	set defenceMV += 5000
	set defenceWV += 5000
	set defenceActParV = 500
	set defenceActParMV = 500
	set defenceActV = 10
	set defenceActMV = 10
	set defAtkMV = 10
	'<B><font color = red><<$nameV>> adds the marks and the space around the hands begins pogruzhatsya water.</font></B>'
	if klon > 0: set klon = 0 & '<B><font color = red>Your clones turned into steam from hitting the water.</font></B>'
	xgt 'fight','sta'
	exit
	end
	if defenceV > 1000:
	set kisameRAND = RAND(0,3)
		if kisameRAND = 0:
		set klonV += 3
		'<B><font color = red><<$nameV>> adds the characters by hand.</font></B>'
		xgt 'fight','sta'
		exit
		end
		if kisameRAND > 0:
		set mannaV -= 250
		set damTipV = 1500
		set damTipMV = 2500
		set bonusShV = 50
		'<B><font color = red><<$nameV>> adds the characters in the hands and fly sharks have created from the water.</font></B>'
		if klon > 0: set klon = 0 & '<B><font color = red>Your clones turned into steam from hitting the water.</font></B>'
		xgt 'atakA1','atak'
		exit
		end
	end
	'<B><font color = red><<$nameV>> attacks.</font></B>'
	xgt 'enemy','fighter'
end

if $ARGS[0] = 'gun':
cla
!непосредственно программа атаки
!gs 'atak'
set damTipV = 1500
'<B><font color = red><<$nameV>> shoots at you.</font></B>'
xgt 'atakA1','atak'
end

if $ARGS[0] = 'fighter':
cla
!непосредственно программа атаки
!gs 'atak'
xgt 'atak','enemy'
end

if $ARGS[0] = 'fighter2':
cla
!непосредственно программа атаки
set deystrand = RAND(0,1)
	if deystrand = 0:
	xgt 'atak','enemy'
	end
	if deystrand = 1:
	set knifeV = RAND(1,3)
	'<B><font color = red><<$nameV>> have a throws <<knifeV>> the blades</font></B>'
	xgt 'atak','enemy'
	end
end

if $ARGS[0] = 'fighter3':
cla
!непосредственно программа атаки
	if tuman = 0 and tumanV < 5 and mannaV > 10:
	set mannaV -= 10
	set tumanV += 10
	'<B><font color = red><<$nameV>> produces a fog on the battlefield.</font></B>'
	xgt 'fight','sta'
	exit
	end
set deystrand = RAND(0,1)
	if deystrand = 0:
	xgt 'atak','enemy'
	end
	if deystrand = 1:
	set knifeV = RAND(1,3)
	'<B><font color = red><<$nameV>> have a throws <<knifeV>> the blades</font></B>'
	xgt 'atak','enemy'
	end
end

if $ARGS[0] = 'fighter4':
cla
!непосредственно программа атаки
	if tuman = 0 and tumanV < 5 and mannaV > 10:
	set mannaV -= 10
	set tumanV += 10
	'<B><font color = red><<$nameV>> produces a fog on the battlefield.</font></B>'
	xgt 'fight','sta'
	exit
	end
	if klonV < 1 and mannaV > 15:
	set mannaV -= 15
	set klonV += 1
	'<B><font color = green>is washed</font></B>'
	xgt 'fight','sta'
	exit
	end
set deystrand = RAND(0,1)
	if deystrand = 0:
	xgt 'atak','enemy'
	end
	if deystrand = 1:
	set knifeV = RAND(1,3)
	'<B><font color = red><<$nameV>> have a throws <<knifeV>> the blades</font></B>'
	xgt 'atak','enemy'
	end
end

if $ARGS[0] = 'fighter5':
cla
!непосредственно программа атаки
	if tuman = 0 and tumanV < 5 and mannaV > 10:
	set mannaV -= 10
	set tumanV += 10
	'<B><font color = red><<$nameV>> produces a fog on the battlefield.</font></B>'
	xgt 'fight','sta'
	exit
	end
	if klonV < 1 and mannaV > 15:
	set mannaV -= 15
	set klonV += 1
	'<B><font color = green>is washed</font></B>'
	xgt 'fight','sta'
	exit
	end
	if stun < 1 and manna > 20:
	set stunnerV = 1
	set mannaV -= 20
	'<B><font color = red><<$nameV>> attacks you Gouge.</font></B>'
	xgt 'atak','enemy'
	end
set deystrand = RAND(0,1)
	if deystrand = 0:
	xgt 'atak','enemy'
	end
	if deystrand = 1:
	set knifeV = RAND(1,3)
	'<B><font color = red><<$nameV>> have a throws <<knifeV>> the blades</font></B>'
	xgt 'atak','enemy'
	end
end
--- enemy ---------------------------------

