diff --git a/luafight/Modules/Battle/Config/Data/PassiveSkillLogicConfig.lua b/luafight/Modules/Battle/Config/Data/PassiveSkillLogicConfig.lua new file mode 100644 index 000000000..0801c9ac7 --- /dev/null +++ b/luafight/Modules/Battle/Config/Data/PassiveSkillLogicConfig.lua @@ -0,0 +1,40 @@ +local PassiveSkillLogicConfig = { +__count = 2738, +__indexs = {1.7,94,1,899,1.42,8976,1.7,13,2.1,4.1,2.1,1.6,14,2.1,4.1,2.1,1.5,15,2.1,4.1,4.3,89695,1100,1.01,90,1.41,886,4.1,8.1,16.1,1.9,91,4.1,8.1,28.41,1.11,89,52.02,1.51,885,52.81,20.2,56.61,60.61,104.82,156.34,57786,1.2,99998,1.3,90097,100,1.4,96,1.5,95,1,9699,300,600,1.6,194,1,199,5.2,994,2.1,1.6,294,1.3,97,9.2,394,4600,1.8,9992,1.3,9997,1.2,298,9800,300,1,49699,33.2,1.6,94,1.2,98,1,99,6.2,58.2,1.11,1789,800,1.5,195,52.2,900,16.2,5500,200,1.51,85,1.4,196,400,1.01,190,1.3,197,1.4,596,1.01,990,2.1,1.01,290,33.2,600,1.01,390,4600,1.01,9990,1.9,9991,1.8,292,57.2,200,449400,1.27,-2.2,1.2,2,1.9,2,1.7,2,1,19,41.2,1.4,396,54.2,1.4,296,6.3,8.4,2.1,4.1,20.2,2.1,596,1.4,896,6.3,6585,-10.6,1,9,-10.3,1,9899,-10.9,1,9,5.2,11.3,-10.2,8.3,19899,13.5,-10.01,19900,15.7,59899,23.8,8.3,1,9,10,28.31,51.8,8.1,69899,78.6,-10.01,17.5,19.4,29899,25.6,9900,24.5,49899,74.11,54.5,105.3,26.6,18.2,1.2,8,72.8,14.2,114.7,1509991,10,90,2.1,1,9,1.2,88,8.3,5.2,30.3,89,4.3,389,21.1,42.14,965289,1.42,999976,1.63,64,1.14,59,1.24,5000538,30,1.2,8,1.3,17,1,29,50,1,19,56160,1.5,995,2.1,4.1,8.1,16.51,18995,1.31,87,537.5,907785,1.9,999992,1.01,999989,1.8,28000116,200,-400.2,-200.2,300,-100.2,300,59908686,-10.5,11,1,8,10,4.2,9,1.3,9896,-10.8,234.4}, +__values = {0,1.23,2,1.91,2,1.2,3,2,1.3,2.1,2.1,3,12,1,7.3,1.51,2,1.9,-2.2,1.01,2,1.7,2,1.71,2,1,2,1.31,2,1.02,14.2,2,1.32,2,1.5,2,1,4,1.52,2,1.11,12.3,1.6,98,1.4,5,-10.2,60,11,5.4,200,100,60,40,1.52,75,100,150,50,-100.2,-200.3,-300.2,-200.2,-300.2,200,1.4,96,1,3,8,2,29,1,10,249,97,1,3,496,1.7,18,8,2,1,9,1,55,69.3,6,21.5,98,3,2,494,3600,401,1.7,3,-2.2,3,1.01,5,8,1.7,13,2.1,2.1,1.6,14,2.1,4.1,2.1,1.5,15,2.1,4.1,4.3,91801,3000,1000,10000,14000,2000,8000,6.2,255893,600084,8,50978,10000,350000,1,29,70.3,19959,11568931,1.7}, +__exVals = {72,.05,.1,.2,.5,.4,.08,.3,.15,.25,.12,.6,.06,nil,.35,.8,.16,.03,.04,.18,.14,.36,.32,.7,.24,.09,.20,.10,.30,.07,.02,.45,.13,.48,.01,.72,.75,2.5,.95,.26,.64,.65,.55,3.2,3.6,.9,.17,.34,.015,1.2,.21,.23,.29,1.6,.50,.40,1.75,.96,1.5,2.8,4.8,.11,2.1,2.4,2.7,4.5,2.9,4.3,5.4,.28,.42,.85,.075}, +__fields = { + 'Id', + 'Type', + 'Value', + 'PoolNum', + 'CoverID', + 'Judge', + 'EffectiveRange' +}, +__defaults = { + nil, + nil, + 1, + 1, + 1, + nil +}, +__refs = { + {45,.2,5,1.2,-7,-6,8,.4,1,-1,.4,-23,15,8,.9,-8,6,0,-5,.93,-1,.6,-5,.6,-19,.31,9,.6,5,.5,-7,.5,22,.5,-27,.5,-2,.11,54,2,.5,142,-139,-3,1,3,-4,.3,140,-140,.51,6,-3,-3,7,-1,-6,.3,3,-3,.51,1,2,-3,10,27,-37,.3,4,-4,.51,12,-9,-3,3,10,-13,20.4,14,-11,-3,15,-1,-14,.3,2,-2,.51,16,-13,-3,0,16,-16,.3,17,-17,.51,15,-12,-3,9,-3,50.2,15,-15,10.4,18,-9,-9,.3,19,-19,.51,20,-17,-3,11,-11,.3,1,-1,.51,21,-18,-3,144,-144,.3,142,-142,.51,22,-19,-3,145,-145,.3,24,-24,.51,13,-10,67.2,-15,.3,106,-106,36.2,14,-34,142,-117,-25,.3,149,-149,.51,26,-23,19.2,-5,-10,.3,41.2,76.5,131,-140,.3,18,-18,.51,27,-24,-3,28,-26,1,-3,.3,27,-27,.51,29,-26,-3,0,30,-30,.02,3,0,-3,31,-28,17.2,134.3,10.3,106,-103,10.2,13,-13,104.4,1,145,-146,96.4,68,-65,-3,32,110,-142,.12,10,-7,-3,5,-5,74.4,190.3,22,-22,.3,71,-71,.51,28,-25,-3,79.2,.3,9,-9,.51,33,-30,9.4,167.3,68,-34,121.2,-107,-35,43.4,36,-32,-4,.3,38,-38,.51,39,-36,-3,40,-25,148.2,41,-41,.31,67,-67,42,-39,-3,43,-37,-6,.3,191,-191,.51,44,-41,-3,45,1,-43,-3,.3,44,-44,113.4,183.2,4.2,.3,70,-70,.51,47,-44,-3,48,21,-69,.3,47,-47,.51,53,-50,-3,142,-93,-49,.3,50,-50,182.4,51,-11,-40,.3,39,-39,74.5,9.2,73.2,.51,50,-47,230.4,147,-147,38.4,9.3,10,-10,127.4,9.3,33,-33,18.4,52,92,276.2,54,-54,.51,55,-52,-3,33,-15,147.2,55,-55,.51,24,-21,-3,18,-8,258.2,148,-148,.51,2,1,96.2,9,-57,.3,58,-58,.51,59,-56,-3,0,59,-59,.3,60,-60,.51,18,-15,-3,13,5,187.5,69.3,3,58,-61,318.4,116.3,1,17,216.5,62,-59,-3,63,-45,10.2,126.3,365.3,226.3,69.3,89.3,.5,46.6,28,-28,333.4,45.3,62,-62,9.4,278.3,64,1,-65,.3,66,-66,.9,-37,5,-2.2,-1,-8,5,0,-37,9,4,-4,4,29,.2,-26,.2,-8,3,21,-31,-1,25,-24,44,.3,-32,0,-6,28,-35,27,18,.3,-42,9,-5,38,0,1,-1,-15,-7,-4,26,.3,211.2,-1,3,-4,1,41,.3,-41,3,2,1,12,16,-1,-1,9,1,-27,1,25,1,-4,4,0,-4,-10,-31,0,36,1,.4,-38,70.4,2,0,16,3,2,-28,14,-3,4,1,21,.2,1,-25,14,0,8,.3,1,.2,-38,4,10,.2,7,0,1,0,5,.2,12,-3,-39,14,0,12,0,-11,27,.3,-24,24,0,-15,13,-11,24.2,116.2,-14,1,.2,14,25.2,.2,-28,0,24,1,14,-1,-39,2,-1,44,112.3,.4,-32,0,-13,0,7,4,-4,5,0,9,-21,28,17,.2,1,-1,.3,-45,12,-12,45,25.3,11.3,-15,-6,-5,26,18.4,143.2,37,-25,30,-43,-4,5,1,39,49.4,149.9,.2,1,-28,1.2,23,0,1.2,7.2,-4,3,4.2,.4,155.3,38,30,72,.2,-72,.3,73,1,31,37,-67,1,-76,0,72,5,-5,1,0,5,-6,-72,79,1.2,-81,79,3,1,-83,84,1,99,-98,1.2,-9,10,1.2,-6,7,1.5,8,-7,-98,99,1,-100,101,1.3,-32,0,-72,0,185,8,-108,-15,-35,-22,-1,-6,-6,194,-176,0,27,8,-11,43,-49,-9,5,59,-61,-21,-9,16,-2,45,-2,106,-102,-52,45,86,-140,194,-207,.4,2,.4,-1,.4,8,.4,-37,.4,34,.4,-3,.4,-4,.4,5,.4,-33,.4,27,.4,9,.2,-64,0,44,.2,-44,0,67,.2,-67,0,62,.2,-62,0,65,.2,-65,0,70,856.2,-105,-34,857.3,197,-201,.5,855.4,165,1.2,-174,.5,1,149,-147,-3,10,141,-114,122,-159,.5,843.4,173,-174,175,-189,.5,842.6,.5,15,137,-149,-3,18,138,-147,152,-161,.5,26,0,784.3,172,-177,141,-151,.5,27,170,-194,0,-3,28,170,-196,197,-199,.5,170,-167,-3,0,171,-171,.5,3,-3,2.1,106,63,-166,165,-168,.5,20,2,850.2,1,95,50,3,-149,.5,68,83,-148,-3,32,123,-13,-131,-11,.5,39,12,-48,714.3,152,-167,.3,712.7,180,-186,.5,44,120,-161,0,-3,165,-119,120,-166,.5,53,43,-93,689.2,2,-95,-49,.5,15,139,-151,-3,158,-118,122,-162,18.2,-38,536.2,52,-29,121,56,-200,.5,24,129,-150,-3,18,139,-147,115.3,640.4,142,-133,-57,.5,59,117,-173,639.3,117,-176,.5,33,-18,13,834.2,3,31,27,114,-175,57.2,148,-160,629.3,142,-160,.5,1,4,-2,-3,64,138,-137,-89,0,-8,0,-18,-11,11,-11,17,-14,0,34,.3,-6,154.3,9,-33,736.2,33,21.1,42.14,-13,.42,177,0,1.2,2.1,3,2,-117,118,2,1.4,0,2,1.3,-152,.4,153,1.4,.3,2,1.2,-30,21.81,3,1,-25,6,21,-15,10,4,-31,27.21,1.2,-151,27.21,-25,2,50,-122,-1,1,8,107,-118,0,157,-170,3,-16,0,43,-57,.101,143,-140,-3,56,126,-4,1.2,-180,.3,10,167,-177,782.4,196,-41,-155,.3,194,-194,.9,-34,175,54,.5,-40,40,-195,.01,203,-203,.7,-13,2,-1,-29,26,8,-11,8,-4,5,9,.5,181,-38,47.6,3,-183,.5,44.3,3,193,-4,-37}, + {{{1},{1,.2,3,529,-1,-528,0,3,-5,8,0,-8,11,-6,-1,-4,8,-5,-3,0,5,1,3,-6,3,7,-7,-2,-4,3,-3,-1,0,1,.7,2.1,4.1,2.1,5,.2,-2,0,-3,0,287,1,2,26,1.2,2,208,.2,-1,.2,7,-6,5.4,-527,.6,527,0,-7,.2,10,-537,0,-1,2.1,-1,11.2,5,0,-4,.3,6,0,-5,0,2,28.2,0,33.4,0,7,-461,-77,6,-6,11,-3,7,-14,538,-539,534,-533,-1,99.3,528,-532,5,6,-7,11,-15,5.1,7,4.2,0,4,517,7,-525,518,35,-567,26.3,530,-534,26.01,.2,51.3,521,-3,-527,-6,543,-543,150.4,0,25.01,14,-14,11,-4,8,-15,533,-528,525,-530,0,26.3,526,-530,26.01,11,-11,2.1,15,528,-10,-525,-8,551,-551,26.3,532,-536,26.31,-5,9,516,2,-520,-2,531,-542,78.51,129.3,-5,9,-15,528,-514,-13,533,-534,26.51,181.3,104.3,528,-523,-5,.2,25.81,-3,7,25.2,-528,530,-530,102.51,179.4,-6,524,179.2,152.4,49.21,8,-8,100.5,-520,526,99.4,-2,-2,254.51,125.3,-14,50.61,99.6,2,-2,1,530,-531,26.3,-3,-1,100.41,-15,552,-546,-5,-1,51.91,-4,8,356.2,-534,-5,532,-532,26.51,253.3,3,1,522,-4,-522,-11,536,-3,-533,27.3,542,-546,129.31,-6,10,129.3,-3,-11,79.4,9,-13,358.51,515,-2,254.2,230.5,358.21,181.5,26.2,181.2,26.5,281.02,536,-527,-9,26.51,182.4,514,4,-527,523,-529,103.4,7,-11,25.01,0,52.8,531,233.4,309.71,521,-8,-520,-8,51.4,529,-533,408.91,258.61,459.8,334.71,126.5,-528,5,-6,1,638.4,126.11,-6,-9,334.7,-4,-2,385.22,539,-539,532,-531,52.4,538,-542,281.31,522,-518,639.2,-526,-7,534,561.61,462.6,533,-519,-14,0,533,360.4,692.71,515,3,-528,334.2,3,27.61,615.52,156.5,533,590.2,639.42,-1,543,716.61,26.8,542,25.4,527,-531,75.81,665.42,356.5,331.14,-15,537,-531,528,-534,50.12,543,-19,-525,-14,175.4,546,-550,50.41,-13,550,-546,199.5,713.61,479.2,-517,-11,24.4,525,-529,299.31,659.3,533,-522,2,-12,378.4,352.81,149.3,456.5,26.02,516,1043.5,350.02,531,-536,26.4,2,-6,301.51,-14,527,633.3,26.4,154.21,278.5,-6,519,278.81,77.5,527,-14,-523,0,-5,303.54,377.2,-5,177.61,24.4,531,-9,-531,530,-6,835.4,254.11,62,-77,557,-556,528,-360,-169,4,555,-24,-3,3,-3,-2,.2,-530,1.2,530,27,-265,238,0,6,-8,895.2,3,-2,530,0,-6,-521,523,6,-529,-6,5,-8,1,528,0,-523,7,-2,-6,525,1,-531,6,-3,1,-4,536,.2,-4,2,-2,-529,531,-534,10,-2,-5,531,-2,0,-2,-530,4,-4,0,4,7,-11,-2.2,7,521,-521,0,518,-239,242,0,-528,-4,1.4,526,0,8,-8,8,-9,0,-529,19,-10,529,-527,-10,537,-6,-532,1.2,9,531,-533,10,-20,.3,1.3,536,-4,-533,-2.2,527,18,-8,-1,-532,10,-5,-11,532,-526,-1,1,2.1,525,-526,1.2,3,519,-528,7.2,-531,325,217,-9,9,-541,1.2,532,-534,1.2,-2,2.1,1.2,536,.3,-6,-1,0,1,2,-527,6,-2,3,-14,137.3,532,-6,3,0,-1,-4,-2.2,.2,4,-4,18.2,-9,136.3,5,-8,531,7,-538,84.2,3,-8,148.5,-528,4,6,-8,6,-5,152.3,532,6,-6,6,-9,-526,526,29,-27,11,-8,-527,-1,5,58.2,160.3,555,-20,0,115.2,3,-4,0,7,56.3,519,-529,1,-3,.2,8,9.3,531,-535,5.3,.4,518,-235,244,-4,-525,-9,11,-10,13,-6,-4,1,-4,533,3,-537,546,23,-555,1,-15,548,-537,-11,6,1556.2,7,-9,529,-530,6,-4,-1,1,7,-7,0,507,-508,0,537,-537,0,12,534,-546,6,543,-549,0,442.2,546,-547,16,516,1,350.2,1161.2,538,-536,.3,-2,.2,170.2,1,-1,4,-4,.2,5.2,.2,2,549,-22,12,-541,0,4,527,12,-543,1,907.2,5,-6,538,-530,162.2,.4,1,-1,7,25,9,-572,.4,529,8,10,26,-43,.3,4,0,13,-4,3,5,4,34,1.2,-20,21,-50,.3,814.2,61.2,529,.2,-7,1,-2,6,319.3,2,6.2,-537,1,2,530,6.2,-7,.2,-531,.3,548.6,542,-10,-533,560,-559,550,-551,613.5,552,-34,-519,518,-532,-1,3,-2,702.5,-5,1311.2,33.2,532,-541,-2,1656.5,551,-37,-521,-8,0,574,-572,13.4,-5,9,527,-13,-516,-2,-11,1244.4,637.3,6,166.2,-5,.6,520.4,0,824.2,-5,0,-1,45.4,1424.4,-8,.2,-518,34.2,536,-535,-1,1411.5,534,7,-542,-3,0,-11,1370.6,-524,550,-542,-14,1,529,-531,1,974.6,0,552,-552,536,-5,-522,-5,-4,1220.5,-518,518,-523,1347.3,536,-536,27.7,220.2,563,-562,-1,0,817.3,518,-514,-15,529,-522,1169.3,0,777.6,0,529,0,-515,-14,.5,35.4,529.2,162.2,198.6,46.4,541,1,-542,.3,11.4,1,542,-537,526,-3,562.2,-531,923.5,1,534,-531,-6,3,-3,148.2,13.4,517,24,-545,158.3,82.4,899.3,70.2,-518,2,-12,0,160.4,83.3,.2,556,-542,516,-527,-3,.2,210.6,534,22,-551,527,-532,6,978.3,-3,7,533,14,-19,-537,418.2,530,-527,.3,534.2,-534,534,-535,529,612.2,0,8,1,519,-509,525,1031.2,-5,5,526,-526,21.1,42.14,258.2,658.4,564,-35,13,-532,0,520,.2,1,13,0,-534,519,6,5,-534,-2,-1,4,1,-8,-1,3,-1,-1,4.3,209.2,573,-575,36.6,-31,62,-585,36.4,7,749.2,523,7,-10,-524,36.21,0,555,-557,539,-10,0,5,-2,-532,41.6,-34,1,789.2,41.2,1.2,0,-522,520,0,39.41,542,-543,528,6,0,-4,11,-542,2,14.2,.2,-1,542,1,0,-12,18,-548,551,23,-573,253.4,985.3,259.6,12.1,1337.6,270.6,12.1,6.1,1014.5,11.1,5.1,39.6,11.1,407.5,514,8,719.2,7,-7,.3,1055.4,377.2,1181.51,531,-9,-537,5,1765.61,-16,1,-3.5,2,-17,6,-6,5,1.3,4,-4,69.2,4,0,520,-535,.7,535,3,-538,534,-3,-1,34,-563,541,-533,-9,54.5,519,9,0,-543,83.3,.4,13.5,533,-18,-530,1276.2,6,-11},{1924,1,4,1,4,4.1,1,412,1.42}},{{2},{1.3,528,1,-531,353,179,-2,-1,0,1,.4,-1,-464,468,-363,384,1.2,-473,472,-1,1,-1,-23,-448,199,-280,-1,294,27,-2.2,1.4,-35,4.1,8.1,4.3,2,1.3,6,9,3,-352,.31,530,48,-12,13,-30,-8,-9,-4,5,4,6,-13,0,-2,1,8,-2,-5,6,-533,.5,-2,.11,1,.5,46,212,273,-273,71,198,-528,5,524,-529,289,89,149,0,-528,528,.3,3.1,-528,260,20.3,204,-534,4,532,-247,19.3,-520,520,19.9,202,-532,0,-1,529,-529,290,21.2,.5,18.5,279,-279,18.4,10,518,18.4,39.21,206,-536,11,-1,518,-517,278,21.3,-527,527,60.11,41.2,5,-244,59.31,4,116.2,76.41,5,523,75.5,133.8,20.6,537,-535,282,74.61,133.2,-239,56.31,530,-527,525,17.3,56.21,131.2,93.2,19.4,3,-3,75.11,528,14,-542,228.4,-529,529,20.6,269,-269,248.3,528,-529,537,229.3,76.6,265.6,531,-537,2,288,18.11,226.3,542,-542,1,18.9,73.5,-1,5,524,5,3,284.4,95.31,-1,14,515,-525,286,266.11,135.6,0,524,1,-519,279,230.41,537,135.4,97.21,208.2,-521,228.4,1,-1,57.5,528,-268,39.71,362.6,3,525,2,-241,287.71,523,250.51,343.4,286.9,227.5,0,528,8,-6,56.4,95.7,545,-285,22.5,-1,537,-537,439.51,20.3,6,524,-530,385.51,-331,1,529,-519,518,20,-259,21.3,21,-21,215.11,2,-2,528,2,-529,277.3,0,-525,525,258.21,1,528,-521,-6,299.51,6,523,13,-252,601.41,432.3,-531,241.6,14,-14,489.31,-2,-541,510.71,-1,6,537,-543,21.21,63.5,541,-542,512.4,381.41,515.6,605.31,16.9,277,-277,220.3,116.2,241.6,2,-2,241.21,5,739.5,94.8,281.6,0,530.31,376.3,6,536,-12,376.71,10,532,20.5,78.8,627.01,131.9,16.4,-529,3,287,169.61,5,523,-528,873.21,230.8,666.5,21.31,3,209.51,330.3,-530,291,227.42,791.7,848.01,506.6,485.2,223.4,420.7,19,29,-47,32,297,-329,1068.3,2,-2,1.2,846.2,6,1,-534,527,9.2,0,-1,117.2,0,11,-2,-8,533,-515,27,-42,525,-360,-168,10,-7,5,520,-520,-7,532,-534,4,42,-37,520,-529,.5,64,-64,529,-520,-5,42,-46,.3,532,-251,-112,359,-519,16.2,534,-525,520,-526,526,0,-526,527,0,-178,-23,.4,-328,71.4,4.2,527,-529,0,535,-534,-1,.2,535,0,-5,0,-530,9,5,-13,1.3,530,-534,529,7,-4,-2,11,-6,-3,4,0,-4,-492,-32,547,-1,-1,1,27,-27,28,-27,0,-555,553,0,-546,-7,0,1.2,533,.2,61.2,.2,-7,.5,3,0,-2,-530,544,-492,-45,535,-533,10,511,-511,2.1,-10,0,-9,.3,11,525,-536,1.2,-2,2,539,341.2,0,511,-501,53,-73,521,146.2,3,525,.2,25.2,31.3,-17,139.2,9,21.3,-521,73,-63,511,-530,.3,3,37,-37,-3,5,-5,134.2,0,521,55.4,73,-82,1,.2,537,-214,-43,247,-524,15,32.2,-530,531,-530,-1,4,8.3,-527,1,5.3,.4,-527,531,-6,-520,47,-53,531,148.3,34,-561,224.3,530,-530,26,-26,150,410,2,-25,1015.2,1,3,-4,1,0,-8,-530,583,-580,581,-584,535,-535,1.2,-1,540,-540,545,-12,-534,550,-548,6,69,183,269,19,-548,66.2,534,-531,527,-1,-530,0,9,521,-530,535,-523,519,-528,-3,530,-528,532,-530,-4,.4,588,-29,-24,-5,6,-2,7,-9,0,-1,3,.4,-533,.4,563,29,-23,24,1,-53,.2,-542,0,532,-1,7,.2,-535,.2,1,0,-4,.2,-1,6.2,.2,11,.2,519,4,-3,-239,237,-236,87,157,-536,-1,6,545,-550,0,291,11.3,193,-572,4,542,-547,292,9.3,149,389.4,-2,-535,528,-236,12.3,167,-546,11,-1,526,325.2,-240,23.5,10,526,-6,-239,241,-240,32.4,5,176.2,-531,530,-238,245,-244,64.3,528,10,-539,547,-547,535,-243,33.6,-10,1,1181.2,0,-1,292,37.6,4,532,-6,15,-254,11.3,68.2,4,524,-524,532,-7,-529,10,-11,25.6,535,-530,613.2,0,-2,293,106.6,533,-534,537,-529,-4,0,288,139.6,541,-535,545,-551,36.4,-380,962.3,526,12,-549,11.4,61.2,2,-3,1.2,535,-6,0,-531,154.6,282.2,155.2,-529,252,273,71.4,1018.4,.2,292,243,-242,35.3,809.2,543,-543,11,94.2,144.5,486.3,144.2,529,-237,94.6,6,523,16,-15,179.6,530,-520,519,12,-8,-242,142.6,532,-537,537,-534,-4,293,23.5,5,531,49.2,56.6,.2,55.2,-15,3,-156,-44,-335,534,-534,110.2,5,-4,4,1,-5,1,-2,-1,1,-529,528,340.2,21.1,42.14,535,0,-534,1.2,8,524,-535,539,-4,2,0,-536,531,-521,-11,543,252.2,.4,7,-15,-518,524,9,.3,-539,530,-524,519,0,-529,28.2,584.2,552,-16,7,0,-542,537,-527,-11,551,-538,533,.4,-18,7,-524,525,-8,.3,8,-525,-7,0,-4,536,0,497.2,8,530,-541,535,6,-11,39.2,-1,222.2,548,-12,.4,-3,3,-525,530,29.3,-530,29.3,529,1.2,18,-19,19,-8,-541,.2,11,20,-19,0,519,-409,422,-422,202,221,-544,121,6.3,209,-532,6.4,12.1,12.6,204,-527,12.1,12.7,423,-423,12.1,12.4,6.3,36.9,12.11,259,1145.5,8,-9,357.2,1166.4,9,-9,1166.11,0,-1,543,-544,5,1602.4,-524,524,22.5,77,-77,.5,4,-4,539,-6,-6.2,-6,-6,6,1007.2,-330,-1,513,17,6,9.2,-2,-2,6,12,-539,538,-18,682.2,576,-38,-246,488.5,8,-9,530,-519,-11,293,242,442.2,11.2,0,-1,263.2,-7,600,-595},{5,77,1.6,65,4,22,3,1,25,6,21,25,23,4,5,17,3.1,3,23,25,3,5,20,22,3,2.1,26,1,5,17,9,17,3,7,46,32,24.3,21,23,8,42,20.3,5,20,24,4,-26.2,25,27,7,20,26,23,54,25,45.3,5,56.2,1,2.1,5,20,23,70.4,5,17,26,4,26,36.3,25,24.3,17,8,20,1,16,2,3,16,63,35,1.2,20,10,22,85,5,15,2,12,14,4,-3.2,1,3,1.2,4,3,4,1,5,8,-2.2,9.2,5,2,4,-2.2,12,1.4,6,1.4,39,1,4,1,4,4.1,1,7,5,8,3,2,1,8,3,13,1,9,4,7,4,14,2,8,5,35,6,14,13,1,11,26,1,8,14,5,12,2,11,9,5,8,1.2,13,1,4,12,1.2,16,2,21,2.1,4.3,6,1.42,9,10,1,26,3.2,17,3,1,-10.2,1,16,3,1,13,110,2,87.2,39,30,3,2,10,6,1.3}},{{3},{2,1,-1,0,1,0,4.3,-1,.9,3.2,529,6,-5,6,-2,7,-10,-2,7.6,26,-13,1,-6,-6,0,2,12.5,4,6.1,6.5,-493,-38,.6,1,-1,.3,-1,2,-1,59.4,5.3,.5,3.2,.7,8.4,13.5,.2,27.3,3.2,.4,16.9,26.5,15.01,31.3,8.3,2,-1,3.2,-2,39.3,52.31,5.1,18.7,.9,536,-536,13.1,65.01,.8,78.51,109.31,.41,529,-528,149.12,.7,4,-3,93.11,54.4,17.3,55.01,97.31,84.5,.2,140.21,207.51,87.01,100.3,26.3,42.01,156.3,102.41,528,-527,36.2,3,-2,18.8,5.3,313.4,174.01,376.3,11.7,.31,536,-535,11.9,66.41,-523,-5,3,-3,.3,68.01,62.3,3.1,71.3,144.8,187.2,70.3,.3,74.01,.6,11.5,101.01,164.3,532,-531,18.4,568,-567,196.01,496.5,36.01,.51,253.41,0,-1,531,-531,82.11,214.3,22.3,548,-547,63.9,548,-548,115.41,53.7,293.31,119.3,208.12,93.6,531,-530,123.22,535,-534,477.41,13.3,.4,324.3,184.11,31.01,98.3,263.01,13.3,47.6,117.8,530,-529,54.9,538,-538,1,579,-580,192.11,145.01,125.01,165.51,-1,558,-558,670.61,.4,82.01,0,7,527,.4,2,.2,-527,.2,-6,-2,-1,21.2,.2,32.2,534,0,-6,2,-530,.2,1,6,523,9,-539,49.7,535,.2,24,-31,3,-528,525,653.2,.2,529,5,-4,0,57.4,1,63,-63,0,527,-528,1,530,.6,-524,524,-2,-524,529,-4,-529,.3,6,524,-512,19,-24,-14,528,-521,.4,-7,.3,19,-19,0,532,.2,-521,.2,527,-531,.8,-7,1,-1,534,-534,68.3,71.6,531,0,1,0,-3,-528,537,-7,0,-522,525,-534,133.3,3.2,17.2,29,-560,112.3,149.7,16.3,.2,29,-28,-526,521,2,-2,33,-561,49.6,530,4,.2,-533,26.6,81,-82,4.2,314.2,-529,.91,2,-2,26.3,.2,6,-3,-3,0,550,-550,.6,3,6.2,1.2,-2,0,585,-585,5,-5,0,542,-542,.2,586,-16,1,16,-582,6,.4,521,-1,7,25,9,-570,.4,-2,.4,1,563,-562,.2,-3,.2,10,.2,522,.2,-531,678.6,104.5,8.3,144.6,947.4,3.2,566.7,630.3,577.4,4,1,-4,585.6,.2,5,-5,501.4,666.5,0,801.6,764.4,0,535,-535,.6,42.4,439.3,1010.5,416.3,532,-532,14.3,521.7,133.2,449.4,687.6,6.2,161.2,513.4,13,423.2,82.3,41.3,73.4,7.3,.2,1,3,-1,-3,856.6,.2,3,0,-3,1,.3,21.2,529,-529,2.1,0,12.1,24.22,-524,-1,526,75.3,-530,0,4,1,530,339.3,-2,.5,539,-539,7,1,6,-8,-6,11,-10,4,438.2,92.3,20.2,4,1,531,-535,8.2,.6,552,-552,24.4,5,-10,45.3,4,-1,527,5,0,-5,-531,26.3,536,-540,0,-1,.5,537,-537,26.9,488.2,395.3,0,2,95.3,-5,.01,1,-1,3.1,.13,6.5,161.3,6.3,.61,783.4,7,-6,679.11,536,-537,651.01,0,4,.5,528,-528,1151.5,.4,541,-540,.7,529,-519,521,-529,-3,2,-2,222.3,576,-566,-11,.5,1,.2,545},{1.8,12,1,11,1.65,15,1.81,32,3,1,22,3.1,3,1,5,17,4,25,6,4.2,7.3,3.2,3,23,8,4.2,5,20,22,3,24.4,20,27.3,9,17,3,1,29.3,25,32,8.3,5,21,23,3,5,17,25,28.3,5,20,24,4,26,20,6,34.3,26,7,4.2,25,23,54,5,20,60.3,5,21,25,1,2.1,69.4,74.4,88.4,70.3,26,46.3,25,28.3,17,89.3,1,16,1.2,2,1.3,14,12,2,2.1,21,1.2,4,1,7,3,1.5,12,1,8,1.9,2,1.6,11,8,1.2,21,1,23,20,2,19,13,1.2,6,1.5,15,2,10,1.4,4,8,4,3,1,2,44.2,1.6,4.2,8.3,3,7,12.3,3,2.1,-2.2,1,3.1,11,1.4,6,1.9,21,1.9,4,1.6,4,1,4.2,7,1,22.2,7,3,2,1,8.3,1.3,10,1,9,4,8.3,1,13,1.3,7,1,4,2,8,4,21,4,1.3,8,5,13,1,5,6,4.2,9,3,1,8,1,13,4,1.2,11,27.2,10.4,4,1,7,1.2,5,8,59.4,4.3,2.1,2,9,2,8,5.1,10.9,6,1.42,7.2,5,25.2,8,17,6.5,62.3,9,9.4,7,9.3,-2.2,25.2,109,1.4,5,18,3,17,1,30,2,1,2,10,6,81.2,77.2}},{{4},{14,-11,.6,1,.6,2,0,2,.2,2,-8,.71,38,-37,0,-2,1,6,-7,4,525,-527,2,-3,535,7,-12,1,-531,1,.2,-2,2,1,-2,1,-1,2,-2,9,.2,-6,.2,-3,2,-1,1,-2,0,12,-12,1.2,-2,4,-4,4,0,-3,0,11,0,-9,9,0,-7,-5,31.4,.2,1,.2,11,-5,-7,.2,2,0,7,40.3,-2,.5,2,.2,1,49,-41,-11,1,-1,2.1,11,-11,0,11,.2,-12,1.3,4,-7,5,-1,-3,3,8,-8,-2,17.2,0,-8,8,.4,43.2,529,0,6,0,-7,2,-526,3,.3,525,.4,-530,.4,530,.4,-525,.2,-5,4,0,-6,6,-6,0,1,2,125.2,0,10,-5,9.3,0,2,-3,1,2,-2,0,3.1,6.1,-1,0,5,-1,1,-4,0,3,0,-3,-1,.4,536,-535,574,-575,15.11,1,556,-18,-10,-527,-2,17.21,543,-15,6,-533,-2,11,-9,-2,3,530,-534,530,9,4,-542,.3,-1,577,-61,-511,528,-530,530,45,-578},{14,75,1.31,20,1.42,265,8,25,18,25,134,49,3,52,72,1,29,6,123,9,21,25,126,49,113,46,146,5,1.01,5,1,6,1,3,6,5,9,1.4,2,1,5,2,5,2,4,1.4,10,1.9,9,24,1.5,12,1.5,2,1.8,3,4,5,6,1.3,7,-5.2,2,3,4,8,5,1.9,4,6,2,5,4,10,1,4,1.5,60,7,1,8,7,2,15,1.5,26,1.41,26,1.2,31,61,1,19,2,22,3,8,13,4,1,10,15,2,27,11,13,10,19,26,2,35,8,2,13,3.1,6.5,30,86.2,7,2,1,10,-2.2,1.11,7.6,85.2,1,3,4.2,11.3,9,11.5,2,4,1.2,8,116,21,5,13,1.7,12,9,7,1.2,12,17}},{{5},{531,-524,0,2,.2,2,0,-4,6.5,-8,.5,3,8.4,-3,0,2,0,19.5,6.3,-6,-3,9,-8,8,-8,.2,8,0,520,-520,.3,-9,528,1,0,-529,529,0,-528,-1,19.3,.2,20,-21,522,-530,1,.2,529,-521,0,521,.3,-521,.3,-8,2,527,-530,528,2,0,-530,530,.4,-529,-1,0,3,1,.2,5,0,-5,3,-6,2,530,-527,524,-530,-1,.7,530,52.2,.2,4,531,-535,535,0,-535,.2,536,-536,5,0,525,38.2,.2,541,-541,33.3,533,-3,-530,19,.6,512,-522},{14,75,1.31,20,1.32,528,824,1.6,15,1,14,9,1.3,11,5,2,4,1.4,11,1.5,2,1,9,24,17,1.2,25,6,1,14,10,4,8,5,1.4,2,7,8,5,4,10,1,4,1.5,60,7,18,51,1.4,64,83,-25.2,26,2,38,42,71,2,21,2.1,4.3,30,1.4,30,1.7,30,1,2,1,56.2,29,6.3,5,4,2,8,155,64.2,12,17}},{{6},{3,-1,.6,1,.6,-1,.5,1,.5,-1,1,2.1,0,4.2,.3,6.2,527,-527,0,5.2,.5,1,25.2,536,-5,.4,-532,7.2,.7,7,1,-8,0,1,6,5.2,1,-1,0,11.3,6.3,2,515,15},{14,75,1.31,32,1.11,1353,2,18,1,14,28,2,4,2,1,13,2,5,9,68,6,1,14,10,4,8,18,13,4,10,5,1.4,68,69,1.4,64,199,113,2,21,2.1,4.3,30,1,33,1.4,33,1,2,1,4,1,32,6.3,11,182,17}},{{7},{3,-1,1,542,-543,.9,532,-531,8,-9,0,1,4.1,8,541},{1561,29,151,228,312,2,21,2.1,4.3,30,1,33,1.4,33,1,7,1,32,1,196}},{{8},{11,-5,5,-8,1,.7,6,506},{1561,29,151,228,312,2,21,2.1,4.3,64,275}},{{9},{2,550},{2416,275}},{{10},{518},{2691}},{{11},{552},{2691}},{{12},{520},{2691}},{{13},{530},{2691}},{{14},{522},{2691}},{{15},{537},{2691}},{{16},{523},{2691}},{{17},{536},{2691}},{{18},{524},{2691}},{{19},{543},{2691}},{{20},{525},{2691}},{{21},{599},{2691}},{{22},{526},{2691}},{{23},{571},{2691}},{{24},{527},{2691}},{{25},{570},{2691}},{{26},{528},{2691}},{{27},{600},{2691}},{{28},{529},{2691}}}, + {297,1.42,62,1.7,7,1.7,2,1.49,-320,.2,91,.3,67,1,.4,1,.5,1,0,2,1,-69,.6,70,0,1,-70,.6,1,2.1,.6,69,.2,-336,337,15.3,-69,.8,1,.3,1,.2,68,2,30.3,.5,23.3,.2,1,0,6.3,.9,1,.11,1.2,.5,1,.4,1.2,.2,1.3,.51,58.3,-87,.01,88,.3,7.2,-88,.01,1,2.1,.01,87,.2,-363,363,2.1,19.4,3.2,39.3,.8,86,1.3,3,.4,2,.4,4,.4,39.3,8.3,2.1,8.4,12.5,.2,2.1,4.1,2.1,-133,107,2,4,2,1.5,3}, + {79,.531,422,1.8,-430,.082,434,1,7,-10,1,0,-433}, + {2,.513}, + {2,.541,1,.4,-1,0,2,-1,4.2,1,.3,-1,3.1,6.4,17.9,1,-1,17.51,34.31,1,-2,34.23,0,14.8,34.52,119.81,16.1,32.1,98.05,34.81,4.2,184.71,.8,14.7,2,0,32.2,31.3,232.01,17.7,100.33,65.6,.5,212.17,78.21,209.82,3.2,.2,226.43,195.5,4.2,313.66,428.611,611.94,679.4,217.221,.182,1,.7,-1,.5,1,-1,2.1,2.1,.2,1,0,4.3,3.1,-1,.12,591.3,28.3,.13,7.2,.08,49.3,434.4,.2,57.7,.3,16.7,8.4,16.8,230.6,24.01,8.1,8.2,456.3,33.21,236.3,491.4,-2,44.12,100.4,542.6,108.4,60.5,9.6,8.1,16.01,133.61,24.7,0,215.3,9.2,.3,102.3,0,-2,10.4,51.21,.552,8.3,3.1,6.1,12.1,24.1,91.7,.4,148.3,301.8,315.61,.81,300.4,.7,-1,.9,99.7,.5,463.8,.2} +}, +__refPoss = { + nil, + nil, + {10,1.531,1343,1.082,98,1.75,3,1.2,2.1,4.1,727,30,1.9}, + {10,1.531,38,78,26,262,363,53,204,73,26,220,1.082,229,12,213,291,2,1,154}, + {153,3,1,22,3.1,6.1,12.1,3,2.1,4.1,20.21,23,35.41,23,35.01,26.21,12.3,15.11,70.81,105.62,364,2,1,5,1.2,3,1,2,1,2,1.5,3,89,1,3,1.2,7,3,1.3,7,1,4.3,3.1,3,1,10.5,4.1,1,4,15.41,8.5,44.3,3.2,1,4,4.3,8.4,4.1,60.8,15.6,87.2,38.6,4.3,240,1.8,2,1.3,103,3,1.4,164.3,62,1,3,1.5,7,52.2}, + nil +}, +} +return PassiveSkillLogicConfig \ No newline at end of file diff --git a/luafight/Modules/Battle/Data/ConfigData.lua b/luafight/Modules/Battle/Data/ConfigData.lua new file mode 100644 index 000000000..90cd4fe42 --- /dev/null +++ b/luafight/Modules/Battle/Data/ConfigData.lua @@ -0,0 +1,334 @@ +ConfigName = { + -- AccomplishmentConfig = "AccomplishmentConfig", + ActivityRewardConfig = "ActivityRewardConfig", + -- AdventureConfig = "AdventureConfig", + AreaConfig = "AreaConfig", + ArtResourcesConfig = "ArtResourcesConfig", + AudioConfig = "AudioConfig", + ChallengeConfig = "ChallengeConfig", + ChallengeMapConfig = "ChallengeMapConfig", + ChallengeMissionConfig = "ChallengeMissionConfig", + ChapterEventPointConfig = "ChapterEventPointConfig", + ChapterOptionConfig = "ChapterOptionConfig", + DifferDemonsComonpentsConfig = "DifferDemonsComonpentsConfig", + DifferDemonsConfig = "DifferDemonsConfig", + DifferDemonsStageConfig = "DifferDemonsStageConfig", + EquipConfig = "EquipConfig", + EquipPropertyPool = "EquipPropertyPool", + EventPointConfig = "EventPointConfig", + ExploreFunctionConfig = "ExploreFunctionConfig", + FoodsConfig = "FoodsConfig", + GameSetting = "GameSetting", + GlobalActivity = "GlobalActivity", + GlobalSystemConfig = "GlobalSystemConfig", + GuideConfig = "GuideConfig", + HeroConfig = "HeroConfig", + HeroLevelConfig = "HeroLevelConfig", + HeroRankupConfig = "HeroRankupConfig", + HeroRankupGroup = "HeroRankupGroup", + ItemConfig = "ItemConfig", + LevelDifficultyConfig = "LevelDifficultyConfig", + LevelSetting = "LevelSetting", + LotteryRewardConfig = "LotteryRewardConfig", + LotterySetting = "LotterySetting", + LotterySpecialConfig = "LotterySpecialConfig", + MapPointConfig = "MapPointConfig", + MissionEventsConfig = "MissionEventsConfig", + MonsterConfig = "MonsterConfig", + MonsterGroup = "MonsterGroup", + MonsterViewConfig = "MonsterViewConfig", + OptionAddCondition = "OptionAddCondition", + OptionConfig = "OptionConfig", + PassiveSkillConfig = "PassiveSkillConfig", + PassiveSkillLogicConfig = "PassiveSkillLogicConfig", + PlayerLevelConfig = "PlayerLevelConfig", + PropertyConfig = "PropertyConfig", + RewardGroup = "RewardGroup", + RoleConfig = "RoleConfig", + RunesConfig = "RunesConfig", + RunesPoolConfig = "RunesPoolConfig", + SkillConfig = "SkillConfig", + SkillLogicConfig = "SkillLogicConfig", + StoreConfig = "StoreConfig", + StoreTypeConfig = "StoreTypeConfig", + UIConfig = "UIConfig", + VipLevelConfig = "VipLevelConfig", + PrivilegeTypeConfig = "PrivilegeTypeConfig", + TaskConfig = "TaskConfig", + WorkShopEquipmentConfig = "WorkShopEquipmentConfig", + WorkShopFoundationConfig = "WorkShopFoundationConfig", + WorkShopFunctionConfig = "WorkShopFunctionConfig", + WorkShopRebuildConfig = "WorkShopRebuildConfig", + WorkShopSetting = "WorkShopSetting", + ArenaReward = "ArenaReward", + ArenaSetting = "ArenaSetting", + DifferDemonsBoxSetting = "DifferDemonsBoxSetting", + -- AdventureReward = "AdventureReward", + DialogueViewConfig = "DialogueViewConfig", + JumpConfig = "JumpConfig", + RechargeCommodityConfig = "RechargeCommodityConfig", + DailyTasksConfig = "DailyTasksConfig", + WorkShopTechnology = "WorkShopTechnology", + WorkShopTechnologySetting = "WorkShopTechnologySetting", + ChallengeStarBox = "ChallengeStarBox", + TrialConfig = "TrialConfig", + TrialSetting = "TrialSetting", + BlessingConfig = "BlessingConfig", + BlessingRewardPool = "BlessingRewardPool", + ElementalResonanceConfig = "ElementalResonanceConfig", + TreasureTaskConfig = "TreasureTaskConfig", + EndlessMapConfig = "EndlessMapConfig", + SevenDaysActivity = "SevenDaysActivity", + LuckyCatConfig = "LuckyCatConfig", + SignInConfig = "SignInConfig", + -- BeginnerTask = "BeginnerTask", + GuildSetting = "GuildSetting", + GuildLevelConfig = "GuildLevelConfig", + GuildRewardConfig = "GuildRewardConfig", + ActivityRankingReward = "ActivityRankingReward", + ExchangeActivityConfig = "ExchangeActivityConfig", + FloodConfig = "FloodConfig", + LoginPosterConfig = "LoginPosterConfig", + QAConfig = "QAConfig", + BeStronger = "BeStronger", + SpecialConfig = "SpecialConfig", + EquipSign="EquipSign", + EquipTalismana = "EquipTalismana", + EquipTalismanaLottery="EquipTalismanaLottery", + EquipSignSetting="EquipSignSetting", + BloodyBattleSetting = "BloodyBattleSetting", + BloodyBattleReward = "BloodyBattleReward", + BloodyBattleTask = "BloodyBattleTask", + BloodyBattleTreasure = "BloodyBattleTreasure", + BloodyRankConfig = "BloodyRankConfig", + RandomName = "RandomName", + MainLevelConfig = "MainLevelConfig", + MainLevelSettingConfig = "MainLevelSettingConfig", + HeroReturn = "HeroReturn", + TreasureSunlongConfig = "TreasureSunlongConfig", + TreasureSunLongTaskConfig = "TreasureSunlongTaskConfig", + DialRewardSetting="DialRewardSetting", + DialRewardConfig="DialRewardConfig", + MainMapIconConfig="MainMapIconConfig", + ErrorCodeHint = "ErrorCodeHint", + SystemMessageConfig = "SystemMessageConfig", + ActivityDropReward = "ActivityDropReward", + -- PlayerAppearance = "PlayerAppearance", + PlayerMountLevelUp = "PlayerMountLevelUp", + MazeTreasure = "MazeTreasure", + MazeTreasureSetting = "MazeTreasureSetting", + ChampionshipReward="ChampionshipReward", + ChampionshipSetting="ChampionshipSetting", + LuxuryFundConfig="LuxuryFund", + PlayerRole="PlayerRole", + GuildBossConfig="GuildBossConfig", + GuildBossRewardConfig="GuildBossRewardConfig", + GuildRedPackConfig="GuildRedPackConfig", + ExpeditionFloorConfig="ExpeditionFloorConfig", + ExpeditionHolyConfig="ExpeditionHolyConfig", + ExpeditionSetting="ExpeditionSetting", + ExpeditionNodeConfig="ExpeditionNodeConfig", + AchievementConfig="AchievementConfig", + MonthcardConfig = "MonthcardConfig", + EquipStarsConfig = "EquipStarsConfig", + CombatControl="CombatControl", + EquipSuiteConfig = "EquipSuiteConfig", + BuffEffectConfig = "BuffEffectConfig", + RecommendTeam="RecommendTeam", + JewelConfig="JewelConfig", + JewelRankupConfig="JewelRankupConfig", + JewelResonanceConfig="JewelResonanceConfig", + DailyChallengeConfig="DailyChallengeConfig", + GuildTechnology="GuildTechnology", + WorldBossConfig="WorldBossConfig", + WorldBossRewardConfig="WorldBossRewardConfig", + WorldBossSetting="WorldBossSetting", + GuildSacrificeConfig="GuildSacrificeConfig", + GuildSacrificeRewardConfig="GuildSacrificeRewardConfig", + GuildWarConfig="GuildWarConfig", + GuildHelpConfig="GuildHelpConfig", + WorldBossTreasureConfig="WorldBossTreasureConfig", + TrialKillConfig="TrialKillConfig", + TrialQuestionConfig="TrialQuestionConfig", + TrialGameConfig="TrialGameConfig", + FakeBattle = "FakeBattle", + ArenaBattleReward = "ArenaBattleReward", + RaceTowerConfig = "RaceTowerConfig", + RaceTowerRewardConfig = "RaceTowerRewardConfig", + HeroSacrifice = "HeroSacrifice", + GuildCheckpointConfig = "GuildCheckpointConfig", + GuildCheckpointRank = "GuildCheckpointRank", + ThemeActivityTaskConfig = "ThemeActivityTaskConfig", + ExchangeRate = "ExchangeRate", + CustomEventConfig = "CustomEventConfig", + SpiritAnimal = "SpiritAnimal", + SpiritAnimalBook = "SpiritAnimalBook", + SpiritAnimalLevel = "SpiritAnimalLevel", + SpiritAnimalStar = "SpiritAnimalStar", + SpiritAnimalSetting = "SpiritAnimalSetting", + SpiritAnimalSkill = "SpiritAnimalSkill", + ExpeditionRecruitConfig = "ExpeditionRecruitConfig", + FreeTravel="FreeTravel", + FreeTravelStore="FreeTravelStore", + GodSacrificeConfig = "GodSacrificeConfig", + GodSacrificeSetting = "GodSacrificeSetting", + Language="Language", + FakeBattleNew = "FakeBattleNew", + HeroSkin = "HeroSkin", + BlessingConfigNew = "BlessingConfigNew", + BlessingRewardPoolNew = "BlessingRewardPoolNew", + SpiritAnimalSummon = "SpiritAnimalSummon", + NewHeroConfig = "NewHeroConfig", + PlayerHeadIcon = "PlayerHeadIcon", + GoodLuck = "GoodLuck", + Tips = "TipsConfig", + Hongmeng = "Hongmeng", + HongmengUp = "HongmengUp", + NewHeroConfig = "NewHeroConfig", + MainLevelBossConfig = "MainLevelBoss", + ActivityGroups = "ActivityGroups", + ArroGantFly = "ArroGantFly", + ComposeActivity = "ComposeActivity", + ComposeBook = "ComposeBook", +} + +require "Modules/Battle/Framework/GameDataBase" +local configList = {} + +ConfigManager = {} + +function ConfigManager.Initialize() + configList = {} +end + +function ConfigManager.GetConfig(cfgType) + if not configList[cfgType] then + local config = require("Modules/Battle/Config/Data/" .. cfgType) + GameDataBase.SheetBase.Init(config) + configList[cfgType] = config + end + return configList[cfgType] +end + +---获取表格Id项 +function ConfigManager.GetConfigData(cfgType, id) + local config = ConfigManager.GetConfig(cfgType)[id] + assert(config, string.format("%s not find Id:%s", cfgType, id)) + return config +end +---获取表格Id项不返回错误 +function ConfigManager.TryGetConfigData(cfgType, id) + return ConfigManager.GetConfig(cfgType)[id] +end + +---获取某个key值为value的固定表格条目(取第一个) +function ConfigManager.GetConfigDataByKey(cfgType, key, value) + local configData + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key] == value then + configData = configInfo + break + end + end + assert(configData, string.format("%s not find key:%s,value:%s", cfgType, key, value)) + return configData +end +---获取某个key值为value的固定表格条目(取第一个),不返回错误 +function ConfigManager.TryGetConfigDataByKey(cfgType, key, value) + local configData + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key] == value then + configData = configInfo + break + end + end + return configData +end + +---获取双重Key锁定下的表格条目(取第一个) +function ConfigManager.GetConfigDataByDoubleKey(cfgType, key1, value1, key2, value2) + local configData + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key1] == value1 and configInfo[key2] == value2 then + configData = configInfo + break + end + end + assert(configData, string.format("%s not find key1:%s,value1:%s,key2:%s, value2:%s", cfgType, key1, value1, key2, value2)) + return configData +end +---获取双重Key锁定下的表格条目(取第一个),不返回错误 +function ConfigManager.TryGetConfigDataByDoubleKey(cfgType, key1, value1, key2, value2) + local configData + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key1] == value1 and configInfo[key2] == value2 then + configData = configInfo + break + end + end + return configData +end +---获取三重Key锁定下的表格条目(取第一个),不返回错误 +function ConfigManager.TryGetConfigDataByThreeKey(cfgType, key1, value1, key2, value2,key3, value3) + local configData + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key1] == value1 and configInfo[key2] == value2 and configInfo[key3] == value3 then + configData = configInfo + break + end + end + return configData +end +---获取某个key值为value的所有条目 +function ConfigManager.GetAllConfigsDataByKey(cfgType, key, value) + local expectList = {} + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key] == value then + table.insert(expectList, configInfo) + end + end + assert(#expectList > 0, string.format("%s not find key:%s,value:%s", cfgType, key, value)) + return expectList +end +---获取双重Key锁定下所有的表格条目 +function ConfigManager.GetAllConfigsDataByDoubleKey(cfgType, key1, value1, key2, value2) + local expectList = {} + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key1] == value1 and configInfo[key2] == value2 then + table.insert(expectList, configInfo) + end + end + assert(#expectList > 0, string.format("%s not find key1:%s,value1:%s,key2:%s, value2:%s", cfgType, key1, value1, key2, value2)) + return expectList +end +---获取三重Key锁定下所有的表格条目 +function ConfigManager.GetAllConfigsDataByThreeKey(cfgType, key1, value1, key2, value2, key3, value3) + local expectList = {} + for _, configInfo in ConfigPairs(ConfigManager.GetConfig(cfgType)) do + if configInfo[key1] == value1 and configInfo[key2] == value2 and configInfo[key3] == value3 then + table.insert(expectList, configInfo) + end + end + assert(#expectList > 0, string.format("%s not find key1:%s,value1:%s,key2:%s, value2:%s,key3:%s, value3:%s", cfgType, key1, value1, key2, value2, key3, value3)) + return expectList +end + + +---配置表遍历(按照id的大小升序遍历) +---用法: +---for k, v in ConfigPairs(configs) do +--- k 为id +--- v 为id对应的配置项 +---end + +function ConfigPairs(configs) + local i = 0 + local keys = GameDataBase.SheetBase.GetKeys(configs) + return function() + i = i + 1 + local key = keys[i] + if key then + return key, configs[key] + end + end +end \ No newline at end of file diff --git a/luafight/Modules/Battle/Framework/GameDataBase.lua b/luafight/Modules/Battle/Framework/GameDataBase.lua new file mode 100644 index 000000000..73055d40d --- /dev/null +++ b/luafight/Modules/Battle/Framework/GameDataBase.lua @@ -0,0 +1,269 @@ +GameDataBase = {} + +local floor = math.floor +local pairs = pairs +local type = type +local setmetatable = setmetatable + +local function readonlyMT(t,k,v) + Log("attempt to update a read-only table") +end + +local function setDefaultTable(rT, dT) + for i=1, #rT do + if type(rT[i]) == "table" then + setDefaultTable(rT[i], dT) + else + rT[i] = dT[rT[i]] + end + end +end + +local function createTable(curD, index, val, parent) + if curD == #index then + parent[index[curD]] = val + else + parent[index[curD]] = parent[index[curD]] or {} + createTable(curD+1, index, val, parent[index[curD]]) + end +end + +local decode = {} +local function decodeList(encodeList) + if not encodeList or #encodeList < 1 then + return encodeList + end + + local dCount = 0 + local off,count,idx,n,n2,f + + for i=1, #encodeList do + n = encodeList[i] + off = floor(n) + + if off == n or off < 2 then + dCount = dCount + 1 + decode[dCount] = n + else + n2, count, f = n, 0, 1 + while n2 - floor(n2) > 1e-5 do + n2 = floor(n2 * 1000000 + 0.5) / 100000 + count = count + floor(n2) % 10 * f + f = f * 10 + end + idx = dCount + if count == 1 then + count = off + end + for j=1, count do + dCount = dCount + 1 + decode[dCount] = decode[idx-off+j] + end + end + end + dCount = 0 + for i=1, #decode do + n = decode[i] + off = floor(n) + if off == n then + dCount = dCount + 1 + encodeList[dCount] = decode[i] + else + if n < 0 then + n = -n + off = floor(n) + end + n2, count, f = n, 0, 1 + while n2 - floor(n2) > 1e-5 do + n2 = floor(n2 * 1000000 + 0.5) / 100000 + count = count + floor(n2) % 10 * f + f = f * 10 + end + for j=1, count do + dCount = dCount + 1 + encodeList[dCount] = off + end + end + end + for i=1,#decode do + decode[i] = nil + end + local flag = encodeList[1] + for i=2, #encodeList do + flag = flag + encodeList[i] + encodeList[i] = flag + end + return encodeList +end + +GameDataBase.SheetRefBase = {} +GameDataBase.SheetRefBase.__newindex = readonlyMT +GameDataBase.SheetRefBase.__index = function(t,k) + if t.m_refTB[k] then + return t.m_refTB[k] + end + local l_rt + for i, v in pairs(t.m_refData) do + if v[k] then + l_rt = l_rt or {} + createTable(1, i, t.m_DT[v[k]], l_rt) + end + end + t.m_refTB[k] = l_rt + return l_rt +end + +GameDataBase.SheetLineBase = {} +GameDataBase.SheetLineBase.__newindex = readonlyMT +GameDataBase.SheetLineBase.__index = function(t,k) + local index = t.m_fIds[k] + if index then + return t.val[index] + end +end + +GameDataBase.SheetBase = {} +GameDataBase.SheetBase.__newindex = readonlyMT +GameDataBase.SheetBase.__index = function(t,k) + local index = t.__ids[k] + if index then + local line = t.__lines[index] + if not line then + line = {val={k}} + for i=1, #t.__fields-1 do + if t.__defaults[i] then + if t.__refPoss[i] and t.__refPoss[i][index] then + line.val[i+1] = t.__refPoss[i][index] + else + line.val[i+1] = t.__defaults[i] + end + else + line.val[i+1] = t.__refs[i][index] + end + if type(line.val[i+1]) == "number" then + line.val[i+1] = t.__values[line.val[i+1]] + end + end + line.m_fIds = t.__fIds + setmetatable(line, GameDataBase.SheetLineBase) + t.__lines[index] = line + end + return line + end +end + +function GameDataBase.SheetBase.GetCount(t) + return t.__count +end + +function GameDataBase.SheetBase.Init(t) + t.__indexs = decodeList(t.__indexs) + t.__values = decodeList(t.__values) + if t.__exVals then + local count = #t.__values + for i=1,t.__exVals[1] do + t.__values[i+count] = t.__exVals[i+1] + end + t.__exVals = nil + end + + t.__fIds = {} + for i=1, #t.__fields do + t.__fIds[t.__fields[i]] = i + end + + t.__ids = {} + t.__lines = {} + for i=1,t.__count do + t.__ids[t.__indexs[i]] = i + end + local ids = {} + local refs = {} + for i=1, #t.__fields-1 do + local idList = decodeList(t.__refPoss[i]) + if t.__refs[i] and type(t.__refs[i][1]) == "table" then + local rTs = { m_refData = {}, m_refTB = {}} + for j=1, #t.__refs[i] do + local data = decodeList(t.__refs[i][j][2]) + local data_pos = decodeList(t.__refs[i][j][3]) + if idList then + local dic = {} + if data_pos then + if #data_pos == #data then + for k=1, #data do + dic[idList[data_pos[k]]] = data[k] + end + else + local dIdx,dIdx2 = 1,0 + for k=1, #data_pos+#data do + if k==data_pos[dIdx] then + dIdx = dIdx + 1 + else + dIdx2 = dIdx2 + 1 + dic[idList[k]] = data[dIdx2] + end + end + end + else + for k=1, #data do + dic[idList[k]] = data[k] + end + end + data = dic + else + if data_pos then + local dic = {} + if #data_pos == #data then + for k=1, #data do + dic[data_pos[k]] = data[k] + end + else + local dIdx,dIdx2 = 1,0 + for k=1, #data_pos+#data do + if k==data_pos[dIdx] then + dIdx = dIdx + 1 + else + dIdx2 = dIdx2 + 1 + dic[k] = data[dIdx2] + end + end + end + data = dic + end + end + rTs.m_refData[t.__refs[i][j][1]] = data + end + rTs.m_DT = t.__values + setmetatable(rTs, GameDataBase.SheetRefBase) + refs[i] = rTs + else + refs[i] = decodeList(t.__refs[i]) + end + if t.__defaults[i] and type(t.__defaults[i]) == "table" then + setDefaultTable(t.__defaults[i], t.__values) + end + if t.__defaults[i] and idList then + local tDic = {} + if type(t.__refs[i][1]) == "table" then + for j=1, #idList do + tDic[idList[j]] = refs[i][idList[j]] + end + else + for j=1, #idList do + tDic[idList[j]] = refs[i][j] + end + end + ids[i] = tDic + end + end + t.__refPoss = ids + t.__refs = refs + setmetatable(t,GameDataBase.SheetBase) +end + +function GameDataBase.SheetBase.GetKeys(t) + return t.__indexs +end + + + diff --git a/luafight/Modules/Battle/Logic/Base/BattleEvent.lua b/luafight/Modules/Battle/Logic/Base/BattleEvent.lua index 358ffed02..58c3e13ab 100644 --- a/luafight/Modules/Battle/Logic/Base/BattleEvent.lua +++ b/luafight/Modules/Battle/Logic/Base/BattleEvent.lua @@ -8,13 +8,14 @@ local itemPool = BattleObjectPool.New(function () return { func = 0, obj = 0, once = false } end) function BattleEvent.New() - local instance = {} + local instance = {isTrigger=true} setmetatable(instance, BattleEvent) instance.m_listeners = {} return instance end -function BattleEvent:AddEvent(sEventName, fListener, pObj, bOnce) + +function BattleEvent:AddEvent(sEventName, fListener, pObj, bOnce,_role) if not self.m_listeners[sEventName] then self.m_listeners[sEventName] = listPool:Get() end @@ -22,9 +23,15 @@ function BattleEvent:AddEvent(sEventName, fListener, pObj, bOnce) item.func = fListener item.obj = pObj item.once = bOnce + item.role = _role self.m_listeners[sEventName]:Add(item) end +function BattleEvent:SetIsTrigger(_trigger) + self.isTrigger=_trigger +end + + function BattleEvent:RemoveEvent(sEventName, fListener, pObj) if not self.m_listeners[sEventName] then return @@ -41,20 +48,26 @@ function BattleEvent:RemoveEvent(sEventName, fListener, pObj) end function BattleEvent:DispatchEvent(sEventName, ...) + if not self.isTrigger then + return + end if not self.m_listeners[sEventName] then return end local v for i=1, self.m_listeners[sEventName].size do v = self.m_listeners[sEventName].buffer[i] - if not v.obj then - v.func(...) - else - v.func(v.obj, ...) - end - if v.once then - self:RemoveEvent(sEventName, v) + if v.role==nil or not v.role.isExile then + if not v.obj then + v.func(...) + else + v.func(v.obj, ...) + end + if v.once then + self:RemoveEvent(sEventName, v) + end end + end end function BattleEvent:ClearEvent() diff --git a/luafight/Modules/Battle/Logic/Base/Buff.lua b/luafight/Modules/Battle/Logic/Base/Buff.lua index 1f7824333..6662a2ba0 100644 --- a/luafight/Modules/Battle/Logic/Base/Buff.lua +++ b/luafight/Modules/Battle/Logic/Base/Buff.lua @@ -340,6 +340,7 @@ function BuffManager:PassUpdate() and buff.roundDuration > 0 -- 不是无限存在的buff and buff.caster.type~=BattleUnitType.Monster --灵兽的buff在这里处理 and buff.type~=BuffName.NoDead + and not buff.target.isExile --放逐单位buff不会更新 then -- 当前轮释放的buff不结算 if buff.startRound ~= BattleLogic.GetCurRound() then @@ -368,6 +369,7 @@ function BuffManager:PassUpdateNoDead() and buff.roundDuration > 0 -- 不是无限存在的buff and buff.caster.type~=BattleUnitType.Monster --灵兽的buff在这里处理 and buff.type==BuffName.NoDead --不灭在这里处理 + and not buff.target.isExile --放逐单位buff不会更新 then -- 当前轮释放的buff不结算 buff.roundPass = buff.roundPass + 1 @@ -389,11 +391,17 @@ function BuffManager:PassMonsterUpdate() if buffList.size > 0 then for index = 1, buffList.size do local buff = buffList.buffer[index] - if not buff.disperse -- 没过期 - --and buff.caster.camp == curCamp -- 释放者是当前轮到的人 - --and buff.caster.position == curPos - and buff.roundDuration > 0 -- 不是无限存在的buff - and buff.caster.type==BattleUnitType.Monster --灵兽的buff在这里处理 + if (not buff.disperse -- 没过期 + and buff.roundDuration > 0 -- 不是无限存在的buff + and buff.caster.type==BattleUnitType.Monster --灵兽的buff在这里处理 + and not buff.target.isExile) --放逐单位buff不会更新 + or (not buff.disperse -- 没过期 + and buff.roundDuration > 0 -- 不是无限存在的buff + and buff.caster.type==BattleUnitType.Monster --灵兽的buff在这里处理 + and buff.target.isExile + and buff.type==BuffName.Exile) + + -- and buff.type~=BuffName.Exile --buff名称不是放逐 then -- 当前轮释放的buff不结算 if buff.startRound ~= BattleLogic.GetCurRound() then @@ -419,7 +427,9 @@ function BuffManager:TurnUpdate(sort) if not buff.disperse -- 没有过期 and buff.sort == sort -- 当前buff刷新等级 and buff.target.camp == curCamp -- 当前阵营 + and not buff.target.isExile --放逐单位buff不会更新 and buff.target.position == curPos then -- 当前位置 + --触发buff if buff.roundInterval >= 0 then if buff.roundInterval == 0 or buff.roundPass % buff.roundInterval == 0 then diff --git a/luafight/Modules/Battle/Logic/Base/Effect.lua b/luafight/Modules/Battle/Logic/Base/Effect.lua index 275e79a4f..b58f7ff01 100644 --- a/luafight/Modules/Battle/Logic/Base/Effect.lua +++ b/luafight/Modules/Battle/Logic/Base/Effect.lua @@ -2388,6 +2388,17 @@ local effectList = { end end) end, + --[a]% 的概率 放逐 目标[b]回合 + --a[float],b[int] + [127] = function(caster, target, args, interval, skill) + local pro = args[1] + local round = args[2] + BattleLogic.WaitForTrigger(interval, function () + BattleUtil.RandomAction(pro, function () + target:AddBuff(Buff.Create(caster, BuffName.Exile, round)) + end) + end) + end, } return effectList \ No newline at end of file diff --git a/luafight/Modules/Battle/Logic/Base/EffectCaster.lua b/luafight/Modules/Battle/Logic/Base/EffectCaster.lua index 200c990ce..752c80730 100644 --- a/luafight/Modules/Battle/Logic/Base/EffectCaster.lua +++ b/luafight/Modules/Battle/Logic/Base/EffectCaster.lua @@ -174,6 +174,19 @@ function EffectCaster:GetDirectTargetsNoMiss() return list end +-- ȡֱĿûбĿ꣬missĿ꣬Ϊ +function EffectCaster:GetDirectTargetsNoExile() + local list = {} + for _, role in ipairs(self.effectTargets[1]) do + if not role.isExile then + table.insert(list, role) + end + end + return list +end + + + -- ȡĿ function EffectCaster:GetMaxTargetNum() local mainEffect = self.effectList[1] diff --git a/luafight/Modules/Battle/Logic/Base/Passivity.lua b/luafight/Modules/Battle/Logic/Base/Passivity.lua index abd66d084..6a06be3d9 100644 --- a/luafight/Modules/Battle/Logic/Base/Passivity.lua +++ b/luafight/Modules/Battle/Logic/Base/Passivity.lua @@ -59,7 +59,7 @@ local passivityList = { role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, duration + BattleLogic.GameDeltaTime * 2) end) end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) end, --发动技能后,[a]的概率对敌方随机1名施加攻击*[c]的[d]伤害。 @@ -77,7 +77,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,[c]使仇恨目标受到治疗效果降低[a],持续[b] @@ -95,7 +95,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,[d]改变自身[a]属性[b],持续[c]秒 @@ -109,7 +109,7 @@ local passivityList = { local OnSkillCastEnd = function(skill) role:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, ct)) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,[a]的概率回复攻击最高的1人的[b]*[c]血量,持续[d]秒。 @@ -129,7 +129,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,[a]的概率提升随机角色的[b]*[c]的[d],持续[e]秒。 @@ -150,7 +150,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --使用回复技能时,[a]的概率提高恢复效果[b]。 @@ -164,7 +164,7 @@ local passivityList = { treatingFunc(f2, CountTypeName.AddPencent) end) end - role.Event:AddEvent(BattleEventName.PassiveTreating, OnPassiveTreating) + role.Event:AddEvent(BattleEventName.PassiveTreating, OnPassiveTreating,nil,nil,role) end, --受击后,[a]的概率,回复自身的[b]*[c]的血量 @@ -180,7 +180,7 @@ local passivityList = { BattleUtil.CalTreat(role, role, val) end) end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --受击后,[a]对攻击者造成的攻击*[c]的持续伤害,持续[d]秒。 @@ -206,7 +206,7 @@ local passivityList = { end) end) end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --受击时[e],[a]的概率将[b]*[c]算作[d]计算 @@ -225,7 +225,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore, OnRoleBeDamagedBefore) + role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore, OnRoleBeDamagedBefore,nil,nil,role) end, --受击时,有[a]的概率抵消[b]*[c]的攻击。 @@ -240,7 +240,7 @@ local passivityList = { damagingFunc(floor(BattleUtil.FP_Mul(f2, role:GetRoleData(BattlePropList[pro])))) end) end - role.Event:AddEvent(BattleEventName.PassiveBeDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveBeDamaging, OnPassiveDamaging,nil,nil,role) end, --受击后,有[a]的概率对敌方全体造成攻击*[c]的[d]伤害 @@ -267,7 +267,7 @@ local passivityList = { end) lastTrigger = 0 end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --受击后,有[a]的概率对随机1人造成[b]*[c]的真实伤害。 @@ -295,7 +295,7 @@ local passivityList = { end) lastTrigger = 0 end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --受击后[f],[a]的概率将[b]*[c]算作[d]计算,持续[e]秒。 @@ -315,7 +315,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --免疫[a]属性伤害。 @@ -353,7 +353,7 @@ local passivityList = { role:AddPropertyTransfer(BattlePropList[pro1], f2, BattlePropList[pro2], 2, f3) end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,[d]改变仇恨目标[a]属性[b],持续[c]秒 @@ -370,7 +370,7 @@ local passivityList = { arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro1], f1, ct)) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,[d]改变己方全体[a]属性[b],持续[c]秒 @@ -387,7 +387,7 @@ local passivityList = { arr[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro1], f1, ct)) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --受到治疗效果提高[a]。 @@ -416,7 +416,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role) end, --自身增益效果超过[a]时,技能伤害提升[b]。 @@ -450,8 +450,8 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.BuffStart, OnBuffStart) - role.Event:AddEvent(BattleEventName.BuffEnd, OnBuffEnd) + role.Event:AddEvent(BattleEventName.BuffStart, OnBuffStart,nil,nil,role) + role.Event:AddEvent(BattleEventName.BuffEnd, OnBuffEnd,nil,nil,role) end, --血量低于[a]时,[b]概率触发控制免疫,持续[c]秒。每场战斗只能触发1次。 @@ -472,7 +472,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --死亡时,立即回复己方全体[a]*[b]的血量。 @@ -488,7 +488,7 @@ local passivityList = { BattleUtil.CalTreat(role, arr[i], val) end end - role.Event:AddEvent(BattleEventName.RoleDead, OnDead) + role.Event:AddEvent(BattleEventName.RoleDead, OnDead,nil,nil,role) end, --控制效果命中后,[a]的概率施加[c]的[d]伤害 @@ -505,7 +505,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role) end, --控制效果命中后,[a]对全体造成[c]的[d]伤害。 @@ -525,7 +525,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role) end, --造成的伤害暴击后,[a]施加攻击*[c]的[d]持续伤害,持续[e]秒。 @@ -549,7 +549,7 @@ local passivityList = { end) end) end - role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit) + role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role) end, --造成的伤害暴击后,[a]的概率回复自身[b]*[c]的血量 @@ -565,7 +565,7 @@ local passivityList = { BattleUtil.CalTreat(role, role, val) end) end - role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit) + role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role) end, --对血量高于[a]的敌人伤害提高[b]。 @@ -579,7 +579,7 @@ local passivityList = { damagingFunc(-floor(f2 * damage)) end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) end, --对血量低于[a]的敌人伤害提高[b]。 @@ -593,7 +593,7 @@ local passivityList = { damagingFunc(-floor(f2 * damage)) end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) end, --发动技能后,[d]改变敌方全体[a]属性[b],持续[c]秒 @@ -610,7 +610,7 @@ local passivityList = { arr[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, ct)) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,有[a]的概率眩晕敌方其中1人,持续[b]秒。 @@ -625,7 +625,7 @@ local passivityList = { BattleUtil.RandomControl(f1, 1, role, arr[1], f2) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --持续伤害效果命中后,[d]改变自身[a]属性[b],持续[c]秒 @@ -641,7 +641,7 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, ct)) end end - role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role) end, --[d]改变自身[a]属性[b],持续[c]秒 @@ -663,7 +663,7 @@ local passivityList = { local OnPassiveDamaging = function(damagingFunc,defRole, damage, skill) damagingFunc(-f1) end - role.Event:AddEvent(BattleEventName.PassiveDamiaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamiaging, OnPassiveDamaging,nil,nil,role) end, --进入战斗[a]秒后,造成的伤害提升[b],持续[c]秒 @@ -758,7 +758,7 @@ local passivityList = { BattleUtil.CalTreat(role, role, f1) end end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --造成伤害时,将伤害的[a]%转化为自身生命 @@ -769,7 +769,7 @@ local passivityList = { local OnDamage = function(defRole, damage, bCrit, finalDmg, damageType, dotType, skill) BattleUtil.CalTreat(role, role, floor(f1 * finalDmg)) end - role.Event:AddEvent(BattleEventName.RoleDamage, OnDamage) + role.Event:AddEvent(BattleEventName.RoleDamage, OnDamage,nil,nil,role) end, --造成暴击伤害时,有[a]的概率造成[b]的暴击伤害。 @@ -783,7 +783,7 @@ local passivityList = { crit(f2) end) end - role.Event:AddEvent(BattleEventName.PassiveCriting, OnPassiveCriting) + role.Event:AddEvent(BattleEventName.PassiveCriting, OnPassiveCriting,nil,nil,role) end, --发动技能后,[d]改变仇恨目标[a]属性[b],持续整场战斗,属性最多可改变[c] @@ -803,7 +803,7 @@ local passivityList = { arr[1]:AddBuff(buff) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --发动技能后,[a]的概率[e]改变自身[b]属性[c],持续[d]秒。 @@ -820,7 +820,7 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, BattlePropList[pro], f2, ct)) end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --免疫[a]次[b]控制状态。 @@ -915,7 +915,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --战斗中,每[a]秒增加[b]%的异妖能量 @@ -984,7 +984,7 @@ local passivityList = { treatingFunc(f1, CountTypeName.AddPencent) end) end - role.Event:AddEvent(BattleEventName.PassiveTreating, OnPassiveTreating) + role.Event:AddEvent(BattleEventName.PassiveTreating, OnPassiveTreating,nil,nil,role) end, --受击后,有[a]的概率对攻击者造成眩晕,持续[b]秒。 --a[float],b[int] @@ -997,7 +997,7 @@ local passivityList = { end BattleUtil.RandomControl(f1, 1, role, atkRole, f2) end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --造成伤害时,有[a]的概率立即造成攻击[b]%的伤害。 --a[float],b[float] @@ -1017,7 +1017,7 @@ local passivityList = { end) lastTrigger = 0 end - role.Event:AddEvent(BattleEventName.RoleHit, OnDamage) + role.Event:AddEvent(BattleEventName.RoleHit, OnDamage,nil,nil,role) end, --造成暴击时,额外造成目标最大生命值[a]%的伤害。(目标最大生命值伤害总上限为施法者2.5倍攻击) --a[float] @@ -1035,7 +1035,7 @@ local passivityList = { BattleUtil.ApplyDamage(nil, role, defRole, floor(min(ar1, ar2))) lastTrigger = 0 end - role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit) + role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role) end, --发动技能时,若技能目标与自身发动的上一个技能目标相同,则增加[a]%的伤害,最多叠加[b]层。 --a[float],b[int] @@ -1064,8 +1064,8 @@ local passivityList = { end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) - role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) + role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) end, --发动技能后,每个敌方角色有[a]概率获得[b],每秒造成[c]%的[d]伤害,持续[e]秒。 --a[float],b[持续伤害类型],c[float],d[伤害类型],e[int] @@ -1084,7 +1084,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --每隔[a]秒,抵挡一个负面状态。(控制 dot 减益) --a[int] @@ -1146,7 +1146,7 @@ local passivityList = { end) end end - end) + end,nil,nil,role) end, --自身受到的非暴击伤害,可以转化[a]%的伤害为自身攻击,持续[b]秒。上限自身攻击的[c]%。 --a[float],b[int],c[float] @@ -1162,7 +1162,7 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, RoleDataName.Attack, floor(min(ar1, ar2)), 1)) end end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --发动技能后,有[a]的概率为自身及相邻加持[b][c]%的护盾,持续[d]秒。 --a[float],b[属性],c[float],d[int] @@ -1181,7 +1181,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --自身拥有护盾时,我方角色每次释放技能后,有[a]概率回复[b]%的[c]的治疗。 --a[float],b[float],c[属性] @@ -1201,7 +1201,7 @@ local passivityList = { end) end end - end) + end,nil,nil,role) end, --基于生命损失的百分比,受到的伤害降低[b]%。 --a[float] @@ -1211,7 +1211,7 @@ local passivityList = { local OnPassiveDamaging = function(damagingFunc, atkRole, damage) damagingFunc(floor(BattleUtil.FP_Mul(f1, damage,1-BattleUtil.GetHPPencent(role)))) end - role.Event:AddEvent(BattleEventName.PassiveBeDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveBeDamaging, OnPassiveDamaging,nil,nil,role) end, --我方角色死亡时,对击杀者造成[a]%的[b]伤害,令其眩晕,持续[c]秒。 --a[float],b[伤害类型],c[int] @@ -1228,7 +1228,7 @@ local passivityList = { BattleUtil.CalDamage(nil, role, atkRole, dt, f1) BattleUtil.RandomControl(1, ControlType.Dizzy, role, atkRole, f2) end - end) + end,nil,nil,role) end, --免疫减益状态。 --无 @@ -1265,7 +1265,7 @@ local passivityList = { count = 0 end end - end) + end,nil,nil,role) end, --受到伤害后,[a]概率为自身施加[b]的[c]%的护盾。持续[d]秒。 --a[float],b[属性],c[float],d[int] @@ -1281,7 +1281,7 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.Shield, f3, ShieldTypeName.NormalReduce, val, 0)) end) end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --造成暴击时,额外造成目标最大生命值[a]%的伤害。造成伤害时,有[a]的概率立即造成攻击[b]%的伤害,该伤害造成的暴击伤害不会触发额外最大生命值伤害。(效果55+效果56)(目标最大生命值伤害总上限为施法者5倍攻击) --a[float],b[float],c[float] @@ -1308,7 +1308,7 @@ local passivityList = { end lastTrigger = 0 end - role.Event:AddEvent(BattleEventName.RoleDamage, OnDamage) + role.Event:AddEvent(BattleEventName.RoleDamage, OnDamage,nil,nil,role) end, --击杀每个敌人会永久增加[a]%的[b],持续[c]秒。(0表示永久)(不可驱散) --a[float],b[属性],c[int] @@ -1323,7 +1323,7 @@ local passivityList = { buff.clear = false role:AddBuff(buff) end - role.Event:AddEvent(BattleEventName.RoleKill, OnKill) + role.Event:AddEvent(BattleEventName.RoleKill, OnKill,nil,nil,role) end, --受击后,[a]对攻击者造成自身[c]%的[d]伤害。 --a[float],c[float],d[伤害类型] @@ -1346,7 +1346,7 @@ local passivityList = { end) lastTrigger = 0 end - role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit,nil,nil,role) end, --造成的伤害暴击时,有[a]概率在计算伤害时额外计算[b]的暴击伤害。 --a[float],b[float] @@ -1359,7 +1359,7 @@ local passivityList = { crit(role:GetRoleData(RoleDataName.CritDamageFactor)+f2) end) end - role.Event:AddEvent(BattleEventName.PassiveCriting, OnPassiveCriting) + role.Event:AddEvent(BattleEventName.PassiveCriting, OnPassiveCriting,nil,nil,role) end, --释放技能时,自己损失[a]%当前生命值,为此次技能增加等量伤害。 --a[float] @@ -1375,8 +1375,8 @@ local passivityList = { hp = floor(BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Hp), f1)) role.data:SubValue(RoleDataName.Hp, hp) - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) - role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) + role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) end OnSkillCastEnd = function(skill) BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延迟一帧移除事件,防止触发帧和结束帧为同一帧时,被动未移除 @@ -1384,7 +1384,7 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) end) end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) end, --死亡时,为所有我方角色增加[a]%的[b]属性,持续[c]秒。 --a[float],b[属性],c[int] @@ -1399,7 +1399,7 @@ local passivityList = { arr[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f2, BattlePropList[pro], f1, 2)) end end - role.Event:AddEvent(BattleEventName.RoleDead, OnDead) + role.Event:AddEvent(BattleEventName.RoleDead, OnDead,nil,nil,role) end, --boss每受到([a]*印记层数)点伤害,为自身永久增加一层印记,每层印记为自身增加[b]点攻击,[c]点护甲和[d]点魔抗。【不可驱散】 --a[int],b[int],c[int],d[int] @@ -1441,7 +1441,7 @@ local passivityList = { role:AddBuff(buff3) end end - role.Event:AddEvent(BattleEventName.RoleBeDamaged, OnBeDamaged) + role.Event:AddEvent(BattleEventName.RoleBeDamaged, OnBeDamaged,nil,nil,role) end, --战斗中,若自己是[a],[d]改变[b]属性[c]。 --a[职业],b[属性],c[float],d[改变类型] @@ -1496,7 +1496,7 @@ local passivityList = { BattleUtil.CalTreat(role, role, val) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleOrderEnd, OnEnd) + BattleLogic.Event:AddEvent(BattleEventName.BattleOrderEnd, OnEnd,nil,nil,role) end, --战斗中,若自己是[a],[d]改变[b]属性[c]。-- 2020/3/6 高鑫 --a[元素],b[属性],c[float],d[改变类型] @@ -1552,7 +1552,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then - role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging,nil,nil,role) end end local OnSkillCastEnd = function(skill) @@ -1563,8 +1563,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveDamaging, passivityDamaging) end end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, -- (直接伤害(目前没有明确定义直接伤害))直接伤害击杀目标自身增加[a]点怒气 @@ -1581,7 +1581,7 @@ local passivityList = { BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end end - role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit,nil,nil,role) end, -- 技能治疗量增加[a] @@ -1596,7 +1596,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special then - role.Event:AddEvent(BattleEventName.PassiveTreating, passiveTreating) + role.Event:AddEvent(BattleEventName.PassiveTreating, passiveTreating,nil,nil,role) end end local OnSkillCastEnd = function(skill) @@ -1607,8 +1607,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveTreating, passiveTreating) end end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, @@ -1632,7 +1632,7 @@ local passivityList = { local onTurnEnd = function() BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end - role.Event:AddEvent(BattleEventName.RoleTurnEnd, onTurnEnd) + role.Event:AddEvent(BattleEventName.RoleTurnEnd, onTurnEnd,nil,nil,role) end, -- 普攻伤害增加[a]%[b]改变 @@ -1651,7 +1651,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Normal then - role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging,nil,nil,role) end end local OnSkillCastEnd = function(skill) @@ -1662,8 +1662,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveDamaging, passivityDamaging) end end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, @@ -1688,7 +1688,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 释放技能[a]概率不消耗怒气 @@ -1704,7 +1704,7 @@ local passivityList = { local dCost = 0 if func then func(dRate, dCost) end end - role.Event:AddEvent(BattleEventName.RoleRageCost, onRageCost) + role.Event:AddEvent(BattleEventName.RoleRageCost, onRageCost,nil,nil,role) end, @@ -1726,7 +1726,7 @@ local passivityList = { end if skill.type == BattleSkillType.Special then allDamage = 0 - role.Event:AddEvent(BattleEventName.RoleHit, OnHit) + role.Event:AddEvent(BattleEventName.RoleHit, OnHit,nil,nil,role) end end local function onSkillCastEnd(skill) @@ -1745,8 +1745,8 @@ local passivityList = { allDamage = 0 end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, @@ -1762,7 +1762,7 @@ local passivityList = { local dCost = 0 if func then func(dRate, dCost) end end - role.Event:AddEvent(BattleEventName.RoleRageCost, onRageCost) + role.Event:AddEvent(BattleEventName.RoleRageCost, onRageCost,nil,nil,role) end, @@ -1783,7 +1783,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special then - role.Event:AddEvent(BattleEventName.PassiveRandomControl, onSkillControl) + role.Event:AddEvent(BattleEventName.PassiveRandomControl, onSkillControl,nil,nil,role) end end local onSkillCastEnd = function(skill) @@ -1794,8 +1794,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveRandomControl, onSkillControl) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, @@ -1814,7 +1814,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 直接伤害每次击杀目标增加[a]%的[b]可叠加持续至战斗结束[c]改变 @@ -1834,7 +1834,7 @@ local passivityList = { role:AddBuff(buff) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, @@ -1870,7 +1870,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -1892,7 +1892,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -1914,7 +1914,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit,nil,nil,role) end, -- 释放技能后自身回[a]点怒气 @@ -1930,7 +1930,7 @@ local passivityList = { BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 受到技能或普攻直接伤害的[a]%反弹给攻击者 @@ -1961,7 +1961,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit,nil,nil,role) end, -- 受到普通攻击或直接伤害时回复自身[a]点怒气 @@ -1974,7 +1974,7 @@ local passivityList = { BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end end - role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onBeSkillCastEnd) + role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onBeSkillCastEnd,nil,nil,role) end, -- 释放技能后降低目标[a]点怒气 @@ -1995,7 +1995,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 被击杀时[a]%概率[b]敌方武将[c]回合 @@ -2009,7 +2009,7 @@ local passivityList = { BattleUtil.RandomControl(f1, ctl, role, caster, i1) end end - role.Event:AddEvent(BattleEventName.RoleBeDamaged, onRoleBeDamaged) + role.Event:AddEvent(BattleEventName.RoleBeDamaged, onRoleBeDamaged,nil,nil,role) end, @@ -2031,10 +2031,10 @@ local passivityList = { end if BattleLogic.GetCurRound() == i1 then target.isFlagCrit = true - role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter) + role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter,nil,nil,role) end end - role.Event:AddEvent(BattleEventName.RoleDamageBefore, onRoleDamageBefore) + role.Event:AddEvent(BattleEventName.RoleDamageBefore, onRoleDamageBefore,nil,nil,role) end, @@ -2050,7 +2050,7 @@ local passivityList = { role.data:AddValue(RoleDataName.Crit, f1) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local function onSkillCastEnd(skill) if skill and not skill.isTriggerJudge and judge==1 then @@ -2060,7 +2060,7 @@ local passivityList = { role.data:SubValue(RoleDataName.Crit, f1) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 直接伤害击杀目标后追加[a]次普攻 @@ -2075,7 +2075,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, @@ -2105,13 +2105,13 @@ local passivityList = { BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound) -- 第i1回合开始 if curRound == i1 then - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end -- 第i1+i2回合结束 if curRound == i1 + i2 then role.Event:RemoveEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) end - end) + end,nil,nil,role) end, -- 直接伤害击杀目标回复自身[a]%的[b] @@ -2125,7 +2125,7 @@ local passivityList = { BattleUtil.CalTreat(role, role, treat) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 技能目标每[a]改变[b]个,技能伤害增加[c]%,[d]改变 @@ -2158,7 +2158,7 @@ local passivityList = { extra = BattleUtil.ErrorCorrection(level * f1) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) -- 如果是技能的伤害则判断加成 local onPassiveDamaging = function(func, target, damage, skill) @@ -2170,7 +2170,7 @@ local passivityList = { if func then func(-floor(BattleUtil.ErrorCorrection(dd))) end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, @@ -2191,7 +2191,7 @@ local passivityList = { af = af + f1 end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCast,nil,nil,role) -- 如果是技能的伤害则判断加成 local onPassiveDamaging = function(func, target, damage, skill) @@ -2203,7 +2203,7 @@ local passivityList = { if func then func(-floor(BattleUtil.ErrorCorrection(dd))) end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, -- 普攻后[a]改变自身[b]%的[c]持续[d]回合可叠加 -- a[改变类型]b[float]c[属性]d[int] @@ -2224,7 +2224,7 @@ local passivityList = { role:AddBuff(buff) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 受到直接伤害[a]%治疗友方全体 -- a[float] @@ -2241,7 +2241,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit,nil,nil,role) end, -- 普攻后回复[a]点怒气 @@ -2257,7 +2257,7 @@ local passivityList = { BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -2282,7 +2282,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -2307,7 +2307,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 释放技能后回复己方后排[a]点怒气 @@ -2326,7 +2326,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 直接伤害击杀目标下回合攻击[a]%暴击(TODO:目前为增加[a]%) @@ -2340,7 +2340,7 @@ local passivityList = { role:AddBuff(buff) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 战斗中生命每减少[c]%,[d]就[e]改变[f]% @@ -2367,7 +2367,7 @@ local passivityList = { curLevel = level end end - role.Event:AddEvent(BattleEventName.RoleBeDamaged, onRoleBeDamaged) + role.Event:AddEvent(BattleEventName.RoleBeDamaged, onRoleBeDamaged,nil,nil,role) end, @@ -2392,7 +2392,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -2443,7 +2443,7 @@ local passivityList = { local buff = Buff.Create(role, BuffName.NoDead, i1, f1, ct, false) BattleLogic.BuffMgr:AddBuff(role, buff) end - role.Event:AddEvent(BattleEventName.RoleDead, onRoleDead) + role.Event:AddEvent(BattleEventName.RoleDead, onRoleDead,nil,nil,role) end, @@ -2470,7 +2470,7 @@ local passivityList = { end end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead,nil,nil,role) -- local passivityDamaging = function(func, caster, damage, skill) -- if skill and not skill.isTriggerJudge and judge==1 then @@ -2506,7 +2506,7 @@ local passivityList = { role:AddBuff(buff) end end - role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit,nil,nil,role) -- 释放技能时计算额外伤害 @@ -2559,8 +2559,8 @@ local passivityList = { role:RemovePropertyTransfer(index, tran) end end - role.Event:AddEvent(BattleEventName.RoleDamageBefore, OnRoleDamageBefore) - role.Event:AddEvent(BattleEventName.RoleDamageAfter, OnRoleDamageAfter) + role.Event:AddEvent(BattleEventName.RoleDamageBefore, OnRoleDamageBefore,nil,nil,role) + role.Event:AddEvent(BattleEventName.RoleDamageAfter, OnRoleDamageAfter,nil,nil,role) end, @@ -2581,7 +2581,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special then - role.Event:AddEvent(BattleEventName.PassiveRandomDot, onSkillControl) + role.Event:AddEvent(BattleEventName.PassiveRandomDot, onSkillControl,nil,nil,role) end end -- 技能后后 @@ -2593,8 +2593,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveRandomDot, onSkillControl) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 普攻有[a]%概率使目标[b]持续[c]回合(每回合造成攻击者20%攻击力的伤害) @@ -2620,7 +2620,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -2641,7 +2641,7 @@ local passivityList = { BattleUtil.RandomDot(f1, dot, role, caster, i1, 1, damage) end end - role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -2668,7 +2668,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 释放普攻后给目标附加治疗效果每回合回复[a]的[b]%点生命持续[c]回合(额外加目标[d][e]%生命 ,d e不填不会添加) @@ -2699,7 +2699,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- TODO @@ -2715,12 +2715,12 @@ local passivityList = { if skill.type == BattleSkillType.Special then role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, tFactor) end - end) + end,nil,nil,role) role.Event:AddEvent(BattleEventName.SkillCastEnd, function(skill) if skill.type == BattleSkillType.Special then role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, tFactor) end - end) + end,nil,nil,role) end, -- 受到[a]状态敌人攻击时受到伤害[b]改变[c]% @@ -2736,7 +2736,7 @@ local passivityList = { if func then func(dmgDeduction) end end end - role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging) + role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging,nil,nil,role) end, @@ -2760,7 +2760,7 @@ local passivityList = { end end end - end) + end,nil,nil,role) end, @@ -2784,7 +2784,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special then - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end end -- 技能后后 @@ -2796,8 +2796,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.RoleHit, onHit) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, @@ -2821,7 +2821,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special then - role.Event:AddEvent(BattleEventName.PassiveRandomControl, onSkillControl) + role.Event:AddEvent(BattleEventName.PassiveRandomControl, onSkillControl,nil,nil,role) end end -- 技能后后 @@ -2833,8 +2833,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveRandomControl, onSkillControl) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 死亡时释放[a]次技能 @@ -2848,7 +2848,7 @@ local passivityList = { role:InsertSkill(BattleSkillType.DeadSkill, false, true, nil) end end - role.Event:AddEvent(BattleEventName.RoleDead, onRoleDead) + role.Event:AddEvent(BattleEventName.RoleDead, onRoleDead,nil,nil,role) end, @@ -2878,8 +2878,8 @@ local passivityList = { role:RemovePropertyTransfer(index, tran) end end - role.Event:AddEvent(BattleEventName.RoleDamageBefore, OnRoleDamageBefore) - role.Event:AddEvent(BattleEventName.RoleDamageAfter, OnRoleDamageAfter) + role.Event:AddEvent(BattleEventName.RoleDamageBefore, OnRoleDamageBefore,nil,nil,role) + role.Event:AddEvent(BattleEventName.RoleDamageAfter, OnRoleDamageAfter,nil,nil,role) end, -- 普攻对[a]目标伤害额外增加[b]%(当次),[c]改变 @@ -2902,7 +2902,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Normal then - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end end local onSkillCastEnd = function(skill) @@ -2913,8 +2913,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 受到[a]攻击有[b]%概率使攻击者[c](每回合造成被击者自身20%攻击力的伤害)持续[d]回合 @@ -2938,7 +2938,7 @@ local passivityList = { local damage = floor(BattleUtil.ErrorCorrection(attack * 0.2)) BattleUtil.RandomDot(f1, dot, role, caster, i1, 1, damage) end - role.Event:AddEvent(BattleEventName.RoleBeHit, onRoleBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, onRoleBeHit,nil,nil,role) end, -- 直接伤害击杀[a]目标回复[b]%的最大生命 -- a[持续伤害状态]b[float] @@ -2955,10 +2955,10 @@ local passivityList = { end local onDamaging = function(func, target,damage,skill) if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onDamaging,nil,nil,role) end, @@ -2976,12 +2976,12 @@ local passivityList = { attor[caster.position] = 1 end end - role.Event:AddEvent(BattleEventName.RoleBeHit, onRoleBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit, onRoleBeHit,nil,nil,role) local onBattleRoundChange = function(func, caster) attor = {} end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onBattleRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onBattleRoundChange,nil,nil,role) -- 被动技能加伤害 local onDamaging = function(func, target, damage, skill) @@ -2997,7 +2997,7 @@ local passivityList = { func(-floor(BattleUtil.ErrorCorrection(dd))) end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onDamaging,nil,nil,role) end, @@ -3021,7 +3021,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special then - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end end local onSkillCastEnd = function(skill) @@ -3032,8 +3032,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, @@ -3063,7 +3063,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 释放技能有[a]%概率附加[b]效果持续[c]回合 @@ -3087,7 +3087,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 直接伤害击杀目标回复自身[a]点怒气 回复[b]属性[c]的血量 (b,c不填就不会回复血量) @@ -3120,7 +3120,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end, -- 复活友方[a]位阵亡的英雄并回复其[b]%的生命每场战斗触发[c]次;复活的如果是[d]阵营,回复[e]% @@ -3148,7 +3148,7 @@ local passivityList = { end end) end - BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead,nil,nil,role) end, -- 目标血量每降低[c]%(只看当前血量),对其治疗量就[e]改变[f]% @@ -3165,7 +3165,7 @@ local passivityList = { treatFactorFunc(BattleUtil.ErrorCorrection(level*f2), ct) end end - role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) + role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor,nil,nil,role) end, -- 受到普攻后降低攻击自己武将的[c]点怒气 @@ -3178,7 +3178,7 @@ local passivityList = { BattleUtil.CalRage(role, skill.owner, i1, CountTypeName.Sub) end end - role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onBeSkillCastEnd) + role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onBeSkillCastEnd,nil,nil,role) end, @@ -3193,7 +3193,7 @@ local passivityList = { buff:ChangeShieldValue(ct, f1) end end - role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role) end, -- 释放技能后回复当前本方阵容最靠前[a]名武将[b]点怒气 @@ -3222,7 +3222,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, @@ -3245,7 +3245,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore) + role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore,nil,nil,role) end, @@ -3265,7 +3265,7 @@ local passivityList = { BattleUtil.RandomDot(f1, dot, role, skill.owner, i1, 1, damage) end end - role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onBeSkillCastEnd) + role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onBeSkillCastEnd,nil,nil,role) end, -- 攻击目标时目标身上每有1种异常状态(包括麻痹、眩晕、沉默、灼烧、中毒)都会使对其造成的直接伤害提高,异常状态数量乘以[a]%。 @@ -3307,7 +3307,7 @@ local passivityList = { damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, -- 当敌方目标处于链接符状态(主动技能110效果)时受到链接符传导效果提高[a]% @@ -3317,7 +3317,7 @@ local passivityList = { local onCurse_ShareDamage = function(func) if func then func(f1, CountTypeName.Add) end end - role.Event:AddEvent(BattleEventName.Curse_ShareDamage, onCurse_ShareDamage) + role.Event:AddEvent(BattleEventName.Curse_ShareDamage, onCurse_ShareDamage,nil,nil,role) end, @@ -3336,14 +3336,14 @@ local passivityList = { num = num + 1 end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, onBattleRoleDead) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, onBattleRoleDead,nil,nil,role) -- local cNum = 0 -- 释放技能前记录此次技能提高伤害的目标数量,防止单次技能伤害不一致的问题 local function onSkillCast() cNum = num end - BattleLogic.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + BattleLogic.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) -- 技能伤害提高 local function onPassiveDamaging(damagingFunc, atkRole, defRole, damage, skill) @@ -3354,7 +3354,7 @@ local passivityList = { damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) end end - BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, @@ -3371,7 +3371,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.CritDamageReduceFactor, onCritDamageReduceFactor) + role.Event:AddEvent(BattleEventName.CritDamageReduceFactor, onCritDamageReduceFactor,nil,nil,role) end, -- 战斗中生命每减少[a]%,自身伤害就[b]改变[c]%,减少为[d]改变 @@ -3395,7 +3395,7 @@ local passivityList = { damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, -- 普通攻击时如目标处于[a]状态则伤害的[b]%转化为生命治疗自己 @@ -3414,7 +3414,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Normal then - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end end -- 技能后后 @@ -3426,8 +3426,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.RoleHit, onHit) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 如果目标数量大于[a]个,增加自身[b]点怒气 @@ -3442,7 +3442,7 @@ local passivityList = { BattleUtil.CalRage(role, role, i2, 1) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 释放技能后给当前血量最少的2名队友附加无敌吸血盾持续[a]回合 @@ -3480,7 +3480,7 @@ local passivityList = { end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -3495,7 +3495,7 @@ local passivityList = { local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro], f1, CountTypeName.AddPencent) role:AddBuff(buff) end - role.Event:AddEvent(BattleEventName.RoleTurnEnd, onTurnEnd) + role.Event:AddEvent(BattleEventName.RoleTurnEnd, onTurnEnd,nil,nil,role) end, @@ -3518,7 +3518,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 攻击目标越少[a]对每个目标提升概率越高,提升概率为[b]%除以被击者的总数,提升为[c]改变 @@ -3535,14 +3535,14 @@ local passivityList = { af = BattleUtil.ErrorCorrection(f1/maxNum) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local onPassiveRandomControl = function(func, ctrl2) if ctrl == 0 or ctrl == ctrl2 then if func then func(af, ct) end end end - role.Event:AddEvent(BattleEventName.PassiveRandomControl, onPassiveRandomControl) + role.Event:AddEvent(BattleEventName.PassiveRandomControl, onPassiveRandomControl,nil,nil,role) end, -- 反弹伤害增加[a]%,[b]改变 @@ -3553,7 +3553,7 @@ local passivityList = { local onPassiveRebackDamage = function(func) if func then func(f1, ct) end end - role.Event:AddEvent(BattleEventName.PassiveRebackDamage, onPassiveRebackDamage) + role.Event:AddEvent(BattleEventName.PassiveRebackDamage, onPassiveRebackDamage,nil,nil,role) end, -- 技能直接伤害治疗生命最少队友治疗量提升[a]%,[b]改变 @@ -3565,7 +3565,7 @@ local passivityList = { local onPassiveSkillDamageHeal = function(func) if func then func(f1, ct) end end - role.Event:AddEvent(BattleEventName.PassiveSkillDamageHeal, onPassiveSkillDamageHeal) + role.Event:AddEvent(BattleEventName.PassiveSkillDamageHeal, onPassiveSkillDamageHeal,nil,nil,role) end, -- 释放技能时,对己方生命最少武将治疗效果额外提升[a],[b]改变 @@ -3584,7 +3584,7 @@ local passivityList = { local function onSkillCast(skill) if skill.type == BattleSkillType.Special then - role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) + role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor,nil,nil,role) end end local function onSkillCastEnd(skill) @@ -3592,8 +3592,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 减伤盾抵抗效果提升[a]%,抵抗效果[b]增加,提升效果由所有受益目标平分。 @@ -3609,14 +3609,14 @@ local passivityList = { af = BattleUtil.ErrorCorrection(f1/maxNum) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local onPassiveShield = function(func, shieldType) if shieldType == ShieldTypeName.RateReduce then if func then func(af, ct) end end end - role.Event:AddEvent(BattleEventName.PassiveShield, onPassiveShield) + role.Event:AddEvent(BattleEventName.PassiveShield, onPassiveShield,nil,nil,role) end, @@ -3633,7 +3633,7 @@ local passivityList = { local function onSkillCast(skill) if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.DeadSkill then - role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor) + role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, onPassiveTreatingFactor,nil,nil,role) end end local function onSkillCastEnd(skill) @@ -3646,8 +3646,8 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, @@ -3665,14 +3665,14 @@ local passivityList = { af = BattleUtil.ErrorCorrection(f1/maxNum) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local onPassiveRandomDot = function(func, dot2) if dot == dot2 then if func then func(af, ct) end end end - role.Event:AddEvent(BattleEventName.PassiveRandomDot, onPassiveRandomDot) + role.Event:AddEvent(BattleEventName.PassiveRandomDot, onPassiveRandomDot,nil,nil,role) end, -- 对别人造成的中毒伤害的[a]%用于治疗自己 @@ -3686,7 +3686,7 @@ local passivityList = { BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(finalDmg * f1))) end end - role.Event:AddEvent(BattleEventName.RoleDamage, onRoleDamage) + role.Event:AddEvent(BattleEventName.RoleDamage, onRoleDamage,nil,nil,role) end, @@ -3702,7 +3702,7 @@ local passivityList = { if func then func(f1, ct) end end end - role.Event:AddEvent(BattleEventName.PassiveBeRandomControl, onPassiveBeRandomControl) + role.Event:AddEvent(BattleEventName.PassiveBeRandomControl, onPassiveBeRandomControl,nil,nil,role) end, @@ -3718,7 +3718,7 @@ local passivityList = { BattleUtil.CalRage(role, targets[1], i1, CountTypeName.Sub) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, @@ -3736,14 +3736,14 @@ local passivityList = { af = BattleUtil.ErrorCorrection(f1/maxNum) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local onPassiveRandomDot = function(func, dot2, damage) if dot == dot2 then if func then func(nil, nil, af, ct) end end end - role.Event:AddEvent(BattleEventName.PassiveRandomDot, onPassiveRandomDot) + role.Event:AddEvent(BattleEventName.PassiveRandomDot, onPassiveRandomDot,nil,nil,role) end, -- 有该技能角色,释放技能造成的[a]效果附加封治疗效果,该状态武将无法回复生命 @@ -3756,7 +3756,7 @@ local passivityList = { BattleUtil.RandomControl(1, ControlType.NoHeal, role, buff.target, buff.duration) end end - role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster,nil,nil,role) end, -- [a]状态延长[b]回合 @@ -3770,7 +3770,7 @@ local passivityList = { buff:ChangeBuffDuration(CountTypeName.Add, i1) end end - role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster,nil,nil,role) end, -- 直接伤害击杀目标对仇恨目标造成[a]%物理伤害 -- a[float] @@ -3783,7 +3783,7 @@ local passivityList = { BattleUtil.CalDamage(nil, role, target, 1, f1) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 直接伤害击杀目标对仇恨目标追加一次造成[a]%物理伤害的技能 @@ -3826,7 +3826,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 普攻[a]%概率暴击 @@ -3838,14 +3838,14 @@ local passivityList = { role.data:AddValue(RoleDataName.Crit, f1) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local function onSkillCastEnd(skill) if skill.type == BattleSkillType.Normal then role.data:SubValue(RoleDataName.Crit, f1) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, -- 受到伤害降低[a]%(与减伤盾同效果)并且将自身受到非致命伤害平分给自身及己方当前生命最高的两名武将(被平摊武将有无敌也会受到伤害)降低伤害[b]改变 @@ -3913,7 +3913,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.FinalBeDamage, onFinalBeDamage) + role.Event:AddEvent(BattleEventName.FinalBeDamage, onFinalBeDamage,nil,nil,role) end, @@ -3927,7 +3927,7 @@ local passivityList = { buff.target:AddBuff(Buff.Create(role, BuffName.Immune, buff.duration, 3)) end end - role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, onBuffCaster,nil,nil,role) end, -- 所有攻击优先攻击敌方[a]最少的单位 @@ -3944,7 +3944,7 @@ local passivityList = { if func then func({list[1]}) end end end - role.Event:AddEvent(BattleEventName.SkillTargetCheck, onSkillTargetCheck) + role.Event:AddEvent(BattleEventName.SkillTargetCheck, onSkillTargetCheck,nil,nil,role) end, -- 技能直接伤害[a]%转化为生命治疗自己 @@ -3960,7 +3960,7 @@ local passivityList = { BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * f))) end end - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end, -- 武将怒气小于[a]点时不会释放技能,释放技能消耗当前所有怒气超过4怒气部分每额外消耗1点怒气技能伤害增加[b]% -- a[int]b[float] @@ -3980,7 +3980,7 @@ local passivityList = { func(0, deltaRage) end end - role.Event:AddEvent(BattleEventName.RoleRageCost, onRoleRageCost) + role.Event:AddEvent(BattleEventName.RoleRageCost, onRoleRageCost,nil,nil,role) -- 释放技能后 @@ -3993,7 +3993,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, @@ -4014,7 +4014,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.PassiveTreating, OnPassiveTreating) + role.Event:AddEvent(BattleEventName.PassiveTreating, OnPassiveTreating,nil,nil,role) end, @@ -4044,7 +4044,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleDamageBefore, OnRoleDamageBefore) + role.Event:AddEvent(BattleEventName.RoleDamageBefore, OnRoleDamageBefore,nil,nil,role) end, -- 首回合免疫[a]效果 @@ -4089,7 +4089,7 @@ local passivityList = { end end - end) + end,nil,nil,role) end, -- 对敌方造成伤害如被分摊其分摊比降低[a]% @@ -4114,7 +4114,7 @@ local passivityList = { end if func then func(f1, CountTypeName.Sub) end end - role.Event:AddEvent(BattleEventName.PassiveDamageBeShare, onDamageBeShare) + role.Event:AddEvent(BattleEventName.PassiveDamageBeShare, onDamageBeShare,nil,nil,role) end, -- 技能直接击杀敌方目标时有[a]%概率获得目标剩余所有怒气(输出武将佩戴) @@ -4128,7 +4128,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 受到的[a]效果伤害降低[b]%(与减伤盾原理相同)[c]改变 @@ -4145,7 +4145,7 @@ local passivityList = { damagingFunc(floor(BattleUtil.ErrorCorrection(dd))) end end - role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging) + role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging,nil,nil,role) end, @@ -4159,7 +4159,7 @@ local passivityList = { local function onRoundChange() curDamage = 0 end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role) local function onFinalBeDamage(damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType,isDirect) @@ -4180,7 +4180,7 @@ local passivityList = { end end - role.Event:AddEvent(BattleEventName.FinalBeDamageEnd, onFinalBeDamage) + role.Event:AddEvent(BattleEventName.FinalBeDamageEnd, onFinalBeDamage,nil,nil,role) end, @@ -4220,7 +4220,7 @@ local passivityList = { BattleUtil.ApplyDamage(skill, atkRole, role, shareDamage,false,damageType,dotType,true) end end - BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, onFinalDamage) + BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, onFinalDamage,nil,nil,role) end, @@ -4238,7 +4238,7 @@ local passivityList = { end if func then func(f1, CountTypeName.Cover) end end - role.Event:AddEvent(BattleEventName.PassiveSeckill, onPassiveSeckill) + role.Event:AddEvent(BattleEventName.PassiveSeckill, onPassiveSeckill,nil,nil,role) end, -- 秒杀概率增加[a]%直接伤害击杀的[b]目标有[c]%概率无法复活触发秒杀的目标[d]%无法复活,秒杀概率[e]改变 @@ -4254,7 +4254,7 @@ local passivityList = { local function onPassiveSeckill(func) if func then func(nil, nil, f1, ct) end end - role.Event:AddEvent(BattleEventName.PassiveSeckill, onPassiveSeckill) + role.Event:AddEvent(BattleEventName.PassiveSeckill, onPassiveSeckill,nil,nil,role) -- 直接伤害概率无法复活 local function onRoleHit(target,damage,bCrit,finalDmg,damageType,skill) @@ -4266,14 +4266,14 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) -- 秒杀概率无法复活 local function onSecKill(target) BattleUtil.RandomAction(f3, function() target:SetReliveFilter(false) end) end - role.Event:AddEvent(BattleEventName.Seckill, onSecKill) + role.Event:AddEvent(BattleEventName.Seckill, onSecKill,nil,nil,role) end, @@ -4295,7 +4295,7 @@ local passivityList = { end) end end - BattleLogic.Event:AddEvent(BattleEventName.RoleTurnEnd, onRoleTurnEnd) + BattleLogic.Event:AddEvent(BattleEventName.RoleTurnEnd, onRoleTurnEnd,nil,nil,role) end, @@ -4315,7 +4315,7 @@ local passivityList = { end end end - BattleLogic.Event:AddEvent(BattleEventName.RoleAddBuffMiss, onRoleAddBuffMiss) + BattleLogic.Event:AddEvent(BattleEventName.RoleAddBuffMiss, onRoleAddBuffMiss,nil,nil,role) end, -- 伤害增加[a]%,[b]改变 @@ -4329,7 +4329,7 @@ local passivityList = { func(-floor(BattleUtil.ErrorCorrection(dd))) end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging,nil,nil,role) end, --技能治疗系数[a]改变[b]% ,技能目标改变[c] [d]名(作用于主动技能效果103) @@ -4354,7 +4354,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore) + role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore,nil,nil,role) end, -- 释放技能有[a]%几率对敌方后排造成[b]%[c]伤害 @@ -4379,7 +4379,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -4425,7 +4425,7 @@ local passivityList = { end end end - BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead,nil,nil,role) end, -- 如果自身是[a]和[b]武将则[e]改变[c]的[d] @@ -4464,7 +4464,7 @@ local passivityList = { BattleUtil.ApplyTreat(list[1], list[1], value) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role) end, -- 战斗开始时, 自身血量高于[a]%, 则[d]改变[b]的[c] @@ -4492,7 +4492,7 @@ local passivityList = { -- BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoundChange, onRoundChange) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role) end, -- 同阵营只会有一个生效 @@ -4513,7 +4513,7 @@ local passivityList = { local list = RoleManager.Query(function(r) return r.camp == defRole.camp and r ~= defRole end) for _, r in ipairs(list) do local dd = floor(BattleUtil.ErrorCorrection(damage* f1)) - BattleUtil.ApplyDamage(nil, role, r, dd) + BattleUtil.ApplyDamage(nil, atkRole, r, dd) end end end @@ -4521,14 +4521,14 @@ local passivityList = { local function onRoundChange(curRound) if curRound == i1 then - BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, OnDamage) + BattleLogic.Event:AddEvent(BattleEventName.FinalDamage, OnDamage,nil,nil,role) elseif curRound == i1 + 1 then BattleLogic.Event:RemoveEvent(BattleEventName.FinalDamage, OnDamage) -- BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoundChange, onRoundChange) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role) end, @@ -4572,8 +4572,8 @@ local passivityList = { local function onRoundChange(curRound) if curRound == 1 then RandomTarget() - BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, _OnPassiveDamaging) - BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead) + BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, _OnPassiveDamaging,nil,nil,role) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead,nil,nil,role) elseif curRound == i1 + 1 then target = nil BattleLogic.Event:RemoveEvent(BattleEventName.PassiveDamaging, _OnPassiveDamaging) @@ -4581,7 +4581,7 @@ local passivityList = { -- BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoundChange, onRoundChange) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role) end, @@ -4621,7 +4621,7 @@ local passivityList = { end end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role) end, @@ -4638,7 +4638,7 @@ local passivityList = { end end - BattleLogic.Event:AddEvent(BattleEventName.BeforeBattleEnd, onBeforeBattleEnd) + BattleLogic.Event:AddEvent(BattleEventName.BeforeBattleEnd, onBeforeBattleEnd,nil,nil,role) end, --[218] 用 79实现 @@ -4661,7 +4661,7 @@ local passivityList = { -- BattleLogic.Event:RemoveEvent(BattleEventName.SkillCast, _OnSkillCast) end end - BattleLogic.Event:AddEvent(BattleEventName.SkillCast, _OnSkillCast) + BattleLogic.Event:AddEvent(BattleEventName.SkillCast, _OnSkillCast,nil,nil,role) end, @@ -4683,7 +4683,7 @@ local passivityList = { BattleUtil.AddProp(role, pro2, f2, ct2) end end - BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead,nil,nil,role) end, -- 我方武将造成伤害时,[a]概率降低目标[b]%的[c]。若同时拥有效果222,则降低的属性加给伤害者。 @@ -4712,7 +4712,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit,nil,nil,role) end, @@ -4743,7 +4743,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit,nil,nil,role) end, @@ -4767,7 +4767,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit,nil,nil,role) end, -- 我方武将造成伤害时,[a]概率附加攻击[b]%的真伤。 @@ -4782,7 +4782,7 @@ local passivityList = { BattleUtil.CalDamage(nil, role, target, 1, f1, 1) end) end - role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, _OnRoleHit,nil,nil,role) end, -- 大闹天宫胜利次数 @@ -4843,7 +4843,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 杀敌回复自身[a]*[b]的血量 @@ -4860,7 +4860,7 @@ local passivityList = { BattleUtil.ApplyTreat(role, role, dd) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 敌人生命越高,造成的伤害越高,最高[a]% @@ -4871,7 +4871,7 @@ local passivityList = { local OnPassiveDamaging = function(damagingFunc, target, damage,skill) damagingFunc(-floor(BattleUtil.FP_Mul(f1, damage, BattleUtil.GetHPPencent(target)))) end - role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) end, -- 自己血量越低,造成伤害越高,最多[a]% @@ -4882,7 +4882,7 @@ local passivityList = { local OnPassiveDamaging = function(damagingFunc, target, damage,skill) damagingFunc(-floor(BattleUtil.FP_Mul(f1, damage, 1 - BattleUtil.GetHPPencent(role)))) end - role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) end, @@ -4913,7 +4913,7 @@ local passivityList = { -- BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoundChange, _OnRoundChange) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange,nil,nil,role) end, -- 我方[a]武将每回合[d]改变[b]的[c],可叠加 @@ -4930,7 +4930,7 @@ local passivityList = { BattleUtil.AddProp(role, pro, f1, ct) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange,nil,nil,role) end, @@ -4949,7 +4949,7 @@ local passivityList = { BattleUtil.ApplyTreat(role, role, dd) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange,nil,nil,role) end, -- 我方[a]武将每回合获得[b]*[c]的护盾,持续[d]回合 @@ -4967,7 +4967,7 @@ local passivityList = { role:AddBuff(buff) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange,nil,nil,role) end, -- 我方[a]武将每回合[b]概率回复[c]点怒气 @@ -4984,7 +4984,7 @@ local passivityList = { end) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange,nil,nil,role) end, -- 我方每有一个[a]武将,自身[d]改变[b]的[c],可叠加(第一回合开始时生效) @@ -5005,7 +5005,7 @@ local passivityList = { BattleUtil.AddProp(role, pro, f1*num, ct) end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, _OnRoundChange,nil,nil,role) end, -- 猎妖之路专属 @@ -5047,8 +5047,29 @@ local passivityList = { local ct2 = args[7] if OutDataManager.GetOutData(role.camp,id) == flr then + local hp=0 + local hp2=0 + --如果提升的是血量上限 + if pro1==12 or pro2==12 then + hp = role:GetRoleData(RoleDataName.Hp) / role:GetRoleData(RoleDataName.MaxHp) + end BattleUtil.AddProp(role, pro1, f1, ct1) BattleUtil.AddProp(role, pro2, f2, ct2) + --如果提升的是血量上限 + if pro1==12 or pro2==12 then + hp2 = role:GetRoleData(RoleDataName.Hp) / role:GetRoleData(RoleDataName.MaxHp) + local pro=hp-hp2 + local treat= floor(BattleUtil.ErrorCorrection(role:GetRoleData(RoleDataName.MaxHp)*pro)) + role.data:AddValue(RoleDataName.Hp, treat) + BattleLogManager.Log( + "Final Treat", + "acamp", role.camp, + "apos", role.position, + "tcamp", role.camp, + "tpos", role.position, + "value", treat + ) + end end end, -- 猎妖之路专属 @@ -5101,7 +5122,7 @@ local passivityList = { BattleUtil.AddProp(role, pro2, f2, ct2) end end - BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, _OnRoleRealDead,nil,nil,role) end, -- 释放技能有[a]%概率释放[b]技能。 -- a[float]b[int] @@ -5120,7 +5141,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 直接伤害击杀目标释放[a]技能。 -- a[float] @@ -5135,7 +5156,7 @@ local passivityList = { role:InsertExtraSkill(f1,f2) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, --怪物的身份表份标识 挂上这个效果就会变成参数对应的类型 [244] = function(role, args) @@ -5163,7 +5184,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit,nil,nil,role) end, -- 直接伤害每次击杀目标增加[a]%的[b]可叠加持续至战斗结束[c]改变 重写103效果 每次释放技能只触发一次 @@ -5200,7 +5221,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 直接伤害击杀目标后追加[a]次普攻 重写114 一次技能只触发一次被动 -- a[int] @@ -5225,7 +5246,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 直接伤害击杀目标回复自身[a]%的[b] 重写116 一次技能只触发一次被动 @@ -5250,7 +5271,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 直接伤害击杀目标下回合攻击[a]%暴击(TODO:目前为增加[a]%) 重写125 一次技能只触发一次被动 @@ -5279,7 +5300,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) local onRoundChange=function(round2) if round2==round+1 and isKill then @@ -5291,14 +5312,14 @@ local passivityList = { round=round2 end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,role) local onRoundStart=function(round2) isKill=false end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, onRoundStart) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, onRoundStart,nil,nil,role) end, @@ -5325,7 +5346,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit,nil,nil,role) -- 释放技能时计算额外伤害 local OnSkillCast = function(skill) @@ -5333,7 +5354,7 @@ local passivityList = { extra = f1 * killNum end end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) -- 造成伤害时判断额外伤害 @@ -5345,7 +5366,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging,nil,nil,role) end, -- 直接伤害击杀[a]目标回复[b]%的最大生命 重写148 一次技能只触发一次被动 @@ -5371,10 +5392,10 @@ local passivityList = { end local onDamaging = function(func, target) if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onDamaging,nil,nil,role) end, -- 直接伤害击杀目标回复自身[a]点怒气 重写153 一次技能只触发一次被动 @@ -5394,7 +5415,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end, -- 击杀目标后对敌方血量百分比最低两名角色造成[a]%[b]伤害 重写170 一次技能只触发一次被动 @@ -5424,7 +5445,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 直接伤害击杀目标对仇恨目标造成[a]%物理伤害 重写185 一次技能只触发一次被动 @@ -5445,7 +5466,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 技能直接击杀敌方目标时有[a]%概率获得目标剩余所有怒气(输出武将佩戴)重写197 一次技能只触发一次被动 @@ -5467,7 +5488,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 直接伤害击杀目标释放[a]技能。 重新243 一次技能只触发一次被动 @@ -5504,7 +5525,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, --技能击杀目标溢出伤害的[a]%将对生命百分比最高的攻击目标造成伤害 -- a[float] @@ -5532,7 +5553,7 @@ local passivityList = { -- end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, --技能追加的普攻额外造成目标[a][b]%的伤害。 --a[int 属性id] b[float] @@ -5555,7 +5576,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, -- 释放技能[a][b]%概率命中(必定命中舔100%或200%) -- a[int], b[float] @@ -5570,7 +5591,7 @@ local passivityList = { role.data:AddValue(BattlePropList[pro], f1) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local function onSkillCastEnd(skill) if skill and not skill.isTriggerJudge and judge==1 then @@ -5580,7 +5601,7 @@ local passivityList = { role.data:SubValue(BattlePropList[pro], f1) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, --释放技能时,如果目标怒气不足[a]点,技能伤害额外[b] [c]% -- a[int,怒气值]b[改变类型]c[float] @@ -5601,7 +5622,7 @@ local passivityList = { if func then func(dmgDeduction) end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, --本次技能中如果有[a]目标,额外回复[b]点怒气 -- a[持续伤害状态]b[int] @@ -5632,7 +5653,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit,nil,nil,role) end, -- 每释放[a]次技能,[b]增加[c]%,可叠加[d]次(d 填0为可叠加无数次) -- a[int] b[int] c[float] d[int] @@ -5659,7 +5680,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, --第[a]回合技能命中前有[b]%概率清除对方目标的免疫控制效果(所有控制效果)的护盾(表现上为护盾,清除护盾为直接清除效果) --a[int] b[float] @@ -5686,7 +5707,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.RoleDamageBefore,onRoleDamageBefore) + role.Event:AddEvent(BattleEventName.RoleDamageBefore,onRoleDamageBefore,nil,nil,role) end, --释放技能时,如果目标怒气大于[a]点,额外降低目标[b]点怒气 --a[int] b[int] @@ -5704,7 +5725,7 @@ local passivityList = { BattleUtil.CalRage(role, defRole, v2,CountTypeName.Sub) end end - role.Event:AddEvent(BattleEventName.FinalDamage,onFinalBeDamage) + role.Event:AddEvent(BattleEventName.FinalDamage,onFinalBeDamage,nil,nil,role) end, --受技能攻击时有[a]%概率给攻击者及周围没有[b]状态的敌方武将附加[c]状态,造成自身[d] [e]% 的伤害持续[f]回合 -- a[float] b[持续伤害类型] c[持续伤害类型] d[int] e[float] f[int] @@ -5731,7 +5752,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.FinalBeDamage,onFinalBeDamage) + role.Event:AddEvent(BattleEventName.FinalBeDamage,onFinalBeDamage,nil,nil,role) end, --攻击时伤害增加(我方每个存活的其他[a]元素武将伤害增加[b]%) --a[int] b[float] @@ -5745,7 +5766,7 @@ local passivityList = { if not skill then return end - local list = RoleManager.Query(function(v) return role.camp == v.camp end) + local list = RoleManager.QueryIncludeExile(function(v) return role.camp == v.camp end) local num=0 for _, r in pairs(list) do if r~=role and r.element==ele and not r:IsDead() then @@ -5760,7 +5781,7 @@ local passivityList = { end - role.Event:AddEvent(BattleEventName.PassiveDamaging,passiveBeBeDamage) + role.Event:AddEvent(BattleEventName.PassiveDamaging,passiveBeBeDamage,nil,nil,role) end, --技能击中受到[a,控制效果]的目标,会额外降低[b]点怒气 -- a[int 控制效果]b[int] @@ -5786,7 +5807,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit,nil,nil,role) end, --概率额外 [a]敌方血量最少的目标(己方每个上阵的其他妖阵营神将可提供姑获鸟眩晕总概率的[b])。持续[c]回合 -- a[控制状态] b[float] c[int] @@ -5799,7 +5820,7 @@ local passivityList = { return end if skill and skill.owner==role and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra) then - local heros=RoleManager.GetRoleByCamp(role.camp) + local heros=RoleManager.QueryIncludeExile(function(v) return v.camp == role.camp end) local num=0 for _, r in pairs(heros) do if r~=role and r.element==role.element then @@ -5822,7 +5843,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCast,onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast,onSkillCast,nil,nil,role) end, --受到[a]目标攻击时,自身免疫[b]和[c]效果 --a[int 持续伤害类型] b,c[int 持续伤害类型] @@ -5844,7 +5865,7 @@ local passivityList = { skiller=atkRole end end - role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore,onRoleDamageBefore) + role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore,onRoleDamageBefore,nil,nil,role) -- 释放技能后 local onSkillEnd = function(skill) @@ -5862,7 +5883,7 @@ local passivityList = { -- end end end - BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -5879,7 +5900,7 @@ local passivityList = { BattleUtil.ApplyTreat(role, role, treatValue) end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, -- 受到[a]状态敌人攻击时受到伤害[b]改变[c]怒气 -- a[持续伤害状态]b[改变类型]c[int] @@ -5895,7 +5916,7 @@ local passivityList = { BattleUtil.CalRage(role, role, f1, ct) end end - role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging) + role.Event:AddEvent(BattleEventName.PassiveBeDamaging, onPassiveBeDamaging,nil,nil,role) end, -- 战斗第[a]回合开始概率无敌,回合数每增加1,概率是之前的[b] -- a[int] b[float] @@ -5919,7 +5940,7 @@ local passivityList = { end) isTrigger=isAdd end - end) + end,nil,nil,role) end, -- 释放技能时如目标处于[a]状态,解除周围[c]系神将的控制状态 -- a[持续伤害状态]b[float] c[int] @@ -5951,7 +5972,7 @@ local passivityList = { return end if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra then - role.Event:AddEvent(BattleEventName.RoleHit, onHit) + role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end end -- 技能后后 @@ -5963,8 +5984,8 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.RoleHit, onHit) end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, --受到[a]目标攻击时,自身免疫控制和减怒 @@ -5991,7 +6012,7 @@ local passivityList = { skiller=atkRole end end - role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore,onRoleDamageBefore) + role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore,onRoleDamageBefore,nil,nil,role) -- 释放技能后 local onSkillEnd = function(skill) @@ -6010,7 +6031,7 @@ local passivityList = { -- end end end - BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -6043,7 +6064,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 释放技能后 生命百分比最少[a]名[b]阵营,附加免疫控制效果,持续[c]回合 @@ -6073,7 +6094,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 减伤改为[a] 持续回合改为[b](技能效果104专属被动) -- a[float]b[int] @@ -6089,7 +6110,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore) + role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore,nil,nil,role) end, --为己方神将附加的护盾消失后,回复被保护的神将[a][b]%的血量 --a[int 属性id] b[flaot] @@ -6102,7 +6123,7 @@ local passivityList = { BattleUtil.CalTreat(role,buff.target, val) end end - BattleLogic.Event:AddEvent(BattleEventName.ShieldBuffEnd, OnBuffEnd) + BattleLogic.Event:AddEvent(BattleEventName.ShieldBuffEnd, OnBuffEnd,nil,nil,role) end, --发动技能后,[a]概率给我方[b]最高[c]名[d]阵营 [e]属性[f]改变[g],持续[h]回合 --a[float],b[int 属性],c[int], d[int],e[int 属性],f[int 改变类型],g[float] h[int] @@ -6136,7 +6157,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --免疫减怒 [280]=function(role,args) @@ -6166,7 +6187,7 @@ local passivityList = { BattleLogic.Event:DispatchEvent(BattleEventName.RecordTransRage, role, caster, lessRage) end end - BattleLogic.Event:AddEvent(BattleEventName.RoleCastSkillBefore, onRoleCastSkillBrfore) + BattleLogic.Event:AddEvent(BattleEventName.RoleCastSkillBefore, onRoleCastSkillBrfore,nil,nil,role) end, --上阵[a]方[b]阵营神将[c] [d]改变[e] 持续[f]回合 --a[int 0:己方 1:敌方], b[int 阵营id], c[int 属性id], d[int 改变类型] e[float] f[int] @@ -6199,7 +6220,7 @@ local passivityList = { end end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, OnRoundChange) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, OnRoundChange,nil,nil,role) end, --释放技能后,额外[a]改变[b]方怒气最少的[c]阵营目标[d]点怒气 --a[int 改变类型],b[int 0:己方 1:敌方],c[int],d[int] @@ -6226,7 +6247,7 @@ local passivityList = { BattleUtil.CalRage(role, list[1], v1, ct) end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) end, --受到[a]类型伤害的[b]%转化为血量,治疗自己 -- a[int 1:普攻 2:技能 ] b[flaot] @@ -6252,7 +6273,7 @@ local passivityList = { end BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * v1))) end - role.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit) + role.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit,nil,nil,role) end, --技能追加的普攻额外造成目标[a][b]%的伤害。技能每成功[c]1个目标,额外造成[d]%生命上限的伤害 @@ -6279,7 +6300,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) --记录技能混乱敌人的数量 local OnRoleHit = function(skill) if skill and skill.owner==role and skill.type==BattleSkillType.Special then @@ -6296,7 +6317,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit,nil,nil,role) end, --必定暴击 @@ -6332,7 +6353,7 @@ local passivityList = { end BattleUtil.CalTreat(role, role, floor(f1 * damage)) end - role.Event:AddEvent(BattleEventName.RoleCrit, OnDamage) + role.Event:AddEvent(BattleEventName.RoleCrit, OnDamage,nil,nil,role) end, --本次技能中如果有[a]目标,额外回复[b]点怒气 回复[c] [d]血量(c,d不填则不回复血量) @@ -6367,7 +6388,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit,nil,nil,role) end, --忽略敌方分摊伤害 @@ -6399,7 +6420,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit) + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, --魂印[a]改变控制概率[b]% ,减员[c]改变控制概率[d]%,减员[e]改变伤害[f]%(只作用于主动技能效果120) --a[改变类型]b[float] c[改变类型] d[int] e[改变类型] f[flaot] @@ -6425,7 +6446,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore) + role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore,nil,nil,role) end, --如果被持续治疗的神将是[a]系神将,持续治疗效果[b]改变[c]回合,并添加免疫[d]的效果,并且移除[e]效果(e 不填不会移除) --a[int,角色职业] b[int,改变类型] c[int] d[int,控制类型] e[int 控制类型] @@ -6472,7 +6493,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role) end, --持续治疗效果结算时,回复被治疗的神将[a][b]%的血量 @@ -6486,7 +6507,7 @@ local passivityList = { BattleUtil.CalTreat(role,buff.target, val) end end - BattleLogic.Event:AddEvent(BattleEventName.HotBuffEnd, OnBuffEnd) + BattleLogic.Event:AddEvent(BattleEventName.HotBuffEnd, OnBuffEnd,nil,nil,role) end, -- 每回合每追击[a]次,额外回复[b]点怒气 --a[int],b[int] @@ -6507,7 +6528,7 @@ local passivityList = { aa=aa+1 end end - role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast) + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) local onRoundChange=function() if aa>=time then @@ -6516,7 +6537,7 @@ local passivityList = { aa=0 end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange ) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange,nil,nil,role) end, -- 如果技能目标有自己,回复[a]点怒气 @@ -6543,7 +6564,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, -- 技能,普攻治疗治疗的目标为[a]阵营,资料量额外提升[b]%,并解除[c]效果 @@ -6573,16 +6594,16 @@ local passivityList = { end local OnSkillCast = function(skill) curSkill=skill - role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) - BattleLogic.Event:AddEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal) + role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, passiveTreating,nil,nil,role) + BattleLogic.Event:AddEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal,nil,nil,role) end local OnSkillCastEnd = function(skill) curSkill=nil role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) BattleLogic.Event:RemoveEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal) end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) end, --死亡时,立即回复己方全体自身[a]*[b]的血量。 @@ -6605,7 +6626,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.RoleDead, OnDead) + role.Event:AddEvent(BattleEventName.RoleDead, OnDead,nil,nil,role) end, --修改持续效果的治疗值为[a]属性的[b]% @@ -6633,7 +6654,7 @@ local passivityList = { end end) end - role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd) + role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role) end, --技能追加的额外技能额外造成目标[a][b]%的伤害。 @@ -6658,7 +6679,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging) + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, --魂印改变[a]伤害[b]% ,额外造成生命百分比伤害[c]改变[d]%(只作用于主动技能效果126) @@ -6680,7 +6701,7 @@ local passivityList = { end end end - role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore) + role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore,nil,nil,role) end, -- 敌方死亡[a]人自身[b]就[c]改变[d]%,--第一回合检测敌方空位加属性 -- @@ -6710,7 +6731,7 @@ local passivityList = { end) end end - BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, OnDead) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, OnDead,nil,nil,role) --第一回合检测敌方空位 BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound) -- 第i1回合开始 @@ -6722,7 +6743,7 @@ local passivityList = { role:AddBuff(Buff.Create(role, BuffName.PropertyChange,0, BattlePropList[p1],v1*num, ct)) end end - end) + end,nil,nil,role) end, -- 战斗第[a]回合,改变[b] 自身属性[c] [d]%,持续[e]回合 @@ -6739,7 +6760,7 @@ local passivityList = { if curRound == i1 then role:AddBuff(Buff.Create(role, BuffName.PropertyChange,round, BattlePropList[p1],v1, ct)) end - end) + end,nil,nil,role) end, -- 敌方单位被击杀自身释放[a]技能,释放的技能类型为[b]。 -- a[int] b[int] @@ -6747,13 +6768,16 @@ local passivityList = { local f1 = args[1] local f2=args[2] local onRoleHit = function(deadRole) + if role.isExile then + return + end BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () if deadRole.camp~=role.camp and not role:IsDead() then role:InsertExtraSkill(f1,f2) end end) end - BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleHit) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleHit,nil,nil,role) end, --英雄[a],附加的[b]种类[c]类型buff,持续时间改变[d][e]回合 --a[int],b[int buff类型],c[int type类型],d[int 改变类型],e[int] @@ -6807,7 +6831,34 @@ local passivityList = { buff.duration = buff.duration * (1 - round) end end - role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster) + role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role) + end, + -- 根据生命百分比添加被动 血量百分比[a],被动id[b],...(后面没有的不配) + -- a[float],b[int],c[float],d[int],e[float],f[int],g[float],h[int] + [313] = function(role, args) + local passTable={} + for i = 1, #args do + if i%2==0 then + table.insert(passTable,{args[i],args[i-1]}) + end + end + local len=BattleUtil.LengthOfTable(passTable) + local addIds={} + + -- 释放技能后 + local onRoleBeDamaged = function(caster, damage) + local ft = role:GetRoleData(RoleDataName.Hp)/role:GetRoleData(RoleDataName.MaxHp) + if BattleUtil.LengthOfTable(addIds)>= len then + return + end + for key, value in pairs(passTable) do + if ft 3 and not r:IsRealDead() then + if r.position > 3 and not r:IsRealDead() and not r.isExile then table.insert(tempArr, r) end end @@ -60,7 +61,7 @@ end function BattleUtil.ChooseCol(arr, col) local tempArr = {} for _, role in ipairs(arr) do - if role.position % 3 == col then + if role.position % 3 == col and not role.isExile then table.insert(tempArr, role) end end @@ -267,7 +268,7 @@ function BattleUtil.ChooseTarget(role, chooseId) if chooseType == 1 then arr = RoleManager.Query(function (r) return r.camp == role.camp end) elseif chooseType == 2 then - if role.lockTarget and not role.lockTarget:IsRealDead() and num == 1 then --嘲讽时对单个敌军生效 + if role.lockTarget and not role.lockTarget:IsRealDead() and not role.lockTarget.isExile and num == 1 then --嘲讽时对单个敌军生效 return {role.lockTarget} end arr = RoleManager.Query(function (r) return r.camp ~= role.camp end) @@ -279,7 +280,7 @@ function BattleUtil.ChooseTarget(role, chooseId) end return {role} elseif chooseType == 4 then - if role.lockTarget and not role.lockTarget:IsRealDead() then --嘲讽时对仇恨目标生效 + if role.lockTarget and not role.lockTarget:IsRealDead() and not role.lockTarget.isExile then --嘲讽时对仇恨目标生效 return {role.lockTarget} end if role.ctrl_blind then --致盲时仇恨目标变随机 @@ -372,9 +373,29 @@ function BattleUtil.ChooseTarget(role, chooseId) -- local r1 = math.abs(role.position - a.position) * 10 + a.position -- local r2 = math.abs(role.position - b.position) * 10 + b.position -- if sort == 1 then return r1 > r2 else return r1 < r2 end - -- end) - elseif chooseWeight == 9 then --血量百分比->血量 - BattleUtil.SortByHpFactorAndHp(arr,sort) + -- end) + elseif chooseWeight ==9 then --攻击最高且没被放逐过 + local list=role.exileTargets + local tempArr = {} + local team = RoleManager.Query(function (r) return r.camp ~= role.camp end) + if list then + for key, value in pairs(team) do + if not value:IsRealDead() and not BattleUtil.ChecklistIsContainValue(role.exileTargets,value) then + --return arr[i] + table.insert(tempArr,value) + end + end + end + BattleUtil.SortByProp(tempArr,RoleDataName.Attack,sort) + arr=tempArr + elseif chooseWeight ==10 then --剩余血量百分比低于25%且生命绝对值最小 + return BattleUtil.GetHpPctLessThanPctHero(arr,0.25) + elseif chooseWeight ==11 then --剩余血量百分比低于32%且生命绝对值最小 + return BattleUtil.GetHpPctLessThanPctHero(arr,0.32) + elseif chooseWeight ==12 then --剩余血量百分比低于40%且生命绝对值最小 + return BattleUtil.GetHpPctLessThanPctHero(arr,0.40) + elseif chooseWeight ==13 then --剩余血量百分比低于50%且生命绝对值最小 + return BattleUtil.GetHpPctLessThanPctHero(arr,0.50) end local finalArr = {} if num == 0 then @@ -393,6 +414,29 @@ function BattleUtil.ChooseTarget(role, chooseId) return finalArr end +--获取生命百分比少于指定百分比且生命置最少 +function BattleUtil.GetHpPctLessThanPctHero(arr,pct) + local hp=0 + local hero=nil + for i = 1, #arr[i] do + local aaa=arr[i] + local curHp=aaa:GetRoleData(RoleDataName.Hp) + local r1 = curHp / aaa:GetRoleData(RoleDataName.MaxHp) + if r1rand/10000 + return rand/10000>r end return false end, @@ -103,16 +103,35 @@ local _ConditionConfig = { end return false end, - [7] = function(skill, condition) --7:检测是否有可以放逐的目标 - local list=skill.owner.exileTargets - if list then - local roleList = RoleManager.Query(function(role) - return role.camp ~= skill.owner.camp and not BattleUtil.ChecklistIsContainValue(list,role) - end) - if roleList and #roleList>0 then - return true + [7] = function(skill, condition) --7:敌方上场神将数量 且概率(万分比)(检测放逐) + local conId = condition[1] + local comType = condition[2] + local comValue = condition[3] + local rand = condition[4] + local roleList = RoleManager.QueryIncludeExile(function(role) + return role.camp ~= skill.owner.camp + end) + --判断场上敌方数量是否足够 + local isEnough=BattleUtil.CompareValue(#roleList, comValue, comType) + if isEnough then + local ishave=false + --是否有没被放逐的目标 + local list=skill.owner.exileTargets + for key, value in pairs(roleList) do + if not BattleUtil.ChecklistIsContainValue(list,value) then + ishave=true + break + end end - end + if ishave then + local r = Random.Range01() + -- 判断概率 + if isEnough then + return rand/10000>r + end + end + return false + end return false end, } diff --git a/luafight/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua b/luafight/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua index 5bb2c872f..daaf6af28 100644 --- a/luafight/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua +++ b/luafight/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua @@ -38,7 +38,7 @@ function MSkill:Init(owner, group, index, skillData) self.effectCaster = EffectCaster:New() self.effectCaster:Init(self, effects, targets) --监听回合开始消息 - BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart,function (round) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,function (round) self.curRoundCount = 0 end) end @@ -63,6 +63,15 @@ function MSkill:Cast(func) -- 技能效果生效 if self.effectCaster then + --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26 + --为解决攻击目标只剩被放逐的单位导致技能播放异常 + self.effectCaster:ChooseTarget() + local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile()) + if targets==0 and self.castDoneFunc then + self.castDoneFunc() + return + end + --end self.effectCaster:Cast() end @@ -119,7 +128,10 @@ end function MSkill:GetMaxTargetNum() return self.effectCaster:GetMaxTargetNum() end - +-- 获取直接目标,不包含放逐的目标,可能为空 +function MSkill:GetDirectTargetsNoExile() + return self.effectCaster:GetDirectTargetsNoExile() +end -- 判断是否命中 function MSkill:CheckTargetIsHit(role) return self.effectCaster:CheckTargetIsHit(role) diff --git a/luafight/Modules/Battle/Logic/Role/RoleLogic.lua b/luafight/Modules/Battle/Logic/Role/RoleLogic.lua index 98524137a..e3a081321 100644 --- a/luafight/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/luafight/Modules/Battle/Logic/Role/RoleLogic.lua @@ -84,7 +84,7 @@ function RoleLogic:Init(uid, data, position) self.type = BattleUnitType.Role self.passiveList = {} if data.passivity and #data.passivity > 0 then - table.sort(data.passivity,function(a,b)return a[1] < b[1] end) + table.sort(data.passivity,function(a,b)return a[1] < b[1] end) for i = 1, #data.passivity do local v = data.passivity[i] local passivityId=v[1] @@ -106,6 +106,21 @@ function RoleLogic:Init(uid, data, position) end +-- 根据被动id添加被动 +function RoleLogic:AddPassiveById(id) + local config=ConfigManager.GetConfigData(ConfigName.PassiveSkillLogicConfig,id) + if not config then + return + end + local value=config.Value + if not value then + return + end + -- 被动生效 + BattleUtil.Passivity[config.Type](self,value,id,config.Judge) + -- 加入被动列表 + table.insert(self.passiveList, {id, value,id,config.judge}) +end -- 添加一个被动技能 function RoleLogic:AddPassive(id, args, isRepeat) --判断是否可以叠加 diff --git a/luafight/Modules/Battle/Logic/Role/RoleManager.lua b/luafight/Modules/Battle/Logic/Role/RoleManager.lua index 27587c1fa..22c19b619 100644 --- a/luafight/Modules/Battle/Logic/Role/RoleManager.lua +++ b/luafight/Modules/Battle/Logic/Role/RoleManager.lua @@ -131,14 +131,35 @@ end -- 获取某阵营所有角色 function this.GetRoleByCamp(camp) local list = {} + --放逐的不会被获取到 for i = 1, 6 do - list[i] = PosList[i + camp * 6] + if not list[i].isExile then + list[i] = PosList[i + camp * 6] + end end return list end -- 查找角色 function RoleManager.Query(func, inCludeDeadRole) + local list = {} + local index = 1 + if func then + for pos, v in pairs(PosList) do + if func(v) and (inCludeDeadRole or not v:IsRealDead())and not v.isExile then + list[index] = v + index = index + 1 + end + end + end + table.sort(list, function(a, b) + return a.position < b.position + end) + return list +end + +-- 查找角包括放逐目标 +function RoleManager.QueryIncludeExile(func, inCludeDeadRole) local list = {} local index = 1 if func then @@ -160,7 +181,7 @@ function RoleManager.QueryNoDead(func) local index = 1 if func then for pos, v in pairs(PosList) do - if func(v) and not v:IsRealDead() and v.deadFilter then + if func(v) and not v:IsRealDead() and v.deadFilter and not v.isExile then list[index] = v index = index + 1 end @@ -177,7 +198,7 @@ function RoleManager.NoOrder(func) local index = 1 if func then for pos, v in pairs(PosList) do - if func(v) and not v:IsRealDead() and v.deadFilter then + if func(v) and not v:IsRealDead() and v.deadFilter and not v.isExile then list[index] = v index = index + 1 end @@ -201,7 +222,7 @@ function this.GetAggro(role) -- 向左 for i = startPos, c*3+1, -1 do local pos = i + enemyCamp * 6 - if PosList[pos] and not PosList[pos]:IsRealDead() then + if PosList[pos] and not PosList[pos]:IsRealDead() and not PosList[pos].isExile then target = PosList[pos] break end @@ -210,7 +231,7 @@ function this.GetAggro(role) -- 向右 for i = startPos + 1, c*3+3 do local pos = i + enemyCamp * 6 - if PosList[pos] and not PosList[pos]:IsRealDead() then + if PosList[pos] and not PosList[pos]:IsRealDead() and not PosList[pos].isExile then target = PosList[pos] break end @@ -233,7 +254,7 @@ function this.GetAliveAggro(role) -- 向左 for i = startPos, c*3+1, -1 do local pos = i + enemyCamp * 6 - if PosList[pos] and not PosList[pos]:IsDead() then + if PosList[pos] and not PosList[pos]:IsDead() and not PosList[pos].isExile then target = PosList[pos] break end @@ -242,7 +263,7 @@ function this.GetAliveAggro(role) -- 向右 for i = startPos + 1, c*3+3 do local pos = i + enemyCamp * 6 - if PosList[pos] and not PosList[pos]:IsDead() then + if PosList[pos] and not PosList[pos]:IsDead() and not PosList[pos].isExile then target = PosList[pos] break end @@ -267,14 +288,14 @@ function this.GetArrAggroList(role, arr) -- 向左 for i = startPos, c*3+1, -1 do local pos = i - if plist[pos] and not plist[pos]:IsRealDead() then + if plist[pos] and not plist[pos]:IsRealDead() and not plist[pos].isExile then table.insert(targetList, plist[pos]) end end -- 向右 for i = startPos + 1, c*3+3 do local pos = i - if plist[pos] and not plist[pos]:IsRealDead() then + if plist[pos] and not plist[pos]:IsRealDead() and not plist[pos].isExile then table.insert(targetList, plist[pos]) end end @@ -343,7 +364,7 @@ function this.GetNeighbor(role, chooseType) if chooseType == 1 then target = role else - if role.lockTarget and not role.lockTarget:IsRealDead() then + if role.lockTarget and not role.lockTarget:IsRealDead() and not role.isExile then target = role.lockTarget else target = this.GetAggro(role) @@ -352,7 +373,7 @@ function this.GetNeighbor(role, chooseType) if target then local list = this.Query(function (r) return r.camp == target.camp end) for i=1, #list do - if not list[i]:IsRealDead() then + if not list[i]:IsRealDead() and not list[i].isExile then if list[i].position == target.position + 3 -- 后排的人 or list[i].position == target.position - 3 -- 前排的人 or (math.abs(target.position - list[i].position) <= 1 and math.floor((target.position-1)/3) == math.floor((list[i].position-1)/3)) then -- 旁边的人和自己 diff --git a/luafight/Modules/Battle/Logic/Role/Skill.lua b/luafight/Modules/Battle/Logic/Role/Skill.lua index ed1407417..641b0233f 100644 --- a/luafight/Modules/Battle/Logic/Role/Skill.lua +++ b/luafight/Modules/Battle/Logic/Role/Skill.lua @@ -64,6 +64,16 @@ function Skill:Cast(func) -- 技能效果生效 if self.effectCaster then + --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26 + --为解决攻击目标只剩被放逐的单位导致技能播放异常 + self.effectCaster:ChooseTarget() + local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile()) + if targets==0 and self.castDoneFunc then + self.isRage=false + self.castDoneFunc() + return + end + --end self.effectCaster:Cast() end @@ -106,6 +116,11 @@ end function Skill:GetDirectTargetsNoMiss() return self.effectCaster:GetDirectTargetsNoMiss() end + +-- 获取直接目标,不包含放逐的目标,可能为空 +function Skill:GetDirectTargetsNoExile() + return self.effectCaster:GetDirectTargetsNoExile() +end -- 获取技能目标最大人数 function Skill:GetMaxTargetNum() return self.effectCaster:GetMaxTargetNum() diff --git a/luafight/Modules/Battle/Logic/SkillManager.lua b/luafight/Modules/Battle/Logic/SkillManager.lua index 98c33aefe..b908fd755 100644 --- a/luafight/Modules/Battle/Logic/SkillManager.lua +++ b/luafight/Modules/Battle/Logic/SkillManager.lua @@ -14,6 +14,8 @@ this.MaxSkillCount = 20 -- 单个回合内最多释放20次技能 -- 初始化 function this.Init() this.CurSkillCount = 0 + -- 清除轮转方法,防止收到上一局战斗的影响 + this.TurnRoundFunc = nil this.Clear() end