# atak
if $ARGS[0]='player':
cla
!!!!!!!
set tip = 0
!!!!!!!
set strenA = stren
set speedA = speed
set agilA = agil
set vitalA = vital
!skills
set boxingA = boxing
!parameters
set healthA = health
set BonusA = BonusAtak
!!!!!!!!!
set strenD = strenV
set speedD = speedV
set agilD = agilV
set vitalD = vitalV
!skills
set boxingD = boxingV
!parameters
set healthD = healthV
set initBonusA = initBonus
set initBonus = 0
set initBonusV = 0
set BonusD = BonusDefV
     if stunV <= 0:
     xgt'atak','popad'
     end
     if stunV > 0:
     '<B><font color=green><<$nameV>> Can not move a critical hit</font></B>'
     xgt'atak','uronKrit'
     end
end


if $ARGS[0]='enemy':
cla
!!!!!!!
set tip = 1
!!!!!!!
set strenA = strenV
set speedA = speedV
set agilA = agilV
set vitalA = vitalV
!skills
set boxingA = boxingV
!parameters
set healthA = healthV
set BonusA = BonusAtakV
!!!!!!!!!!!!!!
set strenD = stren
set speedD = speed
set agilD = agil
set vitalD = vital
!skills
set boxingD = boxing
!parameters
set healthD = health
set BonusD = BonusDef
set initBonusA = initBonusV
set initBonus = 0
set initBonusV = 0
     if stun <= 0:
     xgt'atak','popad'
     end
     if stun > 0:
     '<B><font color=red>YOU can not move a critical hit</font></B>'
     xgt'atak','uronKritV'
     end
end

if $ARGS[0]='popad':
cla
!payment hit dodge
set poSp = speedA*20/100
set uvAg = agilD*20/100
set poBox = boxingA*20/100
set uvBox = boxingD*20/100
set popad = RAND (boxingA-poBox,boxingA+poBox) + RAND (speedA-poSp,speedA+poSp) + BonusA + initBonusA
set uvorot = RAND (boxingD-uvBox,boxingD+uvBox) + RAND (agilD-uvAg,agilD+uvAg) + BonusD
set uvorKoef = uvorot*50/100
set popKoef = popad*50/100
     if popad > uvorot:
         if popad >= uvorot+uvorKoef:
         !Crete, very direct hit
             if tip = 0:
             !attack players
             '<B><font color=green>Critical hits</font></B>'
             xgt'atak','uronKrit'
             end
             if tip = 1:
             !attack the enemy
             '<B><font color=red>Critical hits</font></B>'
             xgt'atak','uronKritV'
             end
         end
         if popad < uvorot+uvorKoef:
         !normal hit
             if tip = 0:
             !attack players
             '<B><font color=green>EYE</font></B>'
             xgt'atak','uron'
             end
             if tip = 1:
             !attack the enemy
             '<B><font color=red>EYE</font></B>'
             xgt'atak','uronV'
             end
         end
     end
     if popad <= uvorot:
         if popad+popKoef <= uvorot:
         !critical blunder
             if tip = 0:
             !attack players
             '<B><font color=red>CRITICAL SLIP</font></B>'
             xgt'atak','uronKritV'
             end
             if tip = 1:
             !attack the enemy
             '<B><font color=green>CRITICAL SLIP</font></B>'
             xgt'atak','uronKrit'
             end
         end
         if popad+popKoef > uvorot:
         !bloomer
             if tip = 0:
             !attack players
             '<B><font color=red>LOST</font></B>'
             xgt'fight','sta'
             end
             if tip = 1:
             !attack the enemy
             '<B><font color=green>LOST</font></B>'
             xgt'fight','sta'
             end
         end
     end
end

