增加切换20G模式函数,不直接修改玩家属性了

This commit is contained in:
MrZ626
2020-11-07 23:16:47 +08:00
parent 762a5bcbb9
commit 5fd96555f9
2 changed files with 13 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ local function check(P)
P.gameEnv.target=100
SFX.play("reach")
elseif T==100 then
P._20G=true
P:set20G()
P.gameEnv.target=200
SFX.play("reach")
else

View File

@@ -1540,13 +1540,6 @@ function player.createBeam(P,R,send,color)
local a=modeEnv.royaleMode and not(P.human or R.human)and .2 or 1
sysFX.newAttack(1-SETTING.atkFX*.1,x1,y1,x2,y2,wid,r,g,b,a*(SETTING.atkFX+2)*.0626)
end
function player.newTask(P,code,data)
local L=P.tasks
ins(L,{
code=code,
data=data,
})
end
--------------------------</FX>--------------------------
--------------------------<Method>--------------------------
@@ -1555,6 +1548,18 @@ function player.RND(P,a,b)
return R:random(a,b)
end
function player.set20G(P)
P._20G=true
if P.AI_mode=="CC"then CC.switch20G(P)end
end
function player.newTask(P,code,data)
local L=P.tasks
ins(L,{
code=code,
data=data,
})
end
function player.solid(P,x,y)
if x<1 or x>10 or y<1 then return true end
if y>#P.field then return false end