游戏王残局简化版

Check-in [a2e76b01c2]
Login

Check-in [a2e76b01c2]

Overview
Comment:(/ω\)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a2e76b01c28b541543ff05d67b424caaeb422a3fe76dcb2fbca48a71e994f50f
User & Date: 顽雨沉风 on 2024-01-26 08:01:22
Other Links: manifest | tags
Context
2024-01-26
10:40
(/ω\) check-in: 19823fddda user: 顽雨沉风 tags: trunk
08:01
(/ω\) check-in: a2e76b01c2 user: 顽雨沉风 tags: trunk
2024-01-24
14:30
(/ω\) check-in: 9f09285374 user: 顽雨沉风 tags: trunk
Changes

Modified script/c0.lua from [96155a3656] to [1e090219ec].

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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

208
209
210
211
212
213
214

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

256
257
258
259
260

261
262
263
264
265
266
267

268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

local str = {}
local math = math
local string = string
local table = table
_G.fun = {}
---------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
str["效果卡的种类表"] = {
  TYPE_SPELL
  , TYPE_TRAP
  , TYPE_EFFECT
  }
str["无效果灵摆怪兽表"] = {
  28363749
  , 19474136
  , 17390179
  , 83980492
  }
cache_1 = 0
cache_1 = cache_1 + LOCATION_HAND
+ LOCATION_MZONE
+ LOCATION_SZONE
+ LOCATION_GRAVE
+ LOCATION_REMOVED
str["除卡组与额外卡组以外的区域"] = cache_1
cache_1 = cache_1 + LOCATION_DECK
+ LOCATION_EXTRA
str["所有区域"] = cache_1
--第一层-------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
fun["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
Debug.ReloadFieldBegin = function(str_1, str_2) --{
  str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
  str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
  str["无AI"] = str_1 & DUEL_SIMPLE_AI
  str["规则表"] = {
    [3] = "大师3 "
    , [4] = "新大师 "
    , [5] = "大师2020 "
    }
  if str_2 then --{
    str["规则"] = str["规则表"][str_2]
    --}
  else --{
    str["规则"] = str["规则表"][5]
    end --}
  fun["Debug.ReloadFieldBegin"](str_1, str_2)
  end --}
fun["一_随机抽卡"] = function(str_1) --{
  str["随机抽卡的数量"] = str_1
  str["效果"] = Effect.GlobalEffect()
  str["效果"]:SetType(EFFECT_TYPE_FIELD
  + EFFECT_TYPE_CONTINUOUS)
  str["效果"]:SetCode(EVENT_ADJUST)
  str["效果"]:SetCondition(aux.TRUE)
  function cache_1(effect_event
  , player_who_activate_the_effect) --{
    Duel.ShuffleDeck(0)
    Duel.Draw(0,str_1,REASON_RULE)
    effect_event:Reset()
    end --}
  str["效果"]:SetOperation(cache_1)
  Duel.RegisterEffect(str["效果"]
  , 0)
  end --}
fun["一_失败得分"] = function() --{
  str["失败得分表"] = {
    [0] = "神龙之圣刻印"
    , [100] = "调和支援士"
    , [200] = "深渊的暗杀者"
    , [300] = "救援猫"
    , [400] = "注射天使 莉莉"
    , [500] = "不知火的隐者"
    , [600] = "影依猎鹰"
    , [700] = "铁兽战线 姬特"
    , [800] = "召唤僧"
    , [900] = "恩底弥翁的仆从"
    , [1000] = "机壳工具 丑恶"
    , [1100] = "欧尼斯特"
    , [1200] = "次元吸引者"
    , [1300] = "黑羽-疾风之盖尔"
    , [1400] = "加农炮兵"
    , [1500] = "教导的大神祗官"
    , [1600] = "地中族导师"
    , [1700] = "相剑师-莫邪"
    , [1800] = "宝玉兽-青玉飞马"
    , [1900] = "命运英雄 血魔-D"
    , [2000] = "流离的狮鹫骑手"
    , [2100] = "电子龙"
    , [2200] = "古遗物-死镰"
    , [2300] = "能朋克 调狐"
    , [2400] = "俱舍怒威族·芬里尔狼"
    , [2500] = "黑魔术师"
    , [2600] = "雅典娜"
    , [2700] = "暗黑界的龙神 格拉法"
    , [2800] = "魔导兽 刻耳柏洛斯尊主"
    , [2900] = "元素英雄 永生侠"
    , [3000] = "青眼白龙"
    }
  str["对方玩家的初始生命值"] = Duel.GetLP(1)
  str["效果"] = Effect.GlobalEffect()
  str["效果"]:SetType(EFFECT_TYPE_FIELD
  + EFFECT_TYPE_CONTINUOUS)
  str["效果"]:SetCode(EVENT_PHASE_START+PHASE_END)
  function cache_1(effect_event
  , player_who_activate_the_effect) --{
    cache_1 = Duel.GetLP(1) - str["对方玩家的初始生命值"]
    if cache_1 > 0 then --{
      return
      --}
    else --{
      cache_1 = math.abs(cache_1) / (str["对方玩家的初始生命值"] - 100)
      cache_1 = math.tointeger(cache_1 * 3000 // 100 * 100)
      end --}
    if cache_1 > 3000 then --{
      --}
    else --{

      Debug.ShowHint("这局,您的得分是 "
      .. cache_1
      .. " 分!\n处于「"
      .. str["失败得分表"][cache_1]
      .. "」级别!")

      end --}
    effect_event:Reset()
    end --}
  str["效果"]:SetOperation(cache_1)
  Duel.RegisterEffect(str["效果"]
  , 0)
  end --}
fun["一_该效果不能被连锁"] = function() --{
  Duel.SetChainLimit(aux.FALSE)
  return true
  end --}
fun["一_通关邀请"] = function() --{
  --备用:圣魔术师
  str["原解邀请"] = "残局群181175613"
  str["二解邀请"] = "爆貘团:「你居然二解了,请加群告诉我怎么二解。」"
  str["效果"] = Effect.GlobalEffect()
  str["效果"]:SetType(EFFECT_TYPE_FIELD
  + EFFECT_TYPE_CONTINUOUS)
  str["效果"]:SetCode(EVENT_DAMAGE)
  function cache_1() --{
    cache_1 = Duel.GetLP(1)
    if cache_1 <= 0 then --{
      if cache_1 == 0 then --{
        --}
      else  --{
        Debug.ShowHint(str["二解邀请"])
        end --}
      Debug.ShowHint(str["原解邀请"])
      --}
    else --{
      return false
      end --}
    end --}
  str["效果"]:SetCondition(cache_1)
  str["效果"]:SetOperation(aux.NULL)
  Duel.RegisterEffect(str["效果"]
  , 0)
  end --}
fun["一_是否效果卡"] = function(card) --{
  for i = 1, #str["效果卡的种类表"] do --{
    if Card.IsType(card, str["效果卡的种类表"][i]) then --{
      return true
      end --}
    end --}
  if Card.IsType(card, TYPE_PENDULUM) then --{
    for i = 1, #str["无效果灵摆怪兽表"] do --{
      if Card.IsCode(card, str["无效果灵摆怪兽表"][i]) then --{
        --}
      else  --{
        return true
        end --}
      end --}
    end --}
  return false
  end --}