if $ARGS[0]='uronKrit':
cla
set damage = RAND(stren,stren*2) + weapbonus + magweapbonus
     if knife > 0:
     set knibon = knife+1
     set knife = 0
     set damage = damage*knibon
     set knibon = 0
     '<B><font color=green>In your opponent flies throwing knife</font></B>'
     end
     if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
     if dospehV > 0:set damage = damage - dospehDefV&set dospehEnV = dospehEnV - 1
     if damage < 0:set damage = 0
     Set healthV = healthV - damage
         if weaponTipe = 1:set bloodV = bloodV + RAND (weapon/4,weapon/2)
         if weaponTipe = 2:set stun = stun + RAND (1,2)
         if weaponTipe = 3:set bloodV = bloodV + RAND (weapon/4,weapon/2)
         if stunner > 0:
         set stunner = 0
         set stunV = RAND (3,6)
         '<B><font color=green>You paralyzed enemy on <<stunV>> moves.</font></B>'
         end
     '<B><font color=green>harmed <<damage>> units</font></B>'
         if zerkaloV > 0:
         set zerkaloV = zerkaloV - 1
         set health = health - damage
         '<B><font color=red><<$nameV>> reflected the damage and you got <<damage>> points of damage</font></B>'
         end
     xgt'fight','sta'
     end
     if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
     Set defenceV = defenceV - damage
     '<B><font color=green>Protection of the enemy suffered damage <<damage>> units</font></B>'
     xgt'fight','sta'
     end
     if klonV > 0 and unmaterialV <= 0:
     set klonV = klonV - 1
     '<B><font color=green>Destroyed enemy clone, he still had <<KlonV>> clones</font></B>'
     xgt'fight','sta'
     end
     if unmaterialV > 0:
     set unmaterialV = unmaterialV - 1
     '<B><font color=red>Your kick flew right through the opponent`s body. <<$nameV>> not material</font></B>'
     xgt'fight','sta'
     end
     if barierV > 0:
     !imeniteta barrier for damage
         if barierV >= damage:
         '<B><font color=red><<$nameV>> easily withstood the blow your</font></B>'
         xgt'fight','sta'
         end
         if barierV < damage:
         Set healthV = healthV - damage
         if weaponTipe = 1:set bloodV = bloodV + RAND (weapon/4,weapon/2)
         if weaponTipe = 2:set stun = stun + RAND (1,2)
         if weaponTipe = 3:set bloodV = bloodV + RAND (weapon/4,weapon/2)
         if stunner > 0:
         set stunV = RAND (3,6)
         '<B><font color=green>You paralyzed enemy on <<stunV>> moves.</font></B>'
         end
         '<B><font color=green>harmed <<damage>> units</font></B>'
             if zerkaloV > 0:
             set zerkaloV = zerkaloV - 1
             set health = health - damage
             '<B><font color=red><<$nameV>> reflected the damage and you got <<damage>> points of damage</font></B>'
             end
         end
     xgt'fight','sta'  
     end

end


if $ARGS[0]='uron':
cla
set stKo = stren*20/100
set damage = RAND(stren-stKo,stren+stKo) + weapbonus + magweapbonus
     if knife > 0:
     set knibon = knife+1
     set knife = 0
     set damage = damage*knibon
     set knibon = 0
     '<B><font color=green>In your opponent flies throwing knife</font></B>'
     end
     if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
     if dospehV > 0:set damage = damage - dospehDefV&set dospehEnV = dospehEnV - 1
     if damage < 0:set damage = 0
     Set healthV = healthV - damage
         if stunner > 0:
         set stunner = 0
         set stunV = RAND (1,3)
         '<B><font color=green>You paralyzed enemy on <<stunV>> moves.</font></B>'
         end
     '<B><font color=green>harmed <<damage>> units</font></B>'
         if zerkaloV > 0:
         set zerkaloV = zerkaloV - 1
         set health = health - damage
         '<B><font color=red><<$nameV>> reflected the damage and you got <<damage>> points of damage</font></B>'
         end
     xgt'fight','sta'
     end
     if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
     Set defenceV = defenceV - damage
     '<B><font color=green>Protection of the enemy suffered damage <<damage>> units</font></B>'
     xgt'fight','sta'
     end
     if klonV > 0 and unmaterialV <= 0:
     set klonV = klonV - 1
     '<B><font color=green>Destroyed enemy clone, he still had <<KlonV>> clones</font></B>'
     xgt'fight','sta'
     end
     if unmaterialV > 0:
     set unmaterialV = unmaterialV - 1
     '<B><font color=red>Your kick flew right through the opponent`s body. <<$nameV>> not material</font></B>'
     xgt'fight','sta'
     end
     if barierV > 0:
     !imeniteta barrier for damage
         if barierV >= damage:
         '<B><font color=red><<$nameV>> easily withstood the blow your</font></B>'
         xgt'fight','sta'
         end
         if barierV < damage:
         Set healthV = healthV - damage
         if stunner > 0:
         set stunV = RAND (1,3)
         '<B><font color=green>You paralyzed enemy on <<stunV>> moves.</font></B>'
         end
         '<B><font color=green>harmed <<damage>> units</font></B>'
             if zerkaloV > 0:
             set zerkaloV = zerkaloV - 1
             set health = health - damage
             '<B><font color=red><<$nameV>> reflected the damage and you got <<damage>> points of damage</font></B>'
             end
         end
     xgt'fight','sta'
     end

end



