--[[ a.abolishin Оборотень ]] function bot_Werewolf_r(A, R, C) local bot = PERS(my.persPtr) if bot_WerewolfInfected == nil then bot_WerewolfInfected = {} end if bot_WerewolfInfected[bot.id] == nil then bot_WerewolfInfected[bot.id] = {} end if bot_WerewolfVamp == nil then bot_WerewolfVamp = {} end if bot_WerewolfVamp[bot.id] == nil then bot_WerewolfVamp[bot.id] = 3 end for persId, persPtr in pairs(bot_WerewolfInfected[bot.id]) do -- проверяем список зараженных if persPtr and (PERS_STATUS(persPtr) == FS_PS_DEAD) and (#aux.activeEffects(persPtr, {artId = A[3]}) > 0) then if PERS_LEVEL(persPtr) < C[1] then aux.useEffect({artId = A[5]}) else aux.useEffect({artId = A[6]}) end bot_WerewolfInfected[bot.id][persId] = nil end end if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then -- можем ли ходить? return end local hpC = bot.hp / bot.hpMax if hpC < R[1] then -- маг удар оборотня (баф 1) aux.useEffect({artId = A[1]}, my.oppPtr) else if aux.randRoll(R[2]) then -- маг удар оборотня AOE (баф 3) aux.useEffect({artId = A[2]}, my.oppPtr) else local attackPart = math.random(3) -- определяем тип атаки if (attackPart == 2) and (#aux.activeEffects(my.oppPtr, {artId = A[3]}) < 1) and (not PERS_ISBOT(my.oppPtr)) then -- кусаем незараженного?! aux.useEffect({artId = A[3]}, my.oppPtr) -- заражаем его bot_WerewolfInfected[bot.id][PERS_ID(my.oppPtr)] = my.oppPtr end ATTACK(attackPart) -- атакуем end end if hpC < (bot_WerewolfVamp[bot.id] * C[2]) then -- вампиризм (баф 2, 3 раза за бой) aux.useEffect({artId = A[4]}) bot_WerewolfVamp[bot.id] = bot_WerewolfVamp[bot.id] - 1 end end function bot_Werewolf_8() local A = {4477, 4478, 4473, 4476, 4474, 4475} local R = {0.2, 0.1} local C = {10, 0.3} return bot_Werewolf_r(A, R, C) end function bot_Werewolf_8_t() local A = {4476, 4477, 4472, 4475, 4473, 4474} local R = {0.2, 0.1} local C = {10, 0.3} return bot_Werewolf_r(A, R, C) end function bot_Werewolf_9() local A = {4477, 4870, 4473, 4476, 4474, 4475} local R = {0.2, 0.1} local C = {10, 0.3} return bot_Werewolf_r(A, R, C) end function bot_Werewolf_8_summoned() local A = {4477, 4478, 4473, 4476, 4474, 4475} local R = {0.2, 0.1} local C = {10, 0.3} return bot_Werewolf_r(A, R, C) end function bot_Werewolf_9_summoned() local A = {4477, 4870, 4473, 4476, 4474, 4475} local R = {0.2, 0.1} local C = {10, 0.3} return bot_Werewolf_r(A, R, C) end