Merge commit '54758fd705c2ba485e8aed1c4006c112ad95f82d'
This commit is contained in:
@@ -19,9 +19,9 @@ function back.update()
|
||||
t=t-1
|
||||
if t==0 then
|
||||
local S={
|
||||
ang=6.2832*rnd(),
|
||||
ang=MATH.tau*rnd(),
|
||||
d=SCR.rad*1.05/2,
|
||||
rotate=6.2832*rnd(),
|
||||
rotate=MATH.tau*rnd(),
|
||||
va=.05-rnd()*.1,
|
||||
size=SCR.rad*(2+rnd()*3)/100,
|
||||
texture=SKIN.lib[SETTING.skinSet][rnd(16)],
|
||||
|
||||
@@ -21,7 +21,7 @@ function back.update()
|
||||
x=SCR.w*rnd(),
|
||||
y=SCR.h*-.05,
|
||||
k=SCR.rad/200,
|
||||
ang=rnd()*6.2832,
|
||||
ang=rnd()*MATH.tau,
|
||||
vy=.5+rnd()*.4,
|
||||
vx=rnd()*.4-.2,
|
||||
va=rnd()*.04-.02,
|
||||
|
||||
@@ -21,8 +21,8 @@ function back.update()
|
||||
ins(mino,{
|
||||
block=TEXTURE.miniBlock[r],
|
||||
color=BLOCK_COLORS[SETTING.skin[r]],
|
||||
ang=6.2832*rnd(),
|
||||
rotate=6.2832*rnd(),
|
||||
ang=MATH.tau*rnd(),
|
||||
rotate=MATH.tau*rnd(),
|
||||
vr=.05-rnd()*.1,
|
||||
d=0,
|
||||
v=.5+rnd(),
|
||||
|
||||
@@ -261,7 +261,7 @@ return {
|
||||
elseif s==5 then
|
||||
if P.stat.frame>420*60 then
|
||||
D.pt=500
|
||||
P:win('finish')
|
||||
P:torikanEnd(420)
|
||||
return
|
||||
else
|
||||
BG.set('glow')
|
||||
|
||||
@@ -40,7 +40,7 @@ return {
|
||||
elseif s==5 then
|
||||
if P.stat.frame>183*60 then
|
||||
D.pt=500
|
||||
P:win('finish')
|
||||
P:torikanEnd(183)
|
||||
return
|
||||
else
|
||||
E.bone=true
|
||||
|
||||
@@ -38,9 +38,9 @@ return {
|
||||
elseif s==4 then
|
||||
BG.set('rainbow2')
|
||||
elseif s==5 then
|
||||
if P.stat.frame>260*60 then
|
||||
if P.stat.time>260 then
|
||||
D.pt=500
|
||||
P:win('finish')
|
||||
P:torikanEnd(260)
|
||||
return
|
||||
else
|
||||
P.gameEnv.freshLimit=10
|
||||
|
||||
@@ -54,7 +54,7 @@ return {
|
||||
|
||||
win="Win!",
|
||||
lose="Lose",
|
||||
|
||||
torikan="Ended",
|
||||
finish="Finished",
|
||||
gamewin="You Won",
|
||||
gameover="Game Over",
|
||||
|
||||
@@ -53,7 +53,7 @@ return {
|
||||
|
||||
win="¡Victoria!",
|
||||
lose="Derrota",
|
||||
|
||||
--torikan="Ended",
|
||||
finish="Finalizado",
|
||||
gamewin="Has ganado",
|
||||
gameover="Fin del Juego",
|
||||
|
||||
@@ -54,7 +54,7 @@ return {
|
||||
|
||||
win="Victoire!",
|
||||
lose="Défaite",
|
||||
|
||||
--torikan="Ended",
|
||||
finish="Terminé",
|
||||
gamewin="Gagné !",
|
||||
gameover="Fin du jeu",
|
||||
|
||||
@@ -55,7 +55,7 @@ return {
|
||||
|
||||
win="Menang!",
|
||||
lose="Kalah",
|
||||
|
||||
torikan="Tamat",
|
||||
finish="Selesai",
|
||||
gamewin="Anda menang!",
|
||||
gameover="Tamat",
|
||||
|
||||
@@ -55,7 +55,7 @@ return {
|
||||
|
||||
win="Win!",
|
||||
lose="Lose",
|
||||
|
||||
torikan="Ended",
|
||||
finish="Finished!",
|
||||
gamewin="You Win!",
|
||||
gameover="Game Over",
|
||||
|
||||
@@ -44,7 +44,7 @@ return {
|
||||
|
||||
-- win="Win",
|
||||
-- lose="Lose",
|
||||
|
||||
--torikan="Ended",
|
||||
finish="Terminou",
|
||||
gamewin="Você venceu!",
|
||||
gameover="Fim de jogo",
|
||||
|
||||
@@ -44,7 +44,7 @@ return {
|
||||
|
||||
win=": )",
|
||||
lose=": (",
|
||||
|
||||
torikan=": /",
|
||||
finish="&",
|
||||
gamewin=">>",
|
||||
gameover="x",
|
||||
|
||||
@@ -59,7 +59,7 @@ return {
|
||||
|
||||
win="Thắng!",
|
||||
lose="Thua",
|
||||
|
||||
torikan="Torikan!",
|
||||
finish="Hoàn thành",
|
||||
gamewin="Bạn đã thắng",
|
||||
gameover="Kết thúc",
|
||||
|
||||
@@ -54,7 +54,7 @@ return {
|
||||
|
||||
win="胜利",
|
||||
lose="失败",
|
||||
|
||||
--torikan="Ended",
|
||||
finish="完成",
|
||||
gamewin="胜利",
|
||||
gameover="游戏结束",
|
||||
|
||||
@@ -53,7 +53,7 @@ return {
|
||||
|
||||
win="Win();",
|
||||
lose="Lose();",
|
||||
|
||||
torikan="Torikan();",
|
||||
finish="Result=Finish",
|
||||
gamewin="Result=Win",
|
||||
gameover="Result=GameOver",
|
||||
|
||||
@@ -54,7 +54,7 @@ return {
|
||||
|
||||
win="勝利",
|
||||
lose="失敗",
|
||||
|
||||
--torikan="Ended",
|
||||
finish="完成",
|
||||
gamewin="勝利",
|
||||
gameover="遊戲結束",
|
||||
|
||||
@@ -121,7 +121,7 @@ function NETPLY.add(d)
|
||||
place=1e99,
|
||||
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
|
||||
|
||||
ins(PLYlist,p)
|
||||
|
||||
@@ -983,6 +983,21 @@ function draw.norm(P,repMode)
|
||||
ENV.mesDisp[i](P,repMode)
|
||||
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
|
||||
_drawStartCounter(P.frameRun)
|
||||
end
|
||||
|
||||
@@ -2225,6 +2225,18 @@ local function task_finish(self)
|
||||
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)
|
||||
while true do
|
||||
yield()
|
||||
@@ -2840,6 +2852,26 @@ function Player:revive()
|
||||
playClearSFX(3)
|
||||
SFX.play('emit')
|
||||
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)
|
||||
if self.result then
|
||||
return
|
||||
@@ -2976,6 +3008,6 @@ function Player:lose(force)
|
||||
-- ::BREAK_notFinished::
|
||||
end
|
||||
end
|
||||
--------------------------<\Event>--------------------------
|
||||
--------------------------</Event>--------------------------
|
||||
|
||||
return Player
|
||||
|
||||
@@ -115,7 +115,7 @@ function scene.draw()
|
||||
end
|
||||
elseif state==1 then
|
||||
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
|
||||
gc.setColor(1,ct>2 and 1 or 0,0)
|
||||
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
|
||||
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
|
||||
GC.pop()
|
||||
end
|
||||
|
||||
@@ -109,7 +109,7 @@ function scene.draw()
|
||||
-- Fetching timer
|
||||
if fetchTimer>0 then
|
||||
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
|
||||
|
||||
-- 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]
|
||||
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
|
||||
rank=CHAR.icon['rank'..(
|
||||
acc==1. and "Z" or
|
||||
@@ -294,7 +294,7 @@ function scene.draw()
|
||||
|
||||
-- Texts
|
||||
local C
|
||||
_=TIME()%6.2832
|
||||
_=TIME()%MATH.tau
|
||||
if _>3.142 then
|
||||
GC.setColor(.97,.97,.97,-timer2*sin(_))
|
||||
FONT.set(35)
|
||||
|
||||
@@ -18,9 +18,9 @@ function scene.draw()
|
||||
local b=math.floor(t*2)%16+1
|
||||
gc.setShader(SHADER.blockSatur)
|
||||
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)
|
||||
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()
|
||||
|
||||
-- Draw center
|
||||
|
||||
@@ -17,7 +17,7 @@ function scene.enter()
|
||||
BG.set()
|
||||
selRS=RSlist[SETTING.RS]
|
||||
for i=1,7 do
|
||||
minoRot0[i]=SETTING.face[i]*1.57
|
||||
minoRot0[i]=SETTING.face[i]*math.pi/2
|
||||
minoRot[i]=minoRot0[i]
|
||||
end
|
||||
end
|
||||
@@ -64,7 +64,7 @@ end
|
||||
local function _nextDir(i)
|
||||
trySettingWarn()
|
||||
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 minoRot0[5]>62 then
|
||||
selEggMode='marathon_bfmax'
|
||||
@@ -119,7 +119,7 @@ scene.widgetList={
|
||||
SETTING.face[i]=0
|
||||
end
|
||||
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
|
||||
SFX.play('hold')
|
||||
end},
|
||||
|
||||
Reference in New Issue
Block a user