# atakB1
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'
gs'atakB1','uronKrit'
elseif popad < uvorot+uvorKoef:
!Normal hit
!He attacks the enemy
'EYE'
gs'atakB1','uron'
end
elseif popad <= uvorot:
'LOST'
end
end
if $ARGS[0] = 'uronKrit':
cla
damDef = defenceV/100
damKoef = damDef*20/100
damage = RAND(damDef+damKoef,damDef+damKoef*2)
gs'atakB1','damage'
end
if $ARGS[0] = 'uron':
cla
damDef = defenceV/100
damKoef = damDef*20/100
damage = RAND(damDef-damKoef,damDef+damKoef)
gs'atakB1','damage'
end
if $ARGS[0] = 'damage':
cla
if defence <= 0 and klon <= 0 and unmaterial <= 0 and barier <= 0:
if dospeh > 0:damage = damage - dospehDefV & dospehEn = dospehEn - 1
if damage < 0:damage = 0
pcs_health = pcs_health - damage
!pcs_manna = pcs_manna - damageM
if eleShV > 0:
stun = RAND(eleShV,eleShV*3)
'Defense paralyzed you to <> Rounds'
end
'Defense caused you damage <> units'
!'Your manna harmed <> units'
if zerkalo > 0:
zerkalo = zerkalo - 1
defenceV = defenceV - damage
'You have reflected the damage of the defense and the defense received <> 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 of the defense'
!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 defense went 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 defense'
!xgt'fight','sta'
elseif barier < damage:
!pcs_manna = pcs_manna - damageM
!pcs_health = pcs_health - damage
pcs_health = pcs_health - damage
if eleShV > 0:
stun = RAND(eleShV,eleShV*3)
'Defense paralyzed you to <> Rounds'
end
'You harmed <> units of the defense'
!'Your manna harmed <> units'
if zerkalo > 0:
zerkalo = zerkalo - 1
defenceV = defenceV - damage
'You have reflected damage and defense received <> points of damage'
end
end
!xgt'fight','sta'
end
end
--- atakB1 ---------------------------------