fun["一_开局添加手卡"] = function(str_1) --{
  str["开局添加手卡"] = true
  str["开局添加手卡的数量"] = str_1
  str["效果"] = Effect.GlobalEffect()
  str["效果"]:SetType(EFFECT_TYPE_FIELD
  + EFFECT_TYPE_CONTINUOUS)
  str["效果"]:SetCode(EVENT_ADJUST)
  str["效果"]:SetCondition(aux.TRUE)
  function cache_1(effect_event
  , player_who_activate_the_effect) --{
    str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect

    , Card.IsAbleToHand
    , player_who_activate_the_effect
    , LOCATION_DECK
    , 0
    , str_1
    , str_1
    , nil)

    Duel.SendtoHand(str["玩家选定的卡"]
    , nil
    , REASON_RULE)
    effect_event:Reset()
    end --}
  str["效果"]:SetOperation(cache_1)
  Duel.RegisterEffect(str["效果"]
  , 0)
  end --}
fun["一_禁格"] = function(str_1) --{
  str["禁格"] = true
  str["禁格的数量"] = str_1
  str["效果"] = Effect.GlobalEffect()
  str["效果"]:SetCode(EFFECT_USE_EXTRA_MZONE)
  str["效果"]:SetValue(str_1)
  Duel.RegisterEffect(str["效果"],0)
  end --}
--第二层-------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
fun["Debug.ReloadFieldEnd"] = Debug.ReloadFieldEnd
Debug.ReloadFieldEnd = function(str_1) --{
  fun["Debug.ReloadFieldEnd"]()
  if str_1 then --{
    fun["一_随机抽卡"](str_1)
    end --}
  end --}
fun["二_印卡"] = function(str_1, str_2, str_3) --{
  if str_3 then --{
    --}
  else --{
    str_3 = str_2
    end --}

  Debug.ShowHint("点击对方额外卡组可以进行印卡。\n手卡只能印 "
  .. str_2
  .. " 张。\n最多可以印 "
  .. str_3
  .. " 张")

  str["效果"] = Effect.CreateEffect(str_1)
  str["当前印卡数"] = 1
  str["效果"]:SetType(EFFECT_TYPE_IGNITION)
  str["效果"]:SetProperty(EFFECT_FLAG_BOTH_SIDE
  + EFFECT_FLAG_UNCOPYABLE
  + EFFECT_FLAG_CANNOT_NEGATE
  + EFFECT_FLAG_CANNOT_DISABLE)

  str["效果"]:SetTarget(fun["一_该效果不能被连锁"])
  str["效果"]:SetRange(LOCATION_EXTRA)
  function print_hand(effect_event
  , player_who_activate_the_effect) --{
    announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
    card = Duel.CreateToken(player_who_activate_the_effect
    , announce_card)
    if str["当前印卡数"] <= str_2 then --{
      str["当前印卡数"] = str["当前印卡数"] + 1
      Duel.SendtoHand(card,nil,REASON_RULE)
      --}
    else --{
      if str["当前印卡数"] <= str_3 then --{
        str["当前印卡数"] = str["当前印卡数"] + 1
        Duel.Remove(card,POS_FACEUP,REASON_RULE)
        Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
        --}
      else --{
        Debug.ShowHint("印卡过多!")
        effect_event:Reset()
        end --}
      end --}
    end --}
  str["效果"]:SetOperation(print_hand)
  str_1:RegisterEffect(str["效果"])
  end --}
fun["二_开局说明"] = function() --{
  str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"]
  , 0
  , str["所有区域"]
  , str["所有区域"]
  , nil)
  str["超量素材组"] = Duel.GetOverlayGroup(0
  , LOCATION_MZONE
  , LOCATION_MZONE)
  for k in aux.Next(str["超量素材组"]) do --{
    if fun["一_是否效果卡"](k) then --{
      str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
      end --}
    end --}
  str["开局说明"] = str["这个残局的效果卡数量"]
  .. "卡 "
  .. str["规则"]
  if str["不洗牌"] == 0 then --{
    --}
  else --{
    str["开局说明"] = str["开局说明"] .. "伪洗牌 "
    end --}
  if str["无BP"] == 0 then --{
    str["开局说明"] = str["开局说明"] .. "无BP "
    end --}
  if str["无AI"] == 0 then --{
    str["开局说明"] = str["开局说明"] .. "无AI "
    end --}
  if str["开局添加手卡"] then --{
    str["开局说明"] = str["开局说明"]
    .. "选"
    .. str["开局添加手卡的数量"]
    .. "卡 "
    end --}
  if str["禁格"] then --{
    str["开局说明"] = str["开局说明"]
    .. "禁"
    .. str["禁格的数量"]
    .. "格 "
    end --}
  if str["随机抽卡的数量"] then --{
    str["开局说明"] = str["开局说明"]
    .. "抽"
    .. str["随机抽卡的数量"]
    .. "卡 "
    end --}
  Debug.ShowHint(str["开局说明"])
  end --}
--第三层-------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
fun["aux.BeginPuzzle"] = aux.BeginPuzzle
aux.BeginPuzzle = function(str_1, str_2) --{
  fun["aux.BeginPuzzle"]()
  if str_1 then --{
    fun["一_开局添加手卡"](str_1)
    end --}
  if str_2 then --{
    fun["一_禁格"](str_2)
    end --}
  fun["二_开局说明"]()
  fun["一_通关邀请"]()
  fun["一_失败得分"]()
  end --}
--兼容层-------------------------------
fun["印卡"] = fun["二_印卡"]
fun["开局添加手卡"] = fun["一_开局添加手卡"]
fun["是否效果卡"] = fun["一_是否效果卡"]
fun["禁格"] = fun["一_禁格"]
fun["随机抽卡"] = fun["一_随机抽卡"]
<

















|
|
|
|

|
|
|
|
|

|
<
<
<
<

|
<














|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
<
|
|
|
<
|
|
|
|
|
|
<
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
|
<
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
>
|
|
|
|
|
<
|

|
|
|

|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
<
|
|
|
<
|
>
|
|
|
|
|
|
|
>
|
<
<
|
|
|
|
<
|

|
|
|
|
|
|
|













|
|
|
|
|

|
|
|
|
|
>
|
|
|
|
|
>
|
|
|
|
<
<
|
>
|
|
|
<
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
<
|
<
<
|
<
<
|
|
|
|
|
|
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
|
|
|
<
<
<
|
|
|
<
<
<
|
|
|













|
|
|
|
|
|
|
|
|
|
|







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
65

66
67
68

69
70
71
72
73
74

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

113
114

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

138
139
140
141
142
143
144
145
146
147
148

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189

190
191
192

