游戏王残局简化版

Check-in [ea42404f54]
Login

Check-in [ea42404f54]

Overview
Comment:
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ea42404f541c7e5fccba27004e28d2175e52f1c446763ba0eb25ae28702b663d
User & Date: 顽雨沉风 on 2024-02-14 12:50:11
Other Links: manifest | tags
Context
2024-02-14
12:52
check-in: 3aeb8a4a57 user: 顽雨沉风 tags: trunk
12:50
check-in: ea42404f54 user: 顽雨沉风 tags: trunk
12:49
check-in: ad8fd18e2a user: 顽雨沉风 tags: trunk
Changes

Deleted script/ygopro_编译.html version [52c2adb065].

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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang>
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>ygopro_编译</title>
  <style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}

ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
  <style type="text/css">@media screen and (min-aspect-ratio:1/1) {html {background-color: f8f8f8;background-image:linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);background-size: 8px 8px;background-position: 0 0, 16px 8px;}body {border: solid #a0a0a0 1px ;border-radius: 20px ;padding: 26px ;margin: 16px ;color: #101010 ;background: linear-gradient(to right, #efefefff, #efefeffc);padding: 2em 11%;line-height: 2.1em;box-shadow: 0px 0px 1px rgba(160, 160, 160, 1), 0px 0px 1px rgba(160, 160, 160, 1);}}h1,h2,h3,h4,h5,h6 {font-size: 1.5em;color: #3F5770;border-bottom: 1px solid #dddddd;margin: 1.2em 0em;}a {list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;background-color: white;text-decoration-color: blue;border-radius: 0.2em;}a:visited {color: blue;text-decoration-color: white;}a:active {color: red;}nav ul li {margin: 1.2em 0em;}p::before {}p {margin: 1.2em 0;letter-spacing: 0.15em;}.title {background-color: white;font-size: 2em;text-align: center;}b {background-color: white;list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;border-radius: 0.2em;}details {border-bottom: 1px solid #dddddd;}details > summary {list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;outline: none;border-radius: 0.2em;}pre {background: #f6f6f6;border-left: 0.5em solid #ccc;padding: 0.4em;border-radius: 0.2em;overflow-wrap:break-word;}pre:active {color: red;}code {font-family: "Verdana";}button {background: #ffffff;color: #20894d;}button:active {color: red;}</style>
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
  <![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">ygopro_编译</h1>
</header>
<nav id="TOC" role="doc-toc">
<ul>
<li><a href="#前言" id="toc-前言"><span class="toc-section-number">1</span> 前言</a></li>
<li><a href="#新建文件夹" id="toc-新建文件夹"><span class="toc-section-number">2</span> 新建文件夹</a></li>
<li><a href="#编译器" id="toc-编译器"><span class="toc-section-number">3</span> 编译器</a></li>
<li><a href="#lua" id="toc-lua"><span class="toc-section-number">4</span> lua</a></li>
<li><a href="#sqlite3" id="toc-sqlite3"><span class="toc-section-number">5</span> sqlite3</a></li>
<li><a href="#freetype" id="toc-freetype"><span class="toc-section-number">6</span> freetype</a></li>
<li><a href="#细节" id="toc-细节"><span class="toc-section-number">7</span> 细节</a></li>
<li><a href="#缺点" id="toc-缺点"><span class="toc-section-number">8</span> 缺点</a></li>
</ul>
</nav>
<h1 data-number="1" id="前言"><span class="header-section-number">1</span> 前言</h1>
<p>来,走起,我们来编译一个小且可用的 ygopro 。</p>
<p>功能不求全,<b>只要有</b>残局功能就够了。</p>
<h1 data-number="2" id="新建文件夹"><span class="header-section-number">2</span> 新建文件夹</h1>
<p>万事第一步,先新建个文件夹……</p>
<p>然后,不做了,等一年后再来看,进度 0%,哈哈,这才是正常轨迹。</p>
<p>上面虽然是玩笑话,但也估摸着是我的真实经历,只不过我这个拖延王<b>拖延了</b>大概六年。</p>
<p>好了,给这个文件夹改名吧。</p>
<p>我则取名叫:</p>
<pre><code>ygopro</code></pre>
<h1 data-number="3" id="编译器"><span class="header-section-number">3</span> 编译器</h1>
<p>编译时,一个<b>很麻烦</b>的东西就是编译器。</p>
<p>很长一段时间,我都不知道到哪里去下编译器,也不知道编译器的名字叫什么。</p>
<p>像这种基础性的东西难道不应该有某某一个人把它们汇总起来让人随便下吗?</p>
<p>后来我发现,诶,还真有,但那人的网站在百度上很难搜。</p>
<p>现在的搜索引擎,早不名副其实了。</p>
<p>我们要下载的编译器叫 msvc ,准确点,应该叫 MSVC 。</p>
<p>不过我懒得换大小写,后文直接叫 msvc 了。</p>
<p>msvc 是一家叫微软的公司出的,这公司现在很鸡贼,把 msvc
的下载页面给隐藏了,狂推 vs 的下载。</p>
<pre><code>https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools</code></pre>
<p>下载下来之后,会有一个 exe ,直接进行执行。</p>
<p>然后就会有一大堆东西让你选,你挑着系统 sdk 与
c++编译工具安装就行了。</p>
<p>但这里会冒出来一个大问题:</p>
<p>下不动!</p>
<p>网络问题,我还真没法解决。</p>
<p>中国的网络封锁太强,自己看情况想办法绕过去吧。</p>
<p>就算我这写了一点解决网络问题的方法,以现在的封锁趋势,过一段时间也就不能用了。</p>
<p>不过,你还是有可能下得动的,因为彻底封死网络会伤某些人的心,所以现在是采用人群分化的方法来封锁网络,顺便还能挑起人群之间的内部矛盾。</p>
<p>安装好编译器之后,桌面上又没快捷方式,不知道该怎么打开。</p>
<p>这时应该打开 windows 的搜索功能,用快捷键就能打开了,我用的是 win8.1
系统,可以用 win+s 组合键打开。</p>
<p>然后输入:</p>
<pre><code>comm</code></pre>
<p>你查字典大概是查不到这单词的,因为这是我记不住那个完整名称而记下来的简写。</p>
<p>全名应该是「命令行」这三个字的英文版。</p>
<p>你输入这单词之后会出现一堆黑框框,选「不带 x64 」的黑框框打开。</p>
<p>你这样打开之后,看起来它仅仅只是打开个 cmd
控制台而已,其实它调用了一堆脚本来设置各组件的环境变量。</p>
<p>比较可惜的是,这些它设置的环境变量它不会告诉你,这就导致很多人其实做了无用功去重复做了这些脚本已经帮他们做好的事。</p>
<p>到这里,编译器就准备好了。</p>
<p>而且它也设置了 32 位的环境。</p>
<h1 data-number="4" id="lua"><span class="header-section-number">4</span> lua</h1>
<p>先下载 lua 的源码:</p>
<pre><code>https://www.lua.org/download.html</code></pre>
<p>直接下最新版本。</p>
<p>顺便一说, lua5.3 有 bug ,性能也不如 lua5.4 。</p>
<p>下完之后,解压,会出现一大堆文件,别怕。</p>
<p>先在 ygopro 下建一个文件夹:</p>
<pre><code>lib</code></pre>
<p>现在的目录结构是:</p>
<pre><code>ygopro
|——|—— lib</code></pre>
<p>再建一个文件夹:</p>
<pre><code>ygopro
|—— lib
|——|—— lua</code></pre>
<p>把 lua 源码的 src 文件夹复制过来:</p>
<pre><code>ygopro
|—— lib
|——|—— lua
|——|——|—— src</code></pre>
<p>注意哦,不是光把文件复制过来就可以了,你自己本身也需要对这些源码的特性有一个基本的了解。</p>
<p>比如 lua 的这个源码,就需要删除两个文件:</p>
<pre><code>lua.c
luac.c</code></pre>
<p>这是因为这两个文件里都有主函数。</p>
<p>这里要特别讲一下,什么叫主函数。</p>
<p>主函数就是应用程序的入口函数,相当于一座城堡的大门,想进城堡旅游,就得进门,不然进不去的。</p>
<p>有些人学程序学四个学期了仍然不知道什么是主函数,这其实都很正常,因为各人有各人的局限性。</p>
<p>好了,接下来就要开始编译了。</p>
<p>你也许会奇怪,这不是 lua 吗?</p>
<p>又不是 ygopro 。</p>
<p>怎么现在就要开始编译了?</p>
<p>编译其实分两步,一步是编译,一步是连接。</p>
<p>我们先编译,等到了最后再进行连接。</p>
<p>打开之前下载的 msvc ,把它的目录转到 ygopro ,然后输入:</p>
<pre><code>cl</code></pre>
<p>然后应该会报错。</p>
<p>加个参数:</p>
<pre><code>cl /c ./lib/lua/src/*.c</code></pre>
<p>那个梅花号是通配符,这样子会把那个目录下的所有后缀名为「 c
」的文件都给编译了。</p>
<p>也许你会奇怪,这就编译完了?</p>
<p>原来编译这么简单。</p>
<p>别人都封装好了,当然简单了。</p>
<p>其实就这么简单的事,窗户纸不捅破,就一直<b>做不了</b>。</p>
<p>接下来,我们开优化:</p>
<pre><code>cl /O2 /c ./lib/lua/src/*.c</code></pre>
<p>代码速度慢一点,没啥大关系,还有编译器优化可以帮我们。</p>
<p>接下来讲点底层。</p>
<p>电脑里其实啥也没有,只有 01 ,我再强调一下,「 0 」、「 1 」。</p>
<p>那这些 01 是怎么运行的?</p>
<p>01
根本就运行不了,必须有东西承载着它们,而承载它们的那个东西理所应当就是计算机的底层吧?</p>
<p>你可以把那个东西看成是一个开关,它明显有两种状态,一种是开,一种关。</p>
<p>于是我们可以「把开叫做 0 ,把关叫做 1 」,也可以「把开叫做 1
,把关叫做 0 」</p>
<p>但这样子,我们人与人之间就不好互相交流了,于是有些组织就给这些名字定了规范。</p>
<p>好了,你现在已经把 01 与实物联系起来了,懂了。</p>
<p>然后再把刚才的忘掉。</p>
<p>因为刚才这个模型虽然合理,但其实是用来描述继电器的。</p>
<p>计算机内部使用的是半导体——它会有一个高电平,一个低电平。</p>
<p>于是我们可以像把开关的开关状态与 01
联系起来一样,把半导体的电平高低状态与 01 联系起来。</p>
<p>这个所谓的电平具体是指啥,我已经忘了,不过总不外乎是「电压」、「电流」这些与电相关的量度。</p>
<p>你小时候家里经常停电吗?</p>
<p>如果有过停电或电烧电器的经历,那么应该会有「电不稳定」的印象。</p>
<p>电平受制于电的不稳定,所以它是不精确的。</p>
<p>电平是低于某个临界点,就属于低电平,高于某个临界点,就属于高电平。</p>
<p>这个临界点是人定的。</p>
<p>接下来,不讲底层了。</p>
<p>01 往上可以组建逻辑门,而汇编编程语言可以指导逻辑门的运行。</p>
<p>但问题在于各个商家给逻辑门定的汇编语言是不一样的,于是我们需要一个通用的汇编语言,而这就是
c 语言的别称——「便携式汇编语言」。</p>
<p>一门编程语言可以大致分为三部分:</p>
<p>语法、标准库、自定义库。</p>
<p>lua 会用到 c 语言的标准库,而我们从上面的过程可以看到系统肯定会有 c
语言标准库。</p>
<p>加个参数:</p>
<pre><code>cl /MD /O2 /c ./lib/lua/src/*.c</code></pre>
<p>这样子, lua 就会采用系统自带的 c 语言标准库了。</p>
<p>但仅仅是这样子还不行,因为 ygopro 不是一个纯 c 语言的项目。</p>
<p>这里的 lua 需要采用 cpp ,也就是 c++的方式进行编译:</p>
<pre><code>cl /TP /MD /O2 /c ./lib/lua/src/*.c</code></pre>
<p>然后由于 cpp
的特性,你会收到一堆报错,此时编译器会提醒你再加个参数:</p>
<pre><code>cl /EHsc /TP /MD /O2 /c ./lib/lua/src/*.c</code></pre>
<p>好,大功告成,这就算把 lua 编译完了。</p>
<p>不过,这时候,你的目录下会有一大堆的 obj 文件,不好看。</p>
<p>于是输入:</p>
<pre><code>lib /OUT:lua.lib *.obj</code></pre>
<p>这就把所有的 obj 文件合成了一个文件了。</p>
<p>所以可以把 obj 文件全部删了:</p>
<pre><code>del *.obj</code></pre>
<p>也就是说,我们由一堆文件中编译出了一个文件:</p>
<pre><code>lua.lib</code></pre>
<h1 data-number="5" id="sqlite3"><span class="header-section-number">5</span> sqlite3</h1>
<p>接下来,我们需要下载一个很厉害的软件,作者是理查德·希普。</p>
<p>这一回应该不会遇到网络问题了:</p>
<pre><code>https://www.sqlite.org/index.html</code></pre>
<p>虽然,这一回我们不会再遇到网络问题,但可能会遇到这个网站的质疑:</p>
<p>你到底是不是<b>人</b>?</p>
<p>这是因为有些中国人恶意进攻这个网站,于是理查德专门把防范机器人的机制加强了。</p>
<p>把解压后的目录复制过来:</p>
<pre><code>ygopro
|—— lib
|——|—— lua
|——|——|—— src
|——|—— sqlite3</code></pre>
<p>然后编译:</p>
<pre><code>cl /MD /O2 /c ./lib/sqlite3/*.c</code></pre>
<p>然后再连接与清理一下即可。</p>
<p>其实 sqlite3 非常强,但是 ygopro
并没有对它擅加利用,这一点也体现在,你看这次的编译非常简单吧。</p>
<p>编译简单是因为没有设置那些解放 sqlite3 力量的宏。</p>
<h1 data-number="6" id="freetype"><span class="header-section-number">6</span> freetype</h1>
<p>下载:</p>
<pre><code>http://www.freetype.org</code></pre>
<p>目录结构:</p>
<pre><code>ygopro
|—— lib
|——|—— lua
|——|——|—— src
|——|—— sqlite3
|——|—— freetype
|——|——|—— src
|——|——|—— include
|——|——|—— builds</code></pre>
<p>编译:</p>
<pre><code>cl /MD /O2 /c /D FT2_BUILD_LIBRARY -I ./lib/freetype/include</code></pre>
<p>可以发现,上面添加了头文件所在的文件夹。</p>
<p>但奇怪的是,怎么没看到 c 文件?</p>
<p>因为这一次要编译的文件太多了:</p>
<pre><code>str[&quot;freetype_文件表&quot;] = {

&quot;src/autofit/autofit.c&quot;
, &quot;src/base/ftbase.c&quot;
, &quot;src/base/ftbbox.c&quot;
, &quot;src/base/ftbdf.c&quot;
, &quot;src/base/ftbitmap.c&quot;
, &quot;src/base/ftcid.c&quot;
, &quot;src/base/ftfstype.c&quot;
, &quot;src/base/ftgasp.c&quot;
, &quot;src/base/ftglyph.c&quot;
, &quot;src/base/ftgxval.c&quot;
, &quot;src/base/ftinit.c&quot;
, &quot;src/base/ftmm.c&quot;
, &quot;src/base/ftotval.c&quot;
, &quot;src/base/ftpatent.c&quot;
, &quot;src/base/ftpfr.c&quot;
, &quot;src/base/ftstroke.c&quot;
, &quot;src/base/ftsynth.c&quot;
, &quot;src/base/fttype1.c&quot;
, &quot;src/base/ftwinfnt.c&quot;
, &quot;src/bdf/bdf.c&quot;
, &quot;src/cache/ftcache.c&quot;
, &quot;src/cff/cff.c&quot;
, &quot;src/cid/type1cid.c&quot;
, &quot;src/gzip/ftgzip.c&quot;
, &quot;src/lzw/ftlzw.c&quot;
, &quot;src/pcf/pcf.c&quot;
, &quot;src/pfr/pfr.c&quot;
, &quot;src/psaux/psaux.c&quot;
, &quot;src/pshinter/pshinter.c&quot;
, &quot;src/psnames/psmodule.c&quot;
, &quot;src/raster/raster.c&quot;
, &quot;src/sfnt/sfnt.c&quot;
, &quot;src/sdf/sdf.c&quot;
, &quot;src/smooth/smooth.c&quot;
, &quot;src/truetype/truetype.c&quot;
, &quot;src/type1/type1.c&quot;
, &quot;src/type42/type42.c&quot;
, &quot;src/winfonts/winfnt.c&quot;
, &quot;src/svg/ftsvg.c&quot;
, &quot;builds/windows/ftsystem.c&quot;
, &quot;builds/windows/ftdebug.c&quot;
}</code></pre>
<h1 data-number="7" id="细节"><span class="header-section-number">7</span> 细节</h1>
<p>大致的流程基本讲清了,接下来就是细节:</p>
<pre><code>local str = {}
local fun = {}

local coroutine = _G.coroutine
local debug = _G.debug
local io = _G.io
local math = _G.math
local os = _G.os
local package = _G.package
local string = _G.string
local table = _G.table

local lfs = _G.lfs

--底层--------------------

fun[&quot;lua_预处理&quot;] = function() --{
  
  str[&quot;lua_目录&quot;] = lfs.currentdir() .. &quot;/lib/lua/src&quot;
  
  os.remove(str[&quot;lua_目录&quot;] .. &quot;/lua.c&quot;)
  
  os.remove(str[&quot;lua_目录&quot;] .. &quot;/luac.c&quot;)
  
  os.remove(str[&quot;lua_目录&quot;] .. &quot;/Makefile&quot;)
  
  str[&quot;lua_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  .. &quot;/TP &quot;
  .. &quot;/EHsc &quot;
  
  end --}
  
fun[&quot;lua_编译&quot;] = function() --{
  
  os.execute(str[&quot;lua_编译参数&quot;] .. &quot;./lib/lua/src/*.c&quot;)
  
  os.execute(&quot;lib /OUT:lua.lib *.obj&quot;)
  
  end --}
  
fun[&quot;lua_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;sqlite3_预处理&quot;] = function() --{
  
  str[&quot;sqlite3_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  
  end --}
  
fun[&quot;sqlite3_编译&quot;] = function() --{
  
  os.execute(str[&quot;sqlite3_编译参数&quot;] .. &quot;./lib/sqlite3/*.c&quot;)
  
  os.execute(&quot;lib /OUT:sqlite3.lib *.obj&quot;)
  
  end --}
  
fun[&quot;sqlite3_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;freetype_预处理&quot;] = function() --{
  
  str[&quot;freetype_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  .. &quot;/wd 4819 &quot;
  .. &quot;/D FT2_BUILD_LIBRARY &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/freetype/include &quot;
  
  str[&quot;freetype_文件表&quot;] = {
    
    &quot;src/autofit/autofit.c&quot;
    , &quot;src/base/ftbase.c&quot;
    , &quot;src/base/ftbbox.c&quot;
    , &quot;src/base/ftbdf.c&quot;
    , &quot;src/base/ftbitmap.c&quot;
    , &quot;src/base/ftcid.c&quot;
    , &quot;src/base/ftfstype.c&quot;
    , &quot;src/base/ftgasp.c&quot;
    , &quot;src/base/ftglyph.c&quot;
    , &quot;src/base/ftgxval.c&quot;
    , &quot;src/base/ftinit.c&quot;
    , &quot;src/base/ftmm.c&quot;
    , &quot;src/base/ftotval.c&quot;
    , &quot;src/base/ftpatent.c&quot;
    , &quot;src/base/ftpfr.c&quot;
    , &quot;src/base/ftstroke.c&quot;
    , &quot;src/base/ftsynth.c&quot;
    , &quot;src/base/fttype1.c&quot;
    , &quot;src/base/ftwinfnt.c&quot;
    , &quot;src/bdf/bdf.c&quot;
    , &quot;src/cache/ftcache.c&quot;
    , &quot;src/cff/cff.c&quot;
    , &quot;src/cid/type1cid.c&quot;
    , &quot;src/gzip/ftgzip.c&quot;
    , &quot;src/lzw/ftlzw.c&quot;
    , &quot;src/pcf/pcf.c&quot;
    , &quot;src/pfr/pfr.c&quot;
    , &quot;src/psaux/psaux.c&quot;
    , &quot;src/pshinter/pshinter.c&quot;
    , &quot;src/psnames/psmodule.c&quot;
    , &quot;src/raster/raster.c&quot;
    , &quot;src/sfnt/sfnt.c&quot;
    , &quot;src/sdf/sdf.c&quot;
    , &quot;src/smooth/smooth.c&quot;
    , &quot;src/truetype/truetype.c&quot;
    , &quot;src/type1/type1.c&quot;
    , &quot;src/type42/type42.c&quot;
    , &quot;src/winfonts/winfnt.c&quot;
    , &quot;src/svg/ftsvg.c&quot;
    , &quot;builds/windows/ftsystem.c&quot;
    , &quot;builds/windows/ftdebug.c&quot;
    }
    
  end --}
  
fun[&quot;freetype_编译&quot;] = function() --{
  
  for i = 1, #str[&quot;freetype_文件表&quot;] do --{
    
    os.execute(str[&quot;freetype_编译参数&quot;]
    .. &quot;./lib/freetype/&quot;
    .. str[&quot;freetype_文件表&quot;][i])
    
    end --}
    
  os.execute(&quot;lib /OUT:freetype.lib *.obj&quot;)
  
  end --}
  
fun[&quot;freetype_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;libevent_预处理&quot;] = function() --{
  
  str[&quot;libevent_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  .. &quot;/D EVENT__HAVE_STDINT_H &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/event/include &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/event/compat &quot;
  
  str[&quot;libevent_文件移动参数&quot;] = &quot;robocopy &quot;
  .. lfs.currentdir() .. &quot;/lib/event/WIN32-Code/nmake &quot;
  .. lfs.currentdir() .. &quot;/lib/event/include &quot;
  .. &quot;/xx &quot;
  .. &quot;/E &quot;
  
  str[&quot;libevent_文件表&quot;] = {
    
    &quot;event.c&quot;
    , &quot;evthread.c&quot;
    , &quot;buffer.c&quot;
    , &quot;bufferevent.c&quot;
    , &quot;bufferevent_sock.c&quot;
    , &quot;bufferevent_filter.c&quot;
    , &quot;bufferevent_pair.c&quot;
    , &quot;listener.c&quot;
    , &quot;bufferevent_ratelim.c&quot;
    , &quot;evmap.c&quot;
    , &quot;log.c&quot;
    , &quot;evutil.c&quot;
    , &quot;evutil_rand.c&quot;
    , &quot;evutil_time.c&quot;
    , &quot;strlcpy.c&quot;
    , &quot;signal.c&quot;
    , &quot;event_tagging.c&quot;
    , &quot;http.c&quot;
    , &quot;evdns.c&quot;
    , &quot;evrpc.c&quot;
    , &quot;win32select.c&quot;
    , &quot;evthread_win32.c&quot;
    , &quot;buffer_iocp.c&quot;
    , &quot;event_iocp.c&quot;
    , &quot;bufferevent_async.c&quot;
    , &quot;WIN32-Code/getopt_long.c&quot;
    , &quot;WIN32-Code/getopt.c&quot;
    }
    
  end --}
  
fun[&quot;libevent_编译&quot;] = function() --{
  
  os.execute(str[&quot;libevent_文件移动参数&quot;])
  
  for i = 1, #str[&quot;libevent_文件表&quot;] do --{
    
    os.execute(str[&quot;libevent_编译参数&quot;]
    .. &quot;./lib/event/&quot;
    .. str[&quot;libevent_文件表&quot;][i])
    
    end --}
    
  os.execute(&quot;lib /OUT:event.lib *.obj&quot;)
  
  end --}
  
fun[&quot;libevent_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;irrlicht_预处理&quot;] = function() --{
  
  str[&quot;irrlicht_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  .. &quot;/wd 4819 &quot;
  .. &quot;/EHsc &quot;
  .. &quot;/D UNICODE &quot;
  .. &quot;/D _IRR_STATIC_LIB_ &quot;
  .. &quot;/D _IRR_WCHAR_FILESYSTEM &quot;
  .. &quot;/D NO_IRR_COMPILE_WITH_DIRECT3D_9_ &quot;
  .. &quot;/D NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/irrlicht/include &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/irrlicht/source/Irrlicht &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/irrlicht/source/Irrlicht/jpeglib &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/irrlicht/source/Irrlicht/libpng &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/irrlicht/source/Irrlicht/zlib &quot;
  
  str[&quot;irrlicht_文件表&quot;] = {
    
    &quot;source/Irrlicht/CCgMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D9CgMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp&quot;
    , &quot;source/Irrlicht/CDefaultSceneNodeFactory.cpp&quot;
    , &quot;source/Irrlicht/CGeometryCreator.cpp&quot;
    , &quot;source/Irrlicht/CMeshCache.cpp&quot;
    , &quot;source/Irrlicht/CMeshManipulator.cpp&quot;
    , &quot;source/Irrlicht/COpenGLCgMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/CSceneManager.cpp&quot;
    , &quot;source/Irrlicht/C3DSMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CSMFMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CAnimatedMeshHalfLife.cpp&quot;
    , &quot;source/Irrlicht/CAnimatedMeshMD2.cpp&quot;
    , &quot;source/Irrlicht/CAnimatedMeshMD3.cpp&quot;
    , &quot;source/Irrlicht/CB3DMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CBSPMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CColladaFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CCSMLoader.cpp&quot;
    , &quot;source/Irrlicht/CDMFLoader.cpp&quot;
    , &quot;source/Irrlicht/CIrrMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CLMTSMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CLWOMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CMD2MeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CMD3MeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CMS3DMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CMY3DMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/COBJMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/COCTLoader.cpp&quot;
    , &quot;source/Irrlicht/COgreMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CPLYMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CQ3LevelMesh.cpp&quot;
    , &quot;source/Irrlicht/CSkinnedMesh.cpp&quot;
    , &quot;source/Irrlicht/CSTLMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CXMeshFileLoader.cpp&quot;
    , &quot;source/Irrlicht/CAnimatedMeshSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CBillboardSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CBoneSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CCameraSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CCubeSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CDummyTransformationSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CEmptySceneNode.cpp&quot;
    , &quot;source/Irrlicht/CLightSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CMeshSceneNode.cpp&quot;
    , &quot;source/Irrlicht/COctreeSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CQuake3ShaderSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CShadowVolumeSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CSkyBoxSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CSkyDomeSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CSphereSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CTerrainSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CTextSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CVolumeLightSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CWaterSurfaceSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp&quot;
    , &quot;source/Irrlicht/CParticleAttractionAffector.cpp&quot;
    , &quot;source/Irrlicht/CParticleBoxEmitter.cpp&quot;
    , &quot;source/Irrlicht/CParticleCylinderEmitter.cpp&quot;
    , &quot;source/Irrlicht/CParticleFadeOutAffector.cpp&quot;
    , &quot;source/Irrlicht/CParticleGravityAffector.cpp&quot;
    , &quot;source/Irrlicht/CParticleMeshEmitter.cpp&quot;
    , &quot;source/Irrlicht/CParticlePointEmitter.cpp&quot;
    , &quot;source/Irrlicht/CParticleRingEmitter.cpp&quot;
    , &quot;source/Irrlicht/CParticleRotationAffector.cpp&quot;
    , &quot;source/Irrlicht/CParticleScaleAffector.cpp&quot;
    , &quot;source/Irrlicht/CParticleSphereEmitter.cpp&quot;
    , &quot;source/Irrlicht/CParticleSystemSceneNode.cpp&quot;
    , &quot;source/Irrlicht/CMetaTriangleSelector.cpp&quot;
    , &quot;source/Irrlicht/COctreeTriangleSelector.cpp&quot;
    , &quot;source/Irrlicht/CSceneCollisionManager.cpp&quot;
    , &quot;source/Irrlicht/CTerrainTriangleSelector.cpp&quot;
    , &quot;source/Irrlicht/CTriangleBBSelector.cpp&quot;
    , &quot;source/Irrlicht/CTriangleSelector.cpp&quot;
    , &quot;source/Irrlicht/CSceneLoaderIrr.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorDelete.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorRotation.cpp&quot;
    , &quot;source/Irrlicht/CSceneNodeAnimatorTexture.cpp&quot;
    , &quot;source/Irrlicht/CColladaMeshWriter.cpp&quot;
    , &quot;source/Irrlicht/CIrrMeshWriter.cpp&quot;
    , &quot;source/Irrlicht/COBJMeshWriter.cpp&quot;
    , &quot;source/Irrlicht/CPLYMeshWriter.cpp&quot;
    , &quot;source/Irrlicht/CSTLMeshWriter.cpp&quot;
    , &quot;source/Irrlicht/CVideoModeList.cpp&quot;
    , &quot;source/Irrlicht/CSoftwareDriver.cpp&quot;
    , &quot;source/Irrlicht/CSoftwareTexture.cpp&quot;
    , &quot;source/Irrlicht/CTRFlat.cpp&quot;
    , &quot;source/Irrlicht/CTRFlatWire.cpp&quot;
    , &quot;source/Irrlicht/CTRGouraud.cpp&quot;
    , &quot;source/Irrlicht/CTRGouraudWire.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureFlat.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureFlatWire.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraud.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudAdd.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudNoZ.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudWire.cpp&quot;
    , &quot;source/Irrlicht/CZBuffer.cpp&quot;
    , &quot;source/Irrlicht/COpenGLDriver.cpp&quot;
    , &quot;source/Irrlicht/COpenGLExtensionHandler.cpp&quot;
    , &quot;source/Irrlicht/COpenGLNormalMapRenderer.cpp&quot;
    , &quot;source/Irrlicht/COpenGLParallaxMapRenderer.cpp&quot;
    , &quot;source/Irrlicht/COpenGLShaderMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/COpenGLSLMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/COpenGLTexture.cpp&quot;
    , &quot;source/Irrlicht/CD3D8Driver.cpp&quot;
    , &quot;source/Irrlicht/CD3D8NormalMapRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D8ParallaxMapRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D8Texture.cpp&quot;
    , &quot;source/Irrlicht/CColorConverter.cpp&quot;
    , &quot;source/Irrlicht/CFPSCounter.cpp&quot;
    , &quot;source/Irrlicht/CImage.cpp&quot;
    , &quot;source/Irrlicht/CNullDriver.cpp&quot;
    , &quot;source/Irrlicht/CImageWriterBMP.cpp&quot;
    , &quot;source/Irrlicht/CImageWriterJPG.cpp&quot;
    , &quot;source/Irrlicht/CImageWriterPCX.cpp&quot;
    , &quot;source/Irrlicht/CImageWriterPNG.cpp&quot;
    , &quot;source/Irrlicht/CImageWriterPPM.cpp&quot;
    , &quot;source/Irrlicht/CImageWriterPSD.cpp&quot;
    , &quot;source/Irrlicht/CImageWriterTGA.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderBMP.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderDDS.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderJPG.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderPCX.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderPNG.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderPPM.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderPSD.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderRGB.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderTGA.cpp&quot;
    , &quot;source/Irrlicht/CImageLoaderWAL.cpp&quot;
    , &quot;source/Irrlicht/CD3D9Driver.cpp&quot;
    , &quot;source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D9NormalMapRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D9ParallaxMapRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp&quot;
    , &quot;source/Irrlicht/CD3D9Texture.cpp&quot;
    , &quot;source/Irrlicht/CBurningShader_Raster_Reference.cpp&quot;
    , &quot;source/Irrlicht/CDepthBuffer.cpp&quot;
    , &quot;source/Irrlicht/CSoftwareDriver2.cpp&quot;
    , &quot;source/Irrlicht/CSoftwareTexture2.cpp&quot;
    , &quot;source/Irrlicht/CTRGouraud2.cpp&quot;
    , &quot;source/Irrlicht/CTRGouraudAlpha2.cpp&quot;
    , &quot;source/Irrlicht/CTRGouraudAlphaNoZ2.cpp&quot;
    , &quot;source/Irrlicht/CTRNormalMap.cpp&quot;
    , &quot;source/Irrlicht/CTRStencilShadow.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureBlend.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureDetailMap2.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraud2.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudAdd2.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudAlpha.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudNoZ2.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureLightMap2_Add.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureLightMap2_M1.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureLightMap2_M2.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureLightMap2_M4.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp&quot;
    , &quot;source/Irrlicht/CTRTextureWire2.cpp&quot;
    , &quot;source/Irrlicht/IBurningShader.cpp&quot;
    , &quot;source/Irrlicht/CLogger.cpp&quot;
    , &quot;source/Irrlicht/COSOperator.cpp&quot;
    , &quot;source/Irrlicht/Irrlicht.cpp&quot;
    , &quot;source/Irrlicht/os.cpp&quot;
    , &quot;source/Irrlicht/lzma/LzmaDec.c&quot;
    , &quot;source/Irrlicht/zlib/adler32.c&quot;
    , &quot;source/Irrlicht/zlib/compress.c&quot;
    , &quot;source/Irrlicht/zlib/crc32.c&quot;
    , &quot;source/Irrlicht/zlib/deflate.c&quot;
    , &quot;source/Irrlicht/zlib/inffast.c&quot;
    , &quot;source/Irrlicht/zlib/inflate.c&quot;
    , &quot;source/Irrlicht/zlib/inftrees.c&quot;
    , &quot;source/Irrlicht/zlib/trees.c&quot;
    , &quot;source/Irrlicht/zlib/uncompr.c&quot;
    , &quot;source/Irrlicht/zlib/zutil.c&quot;
    , &quot;source/Irrlicht/jpeglib/jaricom.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcapimin.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcapistd.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcarith.c&quot;
    , &quot;source/Irrlicht/jpeglib/jccoefct.c&quot;
    , &quot;source/Irrlicht/jpeglib/jccolor.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcdctmgr.c&quot;
    , &quot;source/Irrlicht/jpeglib/jchuff.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcinit.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcmainct.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcmarker.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcmaster.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcomapi.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcparam.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcprepct.c&quot;
    , &quot;source/Irrlicht/jpeglib/jcsample.c&quot;
    , &quot;source/Irrlicht/jpeglib/jctrans.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdapimin.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdapistd.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdarith.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdatadst.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdatasrc.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdcoefct.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdcolor.c&quot;
    , &quot;source/Irrlicht/jpeglib/jddctmgr.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdhuff.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdinput.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdmainct.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdmarker.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdmaster.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdmerge.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdpostct.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdsample.c&quot;
    , &quot;source/Irrlicht/jpeglib/jdtrans.c&quot;
    , &quot;source/Irrlicht/jpeglib/jerror.c&quot;
    , &quot;source/Irrlicht/jpeglib/jfdctflt.c&quot;
    , &quot;source/Irrlicht/jpeglib/jfdctfst.c&quot;
    , &quot;source/Irrlicht/jpeglib/jfdctint.c&quot;
    , &quot;source/Irrlicht/jpeglib/jidctflt.c&quot;
    , &quot;source/Irrlicht/jpeglib/jidctfst.c&quot;
    , &quot;source/Irrlicht/jpeglib/jidctint.c&quot;
    , &quot;source/Irrlicht/jpeglib/jmemmgr.c&quot;
    , &quot;source/Irrlicht/jpeglib/jmemnobs.c&quot;
    , &quot;source/Irrlicht/jpeglib/jquant1.c&quot;
    , &quot;source/Irrlicht/jpeglib/jquant2.c&quot;
    , &quot;source/Irrlicht/jpeglib/jutils.c&quot;
    , &quot;source/Irrlicht/libpng/png.c&quot;
    , &quot;source/Irrlicht/libpng/pngerror.c&quot;
    , &quot;source/Irrlicht/libpng/pngget.c&quot;
    , &quot;source/Irrlicht/libpng/pngmem.c&quot;
    , &quot;source/Irrlicht/libpng/pngpread.c&quot;
    , &quot;source/Irrlicht/libpng/pngread.c&quot;
    , &quot;source/Irrlicht/libpng/pngrio.c&quot;
    , &quot;source/Irrlicht/libpng/pngrtran.c&quot;
    , &quot;source/Irrlicht/libpng/pngrutil.c&quot;
    , &quot;source/Irrlicht/libpng/pngset.c&quot;
    , &quot;source/Irrlicht/libpng/pngtrans.c&quot;
    , &quot;source/Irrlicht/libpng/pngwio.c&quot;
    , &quot;source/Irrlicht/libpng/pngwrite.c&quot;
    , &quot;source/Irrlicht/libpng/pngwtran.c&quot;
    , &quot;source/Irrlicht/libpng/pngwutil.c&quot;
    , &quot;source/Irrlicht/aesGladman/aescrypt.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/aeskey.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/aestab.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/fileenc.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/hmac.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/prng.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/pwd2key.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/sha1.cpp&quot;
    , &quot;source/Irrlicht/aesGladman/sha2.cpp&quot;
    , &quot;source/Irrlicht/bzip2/blocksort.c&quot;
    , &quot;source/Irrlicht/bzip2/bzcompress.c&quot;
    , &quot;source/Irrlicht/bzip2/bzlib.c&quot;
    , &quot;source/Irrlicht/bzip2/crctable.c&quot;
    , &quot;source/Irrlicht/bzip2/decompress.c&quot;
    , &quot;source/Irrlicht/bzip2/huffman.c&quot;
    , &quot;source/Irrlicht/bzip2/randtable.c&quot;
    , &quot;source/Irrlicht/CIrrDeviceConsole.cpp&quot;
    , &quot;source/Irrlicht/CIrrDeviceFB.cpp&quot;
    , &quot;source/Irrlicht/CIrrDeviceLinux.cpp&quot;
    , &quot;source/Irrlicht/CIrrDeviceSDL.cpp&quot;
    , &quot;source/Irrlicht/CIrrDeviceStub.cpp&quot;
    , &quot;source/Irrlicht/CIrrDeviceWin32.cpp&quot;
    , &quot;source/Irrlicht/CIrrDeviceWinCE.cpp&quot;
    , &quot;source/Irrlicht/CAttributes.cpp&quot;
    , &quot;source/Irrlicht/CFileList.cpp&quot;
    , &quot;source/Irrlicht/CFileSystem.cpp&quot;
    , &quot;source/Irrlicht/CLimitReadFile.cpp&quot;
    , &quot;source/Irrlicht/CMemoryFile.cpp&quot;
    , &quot;source/Irrlicht/CMountPointReader.cpp&quot;
    , &quot;source/Irrlicht/CNPKReader.cpp&quot;
    , &quot;source/Irrlicht/CPakReader.cpp&quot;
    , &quot;source/Irrlicht/CReadFile.cpp&quot;
    , &quot;source/Irrlicht/CTarReader.cpp&quot;
    , &quot;source/Irrlicht/CWADReader.cpp&quot;
    , &quot;source/Irrlicht/CWriteFile.cpp&quot;
    , &quot;source/Irrlicht/CXMLReader.cpp&quot;
    , &quot;source/Irrlicht/CXMLWriter.cpp&quot;
    , &quot;source/Irrlicht/CZipReader.cpp&quot;
    , &quot;source/Irrlicht/irrXML.cpp&quot;
    , &quot;source/Irrlicht/CDefaultGUIElementFactory.cpp&quot;
    , &quot;source/Irrlicht/CGUIButton.cpp&quot;
    , &quot;source/Irrlicht/CGUICheckBox.cpp&quot;
    , &quot;source/Irrlicht/CGUIColorSelectDialog.cpp&quot;
    , &quot;source/Irrlicht/CGUIComboBox.cpp&quot;
    , &quot;source/Irrlicht/CGUIContextMenu.cpp&quot;
    , &quot;source/Irrlicht/CGUIEditBox.cpp&quot;
    , &quot;source/Irrlicht/CGUIEnvironment.cpp&quot;
    , &quot;source/Irrlicht/CGUIFileOpenDialog.cpp&quot;
    , &quot;source/Irrlicht/CGUIFont.cpp&quot;
    , &quot;source/Irrlicht/CGUIImage.cpp&quot;
    , &quot;source/Irrlicht/CGUIImageList.cpp&quot;
    , &quot;source/Irrlicht/CGUIInOutFader.cpp&quot;
    , &quot;source/Irrlicht/CGUIListBox.cpp&quot;
    , &quot;source/Irrlicht/CGUIMenu.cpp&quot;
    , &quot;source/Irrlicht/CGUIMeshViewer.cpp&quot;
    , &quot;source/Irrlicht/CGUIMessageBox.cpp&quot;
    , &quot;source/Irrlicht/CGUIModalScreen.cpp&quot;
    , &quot;source/Irrlicht/CGUIScrollBar.cpp&quot;
    , &quot;source/Irrlicht/CGUISkin.cpp&quot;
    , &quot;source/Irrlicht/CGUISpinBox.cpp&quot;
    , &quot;source/Irrlicht/CGUISpriteBank.cpp&quot;
    , &quot;source/Irrlicht/CGUIStaticText.cpp&quot;
    , &quot;source/Irrlicht/CGUITabControl.cpp&quot;
    , &quot;source/Irrlicht/CGUITable.cpp&quot;
    , &quot;source/Irrlicht/CGUIToolBar.cpp&quot;
    , &quot;source/Irrlicht/CGUITreeView.cpp&quot;
    , &quot;source/Irrlicht/CGUIWindow.cpp&quot;
    }
    
  end --}
  
fun[&quot;irrlicht_编译&quot;] = function() --{
  
  for i = 1, #str[&quot;irrlicht_文件表&quot;] do --{
    
    os.execute(str[&quot;irrlicht_编译参数&quot;]
    .. &quot;./lib/irrlicht/&quot;
    .. str[&quot;irrlicht_文件表&quot;][i])
    
    end --}
    
  os.execute(&quot;lib /OUT:irrlicht.lib *.obj&quot;)
  
  end --}
  
fun[&quot;irrlicht_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;lzma_预处理&quot;] = function() --{
  
  str[&quot;lzma_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
    
  end --}
  
fun[&quot;lzma_编译&quot;] = function() --{
  
  os.execute(str[&quot;lzma_编译参数&quot;]
  .. &quot;./gframe/lzma/*.c&quot;)

  os.execute(&quot;lib /OUT:clzma.lib *.obj&quot;)
  
  end --}
  
fun[&quot;lzma_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;spmemvfs_预处理&quot;] = function() --{
  
  str[&quot;spmemvfs_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/sqlite3 &quot;
    
  end --}
  
fun[&quot;spmemvfs_编译&quot;] = function() --{
  
  os.execute(str[&quot;spmemvfs_编译参数&quot;]
  .. &quot;./gframe/spmemvfs/*.c&quot;)

  os.execute(&quot;lib /OUT:cspmemvfs.lib *.obj&quot;)
  
  end --}
  
fun[&quot;spmemvfs_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;ocgcore_预处理&quot;] = function() --{
  
  str[&quot;ocgcore_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  .. &quot;/EHsc &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/lua/src &quot;
    
  end --}
  
fun[&quot;ocgcore_编译&quot;] = function() --{
  
  os.execute(str[&quot;ocgcore_编译参数&quot;]
  .. &quot;./ocgcore/*.cpp&quot;)

  os.execute(&quot;lib /OUT:ocgcore.lib *.obj&quot;)
  
  end --}
  
fun[&quot;ocgcore_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  end --}
  
fun[&quot;ygopro_预处理&quot;] = function() --{
  
  str[&quot;ygopro_编译参数&quot;] = &quot;cl &quot;
  .. &quot;/MD &quot;
  .. &quot;/O2 &quot;
  .. &quot;/c &quot;
  .. &quot;/wd 4819 &quot;
  .. &quot;/EHsc &quot;
  .. &quot;/D _IRR_WCHAR_FILESYSTEM &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/ocgcore &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/irrlicht/include &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/event/include &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/freetype/include &quot;
  .. &quot;-I &quot; .. lfs.currentdir() .. &quot;/lib/sqlite3 &quot;
    
  end --}
  
fun[&quot;ygopro_编译&quot;] = function() --{
  
  os.execute(str[&quot;ygopro_编译参数&quot;]
  .. &quot;./gframe/*.cpp&quot;)
  
  os.rename(&quot;gframe.obj&quot;, &quot;gframe.o&quot;)

  os.execute(&quot;lib /OUT:ygopro.lib *.obj&quot;)
  
  end --}
  
fun[&quot;ygopro_连接&quot;] = function() --{
  
  os.execute(&quot;link &quot;
  .. &quot;/OUT:ygopro.exe &quot;
  .. &quot;gframe.o &quot;
  .. &quot;ygopro.lib &quot;
  .. &quot;clzma.lib &quot;
  .. &quot;cspmemvfs.lib &quot;
  .. &quot;event.lib &quot;
  .. &quot;freetype.lib &quot;
  .. &quot;irrlicht.lib &quot;
  .. &quot;lua.lib &quot;
  .. &quot;ocgcore.lib &quot;
  .. &quot;sqlite3.lib &quot;
  .. &quot;gdi32.lib &quot;
  .. &quot;user32.lib &quot;
  .. &quot;kernel32.lib &quot;
  .. &quot;imm32.lib &quot;
  .. &quot;winmm.lib &quot;
  .. &quot;ws2_32.lib &quot;
  .. &quot;opengl32.lib &quot;
  .. &quot;shell32.lib &quot;
  .. &quot;iphlpapi.lib &quot;
  .. &quot;advapi32.lib &quot;
  )
  
  end --}
  
fun[&quot;ygopro_清理&quot;] = function() --{
  
  os.execute(&quot;del *.obj&quot;)
  
  os.execute(&quot;del *.o&quot;)
  
  end --}
  
--高层--------------------

fun[&quot;lua&quot;] = function() --{
  
  fun[&quot;lua_预处理&quot;]()
  
  fun[&quot;lua_编译&quot;]()
  
  fun[&quot;lua_清理&quot;]()
  
  end --}
  
fun[&quot;sqlite3&quot;] = function() --{
  
  fun[&quot;sqlite3_预处理&quot;]()
  
  fun[&quot;sqlite3_编译&quot;]()
  
  fun[&quot;sqlite3_清理&quot;]()
  
  end --}
  
fun[&quot;freetype&quot;] = function() --{
  
  fun[&quot;freetype_预处理&quot;]()
  
  fun[&quot;freetype_编译&quot;]()
  
  fun[&quot;freetype_清理&quot;]()
  
  end --}
  
fun[&quot;libevent&quot;] = function() --{
  
  fun[&quot;libevent_预处理&quot;]()
  
  fun[&quot;libevent_编译&quot;]()
  
  fun[&quot;libevent_清理&quot;]()
  
  end --}
  
fun[&quot;irrlicht&quot;] = function() --{
  
  fun[&quot;irrlicht_预处理&quot;]()
  
  fun[&quot;irrlicht_编译&quot;]()
  
  fun[&quot;irrlicht_清理&quot;]()
  
  end --}
  
fun[&quot;lzma&quot;] = function() --{
  
  fun[&quot;lzma_预处理&quot;]()
  
  fun[&quot;lzma_编译&quot;]()
  
  fun[&quot;lzma_清理&quot;]()
  
  end --}
  
fun[&quot;spmemvfs&quot;] = function() --{
  
  fun[&quot;spmemvfs_预处理&quot;]()
  
  fun[&quot;spmemvfs_编译&quot;]()
  
  fun[&quot;spmemvfs_清理&quot;]()
  
  end --}
  
fun[&quot;ocgcore&quot;] = function() --{
  
  fun[&quot;ocgcore_预处理&quot;]()
  
  fun[&quot;ocgcore_编译&quot;]()
  
  fun[&quot;ocgcore_清理&quot;]()
  
  end --}
  
fun[&quot;ygopro&quot;] = function() --{
  
  fun[&quot;ygopro_预处理&quot;]()
  
  fun[&quot;ygopro_编译&quot;]()
  
  fun[&quot;ygopro_连接&quot;]()
  
  fun[&quot;ygopro_清理&quot;]()
  
  end --}
  
-------------------------

fun[&quot;lua&quot;]()

fun[&quot;sqlite3&quot;]()

fun[&quot;freetype&quot;]()

fun[&quot;libevent&quot;]()

fun[&quot;irrlicht&quot;]()

fun[&quot;lzma&quot;]()

fun[&quot;spmemvfs&quot;]()

fun[&quot;ocgcore&quot;]()

fun[&quot;ygopro&quot;]()</code></pre>
<h1 data-number="8" id="缺点"><span class="header-section-number">8</span> 缺点</h1>
<p>这样子编译的 ygopro 还缺一些媒体资源,从你的 ygopro
中直接复制过来就行。</p>
<p>不支持声音,小问题。</p>
<p>不支持打人机卡组,小问题。</p>
<p>没有图标,小问题。</p>
<p>不支持中文输入法,大问题,不过我的输入法不受影响,哈哈。</p>
<script>

document.onclick = function(event) {

  var target = event.target

  if (target.tagName == "PRE"
  || target.tagName == "CODE") {
    if (window.getSelection().toString() !== "") {
      return
      }
    var range = document.createRange();
    range.selectNodeContents(target);
    window.getSelection().removeAllRanges();
    window.getSelection().addRange(range);
    var successful = document.execCommand("copy");
    target.removeAttribute("contenteditable");
    window.getSelection().removeAllRanges();
    }

  }

</script>
</body>
</html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted script/一点点点基础.html version [6e90e88849].

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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang>
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>一点点点基础</title>
  <style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}

ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
  <style type="text/css">@media screen and (min-aspect-ratio:1/1) {html {background-color: f8f8f8;background-image:linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);background-size: 8px 8px;background-position: 0 0, 16px 8px;}body {border: solid #a0a0a0 1px ;border-radius: 20px ;padding: 26px ;margin: 16px ;color: #101010 ;background: linear-gradient(to right, #efefefff, #efefeffc);padding: 2em 11%;line-height: 2.1em;box-shadow: 0px 0px 1px rgba(160, 160, 160, 1), 0px 0px 1px rgba(160, 160, 160, 1);}}h1,h2,h3,h4,h5,h6 {font-size: 1.5em;color: #3F5770;border-bottom: 1px solid #dddddd;margin: 1.2em 0em;}a {list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;background-color: white;text-decoration-color: blue;border-radius: 0.2em;}a:visited {color: blue;text-decoration-color: white;}a:active {color: red;}nav ul li {margin: 1.2em 0em;}p::before {}p {margin: 1.2em 0;}.title {background-color: white;font-size: 2em;text-align: center;}b {background-color: white;list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;border-radius: 0.2em;}details {border-bottom: 1px solid #dddddd;}details > summary {list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;outline: none;border-radius: 0.2em;}pre {background: #f6f6f6;border-left: 0.5em solid #ccc;padding: 0.4em;border-radius: 0.2em;overflow-wrap:break-word;}pre:active {color: red;}code {font-family: "Verdana";}button {background: #ffffff;color: #20894d;}button:active {color: red;}</style>
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
  <![endif]-->
</head>
<body>
<nav id="TOC" role="doc-toc">
<ul>
<li><a href="#一点点点基础" id="toc-一点点点基础"><span class="toc-section-number">1</span> 一点点点基础</a>
<ul>
<li><a href="#添加卡片" id="toc-添加卡片"><span class="toc-section-number">1.1</span> 添加卡片</a></li>
<li><a href="#注册效果" id="toc-注册效果"><span class="toc-section-number">1.2</span> 注册效果</a></li>
<li><a href="#效果描述" id="toc-效果描述"><span class="toc-section-number">1.3</span> 效果描述</a></li>
<li><a href="#效果参数" id="toc-效果参数"><span class="toc-section-number">1.4</span> 效果参数</a></li>
<li><a href="#效果检查" id="toc-效果检查"><span class="toc-section-number">1.5</span> 效果检查</a></li>
<li><a href="#火球" id="toc-火球"><span class="toc-section-number">1.6</span> 火球</a></li>
<li><a href="#叛逆之罪宝-蛇眼" id="toc-叛逆之罪宝-蛇眼"><span class="toc-section-number">1.7</span> 叛逆之罪宝-蛇眼</a></li>
<li><a href="#废铁死亡恶魔" id="toc-废铁死亡恶魔"><span class="toc-section-number">1.8</span> 废铁死亡恶魔</a></li>
<li><a href="#虫饵" id="toc-虫饵"><span class="toc-section-number">1.9</span> 虫饵</a></li>
<li><a href="#天底的使徒" id="toc-天底的使徒"><span class="toc-section-number">1.10</span> 天底的使徒</a></li>
</ul></li>
</ul>
</nav>
<h1 data-number="1" id="一点点点基础"><span class="header-section-number">1</span> 一点点点基础</h1>
<h2 data-number="1.1" id="添加卡片"><span class="header-section-number">1.1</span> 添加卡片</h2>
<p>青眼白龙的卡密是 89631139 ,但查不到 c89631139.lua 。</p>
<p>估计<b>只需要</b>更改 cards.cdb ,就可以添加卡片了。</p>
<hr />
<p>c89631139 的 c 是指 card ,就是「卡片」。</p>
<h2 data-number="1.2" id="注册效果"><span class="header-section-number">1.2</span> 注册效果</h2>
<p>火球的效果足够简单,就以火球为例。</p>
<p>火球里有很多函数,但并没有启用这些函数的语句,这表明它们自己单独是不能运行的,而是<b>被</b>其他的东西给调用。</p>
<p>在 c46130346.lua ,有以下效果:</p>
<pre><code>function c46130346.initial_effect(c)
end</code></pre>
<p>它被 interpreter.cpp 所调用:</p>
<pre><code>call_card_function(pcard, &quot;initial_effect&quot;, 1, 0);</code></pre>
<hr />
<p>c46130346.initial_effect 不利于复制粘贴。</p>
<p>在 utility.lua 有:</p>
<pre><code>function GetID()
end</code></pre>
<p>所以可以这样注册效果:</p>
<pre><code>local s,id,o=GetID()
function s.initial_effect(c)
end</code></pre>
<h2 data-number="1.3" id="效果描述"><span class="header-section-number">1.3</span> 效果描述</h2>
<p>诸如 SetProperty ,其参数可以在 <b>constant.lua</b> 查。</p>
<hr />
<p>简单的描述就写简单一点,复杂的描述就写复杂一点。</p>
<h2 data-number="1.4" id="效果参数"><span class="header-section-number">1.4</span> 效果参数</h2>
<p>在 processor.cpp
可以看到,有时给函数传参数的时候传的是匿名参数,所以很多时候,这些参数其实是<b>空</b>的。</p>
<pre><code>e effect
tp this player
eg event group
ep event player
ev event value
re reason effect
r reason
rp reason player
chk check
chkc check card</code></pre>
<hr />
<p>0 指先攻玩家, 1 指后攻玩家,这是绝对的。</p>
<p>tp 指我方玩家, 1 - tp 指对方玩家,这是相对的。</p>
<hr />
<p>这套效果参数,可以看作是一个规范,目的是为了便于看懂与复制代码。</p>
<h2 data-number="1.5" id="效果检查"><span class="header-section-number">1.5</span> 效果检查</h2>
<pre><code>function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
  if chk==0 then return 233333333 end
  233333333
end</code></pre>
<p>这个函数,我觉得应该看作<b>两个</b>函数。</p>
<p>它在 chk 的值不同时,执行不同的分支。</p>
<p>而 chk 取决于效果执行的阶段:检查阶段与执行阶段。</p>
<h2 data-number="1.6" id="火球"><span class="header-section-number">1.6</span> 火球</h2>
<pre><code>function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
    if chk==0 then return true end
    Duel.SetTargetPlayer(1-tp)
    Duel.SetTargetParam(500)
    Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end</code></pre>
<hr />
<p>把:</p>
<pre><code>if chk==0 then return true end</code></pre>
<p>改成:</p>
<pre><code>if chk==0 then return false end</code></pre>
<p>则无法发动火球。</p>
<hr />
<p>去掉:</p>
<pre><code>Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)</code></pre>
<p>则无法<b>对应火球</b>而发动痛魂之咒术。</p>
<hr />
<p>去掉</p>
<pre><code>e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)</code></pre>
<p>则无法对应火球而发动精灵之镜。</p>
<h2 data-number="1.7" id="叛逆之罪宝-蛇眼"><span class="header-section-number">1.7</span> 叛逆之罪宝-蛇眼</h2>
<p>去掉:</p>
<pre><code>e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)</code></pre>
<p>则可以发动多次。</p>
<hr />
<p>去掉:</p>
<pre><code>e1:SetDescription(aux.Stringid(id,0))</code></pre>
<p>则没有变化。</p>
<hr />
<p>去掉:</p>
<pre><code>Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)</code></pre>
<p>则提示文本发生改变。</p>
<p>这些提示文本可以在 constant.lua 中<b>找到</b>。</p>
<hr />
<p>去掉:</p>
<pre><code>e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)</code></pre>
<p>则旋风无法破坏那些怪兽。</p>
<hr />
<p>去掉:</p>
<pre><code>e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)</code></pre>
<p>则那些怪兽离开场上后仍然被当作永续魔法卡。</p>
<h2 data-number="1.8" id="废铁死亡恶魔"><span class="header-section-number">1.8</span> 废铁死亡恶魔</h2>
<p>去掉:</p>
<pre><code>c:EnableReviveLimit()</code></pre>
<p>则<b>没有</b>苏生限制。</p>
<h2 data-number="1.9" id="虫饵"><span class="header-section-number">1.9</span> 虫饵</h2>
<p>去掉:</p>
<pre><code>e2:SetCode(EFFECT_CANNOT_SUMMON)</code></pre>
<p>则<b>不会</b>封锁召唤。</p>
<h2 data-number="1.10" id="天底的使徒"><span class="header-section-number">1.10</span> 天底的使徒</h2>
<p>去掉:</p>
<pre><code>e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)</code></pre>
<p>则我方<b>仍然</b>可从额外卡组特殊召唤怪兽。</p>
<hr />
<p>去掉:</p>
<pre><code>e1:SetReset(RESET_PHASE+PHASE_END)</code></pre>
<p>则我方一直被限制特召。</p>
<script>

document.onclick = function(event) {

  var target = event.target

  if (target.tagName == "PRE"
  || target.tagName == "CODE") {
    if (window.getSelection().toString() !== "") {
      return
      }
    var range = document.createRange();
    range.selectNodeContents(target);
    window.getSelection().removeAllRanges();
    window.getSelection().addRange(range);
    var successful = document.execCommand("copy");
    target.removeAttribute("contenteditable");
    window.getSelection().removeAllRanges();
    }

  }

</script>
</body>
</html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































Deleted script/一点点点基础.md version [add2903578].

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
# 一点点点基础

## 添加卡片

青眼白龙的卡密是 89631139 ,但查不到 c89631139.lua 。

估计<b>只需要</b>更改 cards.cdb ,就可以添加卡片了。

***

c89631139 的 c 是指 card ,就是「卡片」。

## 注册效果

火球的效果足够简单,就以火球为例。

火球里有很多函数,但并没有启用这些函数的语句,这表明它们自己单独是不能运行的,而是<b>被</b>其他的东西给调用。

在 c46130346.lua ,有以下效果:

~~~
function c46130346.initial_effect(c)
end
~~~

它被 interpreter.cpp 所调用:

~~~
call_card_function(pcard, "initial_effect", 1, 0);
~~~

***

c46130346.initial_effect 不利于复制粘贴。

在 utility.lua 有:

~~~
function GetID()
end
~~~

所以可以这样注册效果:

~~~
local s,id,o=GetID()
function s.initial_effect(c)
end
~~~

## 效果描述

诸如 SetProperty ,其参数可以在 <b>constant.lua</b> 查。

***

简单的描述就写简单一点,复杂的描述就写复杂一点。

## 效果参数

在 processor.cpp 可以看到,有时给函数传参数的时候传的是匿名参数,所以很多时候,这些参数其实是<b>空</b>的。

~~~
e effect
tp this player
eg event group
ep event player
ev event value
re reason effect
r reason
rp reason player
chk check
chkc check card
~~~

***

0 指先攻玩家, 1 指后攻玩家,这是绝对的。

tp 指我方玩家, 1 - tp 指对方玩家,这是相对的。

***

这套效果参数,可以看作是一个规范,目的是为了便于看懂与复制代码。

## 效果检查

~~~
function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
  if chk==0 then return 233333333 end
  233333333
end
~~~

这个函数,我觉得应该看作<b>两个</b>函数。

它在 chk 的值不同时,执行不同的分支。

而 chk 取决于效果执行的阶段:检查阶段与执行阶段。

## 火球

~~~
function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return true end
	Duel.SetTargetPlayer(1-tp)
	Duel.SetTargetParam(500)
	Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
~~~

***

把:

~~~
if chk==0 then return true end
~~~

改成:

~~~
if chk==0 then return false end
~~~

则无法发动火球。

***

去掉:

~~~
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
~~~

则无法<b>对应火球</b>而发动痛魂之咒术。

***

去掉

~~~
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
~~~

则无法对应火球而发动精灵之镜。

## 叛逆之罪宝-蛇眼

去掉:

~~~
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
~~~

则可以发动多次。

***

去掉:

~~~
e1:SetDescription(aux.Stringid(id,0))
~~~

则没有变化。

***

去掉:

~~~
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
~~~

则提示文本发生改变。

这些提示文本可以在 constant.lua 中<b>找到</b>。

***

去掉:

~~~
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
~~~

则旋风无法破坏那些怪兽。

***

去掉:

~~~
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
~~~

则那些怪兽离开场上后仍然被当作永续魔法卡。

## 废铁死亡恶魔

去掉:

~~~
c:EnableReviveLimit()
~~~

则<b>没有</b>苏生限制。

## 虫饵

去掉:

~~~
e2:SetCode(EFFECT_CANNOT_SUMMON)
~~~

则<b>不会</b>封锁召唤。

## 天底的使徒

去掉:

~~~
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
~~~

则我方<b>仍然</b>可从额外卡组特殊召唤怪兽。

***

去掉:

~~~
e1:SetReset(RESET_PHASE+PHASE_END)
~~~

则我方一直被限制特召。

## 异界共鸣-同调融合

去掉:

~~~
e1:SetTargetRange(1,0)
~~~

则我方<b>仍可</b>特召。
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































Deleted script/异界共鸣-同调融合.html version [e32b9381ab].

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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang>
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>异界共鸣-同调融合</title>
  <style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}

ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
  <style type="text/css">@media screen and (min-aspect-ratio:1/1) {html {background-color: f8f8f8;background-image:linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);background-size: 8px 8px;background-position: 0 0, 16px 8px;}body {border: solid #a0a0a0 1px ;border-radius: 20px ;padding: 26px ;margin: 16px ;color: #101010 ;background: linear-gradient(to right, #efefefff, #efefeffc);padding: 2em 11%;line-height: 2.1em;box-shadow: 0px 0px 1px rgba(160, 160, 160, 1), 0px 0px 1px rgba(160, 160, 160, 1);}}h1,h2,h3,h4,h5,h6 {font-size: 1.5em;color: #3F5770;border-bottom: 1px solid #dddddd;margin: 1.2em 0em;}a {list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;background-color: white;text-decoration-color: blue;border-radius: 0.2em;}a:visited {color: blue;text-decoration-color: white;}a:active {color: red;}nav ul li {margin: 1.2em 0em;}p::before {}p {margin: 1.2em 0;}.title {background-color: white;font-size: 2em;text-align: center;}b {background-color: white;list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;border-radius: 0.2em;}details {border-bottom: 1px solid #dddddd;}details > summary {list-style: none;border-right: 0.3em solid #5183C466;border-left: 0.3em solid #5183C466;padding: 0.2em 0.4em;margin-bottom: 0.2em;margin-top: 0.3em;outline: none;border-radius: 0.2em;}pre {background: #f6f6f6;border-left: 0.5em solid #ccc;padding: 0.4em;border-radius: 0.2em;overflow-wrap:break-word;}pre:active {color: red;}code {font-family: "Verdana";}button {background: #ffffff;color: #20894d;}button:active {color: red;}</style>
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
  <![endif]-->
</head>
<body>
<nav id="TOC" role="doc-toc">
<ul>
<li><a href="#异界共鸣-同调融合" id="toc-异界共鸣-同调融合"><span class="toc-section-number">1</span> 异界共鸣-同调融合</a>
<ul>
<li><a href="#效果" id="toc-效果"><span class="toc-section-number">1.1</span> 效果</a></li>
<li><a href="#正常" id="toc-正常"><span class="toc-section-number">1.2</span> 正常</a></li>
<li><a href="#正常-1" id="toc-正常-1"><span class="toc-section-number">1.3</span> 正常</a></li>
<li><a href="#异常" id="toc-异常"><span class="toc-section-number">1.4</span> 异常</a></li>
</ul></li>
</ul>
</nav>
<h1 data-number="1" id="异界共鸣-同调融合"><span class="header-section-number">1</span> 异界共鸣-同调融合</h1>
<h2 data-number="1.1" id="效果"><span class="header-section-number">1.1</span> 效果</h2>
<pre><code>这个卡名的卡在1回合只能发动1张,这张卡发动的回合,自己不是融合·同调怪兽不能从额外卡组特殊召唤。
①:把自己场上的表侧表示的调整和调整以外的怪兽各1只送去墓地才能发动。以下怪兽各1只从额外卡组特殊召唤。
●墓地的那2只怪兽为素材可以同调召唤的同调怪兽
●墓地的那2只怪兽为素材可以融合召唤的融合怪兽</code></pre>
<h2 data-number="1.2" id="正常"><span class="header-section-number">1.2</span> 正常</h2>
<pre><code>Debug.SetAIName(&quot;base-2&quot;)
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)
Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

Debug.AddCard(67745632,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(45815891,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

Debug.AddCard(6631034,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(21615956,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

Debug.ReloadFieldEnd()
aux.BeginPuzzle()</code></pre>
<h2 data-number="1.3" id="正常-1"><span class="header-section-number">1.3</span> 正常</h2>
<pre><code>Debug.SetAIName(&quot;base-2&quot;)

Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)

Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)


-----------------

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

-----------------

Debug.AddCard(41517789,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(41209827,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

-----------------

Debug.AddCard(38955728,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(96005454,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

-----------------


-----------------


-----------------

Debug.ReloadFieldEnd()
aux.BeginPuzzle()
</code></pre>
<h2 data-number="1.4" id="异常"><span class="header-section-number">1.4</span> 异常</h2>
<p>应该不能发动异界共鸣。</p>
<pre><code>Debug.SetAIName(&quot;base-2&quot;)

Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)

Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)


-----------------

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

-----------------

Debug.AddCard(60465049,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(41209827,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

-----------------

Debug.AddCard(38955728,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(96005454,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

-----------------


-----------------


-----------------

Debug.ReloadFieldEnd()
aux.BeginPuzzle()
</code></pre>
<script>

document.onclick = function(event) {

  var target = event.target

  if (target.tagName == "PRE"
  || target.tagName == "CODE") {
    if (window.getSelection().toString() !== "") {
      return
      }
    var range = document.createRange();
    range.selectNodeContents(target);
    window.getSelection().removeAllRanges();
    window.getSelection().addRange(range);
    var successful = document.execCommand("copy");
    target.removeAttribute("contenteditable");
    window.getSelection().removeAllRanges();
    }

  }

</script>
</body>
</html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































Deleted script/异界共鸣-同调融合.md version [fda618ad5f].

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
# 异界共鸣-同调融合

## 效果

~~~
这个卡名的卡在1回合只能发动1张,这张卡发动的回合,自己不是融合·同调怪兽不能从额外卡组特殊召唤。
①:把自己场上的表侧表示的调整和调整以外的怪兽各1只送去墓地才能发动。以下怪兽各1只从额外卡组特殊召唤。
●墓地的那2只怪兽为素材可以同调召唤的同调怪兽
●墓地的那2只怪兽为素材可以融合召唤的融合怪兽
~~~

## 正常

~~~
Debug.SetAIName("base-2")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)
Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

Debug.AddCard(67745632,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(45815891,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

Debug.AddCard(6631034,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(21615956,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

Debug.ReloadFieldEnd()
aux.BeginPuzzle()
~~~

## 正常

~~~
Debug.SetAIName("base-2")

Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)

Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)


-----------------

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

-----------------

Debug.AddCard(41517789,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(41209827,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

-----------------

Debug.AddCard(38955728,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(96005454,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

-----------------


-----------------


-----------------

Debug.ReloadFieldEnd()
aux.BeginPuzzle()

~~~

## 异常

应该不能发动异界共鸣。

~~~
Debug.SetAIName("base-2")

Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)

Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)


-----------------

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

-----------------

Debug.AddCard(60465049,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(41209827,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

-----------------

Debug.AddCard(38955728,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(96005454,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

-----------------


-----------------


-----------------

Debug.ReloadFieldEnd()
aux.BeginPuzzle()

~~~

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































Added 残局文料/副_容冗/一点点点基础.md version [add2903578].

















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# 一点点点基础

## 添加卡片

青眼白龙的卡密是 89631139 ,但查不到 c89631139.lua 。

估计<b>只需要</b>更改 cards.cdb ,就可以添加卡片了。

***

c89631139 的 c 是指 card ,就是「卡片」。

## 注册效果

火球的效果足够简单,就以火球为例。

火球里有很多函数,但并没有启用这些函数的语句,这表明它们自己单独是不能运行的,而是<b>被</b>其他的东西给调用。

在 c46130346.lua ,有以下效果:

~~~
function c46130346.initial_effect(c)
end
~~~

它被 interpreter.cpp 所调用:

~~~
call_card_function(pcard, "initial_effect", 1, 0);
~~~

***

c46130346.initial_effect 不利于复制粘贴。

在 utility.lua 有:

~~~
function GetID()
end
~~~

所以可以这样注册效果:

~~~
local s,id,o=GetID()
function s.initial_effect(c)
end
~~~

## 效果描述

诸如 SetProperty ,其参数可以在 <b>constant.lua</b> 查。

***

简单的描述就写简单一点,复杂的描述就写复杂一点。

## 效果参数

在 processor.cpp 可以看到,有时给函数传参数的时候传的是匿名参数,所以很多时候,这些参数其实是<b>空</b>的。

~~~
e effect
tp this player
eg event group
ep event player
ev event value
re reason effect
r reason
rp reason player
chk check
chkc check card
~~~

***

0 指先攻玩家, 1 指后攻玩家,这是绝对的。

tp 指我方玩家, 1 - tp 指对方玩家,这是相对的。

***

这套效果参数,可以看作是一个规范,目的是为了便于看懂与复制代码。

## 效果检查

~~~
function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
  if chk==0 then return 233333333 end
  233333333
end
~~~

这个函数,我觉得应该看作<b>两个</b>函数。

它在 chk 的值不同时,执行不同的分支。

而 chk 取决于效果执行的阶段:检查阶段与执行阶段。

## 火球

~~~
function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return true end
	Duel.SetTargetPlayer(1-tp)
	Duel.SetTargetParam(500)
	Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
~~~

***

把:

~~~
if chk==0 then return true end
~~~

改成:

~~~
if chk==0 then return false end
~~~

则无法发动火球。

***

去掉:

~~~
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
~~~

则无法<b>对应火球</b>而发动痛魂之咒术。

***

去掉

~~~
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
~~~

则无法对应火球而发动精灵之镜。

## 叛逆之罪宝-蛇眼

去掉:

~~~
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
~~~

则可以发动多次。

***

去掉:

~~~
e1:SetDescription(aux.Stringid(id,0))
~~~

则没有变化。

***

去掉:

~~~
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
~~~

则提示文本发生改变。

这些提示文本可以在 constant.lua 中<b>找到</b>。

***

去掉:

~~~
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
~~~

则旋风无法破坏那些怪兽。

***

去掉:

~~~
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
~~~

则那些怪兽离开场上后仍然被当作永续魔法卡。

## 废铁死亡恶魔

去掉:

~~~
c:EnableReviveLimit()
~~~

则<b>没有</b>苏生限制。

## 虫饵

去掉:

~~~
e2:SetCode(EFFECT_CANNOT_SUMMON)
~~~

则<b>不会</b>封锁召唤。

## 天底的使徒

去掉:

~~~
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
~~~

则我方<b>仍然</b>可从额外卡组特殊召唤怪兽。

***

去掉:

~~~
e1:SetReset(RESET_PHASE+PHASE_END)
~~~

则我方一直被限制特召。

## 异界共鸣-同调融合

去掉:

~~~
e1:SetTargetRange(1,0)
~~~

则我方<b>仍可</b>特召。

Added 残局文料/副_容冗/异界共鸣-同调融合.md version [fda618ad5f].



























































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# 异界共鸣-同调融合

## 效果

~~~
这个卡名的卡在1回合只能发动1张,这张卡发动的回合,自己不是融合·同调怪兽不能从额外卡组特殊召唤。
①:把自己场上的表侧表示的调整和调整以外的怪兽各1只送去墓地才能发动。以下怪兽各1只从额外卡组特殊召唤。
●墓地的那2只怪兽为素材可以同调召唤的同调怪兽
●墓地的那2只怪兽为素材可以融合召唤的融合怪兽
~~~

## 正常

~~~
Debug.SetAIName("base-2")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)
Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

Debug.AddCard(67745632,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(45815891,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

Debug.AddCard(6631034,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(21615956,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

Debug.ReloadFieldEnd()
aux.BeginPuzzle()
~~~

## 正常

~~~
Debug.SetAIName("base-2")

Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)

Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)


-----------------

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

-----------------

Debug.AddCard(41517789,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(41209827,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

-----------------

Debug.AddCard(38955728,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(96005454,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

-----------------


-----------------


-----------------

Debug.ReloadFieldEnd()
aux.BeginPuzzle()

~~~

## 异常

应该不能发动异界共鸣。

~~~
Debug.SetAIName("base-2")

Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)

Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)


-----------------

Debug.AddCard(7473735,0,0,LOCATION_HAND,0,POS_FACEDOWN)

-----------------

Debug.AddCard(60465049,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(41209827,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

-----------------

Debug.AddCard(38955728,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(96005454,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

-----------------


-----------------


-----------------

Debug.ReloadFieldEnd()
aux.BeginPuzzle()

~~~