--[[ a.abolishin Маунт Анлагриса. ]] function bot_PinkPantherMount_r(A, C) local bot = PERS(my.persPtr) if bot_PinkPantherMountBaf2 == nil then bot_PinkPantherMountBaf2 = {} end if bot_PinkPantherMountBaf2[bot.id] == nil then bot_PinkPantherMountBaf2[bot.id] = 2 end if (my.status ~= FS_PS_ACTIVE) or (not my.oppPtr) then -- можем ли ходить? return end abil_MountHeal() -- абсорб на своих if aux.randRoll(C[3]) then local myTeam = aux.getPersList(my.teamNum, true, true, false, 1) if myTeam then -- сначала пытаемся кастануть на хозяйку local myPersId = PERS_ID(my.persPtr) local activator_id = lookupParam("Pers", "activator_id", myPersId) or 0 local ownerFound = false for _, persPtr in pairs(myTeam) do if PERS_ID(persPtr) == activator_id then ownerFound = true aux.useEffect({artId = A[3]}, persPtr) break end end -- если это сделать невозможно - кастуем хоть на кого-нить if not ownerFound then aux.useEffect({artId = A[3]}, myTeam[1]) end end end -- обычная или маг атака if aux.randRoll(C[2]) then aux.useEffect({artId = A[1]}, my.oppPtr) else ATTACK(math.random(3)) end -- зарядка станом на следующий ход local hpC = bot.hp/bot.hpMax if hpC < (bot_PinkPantherMountBaf2[bot.id] * C[1]) then aux.useEffect({artId = A[2]}) bot_PinkPantherMountBaf2[bot.id] = bot_PinkPantherMountBaf2[bot.id] - 1 end end -- botID = 868 function bot_PinkPantherMount() -- маг атака, стан, абсорб local A = {5964, 5968, 5976} -- шаг для стана, вероятность для маг атаки, вероятность для абсорба local C = {0.4, 0.15, 0.5} bot_PinkPantherMount_r(A, C) end function bot_PinkPantherMount_t() -- маг атака, стан, абсорб local A = {5946, 5947, 5948} -- шаг для стана, вероятность для маг атаки, вероятность для абсорба local C = {0.4, 0.15, 0.5} bot_PinkPantherMount_r(A, C) end