193
194
195
196
197
198
199
200
201
202
203


204
205
206
207

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251


252
253
254
255
256

257
258

259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279

280


281


282
283
284
285
286
287


288
289
290
291
292
293
294
295
296
297
298
299
300



301
302
303



304
305
306



307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339

local str = {}
local math = math
local string = string
local table = table
_G.fun = {}
---------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
str["效果卡的种类表"] = {
	TYPE_SPELL,
	TYPE_TRAP,
	TYPE_EFFECT,
}
str["无效果灵摆怪兽表"] = {
	28363749,
	19474136,
	17390179,
	83980492,
}
cache_1 = 0
cache_1 = cache_1 + LOCATION_HAND + LOCATION_MZONE + LOCATION_SZONE + LOCATION_GRAVE + LOCATION_REMOVED




str["除卡组与额外卡组以外的区域"] = cache_1
cache_1 = cache_1 + LOCATION_DECK + LOCATION_EXTRA

str["所有区域"] = cache_1
--第一层-------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
fun["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin
Debug.ReloadFieldBegin = function(str_1, str_2) --{
	str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
	str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
	str["无AI"] = str_1 & DUEL_SIMPLE_AI
	str["规则表"] = {
		[3] = "大师3 ",
		[4] = "新大师 ",
		[5] = "大师2020 ",
	}
	if str_2 then --{
		str["规则"] = str["规则表"][str_2]
	--}
	else --{
		str["规则"] = str["规则表"][5]
	end --}
	fun["Debug.ReloadFieldBegin"](str_1, str_2)
end --}
fun["一_随机抽卡"] = function(str_1) --{
	str["随机抽卡的数量"] = str_1
	str["效果"] = Effect.GlobalEffect()
	str["效果"]:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)

	str["效果"]:SetCode(EVENT_ADJUST)
	str["效果"]:SetCondition(aux.TRUE)
	function cache_1(effect_event, player_who_activate_the_effect) --{

		Duel.ShuffleDeck(0)
		Duel.Draw(0, str_1, REASON_RULE)
		effect_event:Reset()
	end --}
	str["效果"]:SetOperation(cache_1)
	Duel.RegisterEffect(str["效果"], 0)

end --}
fun["一_失败得分"] = function() --{
	str["失败得分表"] = {
		[0] = "神龙之圣刻印",
		[100] = "调和支援士",
		[200] = "深渊的暗杀者",
		[300] = "救援猫",
		[400] = "注射天使 莉莉",
		[500] = "不知火的隐者",
		[600] = "影依猎鹰",
		[700] = "铁兽战线 姬特",
		[800] = "召唤僧",
		[900] = "恩底弥翁的仆从",
		[1000] = "机壳工具 丑恶",
		[1100] = "欧尼斯特",
		[1200] = "次元吸引者",
		[1300] = "黑羽-疾风之盖尔",
		[1400] = "加农炮兵",
		[1500] = "教导的大神祗官",
		[1600] = "地中族导师",
		[1700] = "相剑师-莫邪",
		[1800] = "宝玉兽-青玉飞马",
		[1900] = "命运英雄 血魔-D",
		[2000] = "流离的狮鹫骑手",
		[2100] = "电子龙",
		[2200] = "古遗物-死镰",
		[2300] = "能朋克 调狐",
		[2400] = "俱舍怒威族·芬里尔狼",
		[2500] = "黑魔术师",
		[2600] = "雅典娜",
		[2700] = "暗黑界的龙神 格拉法",
		[2800] = "魔导兽 刻耳柏洛斯尊主",
		[2900] = "元素英雄 永生侠",
		[3000] = "青眼白龙",
	}
	str["对方玩家的初始生命值"] = Duel.GetLP(1)
	str["效果"] = Effect.GlobalEffect()
	str["效果"]:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)

	str["效果"]:SetCode(EVENT_PHASE_START + PHASE_END)
	function cache_1(effect_event, player_who_activate_the_effect) --{

		cache_1 = Duel.GetLP(1) - str["对方玩家的初始生命值"]
		if cache_1 > 0 then --{
			return
		--}
		else --{
			cache_1 = math.abs(cache_1) / (str["对方玩家的初始生命值"] - 100)
			cache_1 = math.tointeger(cache_1 * 3000 // 100 * 100)
		end --}
		if cache_1 > 3000 then --{
		--}
		else --{
			Debug.ShowHint(
				"这局,您的得分是 "
					.. cache_1
					.. " 分!\n处于「"
					.. str["失败得分表"][cache_1]
					.. "」级别!"
			)
		end --}
		effect_event:Reset()
	end --}
	str["效果"]:SetOperation(cache_1)
	Duel.RegisterEffect(str["效果"], 0)

end --}
fun["一_该效果不能被连锁"] = function() --{
	Duel.SetChainLimit(aux.FALSE)
	return true
end --}
fun["一_通关邀请"] = function() --{
	--备用:圣魔术师
	str["原解邀请"] = "残局群181175613"
	str["二解邀请"] = "爆貘团:「你居然二解了,请加群告诉我怎么二解。」"
	str["效果"] = Effect.GlobalEffect()
	str["效果"]:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)

	str["效果"]:SetCode(EVENT_DAMAGE)
	function cache_1() --{
		cache_1 = Duel.GetLP(1)
		if cache_1 <= 0 then --{
			if cache_1 == 0 then --{
			--}
			else --{
				Debug.ShowHint(str["二解邀请"])
			end --}
			Debug.ShowHint(str["原解邀请"])
		--}
		else --{
			return false
		end --}
	end --}
	str["效果"]:SetCondition(cache_1)
	str["效果"]:SetOperation(aux.NULL)
	Duel.RegisterEffect(str["效果"], 0)

end --}
fun["一_是否效果卡"] = function(card) --{
	for i = 1, #str["效果卡的种类表"] do --{
		if Card.IsType(card, str["效果卡的种类表"][i]) then --{
			return true
		end --}
	end --}
	if Card.IsType(card, TYPE_PENDULUM) then --{
		for i = 1, #str["无效果灵摆怪兽表"] do --{
			if Card.IsCode(card, str["无效果灵摆怪兽表"][i]) then --{
			--}
			else --{
				return true
			end --}
		end --}
	end --}
	return false
end --}
fun["一_开局添加手卡"] = function(str_1) --{
	str["开局添加手卡"] = true
	str["开局添加手卡的数量"] = str_1
	str["效果"] = Effect.GlobalEffect()
	str["效果"]:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)

	str["效果"]:SetCode(EVENT_ADJUST)
	str["效果"]:SetCondition(aux.TRUE)
	function cache_1(effect_event, player_who_activate_the_effect) --{

		str["玩家选定的卡"] = Duel.SelectMatchingCard(
			player_who_activate_the_effect,
			Card.IsAbleToHand,
			player_who_activate_the_effect,
			LOCATION_DECK,
			0,
			str_1,
			str_1,
			nil
		)
		Duel.SendtoHand(str["玩家选定的卡"], nil, REASON_RULE)


		effect_event:Reset()
	end --}
	str["效果"]:SetOperation(cache_1)
	Duel.RegisterEffect(str["效果"], 0)