if $ARGS[0]='uronKritV':
cla
set damage = RAND(strenV,strenV*2) + weapbonusV + magweapbonusV
     if knifeV > 0:
     set knibonV = knifeV+1
     set knifeV = 0
     set damage = damage*knibonV
     set knibonV = 0
     '<B><font color=red>As you fly throwing knife</font></B>'
     end
     if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
     if dospeh > 0:set damage = damage - dospehDef&set dospehEn = dospehEn - 1
     if damage < 0:set damage = 0
     Set health = health - damage
         if weaponTipeV = 1:set blood = blood + RAND (weaponV/4,weaponV/2)
         if weaponTipeV = 2:set stunV = stunV + RAND (1,2)
         if weaponTipeV = 3:set blood = blood + RAND (weaponV/4,weaponV/2)
         if stunnerV > 0:
         set stunnerV = 0
         set stun = RAND (3,6)
         '<B><font color=red><<$nameV>> paralyze you on <<stun>> moves.</font></B>'
         end
     '<B><font color=red>You harmed <<damage>> units</font></B>'
         if zerkalo > 0:
         set zerkalo = zerkalo - 1
         set healthV = healthV - damage
         '<B><font color=green>You have reflected damage and <<$nameV>> received <<damage>> points of damage</font></B>'
         end
     xgt'fight','sta'
     end
     if defence > 0 and klon <= 0 and unmaterial <= 0:
     Set defence = defence - damage
     '<B><font color=red>Your defense harmed <<damage>> units</font></B>'
     xgt'fight','sta'
     end
     if klon > 0 and unmaterial <= 0:
     set klon = klon - 1
     '<B><font color=red>Destroy your clone, Do you have more <<Klon>> clones</font></B>'
     xgt'fight','sta'
     end
     if unmaterial > 0:
     set unmaterial = unmaterial - 1
     '<B><font color=green>Beat the enemy flew right through your body. YOU are not material</font></B>'
     xgt'fight','sta'
     end
     if barier > 0:
     !imeniteta barrier for damage
         if barier >= damage:
         '<B><font color=green>You can easily withstand the impact of the enemy</font></B>'
         xgt'fight','sta'
         end
         if barier < damage:
         Set health = health - damage
         if weaponTipeV = 1:set blood = blood + RAND (weaponV/4,weaponV/2)
         if weaponTipeV = 2:set stunV = stunV + RAND (1,2)
         if weaponTipeV = 3:set blood = blood + RAND (weaponV/4,weaponV/2)
         if stunnerV > 0:
         set stun = RAND (3,6)
         '<B><font color=red><<$nameV>> paralyze you on <<stun>> moves.</font></B>'
         end
         '<B><font color=red>You harmed <<damage>> units</font></B>'
             if zerkalo > 0:
             set zerkalo = zerkalo - 1
             set healthV = healthV - damage
             '<B><font color=green>You have reflected damage and <<$nameV>> received <<damage>> points of damage</font></B>'
             end
         end
     xgt'fight','sta'
     end

end


if $ARGS[0]='uronV':
cla
set stKo = strenV*20/100
set damage = RAND(strenV-stKo,strenV+stKo) + weapbonusV + magweapbonusV
     if knifeV > 0:
     set knibonV = knifeV+1
     set knifeV = 0
     set damage = damage*knibonV
     set knibonV = 0
     '<B><font color=red>As you fly throwing knife</font></B>'
     end
     if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
     if dospeh > 0:set damage = damage - dospehDef&set dospehEn = dospehEn - 1
     if damage < 0:set damage = 0
     Set health = health - damage
         if stunnerV > 0:
         set stunnerV = 0
         set stun = RAND (3,6)
         '<B><font color=red><<$nameV>> paralyze you on <<stun>> moves.</font></B>'
         end
     '<B><font color=red>You harmed <<damage>> units</font></B>'
         if zerkalo > 0:
         set zerkalo = zerkalo - 1
         set healthV = healthV - damage
         '<B><font color=green>You have reflected damage and <<$nameV>> received <<damage>> points of damage</font></B>'
         end
     xgt'fight','sta'
     end
     if defence > 0 and klon <= 0 and unmaterial <= 0:
     Set defence = defence - damage
     '<B><font color=red>Your defense harmed <<damage>> units</font></B>'
     xgt'fight','sta'
     end
     if klon > 0 and unmaterial <= 0:
     set klon = klon - 1
     '<B><font color=red>Destroy your clone, Do you have more <<Klon>> clones</font></B>'
     xgt'fight','sta'
     end
     if unmaterial > 0:
     set unmaterial = unmaterial - 1
     '<B><font color=green>Beat the enemy flew right through your body. YOU are not material</font></B>'
     xgt'fight','sta'
     end
     if barier > 0:
     !imeniteta barrier for damage
         if barier >= damage:
         '<B><font color=green>You can easily withstand the impact of the enemy</font></B>'
         xgt'fight','sta'
         end
         if barier < damage:
         Set health = health - damage
         if stunnerV > 0:
         set stun = RAND (3,6)
         '<B><font color=red><<$nameV>> paralyze you on <<stun>> moves.</font></B>'
         end
         '<B><font color=red>You harmed <<damage>> units</font></B>'
             if zerkalo > 0:
             set zerkalo = zerkalo - 1
             set healthV = healthV - damage
             '<B><font color=green>You have reflected damage and <<$nameV>> received <<damage>> points of damage</font></B>'
             end
         end
     xgt'fight','sta'
     end

end




















--- atak ---------------------------------

