# atakA if $ARGS[0] = 'atak': cla !!payment hit dodge poSp = speed * 20 / 100 uvAg = agilV * 20 / 100 poBox = react * 20 / 100 uvBox = reactV * 20 / 100 popad = rand(react - poBox, 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 !!attack the enemy 'Contact' xgt 'atakA', 'uron' end else 'is washed' 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 -= dospehDefV & dospehEn -= 1 if damage < 0:damage = 0 healthV -= damage if damTipM > 0: mannaV -= damageM manna += damageM 'you have ingested <> units of manna from the enemy.' end !!manna -= damageM if eleSh > 0: stunV = rand(eleSh, eleSh * 3) '<<$nameV>> paralyzed <> rounds' end 'You have caused damage <> units' !!'caused damage your manna <> units' if zerkaloV > 0: zerkaloV -= 1 health -= damage '<<$nameV>> reflected the damage and you got <> points of damage' end xgt 'fight', 'sta' end if defenceV > 0 and klonV <= 0 and unmaterialV <= 0: !!damSum = damage + damageM !!defence -= damSum defenceV -= damage 'You have caused damage <> Protection of the enemy units' xgt 'fight', 'sta' end if klonV > 0 and unmaterialV <= 0: klonV -= 1 'Destroyed enemy clone' xgt 'fight', 'sta' end if unmaterialV > 0: unmaterialV -= 1 'Your shot went through the opponent''s body. Opponents do not materials' xgt 'fight', 'sta' end if barierV > 0: !!imeniteta barrier for damage if barierV >= damage: '<<$nameV>> easily withstood your butt' xgt 'fight', 'sta' else !!manna -= damageM !!health -= damage damage -= barierV healthV -= damage if damTipM > 0: mannaV -= damageM manna += damageM 'you have ingested <> units of manna from the enemy.' end if eleSh > 0: stunV = rand(eleSh, eleSh * 3) '<<$nameV>> paralyzed <> rounds' end 'You have caused damage <> units' !!'caused damage your manna <> units' if zerkaloV > 0: zerkaloV -= 1 health -= damage 'Enemy reflected damage and you got <> 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 = react * 20 / 100 uvBox = reactV * 20 / 100 popad = rand(react - poBox, 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' else !!normal hit 'Contact' xgt 'atakA', 'uronW' end else 'is washed' 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 -= dospehDefV & dospehEn -= 1 if damage < 0:damage = 0 healthV -= damage mannaV -= damageM 'You are harmed <> units' 'You have caused damage to the enemy manna <> units' if zerkaloV > 0: zerkaloV -= 1 health -= damage '<<$nameV>> reflected the damage and you got <> points of damage' end xgt 'fight', 'sta' end if defenceV > 0 and klonV <= 0 and unmaterialV <= 0: damSum = damage + damageM defenceV -= damSum !!defenceV -= damage 'You have caused damage <> Protection of the enemy units' xgt 'fight', 'sta' end if klonV > 0 and unmaterialV <= 0: klonV -= 1 'Destroyed enemy clone' xgt 'fight', 'sta' end if unmaterialV > 0: unmaterialV -= 1 'Your shot went through the opponent''s body. Opponents do not materials' xgt 'fight', 'sta' end if barierV > 0: !!imeniteta barrier for damage if barierV >= damage: '<<$nameV>> easily withstood your butt' xgt 'fight', 'sta' else mannaV -= damageM healthV -= damage !!healthV -= damage 'You have caused damage <> units' 'You have caused damage to the enemy manna <> units' if zerkaloV > 0: zerkaloV -= 1 health -= damage 'Enemy reflected damage and you got <> points of damage' end end xgt 'fight', 'sta' end end --- atakA ---------------------------------