增强玩家set20G方法,新增setHold方法并应用

This commit is contained in:
MrZ626
2020-11-10 19:56:20 +08:00
parent 7f8bc4ada9
commit c4f14809fe
4 changed files with 22 additions and 7 deletions

View File

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

View File

@@ -66,7 +66,7 @@ local function check_LVup(P)
P.waiting=30 P.waiting=30
ENV.lock=11 ENV.lock=11
ENV.next=6 ENV.next=6
ENV.hold=false P:setHold(false)
ENV.bone=true ENV.bone=true
ENV.target=62 ENV.target=62
@@ -96,7 +96,7 @@ local function check_LVup(P)
ENV.lock=10 ENV.lock=10
ENV.hold=true P:setHold(true)
P.keepVisible=false P.keepVisible=false
P.showTime=180 P.showTime=180

View File

@@ -393,7 +393,7 @@ function royaleLevelup()
P.gameEnv.drop=int(P.gameEnv.drop*.3) P.gameEnv.drop=int(P.gameEnv.drop*.3)
if P.gameEnv.drop==0 then if P.gameEnv.drop==0 then
P.curY=P.imgY P.curY=P.imgY
P:set20G() P:set20G(true)
end end
end end
end end

View File

@@ -1145,6 +1145,10 @@ local function applyGameEnv(P)--Finish gameEnv processing
P.keyAvailable[7]=false P.keyAvailable[7]=false
virtualkey[7].ava=false virtualkey[7].ava=false
end end
if not ENV.hold then
P.keyAvailable[8]=false
virtualkey[8].ava=false
end
if type(ENV.mission)=="table"then if type(ENV.mission)=="table"then
P.curMission=1 P.curMission=1
@@ -1548,10 +1552,21 @@ function player.RND(P,a,b)
return R:random(a,b) return R:random(a,b)
end end
function player.set20G(P) function player.set20G(P,if20g,init)
P._20G=true P._20G=if20g
if P.AI_mode=="CC"then CC.switch20G(P)end P.keyAvailable[7]=not if20g
virtualkey[7].ava=not if20g
if init and if20g and P.AI_mode=="CC"then CC.switch20G(P)end
end end
function player.setHold(P,ifhold)
P.gameEnv.hold=ifhold
P.keyAvailable[8]=not ifhold
virtualkey[8].ava=not ifhold
if not ifhold then
P.hd=nil
end
end
function player.newTask(P,code,data) function player.newTask(P,code,data)
local L=P.tasks local L=P.tasks
ins(L,{ ins(L,{