-- #84546 - Тестирование маг. расходки 11-20. http://task.corp.mail.ru/task/edit/id84546/ local turns = {} local effects = { [11] = { [1] = {2290, 2249}, [2] = {2291, 2249}, [3] = {2289, 2249} }, [12] = { [1] = {2462, 3559}, [2] = {2460, 3559}, [3] = {2461, 3559} }, [14] = { [1] = {4028, 3560}, [2] = {4030, 3560}, [3] = {4029, 3560} } } local spells = { tank = { [11] = 1752, [12] = 2402, [14] = 2784 }, crit = { [11] = 1750, [12] = 2400, [14] = 2782 }, evade = { [11] = 1754, [12] = 2404, [14] = 2786 } } function persLogic(userId, userLevel, userType, setNum) if (not turns[userId]) then -- первый ход aux.useEffect({artId = effects[userLevel][setNum][1]}, my.persPtr) aux.useEffect({artId = effects[userLevel][setNum][2]}, my.persPtr) turns[userId] = userId end aux.useEffect({artId = spells[userType][userLevel]}, my.oppPtr) end -- танки function doTankLogicSet1() if my.status ~= FS_PS_ACTIVE then return end myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'tank', 1) end function doTankLogicSet2() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'tank', 2) end function doTankLogicSet3() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'tank', 3) end -- криты function doCritLogicSet1() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'crit', 1) end function doCritLogicSet2() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'crit', 2) end function doCritLogicSet3() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'crit', 3) end -- увороты function doEvadeLogicSet1() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'evade', 1) end function doEvadeLogicSet2() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'evade', 2) end function doEvadeLogicSet3() myPers = PERS(my.persPtr) persLogic(myPers.id, myPers.level, 'evade', 3) end