# atakB1
if $ARGS[0] = 'atak':
cla
!!payment hit dodge
poSp = speedV * 20 / 100
uvAg = agil * 20 / 100
poBox = reactV * 20 / 100
uvBox = react * 20 / 100
popad = rand(reactV - poBox, reactV + poBox) + rand(speedV - poSp, speedV + poSp) + bonusShV
uvorot = rand(react - uvBox, react + uvBox) + rand(agil - uvAg, 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'
else
!!normal hit
!!attack the enemy
'Contact'
gs 'atakB1', 'uron'
end
else
'is washed'
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 -= dospehDefV & dospehEn -= 1
if damage < 0:damage = 0
health -= damage
!!manna -= damageM
if eleShV > 0:
stun = rand(eleShV, eleShV * 3)
'Protection of the enemy paralyze you <> rounds'
end
'Protection of the enemy caused you damage <> units'
!!'caused damage your manna <> units'
if zerkalo > 0:
zerkalo -= 1
defenceV -= damage
'You are reflected damage from the defense and protection of the enemy received <> points of damage'
end
!!xgt 'fight', 'sta'
end
if defence > 0 and klon <= 0 and unmaterial <= 0:
!!damSum = damage + damageM
!!defence -= damSum
defence -= damage
'your defense harmed <> units from the defense'
!!xgt 'fight', 'sta'
end
if klon > 0 and unmaterial <= 0:
klon -= 1
'destroy your clone'
!!xgt 'fight', 'sta'
end
if unmaterial > 0:
unmaterial -= 1
'Beat the defense went through you. YOU is 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'
else
!!manna -= damageM
!!health -= damage
health -= damage
if eleShV > 0:
stun = rand(eleShV, eleShV * 3)
'Protection of the enemy paralyze you <> rounds'
end
'You have harmed <> units from the defense'
!!'caused damage your manna <> units'
if zerkalo > 0:
zerkalo -= 1
defenceV -= damage
'You are repelled enemy damage and protection received <> points of damage'
end
end
!!xgt 'fight', 'sta'
end
end
--- atakB1 ---------------------------------