# atakA
if $ARGS[0] = 'atak':
cla
!payment hit dodge
poSp = speed * 20 / 100
uvAg = agilV * 20 / 100
poBox = pcs_react * 20 / 100
uvBox = reactV * 20 / 100
popad = RAND(pcs_react - poBox,pcs_react + poBox) + RAND(speed - poSp,speed + poSp) + bonusSh
uvorot = RAND(reactV - uvBox,reactV + uvBox) + RAND(agilV - uvAg,agilV + uvAg)
uvorKoef = uvorot * 50 / 100
popKoef = popad * 50 / 100
if popad > uvorot:
if popad >= uvorot + uvorKoef:
!Crete, very direct hit
'Critical hits'
xgt'atakA','uronKrit'
elseif popad < uvorot+uvorKoef:
!Normal hit
!He attacks the enemy
'EYE'
xgt'atakA','uron'
end
elseif popad <= uvorot:
'LOST'
xgt'fight','sta'
end
end
if $ARGS[0] = 'uronKrit':
cla
damKoef = damTip*20/100
damage = RAND(damTip+damKoef,damTip+damKoef*2)
if damTipM > 0:
damKoefM = damTipM*20/100
damageM = RAND(damTipM+damKoefM,damTipM+damKoefM*2)
end
xgt'atakA','damage'
end
if $ARGS[0] = 'uron':
cla
damKoef = damTip*20/100
damage = RAND(damTip-damKoef,damTip+damKoef)
if damTipM > 0:
damKoefM = damTipM*20/100
damageM = RAND(damTipM-damKoefM,damTipM+damKoefM)
end
xgt'atakA','damage'
end
if $ARGS[0] = 'damage':
cla
if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
if dospehV > 0:damageV = damageV - dospehDefV & dospehEn = dospehEn - 1
if damage < 0:damage = 0
healthV = healthV - damage
if damTipM > 0:
mannaV = mannaV - damageM
pcs_manna = pcs_manna + damageM
'You swallowed <> manna enemy units.'
end
!pcs_manna = pcs_manna - damageM
if eleSh > 0:
stunV = RAND(eleSh,eleSh*3)
'<<$boydesc>> paralyzed <> Rounds'
end
'You have caused damage <> units'
!'Your manna harmed <> units'
if zerkaloV > 0:
zerkaloV = zerkaloV - 1
pcs_health = pcs_health - damage
'<<$boydesc>> reflected the damage and you get <> points of damage'
end
xgt'fight','sta'
end
if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
!damSum = damage + damageM
!defence = defence - damSum
defenceV = defenceV - damage
'You have caused damage <> Protection of enemy units'
xgt'fight','sta'
end
if klonV > 0 and unmaterialV <= 0:
klonV = klonV - 1
'Destroyed enemy clone'
xgt'fight','sta'
end
if unmaterialV > 0:
unmaterialV = unmaterialV - 1
'Your blow has passed through the body of the enemy. Opponents do not materials'
xgt'fight','sta'
end
if barierV > 0:
!imeniteta barrier for damage
if barierV >= damage:
'<<$boydesc>> easily weathered blow your'
xgt'fight','sta'
elseif barierV < damage:
!pcs_manna = pcs_manna - damageM
!pcs_health = pcs_health - damage
damage = damage - barierV
healthV = healthV - damage
if damTipM > 0:
mannaV = mannaV - damageM
pcs_manna = pcs_manna + damageM
'You swallowed <> manna enemy units.'
end
if eleSh > 0:
stunV = RAND(eleSh,eleSh*3)
'<<$boydesc>> paralyzed <> Rounds'
end
'You have caused damage <> units'
!'Your manna harmed <> units'
if zerkaloV > 0:
zerkaloV = zerkaloV - 1
pcs_health = pcs_health - damage
'Opponent reflected damage and you get <> points of damage'
end
end
xgt'fight','sta'
end
end
if $ARGS[0] = 'atakW':
cla
!payment hit dodge
poSp = speed * 20 / 100
uvAg = agilV * 20 / 100
poBox = pcs_react * 20 / 100
uvBox = reactV * 20 / 100
popad = RAND(pcs_react - poBox,pcs_react + poBox) + RAND(speed - poSp,speed + poSp)
uvorot = RAND(reactV - uvBox,reactV + uvBox) + RAND(agilV - uvAg,agilV + uvAg)
uvorKoef = uvorot * 50 / 100
popKoef = popad * 50 / 100
if popad > uvorot:
if popad >= uvorot+uvorKoef:
!Crete, very direct hit
'Critical hits'
xgt'atakA','uronKritW'
elseif popad < uvorot+uvorKoef:
!Normal hit
'EYE'
xgt'atakA','uronW'
end
elseif popad <= uvorot:
'LOST'
xgt'fight','sta'
end
end
if $ARGS[0] = 'uronKritW':
cla
damKoef = damTip*20/100
damage = RAND(damTip+damKoef,damTip+damKoef*2)
damKoefM = damTipM*20/100
damageM = RAND(damTipM+damKoefM,damTipM+damKoefM*2)
xgt'atakA','damageW'
end
if $ARGS[0] = 'uronW':
cla
damKoef = damTip*20/100
damage = RAND(damTip-damKoef,damTip+damKoef)
damKoefM = damTipM*20/100
damageM = RAND(damTipM-damKoefM,damTipM+damKoefM)
xgt'atakA','damageW'
end
if $ARGS[0] = 'damageW':
cla
if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
if dospehV > 0:damageV = damageV - dospehDefV & dospehEn = dospehEn - 1
if damage < 0:damage = 0
healthV = healthV - damage
mannaV = mannaV - damageM
'You harmed <> units'
'You have caused damage to the enemy manna <> units'
if zerkaloV > 0:
zerkaloV = zerkaloV - 1
pcs_health = pcs_health - damage
'<<$boydesc>> reflected the damage and you get <> points of damage'
end
xgt'fight','sta'
end
if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
damSum = damage + damageM
defenceV = defenceV - damSum
!defenceV = defenceV - damage
'You have caused damage <> Protection of enemy units'
xgt'fight','sta'
end
if klonV > 0 and unmaterialV <= 0:
klonV = klonV - 1
'Destroyed enemy clone'
xgt'fight','sta'
end
if unmaterialV > 0:
unmaterialV = unmaterialV - 1
'Your blow has passed through the body of the enemy. Opponents do not materials'
xgt'fight','sta'
end
if barierV > 0:
!imeniteta barrier for damage
if barierV >= damage:
'<<$boydesc>> easily weathered blow your'
xgt'fight','sta'
elseif barierV < damage:
mannaV = mannaV - damageM
healthV = healthV - damage
!healthV = healthV - damage
'You have caused damage <> units'
'You have caused damage to the enemy manna <> units'
if zerkaloV > 0:
zerkaloV = zerkaloV - 1
pcs_health = pcs_health - damage
'Opponent reflected damage and you get <> points of damage'
end
end
xgt'fight','sta'
end
end
--- atakA ---------------------------------