Compare commits
125 Commits
v0.17.1
...
pre0.17.4-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a61172764 | ||
|
|
97fd1721c5 | ||
|
|
55419cc183 | ||
|
|
db47528a37 | ||
|
|
38be81114f | ||
|
|
6c960fdde8 | ||
|
|
05c277a690 | ||
|
|
9dab204ae8 | ||
|
|
075f643fb7 | ||
|
|
8d4e2fa0d0 | ||
|
|
5d05583e26 | ||
|
|
31425440dc | ||
|
|
5409e18ede | ||
|
|
1d50e37df2 | ||
|
|
afa86fe0ac | ||
|
|
77b031fdde | ||
|
|
d0c71cd0af | ||
|
|
5b743a4103 | ||
|
|
da8d7e2080 | ||
|
|
3934a61a6d | ||
|
|
1f225ae6ad | ||
|
|
303a1d7afc | ||
|
|
1d4a2eeb66 | ||
|
|
3fe0f7281a | ||
|
|
f89248a8b7 | ||
|
|
0453e8d94d | ||
|
|
fd1070c313 | ||
|
|
d987008cf6 | ||
|
|
73fc7c037d | ||
|
|
718540db5a | ||
|
|
9c2b09e589 | ||
|
|
0c2f0904ef | ||
|
|
2ae34bded1 | ||
|
|
30b1d2ddfd | ||
|
|
d769604724 | ||
|
|
573366fed9 | ||
|
|
6f3667e65a | ||
|
|
9426dcdc69 | ||
|
|
bdb117c0df | ||
|
|
8fd4391549 | ||
|
|
373c8a8a5f | ||
|
|
2207f7e414 | ||
|
|
984bb7d6a6 | ||
|
|
664afb0bb3 | ||
|
|
716a08b31d | ||
|
|
a6c63c41b6 | ||
|
|
286e330077 | ||
|
|
5e8af423f2 | ||
|
|
5f539a2d4f | ||
|
|
73f63cfd0a | ||
|
|
11422bee5a | ||
|
|
baf36ac86b | ||
|
|
d8c058b0e1 | ||
|
|
6c69c38b32 | ||
|
|
d17e62e36b | ||
|
|
3a2ec3a5dd | ||
|
|
ce25f17676 | ||
|
|
61fe4a5897 | ||
|
|
f50e90b29b | ||
|
|
c151c1176f | ||
|
|
69491e2f8b | ||
|
|
4f4988d7ef | ||
|
|
9ee4af48da | ||
|
|
566ebbf213 | ||
|
|
b1ea222b90 | ||
|
|
d85f77b480 | ||
|
|
20f5d07d05 | ||
|
|
9864a75e0f | ||
|
|
af4cf9fc0d | ||
|
|
d0597e6836 | ||
|
|
61fb504b21 | ||
|
|
bd055a7c60 | ||
|
|
f22c188753 | ||
|
|
7df55b1584 | ||
|
|
f9d5e054d4 | ||
|
|
a17a3f9ba4 | ||
|
|
f3945b9afe | ||
|
|
e3fffc5d7c | ||
|
|
54175a6ee8 | ||
|
|
9ddee1059c | ||
|
|
0e965eaaae | ||
|
|
e66c5c41ee | ||
|
|
da1ec35a55 | ||
|
|
d919812f44 | ||
|
|
eddcd726ca | ||
|
|
190e64de92 | ||
|
|
6ee2833cf7 | ||
|
|
beaaac6892 | ||
|
|
f4e0cabcf3 | ||
|
|
3b60590f8a | ||
|
|
96a695819e | ||
|
|
0a11d2cf47 | ||
|
|
f932005ea0 | ||
|
|
fedce2ae2b | ||
|
|
85cf77f15d | ||
|
|
fa3d7ff199 | ||
|
|
1da6c0c8a9 | ||
|
|
83349707d5 | ||
|
|
d4090dea6f | ||
|
|
ea83add8fa | ||
|
|
7687fb2c12 | ||
|
|
1fb741d7c2 | ||
|
|
157f8cc7d5 | ||
|
|
846d477e9d | ||
|
|
452cdf6ab0 | ||
|
|
e9396c43c9 | ||
|
|
dd726e75e8 | ||
|
|
a66bb9013a | ||
|
|
ea0448af5a | ||
|
|
44735cd6cd | ||
|
|
3956d1d7bc | ||
|
|
a7a2124bb6 | ||
|
|
9399938be0 | ||
|
|
195f9b2c46 | ||
|
|
d7546e5f41 | ||
|
|
888909b48c | ||
|
|
d68f732884 | ||
|
|
5243ed0c6b | ||
|
|
856c490a2b | ||
|
|
5e9dcc27aa | ||
|
|
3f129a9585 | ||
|
|
e682ff1de5 | ||
|
|
2c064d5809 | ||
|
|
e0573382e8 | ||
|
|
5a514ce495 |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* text=auto
|
||||
2
.github/.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
actions/**/*.yml text eol=lf
|
||||
workflows/*.yml text eol=lf
|
||||
52
.github/actions/automatic-test/action.yml
vendored
@@ -4,6 +4,58 @@ description: 'Check for obvious errors.'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install lua
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Check all lua files are valid
|
||||
shell: lua {0}
|
||||
run: |
|
||||
local files = assert(io.popen "find . -name '*.lua' -not -path '*/.git/*'")
|
||||
local errors = 0
|
||||
for file in files:lines() do
|
||||
local f, error = loadfile(file)
|
||||
if not f then
|
||||
print(error)
|
||||
errors = errors + 1
|
||||
end
|
||||
end
|
||||
files:close()
|
||||
|
||||
if errors > 0 then
|
||||
print(('%d syntax error(s) found.'):format(errors))
|
||||
os.exit(1)
|
||||
else
|
||||
print('No syntax error found.')
|
||||
end
|
||||
- name: Prepare FontTools
|
||||
shell: bash
|
||||
run: |
|
||||
pip install fonttools
|
||||
- name: Check all characters are in the font
|
||||
shell: python
|
||||
run: |
|
||||
from fontTools.ttLib import TTFont
|
||||
from pathlib import Path
|
||||
|
||||
font = TTFont('parts/fonts/proportional.otf')
|
||||
keys = set(font.getBestCmap().keys())
|
||||
|
||||
missing = []
|
||||
for file in Path('parts/language').glob('*.lua'):
|
||||
for i, line in enumerate(file.read_text().splitlines()):
|
||||
for char in line:
|
||||
if ord(char) not in keys:
|
||||
missing.append((char, file, i+1))
|
||||
|
||||
if missing:
|
||||
print('Missing characters:')
|
||||
for char, file, i in missing:
|
||||
print(f"'{char}'({ord(char):x}) in {file} at line {i} " \
|
||||
f"(${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/{file}#L{i})")
|
||||
exit(1)
|
||||
else:
|
||||
print('All characters are present in the font.')
|
||||
- uses: ./.github/actions/build-love
|
||||
with:
|
||||
file-path: Techmino.love
|
||||
|
||||
2
.github/actions/get-cc/action.yml
vendored
@@ -3,7 +3,7 @@ description: 'download cc into specific dir'
|
||||
inputs:
|
||||
tag:
|
||||
required: false
|
||||
default:
|
||||
default: techmino-alize-2
|
||||
arch:
|
||||
required: true
|
||||
dir:
|
||||
|
||||
1
.github/build/Linux/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.template text eol=lf
|
||||
1
.github/build/Windows/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.template text eol=crlf
|
||||
1
.github/build/macOS/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.template text eol=lf
|
||||
56
.github/workflows/getVersion.lua
vendored
@@ -1,28 +1,28 @@
|
||||
local arg=arg[1]
|
||||
if arg=="-apkCode"then
|
||||
local code=require"version".apkCode
|
||||
print(code)
|
||||
elseif arg=="-code"then
|
||||
local str=require"version".code
|
||||
print(str)
|
||||
elseif arg=="-name"then
|
||||
local str=require"version".string
|
||||
print(str)
|
||||
elseif arg=="-release"then
|
||||
local str=require"version".string:gsub("V","",1)
|
||||
print(str)
|
||||
elseif arg=="-updateTitle"then
|
||||
local note=require"parts.updateLog"
|
||||
local p1=note:find("\n%d")+1
|
||||
local p2=note:find("\n",p1)-1
|
||||
note=note:sub(p1,p2)
|
||||
print(note)
|
||||
elseif arg=="-updateNote"then
|
||||
local note=require"parts.updateLog"
|
||||
local p1=note:find("\n",note:find("\n%d")+1)+1
|
||||
local p2=note:find("\n%d",p1+1)
|
||||
note=note:sub(p1,p2-2)
|
||||
:gsub(" ","- ")
|
||||
:gsub(" ","# ")
|
||||
print(note)
|
||||
end
|
||||
local arg=arg[1]
|
||||
if arg=="-apkCode"then
|
||||
local code=require"version".apkCode
|
||||
print(code)
|
||||
elseif arg=="-code"then
|
||||
local str=require"version".code
|
||||
print(str)
|
||||
elseif arg=="-name"then
|
||||
local str=require"version".string
|
||||
print(str)
|
||||
elseif arg=="-release"then
|
||||
local str=require"version".string:gsub("V","",1)
|
||||
print(str)
|
||||
elseif arg=="-updateTitle"then
|
||||
local note=require"parts.updateLog"
|
||||
local p1=note:find("\n%d")+1
|
||||
local p2=note:find("\n",p1)-1
|
||||
note=note:sub(p1,p2)
|
||||
print(note)
|
||||
elseif arg=="-updateNote"then
|
||||
local note=require"parts.updateLog"
|
||||
local p1=note:find("\n",note:find("\n%d")+1)+1
|
||||
local p2=note:find("\n%d",p1+1)
|
||||
note=note:sub(p1,p2-2)
|
||||
:gsub(" ","- ")
|
||||
:gsub(" ","# ")
|
||||
print(note)
|
||||
end
|
||||
|
||||
@@ -10,8 +10,6 @@ Powered by LÖVE, © 2006–2022 LÖVE Development Team.
|
||||
|
||||
Lua is free software distributed under the terms of the MIT license. Copyright © 1994–2022 by Lua.org, PUC-Rio.
|
||||
|
||||
SIMPLE LOVE LIGHTS is under a MIT License. Created by Dylan Hunn.
|
||||
|
||||
json.lua is copyrighted by rxi. © 2022 rxi.
|
||||
|
||||
IBM Plex is copyrighted by the International Business Machines Corporation. IBM and IBM Plex are trademarks of IBM Corp, registered in many jurisdictions worldwide. IBM Plex is licensed under the SIL Open Font License, Version 1.1.
|
||||
@@ -29,7 +27,7 @@ JetBrains Mono is copyrighted by the JetBrains Mono Project authors. JetBrains M
|
||||
"Windows", the Windows logo, "Xbox", Xbox logo, and "Microsoft" are registered trademarks of Microsoft Corporation in the United States of America and other countries or regions.
|
||||
|
||||
|
||||
The Apple logo, "Apple Inc.," iOS, iPadOS, macOS, iPhone, and Mac are registered trademarks of Apple Inc. in the United States of America and other countries or regions.
|
||||
The Apple logo, "Apple Inc.," iOS, iPadOS, macOS, iPhone, Mac, and Apple Arcade are registered trademarks of Apple Inc. in the United States of America and other countries or regions.
|
||||
|
||||
|
||||
"EA" and "Electronic Arts" are registered trademarks of Electronic Arts Inc. © 2022 Electronic Arts Inc.
|
||||
@@ -38,7 +36,7 @@ SEGA and the SEGA logo are registered trademarks of Sega Corporation. © 2022 Se
|
||||
|
||||
Oculus Quest is a registered trademark of Facebook Technologies, LLC. © Meta Platforms, Inc.
|
||||
|
||||
"Nintendo" is a registered trademarks of Nintendo Co., Ltd. © 2022 Nintendo Co., Ltd.
|
||||
"Nintendo" is a registered trademark of Nintendo Co., Ltd. © 2022 Nintendo Co., Ltd.
|
||||
|
||||
N3TWORK is a registered trademark of N3TWORK Inc. © 2022 N3TWORK Inc.
|
||||
|
||||
@@ -46,6 +44,8 @@ GoldWave is a registered trademark of GoldWave, Inc.
|
||||
|
||||
Linux is a registered trademark of Linus Torvalds.
|
||||
|
||||
Google is a registered trademark of Google LLC.
|
||||
|
||||
Touhou Project © Team Shanghai Alice 2002–2022.
|
||||
|
||||
All other trademarks, logos, and copyrights are the properties of their respective owners.
|
||||
|
||||
49
main.lua
@@ -30,7 +30,7 @@ SAVEDIR=fs.getSaveDirectory()
|
||||
|
||||
--Global Vars & Settings
|
||||
SFXPACKS={'chiptune'}
|
||||
VOCPACKS={'miya',--[['mono',]]'xiaoya','miku'}
|
||||
VOCPACKS={'miya','mono','xiaoya','miku'}
|
||||
FIRSTLAUNCH=false
|
||||
DAILYLAUNCH=false
|
||||
|
||||
@@ -51,8 +51,8 @@ local _LOADTIME_=TIME()
|
||||
--Load modules
|
||||
Z=require'Zframework'
|
||||
FONT.load{
|
||||
norm='parts/fonts/proportional.ttf',
|
||||
mono='parts/fonts/monospaced.ttf',
|
||||
norm='parts/fonts/proportional.otf',
|
||||
mono='parts/fonts/monospaced.otf',
|
||||
}
|
||||
FONT.setDefault('norm')
|
||||
FONT.setFallback('norm')
|
||||
@@ -180,7 +180,7 @@ Z.setOnFnKeys({
|
||||
end
|
||||
end
|
||||
end,
|
||||
function()print(WIDGET.getSelected()or"no widget selected")end,
|
||||
function()print(BG.locked)end,
|
||||
function()for k,v in next,_G do print(k,v)end end,
|
||||
function()if love['_openConsole']then love['_openConsole']()end end,
|
||||
})
|
||||
@@ -190,9 +190,6 @@ Z.setDebugInfo{
|
||||
{"Voices",VOC.getQueueCount},
|
||||
{"Audios",love.audio.getSourceCount},
|
||||
}
|
||||
Z.setOnResize(function(w,_)
|
||||
SHADER.warning:send('w',w*SCR.dpi)
|
||||
end)
|
||||
do--Z.setOnFocus
|
||||
local function task_autoSoundOff()
|
||||
while true do
|
||||
@@ -234,12 +231,18 @@ end
|
||||
Z.setOnQuit(destroyPlayers)
|
||||
|
||||
--Load settings and statistics
|
||||
TABLE.cover (loadFile('conf/user','-canSkip')or{},USER)
|
||||
TABLE.cover (loadFile('conf/unlock','-canSkip')or{},RANKS)
|
||||
TABLE.update(loadFile('conf/settings','-canSkip')or{},SETTING)
|
||||
TABLE.coverR(loadFile('conf/data','-canSkip')or{},STAT)
|
||||
TABLE.cover (loadFile('conf/key','-canSkip')or{},KEY_MAP)
|
||||
TABLE.cover (loadFile('conf/virtualkey','-json -canSkip')or{},VK_ORG)
|
||||
if
|
||||
not(
|
||||
pcall(TABLE.cover, loadFile('conf/user', '-json -canSkip')or loadFile('conf/user', '-luaon -canSkip')or{},USER) and
|
||||
pcall(TABLE.cover, loadFile('conf/unlock', '-json -canSkip')or loadFile('conf/unlock', '-luaon -canSkip')or{},RANKS) and
|
||||
pcall(TABLE.update,loadFile('conf/settings', '-json -canSkip')or loadFile('conf/settings', '-luaon -canSkip')or{},SETTING) and
|
||||
pcall(TABLE.coverR,loadFile('conf/data', '-json -canSkip')or loadFile('conf/data', '-luaon -canSkip')or{},STAT) and
|
||||
pcall(TABLE.cover, loadFile('conf/key', '-json -canSkip')or loadFile('conf/key', '-luaon -canSkip')or{},KEY_MAP) and
|
||||
pcall(TABLE.cover, loadFile('conf/virtualkey','-json -canSkip')or loadFile('conf/virtualkey','-luaon -canSkip')or{},VK_ORG)
|
||||
)
|
||||
then
|
||||
MES.new('error',"Be careful, an error accured when loading saving, some data was lost")
|
||||
end
|
||||
|
||||
--Initialize fields, sequence, missions, gameEnv for cutsom game
|
||||
local fieldData=loadFile('conf/customBoards','-string -canSkip')
|
||||
@@ -288,6 +291,15 @@ IMG.init{
|
||||
xiaoyaCH='media/image/characters/xiaoya.png',
|
||||
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
|
||||
mikuCH='media/image/characters/miku.png',
|
||||
z={
|
||||
character='media/image/characters/z_character.png',
|
||||
screen1='media/image/characters/z_screen1.png',
|
||||
screen2='media/image/characters/z_screen2.png',
|
||||
particle1='media/image/characters/z_particle1.png',
|
||||
particle2='media/image/characters/z_particle2.png',
|
||||
particle3='media/image/characters/z_particle3.png',
|
||||
particle4='media/image/characters/z_particle4.png',
|
||||
},
|
||||
electric='media/image/characters/electric.png',
|
||||
hbm='media/image/characters/hbm.png',
|
||||
|
||||
@@ -321,6 +333,7 @@ SKIN.load{
|
||||
{name="yinyang_scf",path='media/image/skin/yinyang_scf.png'},
|
||||
{name="cartooncup_earety",path='media/image/skin/cartooncup_earety.png'},
|
||||
{name="jelly_miya",path='media/image/skin/jelly_miya.png'},
|
||||
{name="guidetris_xmiao_lusisi",path='media/image/skin/guidetris_xmiao_lusisi.png'},
|
||||
{name="brick_notypey",path='media/image/skin/brick_notypey.png'},
|
||||
{name="gem_notypey",path='media/image/skin/gem_notypey.png'},
|
||||
{name="classic",path='media/image/skin/classic_unknown.png'},
|
||||
@@ -366,14 +379,12 @@ LANG.init('zh',
|
||||
{
|
||||
zh=require'parts.language.lang_zh',
|
||||
zh_trad=require'parts.language.lang_zh_trad',
|
||||
zh_full=require'parts.language.lang_zh_full',
|
||||
en=require'parts.language.lang_en',
|
||||
fr=require'parts.language.lang_fr',
|
||||
es=require'parts.language.lang_es',
|
||||
pt=require'parts.language.lang_pt',
|
||||
id=require'parts.language.lang_id',
|
||||
ja=require'parts.language.lang_ja',
|
||||
zh_grass=require'parts.language.lang_zh_grass',
|
||||
symbol=require'parts.language.lang_symbol',
|
||||
--1. Add language file to LANG folder;
|
||||
--2. Require it;
|
||||
@@ -489,9 +500,6 @@ do
|
||||
SETTING.dascut=SETTING.dascut+1
|
||||
needSave=true
|
||||
end
|
||||
if SETTING.vocPack=='mono'then
|
||||
SETTING.vocPack='miya'
|
||||
end
|
||||
if RANKS.stack_e then
|
||||
RANKS.stack_e=nil
|
||||
RANKS.stack_h=nil
|
||||
@@ -516,8 +524,8 @@ do
|
||||
fs.remove('record/rhythm_h.rec')
|
||||
fs.remove('record/rhythm_u.rec')
|
||||
end
|
||||
if RANKS.bigbang then
|
||||
RANKS.clearRush,RANKS.bigbang=RANKS.bigbang
|
||||
if RANKS.bigbang or RANKS.clearRush then
|
||||
fs.remove('record/clearRush.rec')
|
||||
fs.remove('record/bigbang.rec')
|
||||
end
|
||||
if STAT.version~=VERSION.code then
|
||||
@@ -550,6 +558,7 @@ do
|
||||
if type(SETTING.bg)~='string'then SETTING.bg='on'end
|
||||
if SETTING.skin[18]==10 then SETTING.skin[18]=4 end
|
||||
if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end
|
||||
if SETTING.locale=='zh_full' then SETTING.locale='zh' end
|
||||
if RANKS.infinite then RANKS.infinite=0 end
|
||||
if RANKS.infinite_dig then RANKS.infinite_dig=0 end
|
||||
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
|
||||
|
||||
BIN
media/effect/chiptune/achievement.ogg
Normal file
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 140 KiB |
BIN
media/image/characters/z_character.png
Normal file
|
After Width: | Height: | Size: 131 KiB |
BIN
media/image/characters/z_particle1.png
Normal file
|
After Width: | Height: | Size: 418 B |
BIN
media/image/characters/z_particle2.png
Normal file
|
After Width: | Height: | Size: 693 B |
BIN
media/image/characters/z_particle3.png
Normal file
|
After Width: | Height: | Size: 458 B |
BIN
media/image/characters/z_particle4.png
Normal file
|
After Width: | Height: | Size: 491 B |
BIN
media/image/characters/z_screen1.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
media/image/characters/z_screen2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
media/image/modeicon/big.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
media/image/modeicon/dig_eff.png
Normal file
|
After Width: | Height: | Size: 969 B |
BIN
media/image/modeicon/secret_grade.png
Normal file
|
After Width: | Height: | Size: 488 B |
BIN
media/image/modeicon/sprint_pento.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
media/image/modeicon/sprint_tri.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
media/image/skin/guidetris_xmiao_lusisi.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
@@ -97,8 +97,8 @@ do
|
||||
{131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S
|
||||
{131,1,2,-1, 0,0},{131,1,2, 0,-1,0},{131,1,2, 0, 0,0},--Z(misOrder)
|
||||
{313,2,2, 0, 0,0},{313,2,2,-1,-1,0},{313,2,2,-1, 0,0},--S(misOrder)
|
||||
{331,3,2, 0,-1,1},--J(farDown)
|
||||
{113,4,2,-1,-1,1},--L(farDown)
|
||||
{331,3,2, 0,-1,0},--J(farDown)
|
||||
{113,4,2,-1,-1,0},--L(farDown)
|
||||
{113,3,2,-1,-1,0},{113,3,0, 0, 0,0},--J
|
||||
{331,4,2, 0,-1,0},{331,4,0,-1, 0,0},--L
|
||||
{222,7,0,-1, 1,1},{222,7,0,-2, 1,1},{222,7,0, 0, 1,1},--I(high)
|
||||
@@ -306,7 +306,7 @@ do
|
||||
[03]={'+0+0','+0-1','+0+1','+0+2'},
|
||||
[30]={'+0+0','+0-1','+0+1','+0-2'},
|
||||
[12]={'+0+0','+0-1','+0+1','+0+2'},
|
||||
[21]={'+0+0','+0-1','+0-2','+0-2'},
|
||||
[21]={'+0+0','+0-1','+0+1','+0-2'},
|
||||
[32]={'+0+0','+1+0','-1+0'},
|
||||
[23]={'+0+0','-1+0','+1+0'},
|
||||
[02]={'+0+0','-1+1','+1-1'},
|
||||
|
||||
@@ -5,19 +5,15 @@ local shader=SHADER.aura
|
||||
local t
|
||||
|
||||
function back.init()
|
||||
t=math.random()*2600
|
||||
t=math.random()*260
|
||||
BG.resize(SCR.w,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
shader:send('w',SCR.W)
|
||||
shader:send('h',h*SCR.dpi)
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
|
||||
@@ -5,18 +5,14 @@ local shader=SHADER.grad1
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=math.random()*2600
|
||||
back.resize()
|
||||
end
|
||||
function back.resize()
|
||||
shader:send('w',SCR.W)
|
||||
t=math.random()*260
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
|
||||
@@ -5,18 +5,15 @@ local shader=SHADER.grad2
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=math.random()*2600
|
||||
t=math.random()*260
|
||||
BG.resize(nil,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
shader:send('h',h*SCR.dpi)
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--Customizable grey background
|
||||
local gc=love.graphics
|
||||
local back={}
|
||||
local brightness=.26
|
||||
local r,g,b=.26,.26,.26
|
||||
function back.draw()
|
||||
gc.clear(brightness,brightness,brightness)
|
||||
gc.clear(r,g,b)
|
||||
end
|
||||
function back.event(b)
|
||||
brightness=b
|
||||
function back.event(_r,_g,_b)
|
||||
r,g,b=_r,_g,_b
|
||||
end
|
||||
return back
|
||||
@@ -5,19 +5,15 @@ local shader=SHADER.rgb1
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=math.random()*2600
|
||||
t=math.random()*260
|
||||
BG.resize(SCR.w,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
shader:send('w',SCR.W)
|
||||
shader:send('h',h*SCR.dpi)
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
|
||||
@@ -5,19 +5,15 @@ local shader=SHADER.rgb2
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=math.random()*2600
|
||||
t=math.random()*260
|
||||
BG.resize(SCR.w,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
shader:send('w',SCR.W)
|
||||
shader:send('h',h*SCR.dpi)
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
t=(t+dt)%2600
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
shader:send('phase',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.setShader()
|
||||
|
||||
@@ -19,8 +19,8 @@ function back.draw()
|
||||
gc.clear(.08,.08,.084)
|
||||
end
|
||||
gc.push('transform')
|
||||
gc.translate(SCR.cx,SCR.cy+20*sin(t*.02))
|
||||
gc.scale(SCR.k)
|
||||
gc.replaceTransform(SCR.xOy_m)
|
||||
gc.translate(0,20*sin(t*.02))
|
||||
gc.scale(1.26,1.36)
|
||||
if -t%6.26<.1355 then
|
||||
gc.translate(60*sin(t*.26),100*sin(t*.626))
|
||||
|
||||
@@ -7,18 +7,36 @@ local pcall=pcall
|
||||
local ins,rem=table.insert,table.remove
|
||||
local yield=coroutine.yield
|
||||
local bot_cc={}
|
||||
function bot_cc:checkDest()
|
||||
function bot_cc:checkDest(b2b,atk,exblock,yomi)
|
||||
local dest=self.P.destFX
|
||||
if not dest then return end
|
||||
if not (dest.b2b==b2b and dest.attack==atk and dest.extra==exblock) then
|
||||
print('hope: '..dest.b2b..' '..dest.attack..' '..dest.extra)
|
||||
print('real: '..b2b..' '..atk..' '..exblock)
|
||||
print(yomi)
|
||||
self:lockWrongPlace()
|
||||
self.P.destFX=nil
|
||||
return
|
||||
end
|
||||
local CB=self.P.cur.bk
|
||||
for k=1,#dest,2 do
|
||||
local r=CB[dest[k+1]-self.P.curY+2]
|
||||
if not r or not r[dest[k]-self.P.curX+2]then
|
||||
print('wrong place')
|
||||
self:lockWrongPlace()
|
||||
self.P.destFX=nil
|
||||
return
|
||||
end
|
||||
end
|
||||
local should_spawn = self.P:getNextSpawn() - 1
|
||||
if dest.spawn ~= should_spawn then
|
||||
assert(dest.spawn > should_spawn)
|
||||
print('wrong spawn: should be '..dest.spawn..' but '..should_spawn)
|
||||
print('-- should only happen when camera is going down')
|
||||
self:lockWrongPlace()
|
||||
self.P.destFX=nil
|
||||
return
|
||||
end
|
||||
end
|
||||
function bot_cc:revive()
|
||||
TABLE.cut(self.P.holdQueue)
|
||||
@@ -37,10 +55,10 @@ function bot_cc:thread()
|
||||
ccBot:think()
|
||||
|
||||
--Poll keys
|
||||
local success,result,dest,hold,move
|
||||
local success,result,dest,hold,move,b2b,attack,extra,spawn
|
||||
repeat
|
||||
yield()
|
||||
success,result,dest,hold,move=pcall(ccBot.getMove,ccBot)
|
||||
success,result,dest,hold,move,b2b,attack,extra,spawn=pcall(ccBot.getMove,ccBot)
|
||||
until not success or result==0 or result==2
|
||||
if not success then break end
|
||||
if result==2 then
|
||||
@@ -50,6 +68,10 @@ function bot_cc:thread()
|
||||
dest[7],dest[8]=dest[2][1],dest[2][2]
|
||||
dest[1],dest[2]=dest[3][1],dest[3][2]
|
||||
dest[3],dest[4]=dest[4][1],dest[4][2]
|
||||
dest.b2b = b2b
|
||||
dest.attack = attack
|
||||
dest.extra = extra
|
||||
dest.spawn = spawn
|
||||
P.destFX=dest
|
||||
if hold then--Hold
|
||||
keys[1]=8
|
||||
@@ -82,8 +104,16 @@ function bot_cc:updateField()
|
||||
F[i],i=F0[y][x]>0,i+1
|
||||
end end
|
||||
while i<=400 do F[i],i=false,i+1 end
|
||||
if not pcall(self.ccBot.reset,self.ccBot,F,P.b2b>=100,P.combo)then
|
||||
local y = P:getNextSpawn()-1
|
||||
if not pcall(self.ccBot.reset,self.ccBot,F,P.b2b,P.combo,P.stat.pc,P.stat.row,y)then
|
||||
print("CC is dead ("..P.id..")","error")
|
||||
for y=#F0,1,-1 do
|
||||
local s=""
|
||||
for x=1,10 do
|
||||
s=s..(F[(y-1)*10+x] and "[]" or "..")
|
||||
end
|
||||
print(s)
|
||||
end
|
||||
end
|
||||
end
|
||||
function bot_cc:switch20G()
|
||||
|
||||
@@ -49,7 +49,7 @@ local botMeta={__index=_undefMethod}
|
||||
|
||||
local BOT={}
|
||||
|
||||
local AISpeed={60,50,40,30,20,14,10,6,4,3}
|
||||
local AISpeed={60,50,42,34,27,21,16,12,9,6}
|
||||
--[[
|
||||
arg={
|
||||
next: number of nexts
|
||||
|
||||
@@ -296,8 +296,10 @@ local L={
|
||||
p9Comb1= 0xF0250,
|
||||
p9Comb2= 0xF0251,
|
||||
frameComb= 0xF0252,
|
||||
s1j= 0xF0253,
|
||||
s1jBase= 0xF0254,
|
||||
s1jComb= 0xF0255,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for _,pack in next,L do
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
local function GetLevelStr(lvl)
|
||||
local list={"01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","00","0A","14","1E","28","32","3C","46","50","5A","64","6E","78","82","8C","96","A0","AA","B4","BE","C6","20","E6","20","06","21","26","21","46","21","66","21","86","21","A6","21","C6","21","E6","21","06","22","26","22","46","22","66","22","86","22","A6","22","C6","22","E6","22","06","23","26","23","85","A8","29","F0","4A","4A","4A","4A","8D","07","20","A5","A8","29","0F","8D","07","20","60","A6","49","E0","15","10","53","BD","D6","96","A8","8A","0A","AA","E8","BD","EA","96","8D","06","20","CA","A5","BE","C9","01","F0","1E","A5","B9","C9","05","F0","0C","BD","EA","96","38","E9","02","8D","06","20","4C","67","97","BD","EA","96","18","69","0C","8D","06","20","4C","67","97","BD","EA","96","18","69","06","8D","06","20","A2","0A","B1","B8","8D","07","20","C8","CA","D0","F7","E6","49","A5","49","C9","14","30","04","A9","20","85","49","60","A5","B1","29","03","D0","78","A9","00","85","AA","A6","AA","B5","4A","F0","5C","0A","A8","B9","EA","96","85","A8","A5","BE","C9","01","D0","0A","A5","A8","18","69","06","85","A8","4C","BD","97","A5","B9","C9","04","D0","0A","A5","A8","38","E9","02","85","A8","4C","BD","97","A5","A8"}
|
||||
list[0]="00"
|
||||
lvl=lvl%256
|
||||
return list[lvl]
|
||||
end
|
||||
local function GetGravity(lvl)
|
||||
lvl=lvl%256
|
||||
return
|
||||
lvl==0 and 48 or
|
||||
lvl==1 and 43 or
|
||||
lvl==2 and 38 or
|
||||
lvl==3 and 33 or
|
||||
lvl==4 and 28 or
|
||||
lvl==5 and 23 or
|
||||
lvl==6 and 18 or
|
||||
lvl==7 and 13 or
|
||||
lvl==8 and 8 or
|
||||
lvl==9 and 6 or
|
||||
lvl<13 and 5 or
|
||||
lvl<16 and 4 or
|
||||
lvl<19 and 3 or
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
@@ -15,8 +40,7 @@ return{
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
local r=P.modeData.target/10
|
||||
mStr(r<10 and 9 or r<30 and r or("%02x"):format(r*10-300),63,210)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
@@ -32,27 +56,22 @@ return{
|
||||
end
|
||||
end,
|
||||
task=function(P)
|
||||
P.modeData.lvl=9
|
||||
P.modeData.target=10
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
local D=P.modeData
|
||||
D.drought=P.lastPiece.id==7 and 0 or D.drought+1
|
||||
if P.stat.row>=D.target then
|
||||
if D.target==110 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=5,5
|
||||
P.gameEnv.sddas,P.gameEnv.sdarr=5,5
|
||||
if D.target>=100 then
|
||||
D.lvl=D.lvl+1
|
||||
end
|
||||
local dropSpd=GetGravity(D.lvl)
|
||||
if D.target==200 then P:win('finish') return
|
||||
elseif dropSpd~=P.gameEnv.drop then
|
||||
P.gameEnv.drop,P.gameEnv.lock=dropSpd,dropSpd
|
||||
P.gameEnv.sddas,P.gameEnv.sdarr=dropSpd,dropSpd
|
||||
SFX.play('warn_2',.7)
|
||||
elseif D.target==140 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=4,4
|
||||
P.gameEnv.sddas,P.gameEnv.sdarr=4,4
|
||||
SFX.play('warn_2',.7)
|
||||
elseif D.target==170 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=3,3
|
||||
P.gameEnv.sddas,P.gameEnv.sdarr=3,3
|
||||
SFX.play('warn_2',.7)
|
||||
elseif D.target==200 then
|
||||
P:win('finish')
|
||||
return
|
||||
else
|
||||
SFX.play('reach')
|
||||
end
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
local function GetLevelStr(lvl)
|
||||
local list={"01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","00","0A","14","1E","28","32","3C","46","50","5A","64","6E","78","82","8C","96","A0","AA","B4","BE","C6","20","E6","20","06","21","26","21","46","21","66","21","86","21","A6","21","C6","21","E6","21","06","22","26","22","46","22","66","22","86","22","A6","22","C6","22","E6","22","06","23","26","23","85","A8","29","F0","4A","4A","4A","4A","8D","07","20","A5","A8","29","0F","8D","07","20","60","A6","49","E0","15","10","53","BD","D6","96","A8","8A","0A","AA","E8","BD","EA","96","8D","06","20","CA","A5","BE","C9","01","F0","1E","A5","B9","C9","05","F0","0C","BD","EA","96","38","E9","02","8D","06","20","4C","67","97","BD","EA","96","18","69","0C","8D","06","20","4C","67","97","BD","EA","96","18","69","06","8D","06","20","A2","0A","B1","B8","8D","07","20","C8","CA","D0","F7","E6","49","A5","49","C9","14","30","04","A9","20","85","49","60","A5","B1","29","03","D0","78","A9","00","85","AA","A6","AA","B5","4A","F0","5C","0A","A8","B9","EA","96","85","A8","A5","BE","C9","01","D0","0A","A5","A8","18","69","06","85","A8","4C","BD","97","A5","B9","C9","04","D0","0A","A5","A8","38","E9","02","85","A8","4C","BD","97","A5","A8"}
|
||||
list[0]="00"
|
||||
lvl=lvl%256
|
||||
return list[lvl]
|
||||
end
|
||||
local function GetGravity(lvl)
|
||||
lvl=lvl%256
|
||||
return
|
||||
lvl==0 and 48 or
|
||||
lvl==1 and 43 or
|
||||
lvl==2 and 38 or
|
||||
lvl==3 and 33 or
|
||||
lvl==4 and 28 or
|
||||
lvl==5 and 23 or
|
||||
lvl==6 and 18 or
|
||||
lvl==7 and 13 or
|
||||
lvl==8 and 8 or
|
||||
lvl==9 and 6 or
|
||||
lvl<13 and 5 or
|
||||
lvl<16 and 4 or
|
||||
lvl<19 and 3 or
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
@@ -15,8 +40,7 @@ return{
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
local r=P.modeData.target/10
|
||||
mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
@@ -32,19 +56,22 @@ return{
|
||||
end
|
||||
end,
|
||||
task=function(P)
|
||||
P.modeData.lvl=18
|
||||
P.modeData.target=10
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
local D=P.modeData
|
||||
D.drought=P.lastPiece.id==7 and 0 or D.drought+1
|
||||
if P.stat.row>=D.target then
|
||||
if D.target==100 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=2,2
|
||||
P.gameEnv.sddas,P.gameEnv.sdarr=2,2
|
||||
if D.target>=100 then
|
||||
D.lvl=D.lvl+1
|
||||
end
|
||||
local dropSpd=GetGravity(D.lvl)
|
||||
if D.target==200 then P:win('finish') return
|
||||
elseif dropSpd~=P.gameEnv.drop then
|
||||
P.gameEnv.drop,P.gameEnv.lock=dropSpd,dropSpd
|
||||
P.gameEnv.sddas,P.gameEnv.sdarr=dropSpd,dropSpd
|
||||
SFX.play('warn_1')
|
||||
elseif D.target==200 then
|
||||
P:win('finish')
|
||||
return
|
||||
else
|
||||
SFX.play('reach')
|
||||
end
|
||||
|
||||
80
parts/eventsets/classic_l.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
local function GetLevelStr(lvl)
|
||||
local list={"01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","00","0A","14","1E","28","32","3C","46","50","5A","64","6E","78","82","8C","96","A0","AA","B4","BE","C6","20","E6","20","06","21","26","21","46","21","66","21","86","21","A6","21","C6","21","E6","21","06","22","26","22","46","22","66","22","86","22","A6","22","C6","22","E6","22","06","23","26","23","85","A8","29","F0","4A","4A","4A","4A","8D","07","20","A5","A8","29","0F","8D","07","20","60","A6","49","E0","15","10","53","BD","D6","96","A8","8A","0A","AA","E8","BD","EA","96","8D","06","20","CA","A5","BE","C9","01","F0","1E","A5","B9","C9","05","F0","0C","BD","EA","96","38","E9","02","8D","06","20","4C","67","97","BD","EA","96","18","69","0C","8D","06","20","4C","67","97","BD","EA","96","18","69","06","8D","06","20","A2","0A","B1","B8","8D","07","20","C8","CA","D0","F7","E6","49","A5","49","C9","14","30","04","A9","20","85","49","60","A5","B1","29","03","D0","78","A9","00","85","AA","A6","AA","B5","4A","F0","5C","0A","A8","B9","EA","96","85","A8","A5","BE","C9","01","D0","0A","A5","A8","18","69","06","85","A8","4C","BD","97","A5","B9","C9","04","D0","0A","A5","A8","38","E9","02","85","A8","4C","BD","97","A5","A8"}
|
||||
list[0]="00"
|
||||
lvl=lvl%256
|
||||
return list[lvl]
|
||||
end
|
||||
local function GetGravity(lvl)
|
||||
lvl=lvl%256
|
||||
return
|
||||
lvl==0 and 48 or
|
||||
lvl==1 and 43 or
|
||||
lvl==2 and 38 or
|
||||
lvl==3 and 33 or
|
||||
lvl==4 and 28 or
|
||||
lvl==5 and 23 or
|
||||
lvl==6 and 18 or
|
||||
lvl==7 and 13 or
|
||||
lvl==8 and 8 or
|
||||
lvl==9 and 6 or
|
||||
lvl<13 and 5 or
|
||||
lvl<16 and 4 or
|
||||
lvl<19 and 3 or
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
sddas=2,sdarr=2,
|
||||
irs=false,ims=false,
|
||||
drop=2,lock=2,
|
||||
wait=10,fall=25,
|
||||
freshLimit=0,
|
||||
fieldH=19,
|
||||
nextCount=1,
|
||||
holdCount=0,
|
||||
RS='Classic',
|
||||
sequence='rnd',
|
||||
noTele=true,
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
if P.modeData.drought<=14 then
|
||||
gc_setColor(1,1,1,P.modeData.drought/7-1)
|
||||
else
|
||||
local gb=P.modeData.drought<=21 and 2-P.modeData.drought/14 or .5
|
||||
gc_setColor(1,gb,gb)
|
||||
end
|
||||
setFont(50)
|
||||
mStr(P.modeData.drought,63,130)
|
||||
mDraw(MODES.drought_l.icon,63,200,nil,.5)
|
||||
end
|
||||
end,
|
||||
task=function(P)
|
||||
P.modeData.lvl=19
|
||||
P.modeData.target=10
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
local D=P.modeData
|
||||
D.drought=P.lastPiece.id==7 and 0 or D.drought+1
|
||||
if P.stat.row>=D.target then
|
||||
--if D.target>=200 then
|
||||
D.lvl=D.lvl+1
|
||||
--end
|
||||
local dropSpd=GetGravity(D.lvl)
|
||||
if dropSpd~=P.gameEnv.drop then
|
||||
P.gameEnv.drop,P.gameEnv.lock=dropSpd,dropSpd
|
||||
P.gameEnv.sddas,P.gameEnv.sdarr=dropSpd,dropSpd
|
||||
SFX.play('warn_1')
|
||||
else
|
||||
SFX.play('reach')
|
||||
end
|
||||
D.target=D.target+10
|
||||
end
|
||||
end
|
||||
}
|
||||
@@ -1,3 +1,28 @@
|
||||
local function GetLevelStr(lvl)
|
||||
local list={"01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","00","0A","14","1E","28","32","3C","46","50","5A","64","6E","78","82","8C","96","A0","AA","B4","BE","C6","20","E6","20","06","21","26","21","46","21","66","21","86","21","A6","21","C6","21","E6","21","06","22","26","22","46","22","66","22","86","22","A6","22","C6","22","E6","22","06","23","26","23","85","A8","29","F0","4A","4A","4A","4A","8D","07","20","A5","A8","29","0F","8D","07","20","60","A6","49","E0","15","10","53","BD","D6","96","A8","8A","0A","AA","E8","BD","EA","96","8D","06","20","CA","A5","BE","C9","01","F0","1E","A5","B9","C9","05","F0","0C","BD","EA","96","38","E9","02","8D","06","20","4C","67","97","BD","EA","96","18","69","0C","8D","06","20","4C","67","97","BD","EA","96","18","69","06","8D","06","20","A2","0A","B1","B8","8D","07","20","C8","CA","D0","F7","E6","49","A5","49","C9","14","30","04","A9","20","85","49","60","A5","B1","29","03","D0","78","A9","00","85","AA","A6","AA","B5","4A","F0","5C","0A","A8","B9","EA","96","85","A8","A5","BE","C9","01","D0","0A","A5","A8","18","69","06","85","A8","4C","BD","97","A5","B9","C9","04","D0","0A","A5","A8","38","E9","02","85","A8","4C","BD","97","A5","A8"}
|
||||
list[0]="00"
|
||||
lvl=lvl%256
|
||||
return list[lvl]
|
||||
end
|
||||
local function GetGravity(lvl)
|
||||
lvl=lvl%256
|
||||
return
|
||||
lvl==0 and 48 or
|
||||
lvl==1 and 43 or
|
||||
lvl==2 and 38 or
|
||||
lvl==3 and 33 or
|
||||
lvl==4 and 28 or
|
||||
lvl==5 and 23 or
|
||||
lvl==6 and 18 or
|
||||
lvl==7 and 13 or
|
||||
lvl==8 and 8 or
|
||||
lvl==9 and 6 or
|
||||
lvl<13 and 5 or
|
||||
lvl<16 and 4 or
|
||||
lvl<19 and 3 or
|
||||
lvl<29 and 2 or
|
||||
1
|
||||
end
|
||||
local gc_setColor=love.graphics.setColor
|
||||
return{
|
||||
das=16,arr=6,
|
||||
@@ -15,8 +40,7 @@ return{
|
||||
keyCancel={5,6},
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
local r=P.modeData.target/10
|
||||
mStr(r==1 and 29 or("%02x"):format(r*10-20),63,210)
|
||||
mStr(GetLevelStr(P.modeData.lvl),63,210)
|
||||
mText(TEXTOBJ.speedLV,63,290)
|
||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||
if P.modeData.drought>7 then
|
||||
@@ -32,18 +56,17 @@ return{
|
||||
end
|
||||
end,
|
||||
task=function(P)
|
||||
P.modeData.lvl=29
|
||||
P.modeData.target=10
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
local D=P.modeData
|
||||
D.drought=P.lastPiece.id==7 and 0 or D.drought+1
|
||||
if P.stat.row>=D.target then
|
||||
if D.target==100 then
|
||||
P:win('finish')
|
||||
return
|
||||
end
|
||||
D.target=D.target+10
|
||||
if D.target>=200 then P:win('finish') return end
|
||||
SFX.play('reach')
|
||||
D.lvl=D.lvl+1
|
||||
D.target=D.target+10
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
local function task_newBoard(P,init)
|
||||
local targetLine
|
||||
local F,L={},{1}
|
||||
--TODO
|
||||
P:pushNextList(L)
|
||||
|
||||
P.control=false
|
||||
if not init then for _=1,26 do YIELD()end end
|
||||
P.control=true
|
||||
|
||||
P.gameEnv.heightLimit=targetLine or #F
|
||||
P:pushLineList(F)
|
||||
end
|
||||
local function _check(P)
|
||||
P.gameEnv.heightLimit=P.gameEnv.heightLimit-P.lastPiece.row
|
||||
if P.gameEnv.heightLimit==0 then
|
||||
P.modeData.stage=P.modeData.stage+1
|
||||
if P.modeData.stage>=100 then
|
||||
P:win('finish')
|
||||
else
|
||||
P:newTask(task_newBoard)
|
||||
end
|
||||
end
|
||||
end
|
||||
return{
|
||||
sequence='none',
|
||||
RS="TRS",
|
||||
pushSpeed=5,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.stage,63,280)
|
||||
mText(TEXTOBJ.wave,63,350)
|
||||
end,
|
||||
hook_drop=_check,
|
||||
task=function(P)task_newBoard(P,true)P.fieldBeneath=0 end,--Just run one time at first to start first level
|
||||
}
|
||||
@@ -2,6 +2,15 @@ local gc=love.graphics
|
||||
local sectionName={"D","C","B","A","A+","S-","S","S+","S+","SS","SS","U","U","X","X+"}
|
||||
local passPoint=16
|
||||
|
||||
local function getRollGoal(P)
|
||||
-- get amount of grades needed for X+
|
||||
local rem=12.4-P.modeData.rankPoint/10
|
||||
if rem<=0 then return 0 end
|
||||
local goal=math.floor(rem)*4
|
||||
rem=rem%1
|
||||
return goal + (rem>0.3 and 4 or rem*10)
|
||||
end
|
||||
|
||||
return{
|
||||
drop=0,lock=15,
|
||||
wait=15,fall=6,
|
||||
@@ -29,6 +38,7 @@ return{
|
||||
setFont(75)
|
||||
mStr(P.stat.row,63,230)
|
||||
mStr(P.stat.clears[4],63,340)
|
||||
PLY.draw.drawTargetLine(P,getRollGoal(P))
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
if P.modeData.rankPoint<140-passPoint then--If Less then X
|
||||
|
||||
@@ -2,7 +2,15 @@ local gc=love.graphics
|
||||
local regretDelay=-1
|
||||
local int_grade=0
|
||||
local grade_points=0
|
||||
local int_grade_boosts={0,1,2,3,4,5,5,6,6,7,7,7,8,8,8,9,9,9,10,11,12,12,12,13,13,14,14,15,15,16,16,17}
|
||||
local int_grade_boosts={0,1,2,3,4,5,5,6,6,7,7,7,8,8,8,9,9,9,10,11,12,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26}
|
||||
local coolList={false,false,false,false,false,false,false,false,false}
|
||||
local regretList={false,false,false,false,false,false,false,false,false,false}
|
||||
local gradeList={
|
||||
"9","8","7","6","5","4","3","2","1",
|
||||
"S1","S2","S3","S4","S5","S6","S7","S8","S9",
|
||||
"m1","m2","m3","m4","m5","m6","m7","m8","m9",
|
||||
"M","MK","MV","MO","MM-","MM","MM+","GM-","GM","GM+","TM-","TM","TM+"
|
||||
}
|
||||
local spd_lvl=0
|
||||
local cools=0
|
||||
local regrets=0
|
||||
@@ -66,15 +74,9 @@ local function getDas(l)
|
||||
6
|
||||
end
|
||||
local function getGrade()
|
||||
local gradeList={
|
||||
"9","8","7","6","5","4","3","2","1",
|
||||
"S1","S2","S3","S4","S5","S6","S7","S8","S9",
|
||||
"m1","m2","m3","m4","m5","m6","m7","m8","m9",
|
||||
"M","MK","MV","MO","MM-","MM","MM+","GM-","GM","GM+","TM-","TM","TM+"
|
||||
}
|
||||
if int_grade==nil then int_grade=0 end
|
||||
if rollGrades==nil then rollGrades=0 end
|
||||
return gradeList[math.min(math.floor(int_grade_boosts[int_grade+1]+rollGrades+cools+1-regrets),#gradeList)]
|
||||
return gradeList[math.max(math.min(math.floor(int_grade_boosts[math.min(int_grade+1,#int_grade_boosts)]+rollGrades+cools+1-regrets),#gradeList),1)]
|
||||
end
|
||||
local function addGrade(row, cmb, lvl) -- IGS = internal grade system
|
||||
if row<1 then return end
|
||||
@@ -102,41 +104,78 @@ local function addGrade(row, cmb, lvl) -- IGS = internal grade system
|
||||
int_grade=int_grade+1
|
||||
end
|
||||
end
|
||||
local function getRollGoal()
|
||||
-- get amount of grades needed for TM+
|
||||
local rem=#gradeList-(int_grade_boosts[math.min(int_grade+1,#int_grade_boosts)]+rollGrades+cools+1-regrets)
|
||||
if rem<=0 then return 0 end
|
||||
local goal=0
|
||||
if cools>8 then
|
||||
goal=math.floor(rem)*4
|
||||
rem=rem%1
|
||||
return goal + (rem>0.3 and 4 or rem*10)
|
||||
else
|
||||
goal=math.floor(rem/0.26)*4
|
||||
rem=rem%0.26
|
||||
return goal + (rem>0.12 and 4 or rem*25)
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
drop=64,
|
||||
lock=30,
|
||||
wait=23,
|
||||
fall=25,
|
||||
noTele=true,
|
||||
keyCancel={10,11,12,14,15,16,17,18,19,20},
|
||||
das=16,arr=1,
|
||||
minsdarr=1,
|
||||
ihs=true,irs=true,ims=false,
|
||||
mesDisp=function(P)
|
||||
gc.setColor(1,1,1,1)
|
||||
setFont(45)
|
||||
mText(TEXTOBJ.grade,63,180)
|
||||
setFont(62)
|
||||
mStr(getGrade(),63,110)
|
||||
setFont(60)
|
||||
mStr(getGrade(),63,110) -- draw grade
|
||||
for i=1,10 do -- draw cool/regret history
|
||||
if not (coolList[i] or regretList[i]) then -- neither cool nor regret
|
||||
gc.setColor(0.6,0.6,0.6,P.modeData.pt<(i-1)*100 and 0.25 or 0.6)
|
||||
else
|
||||
gc.setColor(regretList[i] and 1 or 0, coolList[i] and 1 or 0, 0, 1)
|
||||
end
|
||||
gc.circle('fill',-10,150+i*25,10)
|
||||
gc.setColor(1,1,1,1)
|
||||
end
|
||||
if isInRoll then
|
||||
setFont(20)
|
||||
mStr(("%.1f"):format(rollGrades),63,208)
|
||||
mStr(("%.1f"):format(rollGrades),63,208) -- draw roll grades
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(.98,.98,.98,.8)
|
||||
gc.rectangle('line',0,240,126,80,4)
|
||||
gc.setColor(.98,.98,.98,.4)
|
||||
gc.rectangle('fill',0+2,240+2,126-4,80-4,2)
|
||||
gc.rectangle('fill',0+2,240+2,126-4,80-4,2) -- draw time box
|
||||
setFont(45)
|
||||
local t=(P.stat.frame-prevSectTime)/60
|
||||
local T=("%.1f"):format(60-t)
|
||||
gc.setColor(COLOR.dH)
|
||||
mStr(T,65,250)
|
||||
mStr(T,65,250) -- draw time
|
||||
t=t/60
|
||||
gc.setColor(1.7*t,2.3-2*t,.3)
|
||||
mStr(T,63,248)
|
||||
PLY.draw.drawTargetLine(P,getRollGoal())
|
||||
else
|
||||
-- draw level counter
|
||||
setFont(20)
|
||||
mStr(grade_points,63,208)
|
||||
setFont(45)
|
||||
if coolList[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(0,1,0,1)
|
||||
elseif P.stat.frame-prevSectTime > cool_time[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(0.7,0.7,0.7,1)
|
||||
end
|
||||
if coolList[math.ceil(P.modeData.pt/100+0.01)] and regretList[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(1,1,0,1)
|
||||
elseif regretList[math.ceil(P.modeData.pt/100+0.01)] then
|
||||
gc.setColor(1,0,0,1)
|
||||
end
|
||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||
end
|
||||
end,
|
||||
@@ -173,6 +212,7 @@ return{
|
||||
if D.pt%100>70 and not prevDrop70 then
|
||||
if P.stat.frame-prevSectTime < cool_time[math.ceil(D.pt/100)] then
|
||||
cools=cools+1
|
||||
coolList[math.ceil(D.pt/100)]=true
|
||||
P:_showText("COOL!",0,-120,80,'fly',.8)
|
||||
nextSpeedUp=true
|
||||
end
|
||||
@@ -214,7 +254,7 @@ return{
|
||||
BG.set('lightning')
|
||||
elseif s>9 then
|
||||
if cools>8 then
|
||||
E.lockFX=E.lockFX>1 and 1 or E.lockFX
|
||||
if E.lockFX and E.lockFX>1 then E.lockFX=1 end
|
||||
P:setInvisible(5)
|
||||
else
|
||||
P:setInvisible(300)
|
||||
@@ -245,34 +285,41 @@ return{
|
||||
isInRollTrans=false
|
||||
prevDrop70=false
|
||||
nextSpeedUp=false
|
||||
local decayRate={125,80,80,50,45,45,45,40,40,40,40,40,30,30,30,20,20,20,20,20,15,15,15,15,15,15,15,15,15,15,10,10,10}
|
||||
coolList={false,false,false,false,false,false,false,false,false}
|
||||
regretList={false,false,false,false,false,false,false,false,false,false}
|
||||
local decayRate={125,80,80,50,45,45,45,40,40,40,40,40,30,30,30,20,20,20,20,20,15,15,15,15,15,15,15,15,15,15,10,10,10,9,9,9,8,8,8,7,7,7,6}
|
||||
local decayTimer=0
|
||||
while true do
|
||||
YIELD()
|
||||
P.modeData.grade=getGrade()
|
||||
P.modeData.gradePts=math.min(math.floor(int_grade_boosts[int_grade+1]+rollGrades+cools-regrets),36)
|
||||
P.modeData.gradePts=math.max(math.min(math.floor(int_grade_boosts[math.min(int_grade+1,#int_grade_boosts)]+rollGrades+cools+1-regrets),#gradeList),1)
|
||||
if P.stat.frame-prevSectTime > reg_time[math.ceil(P.modeData.pt/100+0.01)] and not (isInRoll or isInRollTrans) then
|
||||
regretList[math.ceil(P.modeData.pt/100)]=true
|
||||
end
|
||||
if regretDelay>-1 then
|
||||
regretDelay=regretDelay-1
|
||||
if regretDelay==-1 then P:_showText("REGRET!!",0,-120,80,'beat',.8) end
|
||||
end
|
||||
if isInRollTrans then
|
||||
if P.waiting==220 then
|
||||
if P.waiting>=220 then
|
||||
--Make field invisible
|
||||
for j=1,#P.field do for i=1,10 do
|
||||
P.visTime[j][i]=P.visTime[j][i]-0.001
|
||||
for y=1,#P.field do for x=1,10 do
|
||||
P.visTime[y][x]=P.waiting-220
|
||||
end end
|
||||
elseif P.waiting==190 then
|
||||
for _=#P.field,1,-1 do
|
||||
P.field[_],P.visTime[_]=nil
|
||||
end
|
||||
TABLE.cut(P.field)
|
||||
TABLE.cut(P.visTime)
|
||||
elseif P.waiting==180 then
|
||||
playReadySFX(3,3)
|
||||
P:_showText("3",0,-120,120,'fly',1)
|
||||
elseif P.waiting==120 then
|
||||
playReadySFX(2,2)
|
||||
playReadySFX(2,1)
|
||||
P:_showText("2",0,-120,120,'fly',1)
|
||||
elseif P.waiting==60 then
|
||||
playReadySFX(1,1)
|
||||
P:_showText("1",0,-120,120,'fly',1)
|
||||
elseif P.waiting==1 then
|
||||
playReadySFX(0,0)
|
||||
playReadySFX(0,1)
|
||||
isInRollTrans=false
|
||||
isInRoll=true
|
||||
BGM.play('hope')
|
||||
@@ -282,12 +329,15 @@ return{
|
||||
end
|
||||
if P.waiting<=0 and grade_points>0 and not isInRoll then
|
||||
decayTimer=decayTimer+1
|
||||
if decayTimer>=decayRate[int_grade+1] then
|
||||
if decayTimer>=decayRate[math.min(int_grade+1,#decayRate)] then
|
||||
decayTimer=0
|
||||
grade_points=grade_points-1
|
||||
end
|
||||
elseif isInRoll and P.stat.frame>=prevSectTime+3600 then
|
||||
elseif isInRoll and P.stat.frame>=prevSectTime+3599 then
|
||||
rollGrades=rollGrades+(cools>8 and 1.6 or 0.5)
|
||||
P.modeData.grade=getGrade()
|
||||
P.modeData.gradePts=math.min(math.floor(int_grade_boosts[math.min(int_grade+1,#int_grade_boosts)]+rollGrades+cools+1-regrets),#gradeList)
|
||||
YIELD()
|
||||
P:win('finish')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,13 @@ return{
|
||||
local D=P.modeData
|
||||
|
||||
local c=#P.clearedRow
|
||||
if c==0 and D.pt%100==99 then return end
|
||||
if c==0 and D.pt%100==99 then
|
||||
if D.pt<1000 then
|
||||
hidetimer=0-inv_wait[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]
|
||||
if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]end
|
||||
end
|
||||
return
|
||||
end
|
||||
local s=c<3 and c+1 or c==3 and 5 or 7
|
||||
if P.combo>7 then s=s+2
|
||||
elseif P.combo>3 then s=s+1
|
||||
@@ -50,6 +56,8 @@ return{
|
||||
elseif s==7 then
|
||||
E.das=6
|
||||
BGM.play('far')
|
||||
elseif s==8 then
|
||||
BG.set('none')
|
||||
elseif s==10 then
|
||||
D.pt=1000
|
||||
P:win('finish')
|
||||
|
||||
54
parts/eventsets/secret_grade.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
local gc_setColor,gc_draw=love.graphics.setColor,love.graphics.draw
|
||||
local ply_applyField=PLY.draw.applyField
|
||||
local function GetOpenHole(num)
|
||||
return -math.abs(((num-1) % 18)-9)+10
|
||||
end
|
||||
local F={}
|
||||
local ranks={"10","9","8","7","6","5","4","3","2","1","S1","S2","S3","S4","S5","S6","S7","S8","S9","GM","GM+","TM","TM+","TM+₂","TM+₃", "TM+₄","TM+₅"}
|
||||
-- lines: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
||||
return{
|
||||
fkey1=function(P)P.modeData.showGuide=not P.modeData.showGuide end,
|
||||
mesDisp=function(P)
|
||||
mText(TEXTOBJ.grade,63,190)
|
||||
setFont(55)
|
||||
mStr(ranks[P.modeData.rankPts],63,125)
|
||||
|
||||
ply_applyField(P)
|
||||
local mark=TEXTURE.puzzleMark
|
||||
gc_setColor(1,1,1)
|
||||
if P.modeData.showGuide then
|
||||
for y=1,P.modeData.rankPts+1 do for x=1,10 do
|
||||
local T=F[y][x]
|
||||
if T~=0 then
|
||||
gc_draw(mark[T],30*x-30,600-30*y)
|
||||
end
|
||||
end end
|
||||
end
|
||||
PLY.draw.cancelField(P)
|
||||
end,
|
||||
task=function(P)
|
||||
P.modeData.rankPts=1
|
||||
P.modeData.showGuide=true
|
||||
for i=1,50 do
|
||||
F[i] = {}
|
||||
local h=GetOpenHole(i)
|
||||
for j=1,10 do
|
||||
F[i][j]=h==j and -1 or 21
|
||||
end
|
||||
end
|
||||
end,
|
||||
hook_drop=function(P)
|
||||
local D=P.modeData
|
||||
D.rankPts=1
|
||||
for i=1,#P.field do
|
||||
local h=GetOpenHole(i)
|
||||
for j=1,10 do
|
||||
if P.field[i][j]>0 and h==j then return end
|
||||
if P.field[i][j]==0 and h~=j then return end
|
||||
end
|
||||
if i==#P.field then return end
|
||||
if P.field[i+1][h]==0 then return end
|
||||
D.rankPts=D.rankPts+1
|
||||
end
|
||||
end
|
||||
}
|
||||
BIN
parts/fonts/japan.otf
Normal file
BIN
parts/fonts/monospaced.otf
Normal file
BIN
parts/fonts/proportional.otf
Normal file
@@ -165,17 +165,15 @@ do--function applySettings()
|
||||
BG.set()
|
||||
elseif SETTING.bg=='off'then
|
||||
BG.unlock()
|
||||
BG.set('gray')
|
||||
BG.send(SETTING.bgAlpha)
|
||||
BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
BG.lock()
|
||||
elseif SETTING.bg=='custom'then
|
||||
if love.filesystem.getInfo('conf/customBG')then
|
||||
local res,image=pcall(gc.newImage,love.filesystem.newFile('conf/customBG'))
|
||||
if res then
|
||||
BG.unlock()
|
||||
BG.set('custom')
|
||||
gc.setDefaultFilter('linear','linear')
|
||||
BG.send(SETTING.bgAlpha,image)
|
||||
BG.set('custom',SETTING.bgAlpha,image)
|
||||
gc.setDefaultFilter('nearest','nearest')
|
||||
BG.lock()
|
||||
else
|
||||
@@ -184,8 +182,7 @@ do--function applySettings()
|
||||
else--Switch off when custom BG not found
|
||||
SETTING.bg='off'
|
||||
BG.unlock()
|
||||
BG.set('gray')
|
||||
BG.send(SETTING.bgAlpha)
|
||||
BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
|
||||
BG.lock()
|
||||
end
|
||||
end
|
||||
@@ -714,7 +711,7 @@ do--function resetGameData(args)
|
||||
local gameSetting={
|
||||
--Tuning
|
||||
'das','arr','dascut','dropcut','sddas','sdarr',
|
||||
'ihs','irs','ims','RS','FTLock',
|
||||
'ihs','irs','ims','RS',
|
||||
|
||||
--System
|
||||
'skin','face',
|
||||
@@ -943,7 +940,7 @@ do--CUS/SETXXX(k)
|
||||
local warnList={
|
||||
'das','arr','dascut','dropcut','sddas','sdarr',
|
||||
'ihs','irs','ims','RS',
|
||||
'FTLock','frameMul','highCam',
|
||||
'frameMul','highCam',
|
||||
'VKSwitch','VKIcon','VKTrack','VKDodge',
|
||||
'simpMode',
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ EVENTSETS={
|
||||
'backfire_120','backfire_60','backfire_30','backfire_0',
|
||||
'checkAttack_100',
|
||||
'checkLine_10','checkLine_20','checkLine_40','checkLine_100','checkLine_200','checkLine_400','checkLine_1000',
|
||||
'classic_e','classic_h','classic_u',
|
||||
'classic_e','classic_h','classic_l','classic_u',
|
||||
'defender_n','defender_l',
|
||||
'dig_10l','dig_40l','dig_100l','dig_400l',
|
||||
'dig_h','dig_u',
|
||||
@@ -536,7 +536,6 @@ do--Game data tables
|
||||
ROOMENV={
|
||||
--Room config
|
||||
capacity=10,
|
||||
FTLock=true,
|
||||
|
||||
--Basic
|
||||
drop=30,lock=60,
|
||||
@@ -591,7 +590,6 @@ do--Userdata tables
|
||||
ihs=true,irs=true,ims=true,
|
||||
holdMode='hold',
|
||||
RS='TRS',
|
||||
FTLock=true,
|
||||
|
||||
--System
|
||||
reTime=2,
|
||||
|
||||