# atakA1
if $ARGS[0] = 'atak':
cla
!расчет попадания уворота
set poSp = speedV * 20/100
set uvAg = agil * 20/100
set poBox = reactV * 20/100
set uvBox = react * 20/100
set popad = rand(reactV - poBox, reactV + poBox) + rand(speedV-poSp, speedV + poSp) + bonusShV
set uvorot = rand(react - uvBox, react + uvBox) + rand(agil-uvAg, agil + uvAg)
set uvorKoef = uvorot * 50/100
set popKoef = popad * 50/100
if popad > uvorot:
if popad >= uvorot + uvorKoef:
!крит, очень точное попадание
'critical hits'
xgt 'atakA1', 'uronKrit'
end
if popad < uvorot+uvorKoef:
!нормальное попадание
!атаковал противник
'Contact'
xgt 'atakA1', 'uron'
end
end
if popad <= uvorot:
'is washed'
xgt 'fight', 'sta'
end
end
if $ARGS[0] = 'uronKrit':
cla
set damKoef = damTipV * 20 / 100
set damage = rand(damTipV + damKoef, damTipV + damKoef * 2)
if damTipMV > 0:
set damKoefM = damTipMV * 20/100
set damageM = rand(damTipMV + damKoefM, damTipMV + damKoefM * 2)
end
xgt 'atakA1', 'damage'
end
if $ARGS[0] = 'uron':
cla
set damKoef = damTipV * 20 / 100
set damage = rand(damTipV - damKoef, damTipV + damKoef)
if damTipMV > 0:
set damKoefM = damTipMV * 20/100
set damageM = rand(damTipMV - damKoefM, damTipMV + damKoefM)
end
xgt 'atakA1', 'damage'
end
if $ARGS[0] = 'damage':
cla
if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
if dospeh > 0:set damage -= dospehDef & set dospehEn -= 1
if damage < 0:set damage = 0
set health -= damage
if hidanAtk = 1:
set hidanAtk = 0
set zerkaloV += 50
set bloodV += 50
'<<$nameV>> drink your blood.'
end
if damTipMV > 0:
set manna -= damageM
set manna += damageM
'<<$nameV>> absorbed <> units of manna you.'
end
if poisonAV = 1:
set poisonV = 50
'<<$nameV>> have poisoned the needles hit.'
end
!set manna -= damageM
if eleShV > 0:
set stun = rand(eleShV, eleShV * 3)
'You are paralyzed <> rounds'
end
'<<$nameV>> damage caused you <> units'
!'caused damage your manna <> units'
if zerkalo > 0:
set zerkalo -= 1
set healthV -= damage
'You are repelled damage and <<$nameV>> received <> points of damage'
end
xgt 'fight', 'sta'
end
if defence > 0 and klon <= 0 and unmaterial <= 0:
!set damSum = damage + damageM
!set defence -= damSum
set defence -= damage
'Protection of your harmed <> units'
xgt 'fight', 'sta'
end
if klon > 0 and unmaterial <= 0:
set klon -= 1
'destroy your clone'
xgt 'fight', 'sta'
end
if unmaterial > 0:
set unmaterial -= 1
'Strike the enemy passed through you. YOU is not material'
xgt 'fight', 'sta'
end
if barier > 0:
!барьер именитета для урона
if barier >= damage:
'You can easily withstood the impact of the opponent'
xgt 'fight', 'sta'
end
if barier < damage:
!set manna -= damageM
!set health -= damage
set health -= damage
if damTipM > 0:
set manna -= damageM
set mannaV += damageM
'you have ingested <> units of manna from the enemy.'
end
if eleShV > 0:
set stun = rand(eleShV, eleShV * 3)
'<<$nameV>> paralyzed <> rounds'
end
if poisonAV = 1:
set poisonV = 50
'<<$nameV>> have poisoned the needles hit.'
end
'you have caused damage <> units'
!'caused damage your manna <> units'
if zerkalo > 0:
set zerkalo -= 1
set healthV -= damage
'You are repelled enemy damage and received <> points of damage'
end
end
xgt 'fight', 'sta'
end
end
if $ARGS[0] = 'atakW':
cla
!расчет попадания уворота
set poSp = speedV * 20 / 100
set uvAg = agil * 20 / 100
set poBox = reactV * 20 / 100
set uvBox = react * 20 / 100
set popad = rand(reactV - poBox, reactV + poBox) + rand(speedV-poSp, speedV + poSp)
set uvorot = rand(react - uvBox, react + uvBox) + rand(agil - uvAg, agil + uvAg)
set uvorKoef = uvorot * 50 / 100
set popKoef = popad * 50 / 100
if popad > uvorot:
if popad >= uvorot + uvorKoef:
!крит, очень точное попадание
'critical hits'
xgt 'atakA1', 'uronKritW'
end
if popad < uvorot+uvorKoef:
!нормальное попадание
'Contact'
xgt 'atakA1', 'uronW'
end
end
if popad <= uvorot:
'is washed'
xgt 'fight', 'sta'
end
end
if $ARGS[0] = 'uronKritW':
cla
set damKoef = damTipV * 20/100
set damage = rand(damTipV + damKoef, damTipV + damKoef * 2)
set damKoefM = damTipMV * 20/100
set damageM = rand(damTipMV + damKoefM, damTipMV + damKoefM * 2)
xgt 'atakA1', 'damageW'
end
if $ARGS[0] = 'uronW':
cla
set damKoef = damTipV * 20/100
set damage = rand(damTipV - damKoef, damTipV + damKoef)
set damKoefM = damTipMV * 20/100
set damageM = rand(damTipMV - damKoefM, damTipMV + damKoefM)
xgt 'atakA1', 'damageW'
end
if $ARGS[0] = 'damageW':
cla
if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
if dospeh > 0:set damage -= dospehDef & set dospehEn -= 1
if damage < 0:set damage = 0
set health -= damage
set manna -= damageM
'You are harmed <> units'
'You have caused damage to the enemy manna <> units'
if zerkalo > 0:
set zerkalo -= 1
set health -= damage
'<<$nameV>> reflected the damage and you got <> points of damage'
end
xgt 'fight', 'sta'
end
if defence > 0 and klon <= 0 and unmaterial <= 0:
set damSum = damage + damageM
set defence -= damSum
!set defenceV -= damage
'You have caused damage <> Protection of the enemy units'
xgt 'fight', 'sta'
end
if klon > 0 and unmaterial <= 0:
set klon -= 1
'Destroyed enemy clone'
xgt 'fight', 'sta'
end
if unmaterial > 0:
set unmaterial -= 1
'Your shot went through the opponent´s body. Opponents do not materials'
xgt 'fight', 'sta'
end
if barier > 0:
!барьер именитета для урона
if barier >= damage:
'<<$nameV>> easily withstood your butt'
xgt 'fight', 'sta'
end
if barier < damage:
set manna -= damageM
set health -= damage
!set healthV -= damage
'You have caused damage <> units'
'You have caused damage to the enemy manna <> units'
if zerkalo > 0:
set zerkalo -= 1
set healthV -= damage
'Enemy reflected damage and you got <> points of damage'
end
end
xgt 'fight', 'sta'
end
end
--- atakA1 ---------------------------------