攻击特效从全局改为玩家设置项一部分
This commit is contained in:
@@ -330,6 +330,7 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
|||||||
if ENV.clearFX==0 then ENV.clearFX=false end
|
if ENV.clearFX==0 then ENV.clearFX=false end
|
||||||
if ENV.splashFX==0 then ENV.splashFX=false end
|
if ENV.splashFX==0 then ENV.splashFX=false end
|
||||||
if ENV.shakeFX==0 then ENV.shakeFX=false end
|
if ENV.shakeFX==0 then ENV.shakeFX=false end
|
||||||
|
if ENV.atkFX==0 then ENV.atkFX=false end
|
||||||
end
|
end
|
||||||
if ENV.ghost==0 then ENV.ghost=false end
|
if ENV.ghost==0 then ENV.ghost=false end
|
||||||
if ENV.center==0 then ENV.center=false end
|
if ENV.center==0 then ENV.center=false end
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ end
|
|||||||
function Player:createClearingFX(y,spd)
|
function Player:createClearingFX(y,spd)
|
||||||
ins(self.clearFX,{y,0,spd})
|
ins(self.clearFX,{y,0,spd})
|
||||||
end
|
end
|
||||||
function Player:createBeam(R,send,color)
|
function Player:createBeam(R,send,power,color)
|
||||||
local x1,y1,x2,y2
|
local x1,y1,x2,y2
|
||||||
if self.mini then x1,y1=self.centerX,self.centerY
|
if self.mini then x1,y1=self.centerX,self.centerY
|
||||||
else x1,y1=self.x+(30*(self.curX+self.cur.sc[2])-30+15+150)*self.size,self.y+(600-30*(self.curY+self.cur.sc[1])+15)*self.size
|
else x1,y1=self.x+(30*(self.curX+self.cur.sc[2])-30+15+150)*self.size,self.y+(600-30*(self.curY+self.cur.sc[1])+15)*self.size
|
||||||
@@ -110,7 +110,7 @@ function Player:createBeam(R,send,color)
|
|||||||
local r,g,b=c[1]*2,c[2]*2,c[3]*2
|
local r,g,b=c[1]*2,c[2]*2,c[3]*2
|
||||||
|
|
||||||
local a=GAME.modeEnv.royaleMode and not(self.type=="human"or R.type=="human")and .2 or 1
|
local a=GAME.modeEnv.royaleMode and not(self.type=="human"or R.type=="human")and .2 or 1
|
||||||
SYSFX.newAttack(1-SETTING.atkFX*.1,x1,y1,x2,y2,int(send^.7*(4+SETTING.atkFX)),r,g,b,a*(SETTING.atkFX+2)*.0626)
|
SYSFX.newAttack(1-power*.1,x1,y1,x2,y2,int(send^.7*(4+power)),r,g,b,a*(power+2)*.0626)
|
||||||
end
|
end
|
||||||
--------------------------</FX>--------------------------
|
--------------------------</FX>--------------------------
|
||||||
|
|
||||||
@@ -1322,8 +1322,8 @@ do--Player.drop(self)--Place piece
|
|||||||
if M>0 then
|
if M>0 then
|
||||||
for i=1,M do
|
for i=1,M do
|
||||||
self:attack(self.atker[i],send,sendTime,generateLine(self:RND(10)))
|
self:attack(self.atker[i],send,sendTime,generateLine(self:RND(10)))
|
||||||
if SETTING.atkFX>0 then
|
if ENV.atkFX then
|
||||||
self:createBeam(self.atker[i],send,C.color)
|
self:createBeam(self.atker[i],send,ENV.atkFX,C.color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -1338,8 +1338,8 @@ do--Player.drop(self)--Place piece
|
|||||||
end
|
end
|
||||||
if T then
|
if T then
|
||||||
self:attack(T,send,sendTime,generateLine(self:RND(10)))
|
self:attack(T,send,sendTime,generateLine(self:RND(10)))
|
||||||
if SETTING.atkFX>0 then
|
if ENV.atkFX then
|
||||||
self:createBeam(T,send,C.color)
|
self:createBeam(T,send,ENV.atkFX,C.color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -398,8 +398,8 @@ function update.remote_alive(P,dt)
|
|||||||
for i=1,#L do
|
for i=1,#L do
|
||||||
if L[i].sid==sid then
|
if L[i].sid==sid then
|
||||||
P:attack(L[i],amount,time,line,true)
|
P:attack(L[i],amount,time,line,true)
|
||||||
if SETTING.atkFX>0 then
|
if P.gameEnv.atkFX then
|
||||||
P:createBeam(L[i],amount,P.cur.color)
|
P:createBeam(L[i],amount,P.gameEnv.atkFX,P.cur.color)
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user