--[[ 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) local bot = PERS(my.persPtr) -- Можем ли ходить? if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return 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) 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 (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return 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) local bot = PERS(my.persPtr) -- Считалка для мощной атаки. 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 (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return 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, attacks, berserkA) local bot = PERS(my.persPtr) -- можем ли ходить? if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then return 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) -- В противном случае - обычная атака. 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 = 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 = 1157 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 bot_Dragon_Boss_12_r(A, C, R, RD) end -- botID = 1158 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 bot_Dragon_Boss_13_r(A, C, R, RD) end -- botID = 1159 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 bot_Dragon_Boss_14_r(A, C, R, RD) end -- botID = 1160 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 local attacks = {1, 3} local berserkA = {4857, 4858, 4859} bot_Dragon_Boss_15_r(A, C, R, RD, attacks, berserkA) end