Merge commit '54758fd705c2ba485e8aed1c4006c112ad95f82d'
This commit is contained in:
@@ -19,9 +19,9 @@ function back.update()
|
|||||||
t=t-1
|
t=t-1
|
||||||
if t==0 then
|
if t==0 then
|
||||||
local S={
|
local S={
|
||||||
ang=6.2832*rnd(),
|
ang=MATH.tau*rnd(),
|
||||||
d=SCR.rad*1.05/2,
|
d=SCR.rad*1.05/2,
|
||||||
rotate=6.2832*rnd(),
|
rotate=MATH.tau*rnd(),
|
||||||
va=.05-rnd()*.1,
|
va=.05-rnd()*.1,
|
||||||
size=SCR.rad*(2+rnd()*3)/100,
|
size=SCR.rad*(2+rnd()*3)/100,
|
||||||
texture=SKIN.lib[SETTING.skinSet][rnd(16)],
|
texture=SKIN.lib[SETTING.skinSet][rnd(16)],
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function back.update()
|
|||||||
x=SCR.w*rnd(),
|
x=SCR.w*rnd(),
|
||||||
y=SCR.h*-.05,
|
y=SCR.h*-.05,
|
||||||
k=SCR.rad/200,
|
k=SCR.rad/200,
|
||||||
ang=rnd()*6.2832,
|
ang=rnd()*MATH.tau,
|
||||||
vy=.5+rnd()*.4,
|
vy=.5+rnd()*.4,
|
||||||
vx=rnd()*.4-.2,
|
vx=rnd()*.4-.2,
|
||||||
va=rnd()*.04-.02,
|
va=rnd()*.04-.02,
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ function back.update()
|
|||||||
ins(mino,{
|
ins(mino,{
|
||||||
block=TEXTURE.miniBlock[r],
|
block=TEXTURE.miniBlock[r],
|
||||||
color=BLOCK_COLORS[SETTING.skin[r]],
|
color=BLOCK_COLORS[SETTING.skin[r]],
|
||||||
ang=6.2832*rnd(),
|
ang=MATH.tau*rnd(),
|
||||||
rotate=6.2832*rnd(),
|
rotate=MATH.tau*rnd(),
|
||||||
vr=.05-rnd()*.1,
|
vr=.05-rnd()*.1,
|
||||||
d=0,
|
d=0,
|
||||||
v=.5+rnd(),
|
v=.5+rnd(),
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ return {
|
|||||||
elseif s==5 then
|
elseif s==5 then
|
||||||
if P.stat.frame>420*60 then
|
if P.stat.frame>420*60 then
|
||||||
D.pt=500
|
D.pt=500
|
||||||
P:win('finish')
|
P:torikanEnd(420)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
BG.set('glow')
|
BG.set('glow')
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ return {
|
|||||||
elseif s==5 then
|
elseif s==5 then
|
||||||
if P.stat.frame>183*60 then
|
if P.stat.frame>183*60 then
|
||||||
D.pt=500
|
D.pt=500
|
||||||
P:win('finish')
|
P:torikanEnd(183)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
E.bone=true
|
E.bone=true
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ return {
|
|||||||
elseif s==4 then
|
elseif s==4 then
|
||||||
BG.set('rainbow2')
|
BG.set('rainbow2')
|
||||||
elseif s==5 then
|
elseif s==5 then
|
||||||
if P.stat.frame>260*60 then
|
if P.stat.time>260 then
|
||||||
D.pt=500
|
D.pt=500
|
||||||
P:win('finish')
|
P:torikanEnd(260)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
P.gameEnv.freshLimit=10
|
P.gameEnv.freshLimit=10
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ return {
|
|||||||
|
|
||||||
win="Win!",
|
win="Win!",
|
||||||
lose="Lose",
|
lose="Lose",
|
||||||
|
torikan="Ended",
|
||||||
finish="Finished",
|
finish="Finished",
|
||||||
gamewin="You Won",
|
gamewin="You Won",
|
||||||
gameover="Game Over",
|
gameover="Game Over",
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ return {
|
|||||||
|
|
||||||
win="¡Victoria!",
|
win="¡Victoria!",
|
||||||
lose="Derrota",
|
lose="Derrota",
|
||||||
|
--torikan="Ended",
|
||||||
finish="Finalizado",
|
finish="Finalizado",
|
||||||
gamewin="Has ganado",
|
gamewin="Has ganado",
|
||||||
gameover="Fin del Juego",
|
gameover="Fin del Juego",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ return {
|
|||||||
|
|
||||||
win="Victoire!",
|
win="Victoire!",
|
||||||
lose="Défaite",
|
lose="Défaite",
|
||||||
|
--torikan="Ended",
|
||||||
finish="Terminé",
|
finish="Terminé",
|
||||||
gamewin="Gagné !",
|
gamewin="Gagné !",
|
||||||
gameover="Fin du jeu",
|
gameover="Fin du jeu",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ return {
|
|||||||
|
|
||||||
win="Menang!",
|
win="Menang!",
|
||||||
lose="Kalah",
|
lose="Kalah",
|
||||||
|
torikan="Tamat",
|
||||||
finish="Selesai",
|
finish="Selesai",
|
||||||
gamewin="Anda menang!",
|
gamewin="Anda menang!",
|
||||||
gameover="Tamat",
|
gameover="Tamat",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ return {
|
|||||||
|
|
||||||
win="Win!",
|
win="Win!",
|
||||||
lose="Lose",
|
lose="Lose",
|
||||||
|
torikan="Ended",
|
||||||
finish="Finished!",
|
finish="Finished!",
|
||||||
gamewin="You Win!",
|
gamewin="You Win!",
|
||||||
gameover="Game Over",
|
gameover="Game Over",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ return {
|
|||||||
|
|
||||||
-- win="Win",
|
-- win="Win",
|
||||||
-- lose="Lose",
|
-- lose="Lose",
|
||||||
|
--torikan="Ended",
|
||||||
finish="Terminou",
|
finish="Terminou",
|
||||||
gamewin="Você venceu!",
|
gamewin="Você venceu!",
|
||||||
gameover="Fim de jogo",
|
gameover="Fim de jogo",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ return {
|
|||||||
|
|
||||||
win=": )",
|
win=": )",
|
||||||
lose=": (",
|
lose=": (",
|
||||||
|
torikan=": /",
|
||||||
finish="&",
|
finish="&",
|
||||||
gamewin=">>",
|
gamewin=">>",
|
||||||
gameover="x",
|
gameover="x",
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ return {
|
|||||||
|
|
||||||
win="Thắng!",
|
win="Thắng!",
|
||||||
lose="Thua",
|
lose="Thua",
|
||||||
|
torikan="Torikan!",
|
||||||
finish="Hoàn thành",
|
finish="Hoàn thành",
|
||||||
gamewin="Bạn đã thắng",
|
gamewin="Bạn đã thắng",
|
||||||
gameover="Kết thúc",
|
gameover="Kết thúc",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ return {
|
|||||||
|
|
||||||
win="胜利",
|
win="胜利",
|
||||||
lose="失败",
|
lose="失败",
|
||||||
|
--torikan="Ended",
|
||||||
finish="完成",
|
finish="完成",
|
||||||
gamewin="胜利",
|
gamewin="胜利",
|
||||||
gameover="游戏结束",
|
gameover="游戏结束",
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ return {
|
|||||||
|
|
||||||
win="Win();",
|
win="Win();",
|
||||||
lose="Lose();",
|
lose="Lose();",
|
||||||
|
torikan="Torikan();",
|
||||||
finish="Result=Finish",
|
finish="Result=Finish",
|
||||||
gamewin="Result=Win",
|
gamewin="Result=Win",
|
||||||
gameover="Result=GameOver",
|
gameover="Result=GameOver",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ return {
|
|||||||
|
|
||||||
win="勝利",
|
win="勝利",
|
||||||
lose="失敗",
|
lose="失敗",
|
||||||
|
--torikan="Ended",
|
||||||
finish="完成",
|
finish="完成",
|
||||||
gamewin="勝利",
|
gamewin="勝利",
|
||||||
gameover="遊戲結束",
|
gameover="遊戲結束",
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ function NETPLY.add(d)
|
|||||||
place=1e99,
|
place=1e99,
|
||||||
stat=false,
|
stat=false,
|
||||||
}
|
}
|
||||||
local a=math.random()*6.2832
|
local a=math.random()*MATH.tau
|
||||||
p.x,p.y,p.w,p.h=640+2600*math.cos(a),360+2600*math.sin(a),47,47
|
p.x,p.y,p.w,p.h=640+2600*math.cos(a),360+2600*math.sin(a),47,47
|
||||||
|
|
||||||
ins(PLYlist,p)
|
ins(PLYlist,p)
|
||||||
|
|||||||
@@ -983,6 +983,21 @@ function draw.norm(P,repMode)
|
|||||||
ENV.mesDisp[i](P,repMode)
|
ENV.mesDisp[i](P,repMode)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Torikan miss amount
|
||||||
|
if P.result=='torikan' then
|
||||||
|
local diff=P.stat.time-P.stat.torikanReq
|
||||||
|
if diff>=60 then gc_setColor(COLOR.R)
|
||||||
|
elseif diff>=30 then gc_setColor(COLOR.F)
|
||||||
|
elseif diff>=15 then gc_setColor(COLOR.O)
|
||||||
|
elseif diff>=10 then gc_setColor(COLOR.Y)
|
||||||
|
elseif diff>=5 then gc_setColor(COLOR.flicker(COLOR.G,COLOR.L,.1))
|
||||||
|
else gc_setColor(COLOR.flicker(COLOR.G,COLOR.J,.05)) end
|
||||||
|
setFont(40)
|
||||||
|
-- self:_showText(STRING.time(self.stat.time).." / "..STRING.time(requiredTime),0,160,50,'beat',.5,.2)
|
||||||
|
GC.mStr(STRING.time(P.stat.time).." / "..STRING.time(P.stat.torikanReq),300,401)
|
||||||
|
GC.mStr("(+"..STRING.time_short(diff)..")",300,451)
|
||||||
|
end
|
||||||
|
|
||||||
if P.frameRun<180 then
|
if P.frameRun<180 then
|
||||||
_drawStartCounter(P.frameRun)
|
_drawStartCounter(P.frameRun)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2225,6 +2225,18 @@ local function task_finish(self)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local function task_fade(self)
|
||||||
|
while true do
|
||||||
|
yield()
|
||||||
|
self.endCounter=self.endCounter+1
|
||||||
|
if self.endCounter<40 then
|
||||||
|
-- Make field invisible
|
||||||
|
for j=1,#self.field do for i=1,10 do
|
||||||
|
self.visTime[j][i]=math.max(3,self.visTime[j][i]-.5)
|
||||||
|
end end
|
||||||
|
elseif self.endCounter==60 then return end
|
||||||
|
end
|
||||||
|
end
|
||||||
local function task_lose(self)
|
local function task_lose(self)
|
||||||
while true do
|
while true do
|
||||||
yield()
|
yield()
|
||||||
@@ -2840,6 +2852,26 @@ function Player:revive()
|
|||||||
playClearSFX(3)
|
playClearSFX(3)
|
||||||
SFX.play('emit')
|
SFX.play('emit')
|
||||||
end
|
end
|
||||||
|
function Player:torikanEnd(requiredTime)
|
||||||
|
if self.stat.time < requiredTime then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
self:_die()
|
||||||
|
self.result='torikan'
|
||||||
|
if self.type=='human' then
|
||||||
|
GAME.result='torikan'
|
||||||
|
SFX.play('win')
|
||||||
|
VOC.play('win')
|
||||||
|
end
|
||||||
|
self:_showText(text.torikan,0,0,90,'beat',.5,.2)
|
||||||
|
self.stat.torikanReq=requiredTime
|
||||||
|
if self.type=='human' then
|
||||||
|
gameOver()
|
||||||
|
TASK.new(task_autoPause)
|
||||||
|
end
|
||||||
|
self:newTask(task_fade)
|
||||||
|
return true
|
||||||
|
end
|
||||||
function Player:win(result)
|
function Player:win(result)
|
||||||
if self.result then
|
if self.result then
|
||||||
return
|
return
|
||||||
@@ -2976,6 +3008,6 @@ function Player:lose(force)
|
|||||||
-- ::BREAK_notFinished::
|
-- ::BREAK_notFinished::
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--------------------------<\Event>--------------------------
|
--------------------------</Event>--------------------------
|
||||||
|
|
||||||
return Player
|
return Player
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
elseif state==1 then
|
elseif state==1 then
|
||||||
gc.setColor(.2,.7,.4,math.min((60-ct)/10,ct/10)*.8)
|
gc.setColor(.2,.7,.4,math.min((60-ct)/10,ct/10)*.8)
|
||||||
gc.arc('fill',640,360,260,-1.5708,-1.5708+(ct/60)*6.2832)
|
gc.arc('fill',640,360,260,math.pi/2,math.pi/2+(ct/60)*MATH.tau)
|
||||||
elseif state==2 and ct<5 then
|
elseif state==2 and ct<5 then
|
||||||
gc.setColor(1,ct>2 and 1 or 0,0)
|
gc.setColor(1,ct>2 and 1 or 0,0)
|
||||||
gc.rectangle('fill',640-100,(up and 180 or 540)-100,200,200,10)
|
gc.rectangle('fill',640-100,(up and 180 or 540)-100,200,200,10)
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ function scene.draw()
|
|||||||
|
|
||||||
if M.list then
|
if M.list then
|
||||||
GC.setColor(1,1,1,t*6)
|
GC.setColor(1,1,1,t*6)
|
||||||
GC.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*6.2832)
|
GC.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*MATH.tau)
|
||||||
end
|
end
|
||||||
GC.pop()
|
GC.pop()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ function scene.draw()
|
|||||||
-- Fetching timer
|
-- Fetching timer
|
||||||
if fetchTimer>0 then
|
if fetchTimer>0 then
|
||||||
gc_setColor(1,1,1,.12)
|
gc_setColor(1,1,1,.12)
|
||||||
GC.arc('fill','pie',250,630,40,-1.5708,-1.5708-.6283*fetchTimer)
|
GC.arc('fill','pie',250,630,40,-math.pi/2,-math.pi/2-.6283*fetchTimer)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Room list
|
-- Room list
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ function scene.enter()
|
|||||||
val[2*i-1],val[2*i]=val[i]*standard[2*i-1],val[i]*standard[2*i]
|
val[2*i-1],val[2*i]=val[i]*standard[2*i-1],val[i]*standard[2*i]
|
||||||
end
|
end
|
||||||
|
|
||||||
if P1.result=='win' and P1.stat.piece>4 then
|
if (P1.result=='win' or P1.result=='torikan') and P1.stat.piece>4 then
|
||||||
local acc=P1.stat.finesseRate*.2/P1.stat.piece
|
local acc=P1.stat.finesseRate*.2/P1.stat.piece
|
||||||
rank=CHAR.icon['rank'..(
|
rank=CHAR.icon['rank'..(
|
||||||
acc==1. and "Z" or
|
acc==1. and "Z" or
|
||||||
@@ -294,7 +294,7 @@ function scene.draw()
|
|||||||
|
|
||||||
-- Texts
|
-- Texts
|
||||||
local C
|
local C
|
||||||
_=TIME()%6.2832
|
_=TIME()%MATH.tau
|
||||||
if _>3.142 then
|
if _>3.142 then
|
||||||
GC.setColor(.97,.97,.97,-timer2*sin(_))
|
GC.setColor(.97,.97,.97,-timer2*sin(_))
|
||||||
FONT.set(35)
|
FONT.set(35)
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ function scene.draw()
|
|||||||
local b=math.floor(t*2)%16+1
|
local b=math.floor(t*2)%16+1
|
||||||
gc.setShader(SHADER.blockSatur)
|
gc.setShader(SHADER.blockSatur)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
mDraw(SKIN.lib[SETTING.skinSet][b],0,0,t%6.2832,2)
|
mDraw(SKIN.lib[SETTING.skinSet][b],0,0,t%MATH.tau,2)
|
||||||
gc.setColor(1,1,1,t*2%1)
|
gc.setColor(1,1,1,t*2%1)
|
||||||
mDraw(SKIN.lib[SETTING.skinSet][b%16+1],0,0,t%6.2832,2)
|
mDraw(SKIN.lib[SETTING.skinSet][b%16+1],0,0,t%MATH.tau,2)
|
||||||
gc.setShader()
|
gc.setShader()
|
||||||
|
|
||||||
-- Draw center
|
-- Draw center
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function scene.enter()
|
|||||||
BG.set()
|
BG.set()
|
||||||
selRS=RSlist[SETTING.RS]
|
selRS=RSlist[SETTING.RS]
|
||||||
for i=1,7 do
|
for i=1,7 do
|
||||||
minoRot0[i]=SETTING.face[i]*1.57
|
minoRot0[i]=SETTING.face[i]*math.pi/2
|
||||||
minoRot[i]=minoRot0[i]
|
minoRot[i]=minoRot0[i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -64,7 +64,7 @@ end
|
|||||||
local function _nextDir(i)
|
local function _nextDir(i)
|
||||||
trySettingWarn()
|
trySettingWarn()
|
||||||
SETTING.face[i]=(SETTING.face[i]+1)%4
|
SETTING.face[i]=(SETTING.face[i]+1)%4
|
||||||
minoRot0[i]=minoRot0[i]+1.5707963
|
minoRot0[i]=minoRot0[i]+math.pi/2
|
||||||
if not selEggMode and not GAME.playing then
|
if not selEggMode and not GAME.playing then
|
||||||
if minoRot0[5]>62 then
|
if minoRot0[5]>62 then
|
||||||
selEggMode='marathon_bfmax'
|
selEggMode='marathon_bfmax'
|
||||||
@@ -119,7 +119,7 @@ scene.widgetList={
|
|||||||
SETTING.face[i]=0
|
SETTING.face[i]=0
|
||||||
end
|
end
|
||||||
for i=1,7 do
|
for i=1,7 do
|
||||||
minoRot0[i]=(floor(minoRot0[i]/6.2831853)+(minoRot0[i]%6.2831853>4 and 1 or 0))*6.2831853
|
minoRot0[i]=(floor(minoRot0[i]/MATH.tau)+(minoRot0[i]%MATH.tau>4 and 1 or 0))*MATH.tau
|
||||||
end
|
end
|
||||||
SFX.play('hold')
|
SFX.play('hold')
|
||||||
end},
|
end},
|
||||||
|
|||||||
Reference in New Issue
Block a user