end --}
fun["一_禁格"] = function(str_1) --{
	str["禁格"] = true
	str["禁格的数量"] = str_1
	str["效果"] = Effect.GlobalEffect()
	str["效果"]:SetCode(EFFECT_USE_EXTRA_MZONE)
	str["效果"]:SetValue(str_1)
	Duel.RegisterEffect(str["效果"], 0)
end --}
--第二层-------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
fun["Debug.ReloadFieldEnd"] = Debug.ReloadFieldEnd
Debug.ReloadFieldEnd = function(str_1) --{
	fun["Debug.ReloadFieldEnd"]()
	if str_1 then --{
		fun["一_随机抽卡"](str_1)
	end --}
end --}
fun["二_印卡"] = function(str_1, str_2, str_3) --{
	if str_3 then --{
	--}
	else --{
		str_3 = str_2
	end --}
	Debug.ShowHint(
		"点击对方额外卡组可以进行印卡。\n手卡只能印 "
			.. str_2
			.. " 张。\n最多可以印 "
			.. str_3
			.. " 张"
	)
	str["效果"] = Effect.CreateEffect(str_1)
	str["当前印卡数"] = 1
	str["效果"]:SetType(EFFECT_TYPE_IGNITION)
	str["效果"]:SetProperty(


		EFFECT_FLAG_BOTH_SIDE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_CANNOT_NEGATE + EFFECT_FLAG_CANNOT_DISABLE
	)
	str["效果"]:SetTarget(fun["一_该效果不能被连锁"])
	str["效果"]:SetRange(LOCATION_EXTRA)
	function print_hand(effect_event, player_who_activate_the_effect) --{

		announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
		card = Duel.CreateToken(player_who_activate_the_effect, announce_card)

		if str["当前印卡数"] <= str_2 then --{
			str["当前印卡数"] = str["当前印卡数"] + 1
			Duel.SendtoHand(card, nil, REASON_RULE)
		--}
		else --{
			if str["当前印卡数"] <= str_3 then --{
				str["当前印卡数"] = str["当前印卡数"] + 1
				Duel.Remove(card, POS_FACEUP, REASON_RULE)
				Duel.SendtoDeck(card, player_who_activate_the_effect, 0, REASON_RULE)
			--}
			else --{
				Debug.ShowHint("印卡过多!")
				effect_event:Reset()
			end --}
		end --}
	end --}
	str["效果"]:SetOperation(print_hand)
	str_1:RegisterEffect(str["效果"])
end --}
fun["二_开局说明"] = function() --{
	str["这个残局的效果卡数量"] =

		Duel.GetMatchingGroupCount(fun["是否效果卡"], 0, str["所有区域"], str["所有区域"], nil)


	str["超量素材组"] = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)


	for k in aux.Next(str["超量素材组"]) do --{
		if fun["一_是否效果卡"](k) then --{
			str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
		end --}
	end --}
	str["开局说明"] = str["这个残局的效果卡数量"] .. "卡 " .. str["规则"]


	if str["不洗牌"] == 0 then --{
	--}
	else --{
		str["开局说明"] = str["开局说明"] .. "伪洗牌 "
	end --}
	if str["无BP"] == 0 then --{
		str["开局说明"] = str["开局说明"] .. "无BP "
	end --}
	if str["无AI"] == 0 then --{
		str["开局说明"] = str["开局说明"] .. "无AI "
	end --}
	if str["开局添加手卡"] then --{
		str["开局说明"] = str["开局说明"] .. "选" .. str["开局添加手卡的数量"] .. "卡 "



	end --}
	if str["禁格"] then --{
		str["开局说明"] = str["开局说明"] .. "禁" .. str["禁格的数量"] .. "格 "



	end --}
	if str["随机抽卡的数量"] then --{
		str["开局说明"] = str["开局说明"] .. "抽" .. str["随机抽卡的数量"] .. "卡 "



	end --}
	Debug.ShowHint(str["开局说明"])
end --}
--第三层-------------------------------
local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9
local _
fun["aux.BeginPuzzle"] = aux.BeginPuzzle
aux.BeginPuzzle = function(str_1, str_2) --{
	fun["aux.BeginPuzzle"]()
	if str_1 then --{
		fun["一_开局添加手卡"](str_1)
	end --}
	if str_2 then --{
		fun["一_禁格"](str_2)
	end --}
	fun["二_开局说明"]()
	fun["一_通关邀请"]()
	fun["一_失败得分"]()
end --}
--兼容层-------------------------------
fun["印卡"] = fun["二_印卡"]
fun["开局添加手卡"] = fun["一_开局添加手卡"]
fun["是否效果卡"] = fun["一_是否效果卡"]
fun["禁格"] = fun["一_禁格"]
fun["随机抽卡"] = fun["一_随机抽卡"]

Modified single/X-LV-05.lua from [7e5f2034ef] to [840077f321].

11
12
13
14
15
16
17
18
19
local g01 = Debug.AddCard(27288416, 0, 0, LOCATION_MZONE, 1, POS_FACEUP_ATTACK)
local g03 = Debug.AddCard(27288416, 0, 0, LOCATION_MZONE, 3, POS_FACEUP_ATTACK)

Debug.AddCard(27288416, 1, 1, LOCATION_MZONE, 3, POS_FACEUP_ATTACK)
Debug.ReloadFieldEnd()
aux.BeginPuzzle()
Debug.ShowHint(
	"尝试一下四星以下不需要祭品。\n五·六星怪兽需要一只祭品。\n七星以上两只祭品。"
)







|

11
12
13
14
15
16
17
18
19
local g01 = Debug.AddCard(27288416, 0, 0, LOCATION_MZONE, 1, POS_FACEUP_ATTACK)
local g03 = Debug.AddCard(27288416, 0, 0, LOCATION_MZONE, 3, POS_FACEUP_ATTACK)

Debug.AddCard(27288416, 1, 1, LOCATION_MZONE, 3, POS_FACEUP_ATTACK)
Debug.ReloadFieldEnd()
aux.BeginPuzzle()
Debug.ShowHint(
  "尝试一下四星以下不需要祭品。\n五·六星怪兽需要一只祭品。\n七星以上两只祭品。"
)

Modified single/X-LV-43.lua from [cdecefb7a0] to [38f31324fd].

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
--[[message
1850
]]
Debug.SetAIName("X-LV-43")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN + DUEL_SIMPLE_AI + DUEL_PSEUDO_SHUFFLE, 4)
Debug.SetPlayerInfo(0, 2000, 0, 0)
Debug.SetPlayerInfo(1, 13600, 0, 0)

local e0 = Effect.GlobalEffect()
e0:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetCountLimit(1)
e0:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetLP(0) > 0
end)
e0:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.SelectMatchingCard(tp, Card.IsAbleToHand, tp, LOCATION_DECK, 0, 5, 5, nil)
	if g:GetCount() > 0 then
		Duel.SendtoHand(g, nil, REASON_RULE)
	end
