--[[ a.abolishin Инст 11-15: Боссы. ]] function bot_Mage_Boss_11_r(A, R, attacks, mages, summonA) local bot = PERS(my.persPtr) -- Считалка дохлых магов. if bot_Mage_11_Dead == nil then bot_Mage_11_Dead = {} end if bot_Mage_11_Dead[bot.id] == nil then bot_Mage_11_Dead[bot.id] = 0 end -- Считалка для призыва. if bot_Mage_11_Summon == nil then bot_Mage_11_Summon = {} end if bot_Mage_11_Summon[bot.id] == nil then bot_Mage_11_Summon[bot.id] = 1 end -- Призываем трэшовых магов в начале боя. if (bot_Mage_11_Summon[bot.id] > 0) and summonA then for i=1, 4 do aux.useEffect({artId = aux.getRandVal(summonA[1])}) end bot_Mage_11_Summon[bot.id] = 0 end -- Можем ли ходить? if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return end -- Проверяем всех дохлых. if summonA then local deadCount = 0 local deadList = aux.getPersList(my.teamNum, false, true, true) if deadList then for _, deadPersPtr in pairs(deadList) do local deadPers = PERS(deadPersPtr) if aux.inTable(deadPers.artId, mages) then deadCount = deadCount + 1 end end -- Помер маг? Призываем клон (Баф 2). if deadCount > bot_Mage_11_Dead[bot.id] then aux.useEffect({artId = summonA[2]}) bot_Mage_11_Dead[bot.id] = deadCount end end end -- Баф 3 - ослаблялка. Вероятность. if aux.randRoll(R[2]) then aux.useEffect({artId = A[2]}, my.oppPtr) end -- Если противник в блоке, то используем специальный удар. if PERS_ISDEFENDED(my.oppPtr) then aux.useEffect({artId = A[3]}, my.oppPtr) -- Баф 1 - магическая атака + дот. Наличие этого же дота или вероятность. elseif (#aux.activeEffects(my.oppPtr, {artId = A[1]}) > 0) or aux.randRoll(R[1]) then aux.useEffect({artId = A[1]}, my.oppPtr) -- В противном случае - обычная атака. else ATTACK(aux.getRandVal(attacks)) end end function bot_Dragon_Boss_12_r(A, C, R, RD, mages, summonA) local bot = PERS(my.persPtr) -- Считалка для призыва. if bot_Dragon_12_Summon == nil then bot_Dragon_12_Summon = {} end if bot_Dragon_12_Summon[bot.id] == nil then bot_Dragon_12_Summon[bot.id] = 5 end -- Время текущего призыва. if bot_Dragon_12_SummonTime == nil then bot_Dragon_12_SummonTime = {} end if bot_Dragon_12_SummonTime[bot.id] == nil then bot_Dragon_12_SummonTime[bot.id] = 0 end -- Считалка дохлых магов/элементалей. if bot_Dragon_12_Dead == nil then bot_Dragon_12_Dead = {} end if bot_Dragon_12_Dead[bot.id] == nil then bot_Dragon_12_Dead[bot.id] = 0 end -- Если мы в процессе каста... if bot_Dragon_12_SummonTime[bot.id] > 0 then -- ... если эффект еще должен висеть... if bot_Dragon_12_SummonTime[bot.id] > my.stime then -- ... но его сбили... if #aux.activeEffects(my.persPtr, {artId = A[4]}) < 1 then -- ... призываем бота номер раз aux.useEffect({artId = aux.getRandVal(summonA[3])}) bot_Dragon_12_SummonTime[bot.id] = 0 end else -- если эффект уже должен был слететь... -- ... но не слетел --if #aux.activeEffects(my.persPtr, {artId = A[4]}) > 0 then -- ... призываем бота номер два aux.useEffect({artId = aux.getRandVal(summonA[2])}) bot_Dragon_12_SummonTime[bot.id] = 0 --end end end -- Призываем трэшовых магов в начале боя. if bot_Dragon_12_Summon[bot.id] > 4 then for i=1, 4 do aux.useEffect({artId = aux.getRandVal(summonA[math.ceil(i/2)])}) end bot_Dragon_12_Summon[bot.id] = 4 end -- Можем ли ходить? if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return end -- Баф 2 - призыв. 4 раза за бой. local hpC = bot.hp / bot.hpMax if (hpC < (bot_Dragon_12_Summon[bot.id] * C[1])) and (#aux.activeEffects(my.persPtr, {artId = A[4]}) < 1) then aux.useEffect({artId = A[4]}) bot_Dragon_12_Summon[bot.id] = bot_Dragon_12_Summon[bot.id] - 1 bot_Dragon_12_SummonTime[bot.id] = my.stime + C[2] end -- Проверяем всех дохлых local deadCount = 0 local deadList = aux.getPersList(my.teamNum, false, true, true) if deadList then for _, deadPersPtr in pairs(deadList) do local deadPers = PERS(deadPersPtr) if aux.inTable(deadPers.artId, mages) then deadCount = deadCount + 1 end end -- Помер маг или элементаль? if deadCount > bot_Dragon_12_Dead[bot.id] then -- Если нет РД... if #aux.activeEffects(my.persPtr, {grpId = RD}) < 1 then -- ...дамажим всех (Баф 3). aux.useEffect({artId = A[5]}, my.oppPtr) end bot_Dragon_12_Dead[bot.id] = deadCount end end -- Баф 2 - АоЕ поджаривание. Кол-во зарядок первым бафом > кол-ва РД. if #aux.activeEffects(my.persPtr, {artId = A[2]}) > #aux.activeEffects(my.persPtr, {grpId = RD}) then aux.useEffect({artId = A[3]}, my.oppPtr) aux.useEffect({artId = A[6]}) -- сброс считалки end -- Баф 1 - магическая атака + счетчик. С вероятностью. if aux.randRoll(R[1]) then aux.useEffect({artId = A[1]}, my.oppPtr) -- атака aux.useEffect({artId = A[2]}) -- счетчик -- В противном случае - обычная атака. else ATTACK(math.random(3)) end end function bot_Dragon_Boss_13_r(A, C, R, RD, summonA) local bot = PERS(my.persPtr) -- Считалка для сброса РД. 3 раза за бой. if bot_Dragon_13_RD == nil then bot_Dragon_13_RD = {} end if bot_Dragon_13_RD[bot.id] == nil then bot_Dragon_13_RD[bot.id] = 3 end -- Флаг наличия РД if bot_Dragon_13_RDFlag == nil then bot_Dragon_13_RDFlag = {} end if bot_Dragon_13_RDFlag[bot.id] == nil then bot_Dragon_13_RDFlag[bot.id] = 0 end -- Считалка для призыва. if bot_Dragon_13_Summon == nil then bot_Dragon_13_Summon = {} end if bot_Dragon_13_Summon[bot.id] == nil then bot_Dragon_13_Summon[bot.id] = 5 end -- Время текущего призыва. if bot_Dragon_13_SummonTime == nil then bot_Dragon_13_SummonTime = {} end if bot_Dragon_13_SummonTime[bot.id] == nil then bot_Dragon_13_SummonTime[bot.id] = 0 end -- Если мы в процессе каста... if bot_Dragon_13_SummonTime[bot.id] > 0 then -- ... если эффект еще должен висеть... if bot_Dragon_13_SummonTime[bot.id] > my.stime then -- ... но его сбили... if #aux.activeEffects(my.persPtr, {artId = A[4]}) < 1 then -- ... призываем бота номер раз aux.useEffect({artId = aux.getRandVal(summonA[1])}) bot_Dragon_13_SummonTime[bot.id] = 0 end else -- если эффект уже должен был слететь... -- ... но не слетел --if #aux.activeEffects(my.persPtr, {artId = A[4]}) > 0 then -- ... призываем бота номер два aux.useEffect({artId = summonA[2]}) bot_Dragon_13_SummonTime[bot.id] = 0 --end end end -- Призываем трэшовых магов в начале боя. if bot_Dragon_13_Summon[bot.id] > 4 then for i=1, 3 do aux.useEffect({artId = aux.getRandVal(summonA[1])}) end bot_Dragon_13_Summon[bot.id] = 4 end -- можем ли ходить? if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return end -- Баф 2 - призыв. 4 раза за бой. local hpC = bot.hp / bot.hpMax if (hpC < (bot_Dragon_13_Summon[bot.id] * C[1])) and (#aux.activeEffects(my.persPtr, {artId = A[4]}) < 1) then aux.useEffect({artId = A[4]}) bot_Dragon_13_Summon[bot.id] = bot_Dragon_13_Summon[bot.id] - 1 bot_Dragon_13_SummonTime[bot.id] = my.stime + C[2] end -- Проверяем слет РД. local rdflag = #aux.activeEffects(my.persPtr, {grpId = RD}) -- Сейчас нету, а ход назад был? if rdflag < 1 and bot_Dragon_13_RDFlag[bot.id] > 0 then -- Дот на противника. aux.useEffect({artId = A[6]}, my.oppPtr) bot_Dragon_13_RDFlag[bot.id] = rdflag return end bot_Dragon_13_RDFlag[bot.id] = rdflag -- Баф 2 - сброс РД. 3 раза за бой. local hpC = bot.hp / bot.hpMax if hpC < (bot_Dragon_13_RD[bot.id] * C[3]) then aux.useEffect({artId = A[2]}) bot_Dragon_13_RD[bot.id] = bot_Dragon_13_RD[bot.id] - 1 end -- Баф 3 - ослаблялка/дот на вражин. С вероятностью и без РД. if aux.randRoll(R[1]) and (#aux.activeEffects(my.persPtr, {grpId = RD}) < 1) then aux.useEffect({artId = A[3]}, my.oppPtr) end local r = math.random() -- Up attack - стан на n ходов. С вероятностью и только врагов под 3им бафом. if (r <= R[2]) and (#aux.activeEffects(my.oppPtr, {artId = A[3]}) > 0) then aux.useEffect({artId = A[5]}) ATTACK(1) -- Баф 1 - магический урон. С вероятностью и без РД. elseif (r <= R[2]+R[3]) and (#aux.activeEffects(my.persPtr, {grpId = RD}) < 1) then aux.useEffect({artId = A[1]}, my.oppPtr) -- В противном случае - обычная атака. else ATTACK(2) end end function bot_Dragon_Boss_14_r(A, C, R, RD, dragons, summonA) local bot = PERS(my.persPtr) -- Считалка для призыва. if bot_Dragon_14_Summon == nil then bot_Dragon_14_Summon = {} end if bot_Dragon_14_Summon[bot.id] == nil then bot_Dragon_14_Summon[bot.id] = 5 end -- Время текущего призыва. if bot_Dragon_14_SummonTime == nil then bot_Dragon_14_SummonTime = {} end if bot_Dragon_14_SummonTime[bot.id] == nil then bot_Dragon_14_SummonTime[bot.id] = 0 end -- Считалка дохлых драконов. if bot_Dragon_14_Dead == nil then bot_Dragon_14_Dead = {} end if bot_Dragon_14_Dead[bot.id] == nil then bot_Dragon_14_Dead[bot.id] = 0 end -- Считалка для мощной атаки. if bot_Dragon_14_Baf3 == nil then bot_Dragon_14_Baf3 = {} end if bot_Dragon_14_Baf3[bot.id] == nil then bot_Dragon_14_Baf3[bot.id] = 3 end -- Если мы в процессе каста... if bot_Dragon_14_SummonTime[bot.id] > 0 then -- ... если эффект еще должен висеть... if bot_Dragon_14_SummonTime[bot.id] > my.stime then -- ... но его сбили... if #aux.activeEffects(my.persPtr, {artId = A[4]}) < 1 then -- ... призываем бота номер раз aux.useEffect({artId = aux.getRandVal(summonA[2])}) bot_Dragon_14_SummonTime[bot.id] = 0 end else -- если эффект уже должен был слететь... -- ... но не слетел --if #aux.activeEffects(my.persPtr, {artId = A[4]}) > 0 then -- ... призываем бота номер два aux.useEffect({artId = aux.getRandVal(summonA[3])}) bot_Dragon_14_SummonTime[bot.id] = 0 --end end end -- Призываем трэшовых драконов в начале боя. if bot_Dragon_14_Summon[bot.id] > 4 then for i=1, 4 do aux.useEffect({artId = summonA[1]}) end bot_Dragon_14_Summon[bot.id] = 4 end -- можем ли ходить? if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return end -- Баф 2 - призыв с ослаблялкой. 5 раз за бой. local hpC = bot.hp / bot.hpMax if (hpC < (bot_Dragon_14_Summon[bot.id] * C[1])) and (#aux.activeEffects(my.persPtr, {artId = A[4]}) < 1) then aux.useEffect({artId = A[4]}) bot_Dragon_14_Summon[bot.id] = bot_Dragon_14_Summon[bot.id] - 1 bot_Dragon_14_SummonTime[bot.id] = my.stime + C[2] end -- Проверяем всех дохлых local deadCount = 0 local deadList = aux.getPersList(my.teamNum, false, true, true) if deadList then for _, deadPersPtr in pairs(deadList) do local deadPers = PERS(deadPersPtr) if aux.inTable(deadPers.artId, dragons) then deadCount = deadCount + 1 end end -- Помер дракон? if deadCount > bot_Dragon_14_Dead[bot.id] then -- Если нет РД... if #aux.activeEffects(my.persPtr, {grpId = RD}) < 1 then -- ...лечим себя (Баф 2). aux.useEffect({artId = A[2]}) end bot_Dragon_14_Dead[bot.id] = deadCount end end -- Баф 3 - мощная атака на всех противников. 3 раза за бой. local hpC = bot.hp / bot.hpMax if hpC < (bot_Dragon_14_Baf3[bot.id] * C[3]) then aux.useEffect({artId = A[3]}) bot_Dragon_14_Baf3[bot.id] = bot_Dragon_14_Baf3[bot.id] - 1 end -- Баф 1 - атака + дот. С вероятностью. if aux.randRoll(R[1]) then aux.useEffect({artId = A[1]}, my.oppPtr) else ATTACK(math.random(3)) end end function bot_Dragon_Boss_15_r(A, C, R, RD, mages, attacks, summonA, vampA, berserkA) local bot = PERS(my.persPtr) -- Считалка для призыва. if bot_Dragon_15_Summon == nil then bot_Dragon_15_Summon = {} end if bot_Dragon_15_Summon[bot.id] == nil then bot_Dragon_15_Summon[bot.id] = 5 end -- Время текущего призыва. if bot_Dragon_15_SummonTime == nil then bot_Dragon_15_SummonTime = {} end if bot_Dragon_15_SummonTime[bot.id] == nil then bot_Dragon_15_SummonTime[bot.id] = 0 end -- Если мы в процессе каста... if bot_Dragon_15_SummonTime[bot.id] > 0 then -- ... если эффект еще должен висеть... if bot_Dragon_15_SummonTime[bot.id] > my.stime then -- ... но его сбили... if #aux.activeEffects(my.persPtr, {artId = A[2]}) < 1 then -- ... призываем бота номер раз aux.useEffect({artId = aux.getRandVal(summonA[3])}) bot_Dragon_15_SummonTime[bot.id] = 0 end else -- если эффект уже должен был слететь... -- ... но не слетел --if #aux.activeEffects(my.persPtr, {artId = A[2]}) > 0 then -- ... призываем бота номер два aux.useEffect({artId = summonA[2]}) bot_Dragon_15_SummonTime[bot.id] = 0 --end end end -- Призываем трэшовых драконов в начале боя. if bot_Dragon_15_Summon[bot.id] > 4 then for i=1, 4 do aux.useEffect({artId = summonA[1]}) end bot_Dragon_15_Summon[bot.id] = 4 end -- можем ли ходить? if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return end -- Баф 2 - призыв. 4 раза за бой. local hpC = bot.hp / bot.hpMax if (hpC < (bot_Dragon_15_Summon[bot.id] * C[1])) and (#aux.activeEffects(my.persPtr, {artId = A[2]}) < 1) then aux.useEffect({artId = A[2]}) bot_Dragon_15_Summon[bot.id] = bot_Dragon_15_Summon[bot.id] - 1 bot_Dragon_15_SummonTime[bot.id] = my.stime + C[2] end -- Баф 3 - сносит % урона N противникам на следующий ход. С вероятностью и без РД. if aux.randRoll(R[1]) and (#aux.activeEffects(my.persPtr, {grpId = RD}) < 1) then aux.useEffect({artId = A[3]}, my.oppPtr) end -- Баф 2 - заряжалка на увеличенный урон, мощность зависит от кол-ва РД. С вероятностью. if aux.randRoll(R[2]) then local power = 3 - #aux.activeEffects(my.persPtr, {grpId = RD}) if power > 0 then aux.useEffect({artId = berserkA[power]}) end end -- Баф 1 - магический урон. С вероятностью. local r = math.random() if r <= R[3] then aux.useEffect({artId = A[1]}, my.oppPtr) -- Middle attack - заряженная атака (вампиризм), мощность зависит от кол-ва магов. С вероятностью. elseif r <= R[3]+R[4] then local mageCount = 0 local persList = aux.getPersList(my.teamNum, true, true, true) if persList then for _, persPtr in pairs(persList) do local pers = PERS(persPtr) if aux.inTable(pers.artId, mages) then mageCount = mageCount + 1 end end end if mageCount > 0 then aux.useEffect({artId = vampA[math.min(mageCount, 3)]}, my.oppPtr) ATTACK(2) else ATTACK(aux.getRandVal(attacks)) end -- В противном случае - обычная атака. else ATTACK(aux.getRandVal(attacks)) end end -- botID = 906 function bot_Mage_Boss_11() -- атака + дот, АоЕ ослаблялка, мощная атака в блоке. local A = {4836, 4837, 4838} local R = {0.4, 0.4} local attacks = {1, 3} -- 11ые маги local mages = {879, 880, 886, 887, 888, 889, 911, 912, 913} -- 11ые маги, призрак 11ого мага-босса local summonA = {{4817, 4818, 4819, 4820, 4821, 4822}, 4835} bot_Mage_Boss_11_r(A, R, attacks, mages, summonA) end -- botID = 920 function bot_Mage_Boss_Ghost_11() local A = {4836, 4837, 4838} local R = {0.4, 0.4} local attacks = {1, 2} bot_Mage_Boss_11_r(A, R, attacks) end -- botID = 907 function bot_Dragon_Boss_12() -- атака, считалка, АоЕ дот, призыв, АоЕ дамаг, сброс считалки local A = {4839, 4840, 4841, 4842, 4843, 4654} local C = {0.25, 20} local R = {0.4} local RD = 5 local mages = {879, 880, 886, 887, 888, 889, 911, 912, 913, -- 11ые маги 890, 891, 892, 893, 894, 895, 914, 915, 916, -- 13ые маги 923, 924, 925, 926, 927, 928} -- 13ые элементали local summonA = {{4817, 4818, 4819, 4820, 4821, 4822}, -- 11ые маги {4823, 4824, 4825, 4826, 4827, 4828}, -- 13ые маги {4680, 4695, 4696, 4697, 4698, 4699}} -- 13ые элементали bot_Dragon_Boss_12_r(A, C, R, RD, mages, summonA) end -- botID = 908 function bot_Dragon_Boss_13() -- атака, сброс РД, АоЕ ослаблялка, призыв, стан, АоЕ дот local A = {4844, 4845, 4847, 4846, 4848, 4849} local C = {0.25, 20, 0.3} local R = {0.85, 0.2, 0.7} local RD = 5 -- 13ые маги, 13ый дракон local summonA = {{4823, 4824, 4825, 4826, 4827, 4828}, 4814} bot_Dragon_Boss_13_r(A, C, R, RD, summonA) end -- botID = 909 function bot_Dragon_Boss_14() -- атака + дот, лечилка, АоЕ атака, призыв local A = {4850, 4851, 4852, 4853} local C = {0.25, 20, 0.3} local R = {0.5} local RD = 5 local dragons = {884} local summonA = {4815, -- 14ый дракон {4817, 4818, 4819, 4820, 4821, 4822}, -- 11ые маги {4829, 4830, 4831, 4832, 4833, 4834}} -- 15ые маги bot_Dragon_Boss_14_r(A, C, R, RD, dragons, summonA) end -- botID = 910 function bot_Dragon_Boss_15() -- атака, призыв, АоЕ ослаблялка local A = {4854, 4855, 4856} local C = {0.25, 20} local R = {0.9, 0.8, 0.45, 0.45} local RD = 5 -- призрак 11ого мага-босса, 15ые маги local mages = {920, 896, 897, 898, 899, 900, 901, 917, 918, 919} local attacks = {1, 3} -- 15ый дракон, призрак 11ого мага-босса, 15ые маги local summonA = {4816, 4835, {4829, 4830, 4831, 4832, 4833, 4834}} local vampA = {4860, 4861, 4862} local berserkA = {4857, 4858, 4859} bot_Dragon_Boss_15_r(A, C, R, RD, mages, attacks, summonA, vampA, berserkA) end