-- $Id: bot_Flaundin.lua,v 1.12 2009-10-21 08:40:19 a.abolishin Exp $ --[[ AKEB (c) 03.04.2009 12:31 Бот Флаундин G - количество оставшейся жизни у бота, в %% G = hp/hp_max В свой ход: с вероятностью (H2-G)/(H2-H1) и если G

0) then aux.useEffect({artId = A[3]}, persPtr[1]) end else if #aux.activeEffects(my.oppPtr, {artId = A[1]}) < 1 and #aux.activeEffects(my.oppPtr, {artId = B[1]}) < 1 then aux.useEffect({artId = aux.getRandVal({A[1], A[4], A[5]})}, my.oppPtr) else aux.useEffect({artId = aux.getRandVal({A[4], A[5]})}, my.oppPtr) end end ATTACK(math.random(3)) elseif #aux.activeEffects(my.persPtr, {artId = A[2]}) > 0 then if aux.randRoll(R[1]) then local persPtr = aux.getPersList(aux.oppTeamNum(), true, true, false, 1) if persPtr and (#persPtr > 0) then aux.useEffect({artId = A[3]}, persPtr[1]) end else if #aux.activeEffects(my.oppPtr, {artId = A[1]}) < 1 and #aux.activeEffects(my.oppPtr, {artId = B[1]}) < 1 then aux.useEffect({artId = aux.getRandVal({A[1], A[4], A[5]})}, my.oppPtr) else aux.useEffect({artId = aux.getRandVal({A[4], A[5]})}, my.oppPtr) end end ATTACK(math.random(3)) else if aux.randRoll(R[3]) then if aux.randRoll(R[2]) then local persPtr = aux.getPersList(aux.oppTeamNum(), true, true, false, 1) if persPtr and (#persPtr > 0) then aux.useEffect({artId = B[2]}, persPtr[1]) end else if #aux.activeEffects(my.oppPtr, {artId = A[1]}) < 1 and #aux.activeEffects(my.oppPtr, {artId = B[1]}) < 1 then aux.useEffect({artId = aux.getRandVal({B[1], B[3], B[4]})}, my.oppPtr) else aux.useEffect({artId = aux.getRandVal({B[3], B[4]})}, my.oppPtr) end end else ATTACK(math.random(3)) end end end function bot_Flaundin_init(botId) if botId == nil then return; end if bot_FlaundinTable == nil then bot_FlaundinTable = {} end if bot_FlaundinTable[botId] == nil then bot_FlaundinTable[botId] = 0 end end ------------------------------------------------------------------------------------------------ function bot_Flaundin() local A = {4237, 4238, 4239, 4240, 4233} local B = {4242, 4243, 4244, 4241} local H = {0.3, 1} local R = {0.25, 0.25, 0.5} bot_Flaundin_r(A, B, H, R) end function bot_Flaundin_t() local A = {4237, 4238, 4239, 4240, 4233} local B = {4242, 4243, 4244, 4241} local H = {0.3, 1} local R = {1, 1, 1} bot_Flaundin_r(A, B, H, R) end