end)
Duel.RegisterEffect(e0, 0)

--自己的怪兽区
--对方的怪兽区
Debug.AddCard(95788410, 1, 1, LOCATION_MZONE, 0, POS_FACEUP_ATTACK) --兔龙
Debug.AddCard(38955728, 1, 1, LOCATION_MZONE, 4, POS_FACEUP_ATTACK) --龙核的咒灵者













|


|
|
|
|







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
--[[message
1850
]]
Debug.SetAIName("X-LV-43")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN + DUEL_SIMPLE_AI + DUEL_PSEUDO_SHUFFLE, 4)
Debug.SetPlayerInfo(0, 2000, 0, 0)
Debug.SetPlayerInfo(1, 13600, 0, 0)

local e0 = Effect.GlobalEffect()
e0:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetCountLimit(1)
e0:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
  return Duel.GetLP(0) > 0
end)
e0:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
  local g = Duel.SelectMatchingCard(tp, Card.IsAbleToHand, tp, LOCATION_DECK, 0, 5, 5, nil)
  if g:GetCount() > 0 then
    Duel.SendtoHand(g, nil, REASON_RULE)
  end
end)
Duel.RegisterEffect(e0, 0)

--自己的怪兽区
--对方的怪兽区
Debug.AddCard(95788410, 1, 1, LOCATION_MZONE, 0, POS_FACEUP_ATTACK) --兔龙
Debug.AddCard(38955728, 1, 1, LOCATION_MZONE, 4, POS_FACEUP_ATTACK) --龙核的咒灵者

Added 残局文料/lib/ipml_mj_ysaf.lua version [d276baf2ce].





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
package.path = [[.\lib\?.lua;]] .. package.path
package.cpath = [[.\lib\?.dll;]] .. package.cpath
local 字集码互转库 = require("u8_to_a")
local d_5 = {}
local 简件系库 = require("lfs")
--~ 程语_月_标准库_仿照_加多_多编码_大字集_通用
function d_5.require_通用大字集态_八位态(modname)
	return require(字集码互转库.u8_to_a(modname))
end
do
	local k1 = 0
	function _G.递增示()
		k1 = k1 + 1
		print(k1)
	end
end
--~ do
--~ local k1 = os.execute
--~ function _G.os.execute(command)
--~ return k1(字集码互转库.u2a(command))
--~ end
--~ end
function d_5.读件(o1, o2)
	local k1
	local k1_3
	k1_3 = io.open(o1, o2 or "r")
	k1 = k1_3:read("a")
	k1_3:flush()
	k1_3:close()
	return k1
end
function d_5.读件排(o1_9, o1)
	local k1_9
	k1_9 = {}
	for o2 = 1, #o1_9 do
		k1_9[#k1_9 + 1] = d_5.读件(o1_9[o2], o1)
	end
	return k1_9
end
function d_5.写件(o1, o2, o3)
	local k1_3
	k1_3 = io.open(o1, o3 or "w")
	k1_3:write(o2)
	k1_3:flush()
	k1_3:close()
end
function d_5.写件_一维(o1, o1_9, o2, o3)
	local k1 = table.concat(o1_9, "\n")
	if o3 then
		k1 = o3(k1)
	end
	d_5.写件(o1, k1, o2)
end
function d_5.删制表符(o1)
	return o1:gsub("\t", "")
end
--~ function d_5.删空白字(o1)
--~ return o1:gsub("%s", "")
--~ end
--~ function d_5.删空格与制表符(o1)
--~ o1 = d_5.删空格(o1)
--~ return d_5.删制表符(o1)
--~ end
function d_5.文转排(text)
	local lines = {}
	for line in text:gmatch("[^\n]+") do
		table.insert(lines, line)
	end
	return lines
end
--~ function d_5.删前缀(o1, o2)
--~ if o1:find(o2, 1, true) then
--~ return o1:sub(#o2 + 1)
--~ end
--~ end
--~ function d_5.删后缀(o1, o2)
--~ if o1:find(o2, -1, true) then
--~ return o1:sub(1, #o1 - #o2)
--~ end
--~ end
--~ function d_5.删空行_不虑首末态(o1)
--~ return o1:gsub("\n+", "\n")
--~ end
--~ function d_5.删空行(o1)
--~ o1 = d_5.删空行_不虑首末态(o1)
--~ o1 = d_5.删前缀(o1, "\n")
--~ return d_5.删后缀(o1, "\n")
--~ end
function d_5.删空格(o1)
	return o1:gsub(" ", "")
end
function d_5.筛排(o1_9, o1, o2, o3)
	local k1_8
	local k1_9
	k1_9 = {}
	for o4 = 1, #o1_9 do
		k1_8 = o1(o1_9[o4], o2, o3)
		if k1_8 then
			k1_9[#k1_9 + 1] = k1_8
		end
	end
	return k1_9
end
--~ function d_5.筛文(o1, o2, o3)
--~ local k1_9
--~ k1_9 = {}
--~ for o4 in o2(o1, o3) do
--~ k1_9[#k1_9 + 1] = o4
--~ end
--~ return k1_9
--~ end
--~ function d_5.判文(o1, o2, o3, o4)
--~ if o1:find(o2 or ".", o3, o4) then
--~ return o1
--~ end
--~ end
function d_5.筛件径(o1, o2)
	local k1_9
	k1_9 = d_5.筛文(o1, 简件系库.dir)
	k1_9 = d_5.筛排(k1_9, d_5.加前缀, o1 .. "/")
	k1_9 = d_5.筛排(k1_9, d_5.判文, o2)
	return d_5.筛排(k1_9, d_5.在前后加英文双引号)
end
--~ function d_5.筛单行等式(o1)
--~ return 常用库.捕排(string.gmatch, o1, "[^\n= \t]+")
--~ end
--~ function d_5.捕非空单行(o1)
--~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?")
--~ end
--~ function d_5.捕非空单行(o1)
--~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?")
--~ end
function d_5.排转对(o1_12, o1)
	local k1_5
	local k1_11
	k1_11 = {}
	for o2 = 1, #o1_12, o1 + 1 do
		k1_5 = {}
		for o3 = 1, o1 do
			k1_5[o3] = o1_12[o2 + o3]
		end
		k1_11[o1_12[o2]] = k1_5
	end
	return k1_11
end
--~ function d_5.加前缀(o1, o2)
--~ return o2 .. o1
--~ end
--~ function d_5.加后缀(o1, o2)
--~ return o1 .. o2
--~ end
function d_5.filterLinesWithCharacter(text, character)
	local result = {}
	local lines = d_5.文转排(text)
	-- 遍历每一行,检查是否包含目标字符
	for i, line in ipairs(lines) do
		if line:find(character, 1, true) then
			table.insert(result, line)
		end
	end
	return result
end
function d_5.办令(o1)
	print(o1)
	os.execute(o1)
end
--~ function d_5.在前后加英文双引号(o1)
--~ return [["]] .. o1 .. [["]]
--~ end
--~ function d_5.筛单行等式_左右值态(o1)
--~ local k1_11
--~ k1_11 = {}
--~ for o2 in k1_11:gmatch("[^\n= \t]+") do
--~ table.insert(k1_11, o2)
--~ end
--~ return o2
--~ end
return d_5

Added 残局文料/lib/u8_to_a.lua version [c257efad79].

















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
local ffi = require("ffi")
local d_4 = {}
ffi.cdef([[
typedef unsigned int UINT;
typedef unsigned long DWORD;
typedef wchar_t WCHAR;
typedef WCHAR* LPWSTR;
typedef wchar_t* LPCWCH;
typedef char CHAR;
typedef CHAR* LPSTR;
typedef const char* LPCCH;
typedef int BOOL;
typedef BOOL* LPBOOL;
int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCCH lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cchMultiByte, LPCCH lpDefaultChar, LPBOOL pfUsedDefaultChar);
]])
d_4.CP_ACP = 0
d_4.CP_UTF8 = 65001
--~ 算机_基统_窗群
function d_4.m2w(input, o1)
	local wlen = ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, nil, 0)
	local wstr = ffi.new("wchar_t[?]", wlen + 1)
	ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, wstr, wlen)
	return wstr, wlen
end
function d_4.w2m(wstr, wlen, o1)
	local len = ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, nil, 0, nil, nil)
	local str = ffi.new("char[?]", len)
	ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, str, len, nil, nil)
	return ffi.string(str, len)
