游戏王残局简化版

Check-in [a8787a258d]
Login

Check-in [a8787a258d]

Overview
Comment:逐步深入
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a8787a258dedb45b59dcb051a1eff5a9dbe06a1a9becc2539c2261868856ee39
User & Date: 顽雨沉风 on 2024-02-03 11:34:37
Other Links: manifest | tags
Context
2024-02-03
11:52
有字易混,故用真 check-in: d8075946c6 user: 顽雨沉风 tags: trunk
11:34
逐步深入 check-in: a8787a258d user: 顽雨沉风 tags: trunk
09:54
完成 check-in: 81015f535b user: 顽雨沉风 tags: trunk
Changes

Modified 残局文料/残局改名.lua from [2610dc5efe] to [86e9ea024a].

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
27
28
29
30
31






32
33
34
35
36
37
38
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
27
28
29
30
31
32
33
34
35
36
37
38
39

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64






+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







+





-
+











+
+
+
+
+
+







package.path = [[.\lua_lib\?.lua;]] .. package.path
package.cpath = [[.\lua_lib\?.dll;]] .. package.cpath
local 字集码互转库 = require("u8_to_a")
local u8 = 字集码互转库.u8_to_a
local f = require(u8("常用库"))
local 简文件库 = require("lfs")
local 简数据库库 = require("lsqlite3")
local d_5 = {}
--~ 卡编排
function d_5.筛卡对_一维(o1_8)
  return f.历排(o1_8, d_5.筛卡对)
  end
--~ 卡编
function d_5.筛卡对(o1_8)
  for o1_5 in 数据库:nrows("select * from datas where id = " .. o1_8) do
    return o1_5
    end
  end
--~ 文
function d_5.局筛卡编(o1)
  local k1_9
  --~ 卡编排
  k1_9 = f.历文(o1, string.gmatch, "[^\n]+")
  k1_9 = f.历排(k1_9, f.全筛前缀, "Debug.AddCard")
  return f.历排(k1_9, string.match, "[0-9]+")
  end
--~ 文
function d_5.局筛则数(o1)
  local k1
  local k1_9
  --~ 则数排
  k1_9 = f.历文(o1, string.gmatch, "[^\n]+")
  k1_9 = f.历排(k1_9, f.全筛前缀, "Debug.ReloadFieldBegin")
  --~ 则数
  k1 = string.match(k1_9[1], "[0-9]")
  return k1 or 3
  end
--~ 目对
function d_5.残局改名(o1)
  local k1_9, k2_9
  local k1_9, k2_9, k3_9, k4_9, k5_9
  --~ 文件排
  k1_9 = f.历文(o1.文件目, 简文件库.dir)
  k1_9 = f.历排(k1_9, f.全筛后缀, ".lua")
  for o2 = 1, #k1_9 do
    k1_9[o2] = f.加前缀(k1_9[o2], o1.文件目)
    k1_9[o2] = f.读文件(k1_9[o2])
    k1_9[o2] = string.gsub(k1_9[o2], "%-%-" .. "%[(=*)%[" .. ".-" .. "%]%1%]", "")
    k1_9[o2] = string.gsub(k1_9[o2], "%-%-" .. "[^\n]*", "")
    end
  --~ 则数排
  k2_9 = f.历排(k1_9, d_5.局筛则数)
  --~ 各文件的卡编排
  k3_9 = f.历排(k1_9, d_5.局筛卡编)
  _G.数据库 = 简数据库库.open(o1.数据库路)
  --~ 各文件的卡对排
  k4_9 = f.历排(k3_9, d_5.筛卡对_一维)
  k5_9 = f.历排(k4_9, d_5.筛有效果的卡数)
  end
d_5.目对 = {
  ["文件目"] = "../single/"
  , ["数据库路"] = [[D:\install\YGOPro\cards.cdb]]
  }
for o1, o2 in pairs(d_5.目对) do
  d_5.目对[o1] = f.操类(o2, "string", u8)