Lines of
残局文料/残局改名.lua
from check-in d8075946c6
that are changed by the sequence of edits moving toward
check-in b2d67bda64:
1: package.path = [[.\lua_lib\?.lua;]] .. package.path
2: package.cpath = [[.\lua_lib\?.dll;]] .. package.cpath
3: local 字集码互转库 = require("u8_to_a")
4: local u8 = 字集码互转库.u8_to_a
5: local f = require(u8("常用库"))
6: local 简文件库 = require("lfs")
7: local 简数据库库 = require("lsqlite3")
8: local d_5 = {}
d8075946c6 2024-02-03 9: function d_5.筛有效果卡的卡数(o1_8)
10: local k1_8
d8075946c6 2024-02-03 11: f.历排(o1_8, d_5.局滤)
12: end
13: --~ 卡编排
14: function d_5.筛卡对_一维(o1_8)
15: return f.历排(o1_8, d_5.筛卡对)
16: end
17: --~ 卡编
18: function d_5.筛卡对(o1_8)
19: for o1_5 in 数据库:nrows("select * from datas where id = " .. o1_8) do
20: return o1_5
21: end
22: end
23: --~ 文
24: function d_5.局筛卡编(o1)
25: local k1_9
26: --~ 卡编排
27: k1_9 = f.历文(o1, string.gmatch, "[^\n]+")
28: k1_9 = f.历排(k1_9, f.全筛前缀, "Debug.AddCard")
29: return f.历排(k1_9, string.match, "[0-9]+")
30: end
31: --~ 文
32: function d_5.局筛则数(o1)
33: local k1
34: local k1_9
35: --~ 则数排
36: k1_9 = f.历文(o1, string.gmatch, "[^\n]+")
37: k1_9 = f.历排(k1_9, f.全筛前缀, "Debug.ReloadFieldBegin")
38: --~ 则数
39: k1 = string.match(k1_9[1], "[0-9]")
40: return k1 or 3
41: end
42: --~ 目对
43: function d_5.残局改名(o1)
44: local k1_9, k2_9, k3_9, k4_9, k5_9
45: --~ 文件排
46: k1_9 = f.历文(o1.文件目, 简文件库.dir)
47: k1_9 = f.历排(k1_9, f.全筛后缀, ".lua")
48: for o2 = 1, #k1_9 do
49: k1_9[o2] = f.加前缀(k1_9[o2], o1.文件目)
50: k1_9[o2] = f.读文件(k1_9[o2])
51: k1_9[o2] = string.gsub(k1_9[o2], "%-%-" .. "%[(=*)%[" .. ".-" .. "%]%1%]", "")
52: k1_9[o2] = string.gsub(k1_9[o2], "%-%-" .. "[^\n]*", "")
53: end
54: --~ 则数排
55: k2_9 = f.历排(k1_9, d_5.局筛则数)
56: --~ 各文件的卡编排
57: k3_9 = f.历排(k1_9, d_5.局筛卡编)
58: _G.数据库 = 简数据库库.open(o1.数据库路)
59: --~ 各文件的卡对排
60: k4_9 = f.历排(k3_9, d_5.筛卡对_一维)
61: --~ 真效果卡的卡数排
d8075946c6 2024-02-03 62: k5_9 = f.历排(k4_9, d_5.筛真效果卡的卡数)
63: end
64: d_5.目对 = {
65: ["文件目"] = "../single/"
66: , ["数据库路"] = [[D:\install\YGOPro\cards.cdb]]
67: }
68: for o1, o2 in pairs(d_5.目对) do
69: d_5.目对[o1] = f.操类(o2, "string", u8)
70: end
71: d_5.残局改名(d_5.目对)