end
--~ 通用大字集_八位
function d_4.u8_to_a(input)
	return d_4.w2m(d_4.m2w(input, d_4.CP_UTF8))
end
function d_4.a_to_u8(input)
	local k1, k2 = d_4.m2w(input)
	return d_4.w2m(k1, k2, d_4.CP_UTF8)
end
return d_4

Added 残局文料/lib/删注/月程语.lua version [ff66905768].































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local d_3 = {}
--~ function d_3.多行注_套娃态(o1)
--~ return o1:gsub("%-%-%[(=*)%[.-%]%1%]", "")
--~ end
--~ function d_3.多行注_凡态(o1)
--~ return o1:gsub("%-%-%[%[.-%]%]", "")
--~ end
function d_3.单行注_不虑字串态(o1)
	return o1:gsub("%-%-[^\n]*", "")
end
--~ function d_3.事启(o1)
--~ o1 = d_3.多行注_套娃态(o1)
--~ return d_3.单行注(o1)
--~ end
return d_3

Added 残局文料/lib/程语_月_基类_排_遍历.lua version [8fa85cf200].







































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local d_2 = {}
function d_2.遍历_返排态(o1_9, o1, o2, o3)
	local k1_8
	local k1_9
	k1_9 = {}
	for o4 = 1, #o1_9 do
		k1_8 = o1(o1_9[o4], o2, o3)
		if k1_8 then
			k1_9[#k1_9 + 1] = k1_8
		end
	end
	return k1_9
end
function d_2.遍历_基态(o1_9, o1, o2, o3)
	for o4 = 1, #o1_9 do
		o1(o1_9[o4], o2, o3)
	end
end
return d_2

Added 残局文料/lib/程语_月_基类_文_前后缀.lua version [bfd1f20402].



















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
local d_3 = {}
local require = 常用库.require_通用大字集态_八位态
local 筛文库 = require("程语_月_基类_文_筛文")
--~ 加
--~ 加_分_基
function d_3.加前缀_基态(o1, o2)
  return o2 .. o1
  end
function d_3.加后缀_基态(o1, o2)
  return o1 .. o2
  end
--~ 加_分_确保
--~ function d_3.加前缀_确保态(o1, o2, o3)
--~ 筛文库.返全文(o1, )
--~ local k1
--~ k1 = d_3.删前缀(o1, o2, o3)
--~ return o2 .. o1
--~ end
--~ 加_合
function d_3.加前缀与后缀_基态(o1, o2, o3)
  return o2 .. o1 .. (o3 or "")
  end
--~ 删
--~ 删_分
function d_3.删前缀(o1, o2, o3)
  if o1:find(o2, 1, o3 or true) then
    return o1:sub(#o2 + 1)
    end
  end
function d_3.删后缀(o1, o2, o3)
  if o1:find(o2, -1, o3 or true) then
    return o1:sub(1, #o1 - #o2)
    end
  end
--~ 删
--~ 场景_令行窗_件径
function d_3.在前后加英文双引号_基态(o1)
  return [["]] .. o1 .. [["]]
  end
return d_3

Added 残局文料/lib/程语_月_基类_文_筛文.lua version [8ab425ff49].















>
>
>
>
>
>
>
1
2
3
4
5
6
7
local d_2 = {}
function d_2.返全文(o1, o2, o3, o4)
	if o1:find(o2, o3, o4) then
		return o1
	end
end
return d_2

Added 残局文料/lib/程语_月_基类_文_遍历.lua version [2ecc02809a].





















>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
local d_2 = {}
function d_2.遍历(o1, o2, o3)
	local k1_9
	k1_9 = {}
	for o4 in o2(o1, o3) do
		k1_9[#k1_9 + 1] = o4
	end
	return k1_9
end
return d_2

Added 残局文料/lib/程语_月_基类_能_传参_字集码_大字集_通用.lua version [12413adb69].







>
>
>
1
2
3
local d_2 = {}
--~ 八位
return d_2

Added 残局文料/lib/程语_月_基类_能_传参_转化.lua version [c27ba9f840].

























>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
local d_2 = {}
--~ 传参_参数数量
function d_2.二参(o1, o2, o3, o4)
  return o1(o2(o3), o2(o4))
  end
function d_2.三参(o1, o2, o3, o4, o5)
  return o1(o2(o3), o2(o4), o2(o5))
  end
function d_2.四参(o1, o2, o3, o4, o5, o6)
  return o1(o2(o3), o2(o4), o2(o5), o2(o6))
  end
return d_2

Added 残局文料/lib/算机_基统_窗群_令行窗_无窗.lua version [088fbe6735].







































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local d_2 = {}
local require = 常用库.require_通用大字集态_八位态
local 字集码互转库 = require("u8_to_a")
local 件径库 = require("算机_基统_窗群_件系_件径")
local 遍历排库 = require("程语_月_基类_排_遍历")
local 前后缀库 = require("程语_月_基类_文_前后缀")
function d_2.办令_基态(o1)
  print(o1)
  os.execute(o1)
  end
--~ 件夹
function d_2.入件夹而用件径_基态(o1, o2, o3, o4)
  local k1_9
  k1_9 = 件径库.入件夹而返件径排_筛态(o1, o2)
  k1_9 = 遍历排库.遍历_返排态(k1_9, 前后缀库.在前后加英文双引号_基态)
  k1_9 = 遍历排库.遍历_返排态(k1_9, 前后缀库.加前缀与后缀_基态, o3, o4)
  遍历排库.遍历_基态(k1_9, d_2.办令_基态)
  end
return d_2

Added 残局文料/lib/算机_基统_窗群_件系_件径.lua version [fec2875847].





































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local d_2 = {}
local require = 常用库.require_通用大字集态_八位态
local 遍历文库 = require("程语_月_基类_文_遍历")
local 遍历排库 = require("程语_月_基类_排_遍历")
local 前后缀库 = require("程语_月_基类_文_前后缀")
local 筛文库 = require("程语_月_基类_文_筛文")
local 简件系库 = require("lfs")
function d_2.入件夹而返件径排_筛态(o1, o2, o3, o4)
  local k1_9
  k1_9 = d_2.入件夹而返件径排_基态(o1)
  return 遍历排库.遍历_返排态(k1_9, 筛文库.返全文, o2, o3, o4)
  end
function d_2.入件夹而返件径排_基态(o1)
  local k1_9
  k1_9 = 遍历文库.遍历(o1, 简件系库.dir)
  return 遍历排库.遍历_返排态(k1_9, 前后缀库.加前缀_基态, o1 .. "/")
  end
return d_2

Deleted 残局文料/lib_lua/ipml_mj_ysaf.lua version [f7c0bc33d7].

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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
package.path = [[.\lib_lua\?.lua;]] .. package.path
package.cpath = [[.\lib_dll\?.dll;]] .. package.cpath
local 字集码互转库 = require("u8_to_a")
local d_5 = {}
local 简件系库 = require("lfs")
--~ function _G.require_u8(modname)
  --~ return require(字集码互转库.u8_to_a(modname))
  --~ end
do
local k1 = 0
function _G.递增示()
  k1 = k1 + 1
  print(k1)
  end
  end
--~ do
--~ local k1 = os.execute
--~ function _G.os.execute(command)
--~ return k1(字集码互转库.u2a(command))
--~ end
--~ end
function d_5.读件(o1, o2)
  local k1
  local k1_3
  k1_3 = io.open(o1, o2 or "r")
  k1 = k1_3:read("a")
  k1_3:flush()
  k1_3:close()
  return k1
  end
function d_5.读件排(o1_9, o1)
  local k1_9
  k1_9 = {}
  for o2 = 1, #o1_9 do
    k1_9[#k1_9 + 1] = d_5.读件(o1_9[o2], o1)
    end
  return k1_9
  end
function d_5.写件(o1, o2, o3)
  local k1_3
  k1_3 = io.open(o1, o3 or "w")
  k1_3:write(o2)
  k1_3:flush()
  k1_3:close()
  end
function d_5.写件_一维(o1, o1_9, o2, o3)
  local k1 = table.concat(o1_9, "\n")
  if o3 then
    k1 = o3(k1)
    end
  d_5.写件(o1, k1, o2)
  end
function d_5.删制表符(o1)
  return o1:gsub("\t", "")
  end
--~ function d_5.删空白字(o1)
  --~ return o1:gsub("%s", "")
  --~ end
--~ function d_5.删空格与制表符(o1)
  --~ o1 = d_5.删空格(o1)
  --~ return d_5.删制表符(o1)
  --~ end
function d_5.文转排(text)
  local lines = {}
  for line in text:gmatch("[^\n]+") do
    table.insert(lines, line)
    end
  return lines
  end
function d_5.删前缀(o1, o2)
  if o1:find(o2, 1, true) then
    return o1:sub(#o2 + 1)
    end
  end
function d_5.删后缀(o1, o2)
  if o1:find(o2, -1, true) then
    return o1:sub(1, #o1 - #o2)
    end
  end
--~ function d_5.删空行_不虑首末态(o1)
  --~ return o1:gsub("\n+", "\n")
  --~ end
--~ function d_5.删空行(o1)
  --~ o1 = d_5.删空行_不虑首末态(o1)
  --~ o1 = d_5.删前缀(o1, "\n")
  --~ return d_5.删后缀(o1, "\n")
  --~ end
function d_5.删空格(o1)
  return o1:gsub(" ", "")
  end
function d_5.筛排(o1_9, o1, o2, o3)
  local k1_8
  local k1_9
  k1_9 = {}
  for o4 = 1, #o1_9 do
    k1_8 = o1(o1_9[o4], o2, o3)
    if k1_8 then
      k1_9[#k1_9 + 1] = k1_8
      end
    end
  return k1_9
  end
function d_5.筛文(o1, o2, o3)
  local k1_9
  k1_9 = {}
  for o4 in o2(o1, o3) do
    k1_9[#k1_9 + 1] = o4
    end
  return k1_9
  end
function d_5.判文(o1, o2, o3, o4)
  if o1:find(o2 or ".", o3, o4) then
    return o1
    end
  end
function d_5.筛件径(o1, o2)
  local k1_9
  k1_9 = d_5.筛文(o1, 简件系库.dir)
  k1_9 = d_5.筛排(k1_9, d_5.加前缀, o1 .. "/")
  k1_9 = d_5.筛排(k1_9, d_5.判文, o2)
  return d_5.筛排(k1_9, d_5.在前后加英文双引号)
  end
--~ function d_5.筛单行等式(o1)
  --~ return 常用库.捕排(string.gmatch, o1, "[^\n= \t]+")
  --~ end
--~ function d_5.捕非空单行(o1)
  --~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?")
  --~ end
--~ function d_5.捕非空单行(o1)
  --~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?")
  --~ end
function d_5.排转对(o1_12, o1)
  local k1_5
  local k1_11
  k1_11 = {}
  for o2 = 1, #o1_12, o1 + 1 do
    k1_5 = {}
    for o3 = 1, o1 do
      k1_5[o3] = o1_12[o2 + o3]
      end
    k1_11[ o1_12[o2] ] = k1_5
    end
  return k1_11
  end
function d_5.加前缀(o1, o2)
  return o2 .. o1
  end
function d_5.加后缀(o1, o2)
  return o1 .. o2
  end
function d_5.filterLinesWithCharacter(text, character)
  local result = {}
  local lines = d_5.文转排(text)
  -- 遍历每一行,检查是否包含目标字符
  for i, line in ipairs(lines) do
    if line:find(character, 1, true) then
      table.insert(result, line)
      end
    end
  return result
  end
function d_5.办令(o1)
  print(o1)
  os.execute(o1)
  end
function d_5.在前后加英文双引号(o1)
  return [["]] .. o1 .. [["]]
  end
--~ function d_5.筛单行等式_左右值态(o1)
  --~ local k1_11
  --~ k1_11 = {}
  --~ for o2 in k1_11:gmatch("[^\n= \t]+") do
    --~ table.insert(k1_11, o2)
    --~ end
  --~ return o2
  --~ end
return d_5
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































Deleted 残局文料/lib_lua/u8_to_a.lua version [8ed9e155fc].

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
local ffi = require("ffi")
local d_4 = {}
ffi.cdef([[
typedef unsigned int UINT;
typedef unsigned long DWORD;
typedef wchar_t WCHAR;
typedef WCHAR* LPWSTR;
typedef wchar_t* LPCWCH;
typedef char CHAR;
typedef CHAR* LPSTR;
typedef const char* LPCCH;
typedef int BOOL;
typedef BOOL* LPBOOL;
int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCCH lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cchMultiByte, LPCCH lpDefaultChar, LPBOOL pfUsedDefaultChar);
]])
d_4.CP_ACP = 0
d_4.CP_UTF8 = 65001
function d_4.m2w(input, o1)
  local wlen = ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, nil, 0)
  local wstr = ffi.new("wchar_t[?]", wlen + 1)
  ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, wstr, wlen)
  return wstr, wlen
  end
function d_4.w2m(wstr, wlen, o1)
  local len = ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, nil, 0, nil, nil)
  local str = ffi.new("char[?]", len)
  ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, str, len, nil, nil)
  return ffi.string(str, len)
  end
function d_4.u8_to_a(input)
  return d_4.w2m(d_4.m2w(input, d_4.CP_UTF8))
  end
function d_4.a_to_u8(input)
  local k1, k2 = d_4.m2w(input)
  return d_4.w2m(k1, k2, d_4.CP_UTF8)
  end
return d_4
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted 残局文料/lib_lua/删注/月程语.lua version [4806e49752].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local d_3 = {}
--~ function d_3.多行注_套娃态(o1)
  --~ return o1:gsub("%-%-%[(=*)%[.-%]%1%]", "")
  --~ end
--~ function d_3.多行注_凡态(o1)
  --~ return o1:gsub("%-%-%[%[.-%]%]", "")
  --~ end
function d_3.单行注_不虑字串态(o1)
  return o1:gsub("%-%-[^\n]*", "")
  end
--~ function d_3.事启(o1)
  --~ o1 = d_3.多行注_套娃态(o1)
  --~ return d_3.单行注(o1)
  --~ end
return d_3
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Modified 残局文料/产常量件.lua from [719a388c6e] to [9d43013932].

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
package.path = [[.\lib_lua\?.lua;]] .. package.path
package.cpath = [[.\lib_dll\?.dll;]] .. package.cpath
_G.常用库 = require("ipml_mj_ysaf")
local 字集码互转库 = require("u8_to_a")
--~ local profile = require("jit.profile")
--~ profile.start("f", cb)
local 删注库_月程语版_不虑字串版 = require(字集码互转库.u8_to_a("删注/月程语_不虑字串"))
local d_2 = {}
function d_2.产常量件(o1, o2)
  local k1
  k1 = 常用库.读件(o1 .. o2)
  k1 = 删注库_月程语版.单行注_不虑字串态(k1)
  --~ k1 = 常用库.删空格(k1)
  --~ k1 = 常用库.删制表符(k1)
  --~ k1 = 常用库.捕非空单行(k1)
  --~ k1 = 常用库.捕非空单行(k1)
  --~ k1 = 常用库.筛单行等式(k1)
  --~ k1 = 常用库.排转对(k1, 1)
  --~ k1 = 常用库.删空行(k1)
  --~ k1 = "local k1_11 = {}\n" .. k1 .. ""
  --~ k1 = 常用库.筛排(k1, print)
  --~ print(k1.DOUBLE_DAMAGE[1])
  --~ print(k1)
  --~ print(k1[1])
  --~ print(k1:gsub("\n", "猪"))
  end
function d_2.筛凡常量()
  
  end
function d_2.筛字段量()



  
  end
d_2.产常量件(字集码互转库.u8_to_a([[D:\install\YGOPro]]), 字集码互转库.u8_to_a([[/script/constant.lua]]))









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
|
>
>
>
|
<
<
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


package.path = [[.\lib_lua\?.lua;]] .. package.path
package.cpath = [[.\lib_dll\?.dll;]] .. package.cpath
_G.常用库 = require("ipml_mj_ysaf")
local 字集码互转库 = require("u8_to_a")
--~ local profile = require("jit.profile")
--~ profile.start("f", cb)
local 删注库_月程语版_不虑字串版 = require(字集码互转库.u8_to_a("删注/月程语_不虑字串"))
local d_2 = {}
function d_2.产常量件(o1, o2)
	local k1
	k1 = 常用库.读件(o1 .. o2)
	k1 = 删注库_月程语版.单行注_不虑字串态(k1)
	--~ k1 = 常用库.删空格(k1)
	--~ k1 = 常用库.删制表符(k1)
	--~ k1 = 常用库.捕非空单行(k1)
	--~ k1 = 常用库.捕非空单行(k1)
	--~ k1 = 常用库.筛单行等式(k1)
	--~ k1 = 常用库.排转对(k1, 1)
	--~ k1 = 常用库.删空行(k1)
	--~ k1 = "local k1_11 = {}\n" .. k1 .. ""
	--~ k1 = 常用库.筛排(k1, print)
	--~ print(k1.DOUBLE_DAMAGE[1])
	--~ print(k1)
	--~ print(k1[1])
	--~ print(k1:gsub("\n", "猪"))
end
function d_2.筛凡常量() end


function d_2.筛字段量() end
d_2.产常量件(
	字集码互转库.u8_to_a([[D:\install\YGOPro]]),
	字集码互转库.u8_to_a([[/script/constant.lua]])
)


Modified 残局文料/齐月程语件.lua from [01d24235a2] to [e1b77acf34].

1
2



3
4
5
6
7
8
9
10
11
_G.常用库 = require("lib_lua/ipml_mj_ysaf")
local 字集码互转库 = require("u8_to_a")



local d_2 = {}
function d_2.齐月程语件(o1, o2)
  local k1_9
  k1_9 = 常用库.筛件径(o1, "%.lua$")
  assert(k1_9[1]:match([["[^"]+"]]) == k1_9[1])
  k1_9 = 常用库.筛排(k1_9, 常用库.加前缀, o2)
  常用库.筛排(k1_9, 常用库.办令)
  end
d_2.齐月程语件(字集码互转库.u8_to_a([[../single]]), 字集码互转库.u8_to_a([[stylua ]]))
|

>
>
>

|
<
<
<
|
<

|
1
2
3
4
5
6
7



8

9
10
_G.常用库 = require("lib/ipml_mj_ysaf")
local 字集码互转库 = require("u8_to_a")
local require = 常用库.require_通用大字集态_八位态
local 令行库 = require("算机_基统_窗群_令行窗_无窗")
local 转参库 = require("程语_月_基类_能_传参_转化")
local d_2 = {}
function d_2.齐月程语件_基态_通用大字集态_八位态(o1, o2)



  转参库.三参(令行库.入件夹而用件径_基态, 字集码互转库.u8_to_a, o1, [[%.lua$]], o2)

  end
d_2.齐月程语件_基态_通用大字集_八位态([[../single]], [[stylua --indent-type Spaces --sort-requires --indent-width 2 --collapse-simple-statement Never ]])