# atakA1
menu_off = 1
if $ARGS[0] = 'atak':
cla
!payment hit dodge
poSp = speedV*20/100
uvAg = pcs_agil*20/100
poBox = reactV*20/100
uvBox = pcs_react*20/100
popad = RAND(reactV-poBox,reactV+poBox) + RAND(speedV-poSp,speedV+poSp) + bonusShV
uvorot = RAND(pcs_react-uvBox,pcs_react+uvBox) + RAND(pcs_agil-uvAg,pcs_agil+uvAg)
uvorKoef = uvorot*50/100
popKoef = popad*50/100
if popad > uvorot:
if popad >= uvorot+uvorKoef:
!Crete, very direct hit
'Critical hits'
xgt'atakA1','uronKrit'
elseif popad < uvorot+uvorKoef:
!Normal hit
!He attacks the enemy
'EYE'
xgt'atakA1','uron'
end
elseif popad <= uvorot:
'LOST'
xgt'fight','sta'
end
end
if $ARGS[0] = 'uronKrit':
cla
damKoef = damTipV*20/100
damage = RAND(damTipV+damKoef,damTipV+damKoef*2)
if damTipMV > 0:
damKoefM = damTipMV*20/100
damageM = RAND(damTipMV+damKoefM,damTipMV+damKoefM*2)
end
xgt'atakA1','damage'
end
if $ARGS[0] = 'uron':
cla
damKoef = damTipV*20/100
damage = RAND(damTipV-damKoef,damTipV+damKoef)
if damTipMV > 0:
damKoefM = damTipMV*20/100
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:damage = damage - dospehDef & dospehEn = dospehEn - 1
if damage < 0:damage = 0
pcs_health = pcs_health - damage
if hidanAtk = 1:
hidanAtk = 0
zerkaloV = zerkaloV + 50
bloodV = bloodV + 50
'<<$boydesc>> drink your blood.'
end
if damTipMV > 0:
pcs_mana = pcs_mana - damageM
pcs_mana = pcs_mana + damageM
'<<$boydesc>> swallowed <> Units mana you.'
end
if poisonAV = 1:
poisonV = 50
'<<$boydesc>> hit the needle poisoned you.'
end
!pcs_mana = pcs_mana - damageM
if eleShV > 0:
stun = RAND(eleShV,eleShV*3)
'You paralyzed on <> Rounds'
end
'<<$boydesc>> Damage caused to you <> units'
!'Your mana harmed <> units'
if zerkalo > 0:
zerkalo = zerkalo - 1
healthV = healthV - damage
'You are repelled and the damage <<$boydesc>> got a <> points of damage'
end
xgt'fight','sta'
end
if defence > 0 and klon <= 0 and unmaterial <= 0:
!damSum = damage + damageM
!defence = defence - damSum
defence = defence - damage
'Your protection harmed <> units'
xgt'fight','sta'
end
if klon > 0 and unmaterial <= 0:
klon = klon - 1
'It destroys your clone'
xgt'fight','sta'
end
if unmaterial > 0:
unmaterial = unmaterial - 1
'Beat the enemy passed through you. YOU are not material'
xgt'fight','sta'
end
if barier > 0:
!imeniteta barrier for damage
if barier >= damage:
'You can easily withstand the impact of the enemy'
xgt'fight','sta'
elseif barier < damage:
!pcs_mana = pcs_mana - damageM
!pcs_health = pcs_health - damage
pcs_health = pcs_health - damage
if damTipM > 0:
pcs_mana = pcs_mana - damageM
manaV = manaV + damageM
'You swallowed <> mana enemy units.'
end
if eleShV > 0:
stun = RAND(eleShV,eleShV*3)
'<<$boydesc>> paralyzed <> Rounds'
end
if poisonAV = 1:
poisonV = 50
'<<$boydesc>> hit the needle poisoned you.'
end
'You have caused damage <> units'
!'Your mana harmed <> units'
if zerkalo > 0:
zerkalo = zerkalo - 1
healthV = healthV - damage
'You have reflected the damage and the opponent was <> points of damage'
end
end
xgt'fight','sta'
end
end
if $ARGS[0] = 'atakW':
cla
!payment hit dodge
poSp = speedV*20/100
uvAg = pcs_agil*20/100
poBox = reactV*20/100
uvBox = pcs_react*20/100
popad = RAND(reactV-poBox,reactV+poBox) + RAND(speedV-poSp,speedV+poSp)
uvorot = RAND(pcs_react-uvBox,pcs_react+uvBox) + RAND(pcs_agil-uvAg,pcs_agil+uvAg)
uvorKoef = uvorot*50/100
popKoef = popad*50/100
if popad > uvorot:
if popad >= uvorot+uvorKoef:
!Crete, very direct hit
'Critical hits'
xgt'atakA1','uronKritW'
elseif popad < uvorot+uvorKoef:
!Normal hit
'EYE'
xgt'atakA1','uronW'
end
elseif popad <= uvorot:
'LOST'
xgt'fight','sta'
end
end
if $ARGS[0] = 'uronKritW':
cla
damKoef = damTipV*20/100
damage = RAND(damTipV+damKoef,damTipV+damKoef*2)
damKoefM = damTipMV*20/100
damageM = RAND(damTipMV+damKoefM,damTipMV+damKoefM*2)
xgt'atakA1','damageW'
end
if $ARGS[0] = 'uronW':
cla
damKoef = damTipV*20/100
damage = RAND(damTipV-damKoef,damTipV+damKoef)
damKoefM = damTipMV*20/100
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:damage = damage - dospehDef & dospehEn = dospehEn - 1
if damage < 0:damage = 0
pcs_health = pcs_health - damage
pcs_mana = pcs_mana - damageM
'You harmed <> units'
'You have caused damage to the enemy mana <> units'
if zerkalo > 0:
zerkalo = zerkalo - 1
pcs_health = pcs_health - damage
'<<$boydesc>> reflected the damage and you get <> points of damage'
end
xgt'fight','sta'
end
if defence > 0 and klon <= 0 and unmaterial <= 0:
damSum = damage + damageM
defence = defence - damSum
!defenceV = defenceV - damage
'You have caused damage <> Protection of enemy units'
xgt'fight','sta'
end
if klon > 0 and unmaterial <= 0:
klon = klon - 1
'Destroyed enemy clone'
xgt'fight','sta'
end
if unmaterial > 0:
unmaterial = unmaterial - 1
'Your blow has passed through the body of the enemy. Opponents do not materials'
xgt'fight','sta'
end
if barier > 0:
!imeniteta barrier for damage
if barier >= damage:
'<<$boydesc>> easily weathered blow your'
xgt'fight','sta'
elseif barier < damage:
pcs_mana = pcs_mana - damageM
pcs_health = pcs_health - damage
!healthV = healthV - damage
'You have caused damage <> units'
'You have caused damage to the enemy mana <> units'
if zerkalo > 0:
zerkalo = zerkalo - 1
healthV = healthV - damage
'Opponent reflected damage and you get <> points of damage'
end
end
xgt'fight','sta'
end
end
--- atakA1 ---------------------------------