Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
DataEditorX
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
聖園ミカ
DataEditorX
Commits
12935e7c
Commit
12935e7c
authored
Jun 30, 2015
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve undo and update data
parent
75593d88
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
211 additions
and
136 deletions
+211
-136
DataEditorX/Config/MyConfig.cs
DataEditorX/Config/MyConfig.cs
+0
-1
DataEditorX/Core/Card.cs
DataEditorX/Core/Card.cs
+1
-1
DataEditorX/Core/CardEdit.cs
DataEditorX/Core/CardEdit.cs
+21
-0
DataEditorX/Core/DataBase.cs
DataEditorX/Core/DataBase.cs
+30
-2
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+12
-7
DataEditorX/app.config
DataEditorX/app.config
+46
-48
DataEditorX/data/_functions.txt
DataEditorX/data/_functions.txt
+25
-13
win32/DataEditorX.exe
win32/DataEditorX.exe
+0
-0
win32/DataEditorX.exe.config
win32/DataEditorX.exe.config
+10
-12
win32/DataEditorX.vshost.exe.config
win32/DataEditorX.vshost.exe.config
+41
-39
win32/data/_functions.txt
win32/data/_functions.txt
+25
-13
win32/win32.zip
win32/win32.zip
+0
-0
No files found.
DataEditorX/Config/MyConfig.cs
View file @
12935e7c
...
...
@@ -46,7 +46,6 @@ public class MyConfig : XMLReader
/// 语言
/// </summary>
public
const
string
TAG_LANGUAGE
=
"language"
;
public
const
string
TAG_AUTO_LEN
=
"autolength"
;
/// <summary>
/// 临时文件
/// </summary>
...
...
DataEditorX/Core/Card.cs
View file @
12935e7c
...
...
@@ -87,7 +87,7 @@ public string[] Str
public
long
[]
GetSetCode
()
{
long
[]
setcodes
=
new
long
[
SETCODE_MAX
];
for
(
int
i
=
0
,
k
=
0
;
i
<
SETCODE_MAX
;
k
+=
0x10
,
i
++)
for
(
int
i
=
0
,
k
=
0
;
i
<
SETCODE_MAX
;
k
+=
0x10
,
i
++)
{
setcodes
[
i
]
=
(
this
.
setcode
>>
k
)
&
0xffff
;
}
...
...
DataEditorX/Core/CardEdit.cs
View file @
12935e7c
...
...
@@ -23,14 +23,23 @@ public class FileDeleted
public
bool
deleted
=
false
;
public
List
<
long
>
ids
=
new
List
<
long
>();
}
public
class
DBcopied
{
public
bool
copied
=
false
;
public
Card
[]
NewCards
;
public
bool
replace
;
public
Card
[]
OldCards
;
}
public
List
<
FileModified
>
undoModified
;
public
List
<
FileDeleted
>
undoDeleted
;
public
List
<
DBcopied
>
undoCopied
;
public
CardEdit
(
IDataForm
dataform
)
{
this
.
dataform
=
dataform
;
this
.
undoSQL
=
new
List
<
string
>();
this
.
undoModified
=
new
List
<
FileModified
>();
this
.
undoDeleted
=
new
List
<
FileDeleted
>();
this
.
undoCopied
=
new
List
<
DBcopied
>();
}
#
region
添加
...
...
@@ -61,6 +70,7 @@ public bool AddCard()
undoSQL
.
Add
(
DataBase
.
GetDeleteSQL
(
c
));
undoModified
.
Add
(
new
FileModified
());
undoDeleted
.
Add
(
new
FileDeleted
());
undoCopied
.
Add
(
new
DBcopied
());
dataform
.
Search
(
true
);
dataform
.
SetCard
(
c
);
return
true
;
...
...
@@ -118,11 +128,13 @@ public bool ModCard(bool modfiles)
modify
.
delold
=
delold
;
undoModified
.
Add
(
modify
);
undoDeleted
.
Add
(
new
FileDeleted
());
undoCopied
.
Add
(
new
DBcopied
());
}
else
{
undoModified
.
Add
(
new
FileModified
());
undoDeleted
.
Add
(
new
FileDeleted
());
undoCopied
.
Add
(
new
DBcopied
());
}
}
else
...
...
@@ -131,6 +143,7 @@ public bool ModCard(bool modfiles)
undoSQL
.
Add
(
DataBase
.
GetUpdateSQL
(
oldCard
));
undoModified
.
Add
(
new
FileModified
());
undoDeleted
.
Add
(
new
FileDeleted
());
undoCopied
.
Add
(
new
DBcopied
());
}
if
(
DataBase
.
Command
(
dataform
.
GetOpenFile
(),
sql
)
>
0
)
{
...
...
@@ -178,6 +191,7 @@ public bool DelCards(bool deletefiles)
undoSQL
.
Add
(
undo
);
undoDeleted
.
Add
(
delete
);
undoModified
.
Add
(
new
FileModified
());
undoCopied
.
Add
(
new
DBcopied
());
return
true
;
}
else
...
...
@@ -252,6 +266,13 @@ public void Undo()
YGOUtil
.
CardDelete
(
id
,
dataform
.
GetPath
(),
YGOUtil
.
DeleteOption
.
RESTORE
);
}
undoDeleted
.
RemoveAt
(
undoDeleted
.
Count
-
1
);
if
(
undoCopied
[
undoCopied
.
Count
-
1
].
copied
)
{
DBcopied
lastcopied
=
undoCopied
[
undoCopied
.
Count
-
1
];
DataBase
.
DeleteDB
(
dataform
.
GetOpenFile
(),
lastcopied
.
NewCards
);
DataBase
.
CopyDB
(
dataform
.
GetOpenFile
(),
!
lastcopied
.
replace
,
lastcopied
.
OldCards
);
}
undoCopied
.
RemoveAt
(
undoCopied
.
Count
-
1
);
dataform
.
Search
(
true
);
}
#
endregion
...
...
DataEditorX/Core/DataBase.cs
View file @
12935e7c
...
...
@@ -238,7 +238,7 @@ public static Card[] Read(string DB,bool reNewLine, params string[] SQLs)
/// <param name="cards">卡片集合</param>
/// <param name="ignore">是否忽略存在</param>
/// <returns>更新数x2</returns>
public
static
int
CopyDB
(
string
DB
,
bool
ignore
,
params
Card
[]
cards
)
public
static
int
CopyDB
(
string
DB
,
bool
ignore
,
params
Card
[]
cards
)
{
int
result
=
0
;
if
(
File
.
Exists
(
DB
)
&&
cards
!=
null
)
...
...
@@ -264,7 +264,35 @@ public static int CopyDB(string DB, bool ignore,params Card[] cards)
return
result
;
}
#
endregion
#
region
删除记录
public
static
int
DeleteDB
(
string
DB
,
params
Card
[]
cards
)
{
int
result
=
0
;
if
(
File
.
Exists
(
DB
)
&&
cards
!=
null
)
{
using
(
SQLiteConnection
con
=
new
SQLiteConnection
(
@"Data Source="
+
DB
))
{
con
.
Open
();
using
(
SQLiteTransaction
trans
=
con
.
BeginTransaction
())
{
using
(
SQLiteCommand
cmd
=
new
SQLiteCommand
(
con
))
{
foreach
(
Card
c
in
cards
)
{
cmd
.
CommandText
=
DataBase
.
GetDeleteSQL
(
c
);
result
+=
cmd
.
ExecuteNonQuery
();
}
}
trans
.
Commit
();
}
con
.
Close
();
}
}
return
result
;
}
#
endregion
#
region
压缩数据库
public
static
void
Compression
(
string
db
)
{
...
...
DataEditorX/DataEditForm.cs
View file @
12935e7c
...
...
@@ -1113,11 +1113,6 @@ public void SaveCards(Card[] cards)
return
;
bool
replace
=
false
;
Card
[]
oldcards
=
DataBase
.
Read
(
nowCdbFile
,
true
,
""
);
string
undo
=
""
;
foreach
(
Card
c
in
cards
)
{
undo
+=
DataBase
.
GetDeleteSQL
(
c
);
}
if
(
oldcards
!=
null
&&
oldcards
.
Length
!=
0
)
{
int
i
=
0
;
...
...
@@ -1129,16 +1124,26 @@ public void SaveCards(Card[] cards)
{
i
+=
1
;
if
(
i
==
1
)
{
replace
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingCard
);
undo
+=
DataBase
.
GetInsertSQL
(
oc
,
!
replace
);
break
;
}
}
}
if
(
i
>
0
)
break
;
}
}
cardedit
.
undoSQL
.
Add
(
undo
);
cardedit
.
undoSQL
.
Add
(
""
);
cardedit
.
undoModified
.
Add
(
new
CardEdit
.
FileModified
());
cardedit
.
undoDeleted
.
Add
(
new
CardEdit
.
FileDeleted
());
DataBase
.
CopyDB
(
nowCdbFile
,
!
replace
,
cards
);
CardEdit
.
DBcopied
copied
=
new
CardEdit
.
DBcopied
();
copied
.
copied
=
true
;
copied
.
NewCards
=
cards
;
copied
.
replace
=
replace
;
copied
.
OldCards
=
oldcards
;
cardedit
.
undoCopied
.
Add
(
copied
);
Search
(
srcCard
,
true
);
btn_undo
.
Enabled
=
true
;
}
...
...
DataEditorX/app.config
View file @
12935e7c
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
connectionStrings
>
<!--
Example
connection
to
a
SQL
Server
Database
on
localhost
. -->
<!-- <
add
name
=
"ExampleConnectionString"
connectionString
=
"Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName
=
"System.Data.SqlClient"
/> -->
</
connectionStrings
>
<
appSettings
>
<!--
access
these
values
via
the
property
:
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
key
]
-->
<!--
auto
enter
length
-->
<
add
key
=
"autolength"
value
=
"30"
/>
<!--
MSE
language
data
/
mse_xxx
.
txt
-->
<
add
key
=
"mse"
value
=
"Chinese-Simplified"
/>
<!--
Language
data
/
cardinfo_xxxx
.
txt
data
/
language_xxx
.
txt
-->
<
add
key
=
"language"
value
=
"english"
/>
<!--
Check
system
language
when
running
program
first
time
-->
<
add
key
=
"check_system_language"
value
=
"true"
/>
<!--
async
load
data
-->
<
add
key
=
"async"
value
=
"false"
/>
<!--
DataEditorX
source
code
-->
<
add
key
=
"sourceURL"
value
=
"https://github.com/247321453/DataEditorX"
/>
<!--
DataEditorX
update
url
-->
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt"
/>
<!--
delete
,
modify
with
card
'
s
files
image
script
-->
<
add
key
=
"opera_with_cards_file"
value
=
"true"
/>
<!--
open
file
in
this
.
such
as
lua
-->
<
add
key
=
"open_file_in_this"
value
=
"true"
/>
<!--
check
update
when
opening
application
automatically
-->
<
add
key
=
"auto_check_update"
value
=
"true"
/>
<!--
Cut
Images
Setting
-->
<
add
key
=
"image_quilty"
value
=
"100"
/>
<
add
key
=
"image"
value
=
"44,64,177,254"
/>
<
add
key
=
"image_other"
value
=
"25,54,128,128"
/>
<
add
key
=
"image_xyz"
value
=
"24,51,128,128"
/>
<
add
key
=
"image_pendulum"
value
=
"14,46,149,120"
/>
<!--
CodeEdiotr
Setting
IME
=
true
使用輸入法,正常顯示文字,反應變慢
IME
=
false
English
-->
<
add
key
=
"IME"
value
=
"false"
/>
<
add
key
=
"wordwrap"
value
=
"true"
/>
<
add
key
=
"tabisspace"
value
=
"false"
/>
<
add
key
=
"fontname"
value
=
"Consolas"
/>
<
add
key
=
"fontsize"
value
=
"14.5"
/>
<!--
MSE
path
-->
<
add
key
=
"mse_path"
value
=
"E:\\git\\MagicSetEditor2\\mse.exe"
/>
</
appSettings
>
<
connectionStrings
>
<!--
Example
connection
to
a
SQL
Server
Database
on
localhost
. -->
<!-- <
add
name
=
"ExampleConnectionString"
connectionString
=
"Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName
=
"System.Data.SqlClient"
/> -->
</
connectionStrings
>
<
appSettings
>
<!--
access
these
values
via
the
property
:
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
key
]
-->
<!--
MSE
language
data
/
mse_xxx
.
txt
-->
<
add
key
=
"mse"
value
=
"Chinese-Simplified"
/>
<!--
Language
data
/
cardinfo_xxxx
.
txt
data
/
language_xxx
.
txt
-->
<
add
key
=
"language"
value
=
"english"
/>
<!--
Check
system
language
when
running
program
first
time
-->
<
add
key
=
"check_system_language"
value
=
"true"
/>
<!--
async
load
data
-->
<
add
key
=
"async"
value
=
"false"
/>
<!--
DataEditorX
source
code
-->
<
add
key
=
"sourceURL"
value
=
"https://github.com/247321453/DataEditorX"
/>
<!--
DataEditorX
update
url
-->
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt"
/>
<!--
delete
,
modify
with
card
'
s
files
image
script
-->
<
add
key
=
"opera_with_cards_file"
value
=
"true"
/>
<!--
open
file
in
this
.
such
as
lua
-->
<
add
key
=
"open_file_in_this"
value
=
"true"
/>
<!--
check
update
when
opening
application
automatically
-->
<
add
key
=
"auto_check_update"
value
=
"true"
/>
<!--
Cut
Images
Setting
-->
<
add
key
=
"image_quilty"
value
=
"100"
/>
<
add
key
=
"image"
value
=
"44,64,177,254"
/>
<
add
key
=
"image_other"
value
=
"25,54,128,128"
/>
<
add
key
=
"image_xyz"
value
=
"24,51,128,128"
/>
<
add
key
=
"image_pendulum"
value
=
"14,46,149,120"
/>
<!--
CodeEdiotr
Setting
IME
=
true
使用輸入法,正常顯示文字,反應變慢
IME
=
false
English
-->
<
add
key
=
"IME"
value
=
"false"
/>
<
add
key
=
"wordwrap"
value
=
"true"
/>
<
add
key
=
"tabisspace"
value
=
"false"
/>
<
add
key
=
"fontname"
value
=
"Consolas"
/>
<
add
key
=
"fontsize"
value
=
"14.5"
/>
<!--
MSE
path
-->
<
add
key
=
"mse_path"
value
=
"E:\\git\\MagicSetEditor2\\mse.exe"
/>
</
appSettings
>
</
configuration
>
\ No newline at end of file
DataEditorX/data/_functions.txt
View file @
12935e7c
...
...
@@ -274,14 +274,14 @@ copy_info=false或者自由时点的效果则只返回这个效果
如果forced为true则不会检查c对e的免疫效果
●bool Card.IsHasEffect(Card c, int code)
检查c是否受到效果种类是code的效果的影响
●void Card.ResetEffect(Card c, int
id
, int reset_type)
以重置类型为reset_type、重置种类为
id
手动重置c受到的效果的影响
重置类型
只能是以下类型,对应的重置种类为
RESET_EVENT 发生事件重置
id
为事件
RESET_PHASE 阶段结束重置
id
为阶段
RESET_CODE 重置指定code的效果
id
为效果的种类code,只能重置EFFECT_TYPE_SINGLE的永续型效果
RESET_COPY 重置复制的效果
id
为copy_id
RESET_CARD 重置卡片的效果
id
为效果owner的卡号
●void Card.ResetEffect(Card c, int
reset_code
, int reset_type)
以重置类型为reset_type、重置种类为
reset_code
手动重置c受到的效果的影响
reset_type
只能是以下类型,对应的重置种类为
RESET_EVENT 发生事件重置
reset_code
为事件
RESET_PHASE 阶段结束重置
reset_code
为阶段
RESET_CODE 重置指定code的效果
reset_code
为效果的种类code,只能重置EFFECT_TYPE_SINGLE的永续型效果
RESET_COPY 重置复制的效果
reset_code
为copy_id
RESET_CARD 重置卡片的效果
reset_code
为效果owner的卡号
●int Card.GetEffectCount(Card c, int code)
返回c受到影响的种类是code的效果的数量
●Effect Card.RegisterFlagEffect(Card c, int code, int reset_flag, int property, int reset_count[, int label, int desc])
...
...
@@ -575,7 +575,8 @@ EFFECT_COUNT_CODE_SINGLE 同一张卡多个效果公共使用次数(不
o_range值影响的对方区域
如果property属性中指定了EFFECT_FLAG_ABSOLUTE_RANGE标志,
那么s_range指玩家1受到影响的区域,o_range指玩家2受到影响的区域
如果这是一个特殊召唤手续(EFFECT_SPSUMMON_PROC)的效果,
如果这是一个召唤(覆盖)/限制召唤(覆盖)/特殊召唤手续
(EFFECT_SUMMON_PROC/EFFECT_LIMIT_SUMMON_PROC/EFFECT_SPSUMMON_PROC等)的效果,
并且property指定了EFFECT_FLAG_SPSUM_PARAM标志,
那么s_range表示特殊召唤到的哪个玩家的场地,
o_range表示可选择的表示形式
...
...
@@ -1018,12 +1019,12 @@ Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
过滤函数,让玩家player从场上·手卡选择min-max张不等于ex的满足条件f的可解放的卡(非上级召唤用)
●Group Duel.GetTributeGroup(Card c)
返回用于通常召唤c可解放(上级召唤用)的卡片组
●int Duel.GetTributeCount(Card c[, Group mg])
返回[mg中]用于通常召唤c的祭品数量
●int Duel.GetTributeCount(Card c[, Group mg
, bool ex=false
])
返回[mg中]用于通常召唤c的祭品数量
,ex=true则允许对方场上的怪兽(太阳神之翼神龙-球体形)
此数量不一定等于Duel.GetTributeGroup的返回值中的卡片数量
因为某些卡可以作为两个祭品来使用
●Group Duel.SelectTribute(int player, Card c, int min, int max[, Group mg])
让玩家player[从mg中]选择用于通常召唤c的min-max个祭品
●Group Duel.SelectTribute(int player, Card c, int min, int max[, Group mg
, bool ex=false
])
让玩家player[从mg中]选择用于通常召唤c的min-max个祭品
,ex=true则允许对方场上的怪兽(太阳神之翼神龙-球体形)
●int Duel.GetTargetCount(function f, int player, int s, int o, Card ex|nil, ...)
基本同Duel.GetMatchingGroupCount,不同之处在于需要追加判定卡片是否能成为当前正在处理的效果的对象
●bool Duel.IsExistingTarget(function f, int player, int s, int o, int count, Card ex|nil, ...)
...
...
@@ -1105,6 +1106,17 @@ void Duel.SetTargetParam(inte param)
让player以reason原因移除指定位置的min-max张叠放卡,返回值表示是否成功
●void Duel.Hint(int hint_type, int player, int desc)
给玩家player发送hint_type类型的消息提示,提示内容为desc
#hint_type只能为以下类型:
#HINT_SELECTMSG 将提示内容写入缓存,用于选择卡片的提示,例如Duel.SelectMatchingCard等
#HINT_OPSELECTED 向player提示“对方选择了:...”,常用于向对方玩家提示选择发动了什么效果
#HINT_CARD 此时desc应为卡号,手动显示卡片发动的动画,常用于提示不入连锁的处理
#HINT_RACE 此时desc应为种族,向player提示“对方宣言了:...”种族
#HINT_ATTRIB 此时desc应为属性,向player提示“对方宣言了:...”属性
#HINT_CODE 此时desc应为卡号,向player提示“对方宣言了:...”卡片
#HINT_NUMBER 此时desc视为单纯的数字,向player提示“对方选择了:...”数字
#HINT_MESSAGE 弹出一个对话框显示信息
#HINT_EVENT 将提示内容写入缓存,用于时点的提示信息(诱发即时效果的提示)
#HINT_EFFECT 同HINT_CARD
●void Duel.HintSelection(Group g)
手动为g显示被选为对象的动画效果,并记录这些卡被选为对象
●bool Duel.SelectEffectYesNo(int player, Card c)
...
...
win32/DataEditorX.exe
View file @
12935e7c
No preview for this file type
win32/DataEditorX.exe.config
View file @
12935e7c
...
...
@@ -3,21 +3,19 @@
<
connectionStrings
>
<!--
Example
connection
to
a
SQL
Server
Database
on
localhost
. -->
<!-- <
add
name
=
"ExampleConnectionString"
connectionString
=
"Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName
=
"System.Data.SqlClient"
/> -->
connectionString
=
"Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName
=
"System.Data.SqlClient"
/> -->
</
connectionStrings
>
<
appSettings
>
<!--
access
these
values
via
the
property
:
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
key
]
-->
<!--
auto
enter
length
-->
<
add
key
=
"autolength"
value
=
"30"
/>
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
key
]
-->
<!--
MSE
language
data
/
mse_xxx
.
txt
-->
<
add
key
=
"mse"
value
=
"Chinese-Simplified"
/>
<!--
Language
data
/
cardinfo_xxxx
.
txt
data
/
language_xxx
.
txt
-->
<
add
key
=
"language"
value
=
"
Chinese
"
/>
<
add
key
=
"language"
value
=
"
english
"
/>
<!--
Check
system
language
when
running
program
first
time
-->
<
add
key
=
"check_system_language"
value
=
"
fals
e"
/>
<
add
key
=
"check_system_language"
value
=
"
tru
e"
/>
<!--
async
load
data
-->
<
add
key
=
"async"
value
=
"false"
/>
<!--
DataEditorX
source
code
-->
...
...
@@ -37,15 +35,15 @@
<
add
key
=
"image_xyz"
value
=
"24,51,128,128"
/>
<
add
key
=
"image_pendulum"
value
=
"14,46,149,120"
/>
<!--
CodeEdiotr
Setting
IME
=
true
使用輸入法,正常顯示文字,反應變慢
IME
=
false
English
-->
IME
=
true
使用輸入法,正常顯示文字,反應變慢
IME
=
false
English
-->
<
add
key
=
"IME"
value
=
"false"
/>
<
add
key
=
"wordwrap"
value
=
"true"
/>
<
add
key
=
"tabisspace"
value
=
"false"
/>
<
add
key
=
"fontname"
value
=
"Consolas"
/>
<
add
key
=
"fontsize"
value
=
"14.5"
/>
<!--
MSE
path
-->
<
add
key
=
"mse_path"
value
=
"E:\\git\\MagicSetEditor2\\mse.exe"
/>
<
add
key
=
"mse_path"
value
=
"E:\\git\\MagicSetEditor2\\mse.exe"
/>
</
appSettings
>
</
configuration
>
\ No newline at end of file
win32/DataEditorX.vshost.exe.config
View file @
12935e7c
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
connectionStrings
>
<!--
Example
connection
to
a
SQL
Server
Database
on
localhost
. -->
<!-- <
add
name
=
"ExampleConnectionString"
<
connectionStrings
>
<!--
Example
connection
to
a
SQL
Server
Database
on
localhost
. -->
<!-- <
add
name
=
"ExampleConnectionString"
connectionString
=
"Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName
=
"System.Data.SqlClient"
/> -->
</
connectionStrings
>
<
appSettings
>
<!--
access
these
values
via
the
property
:
</
connectionStrings
>
<
appSettings
>
<!--
access
these
values
via
the
property
:
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
key
]
-->
<!--
auto
enter
length
-->
<
add
key
=
"autolength"
value
=
"30"
/>
<!--
MSE
language
data
/
mse_xxx
.
txt
-->
<
add
key
=
"mse"
value
=
"Chinese-Simplified"
/>
<!--
Language
data
/
cardinfo_xxxx
.
txt
data
/
language_xxx
.
txt
-->
<
add
key
=
"language"
value
=
"english
"
/>
<!--
Check
system
language
when
running
program
first
time
-->
<
add
key
=
"check_system_language"
value
=
"tru
e"
/>
<!--
async
load
data
-->
<
add
key
=
"async"
value
=
"false"
/>
<!--
DataEditorX
source
code
-->
<
add
key
=
"sourceURL"
value
=
"https://github.com/247321453/DataEditorX"
/>
<!--
DataEditorX
update
url
-->
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt"
/>
<!--
delete
,
modify
with
card
'
s
files
image
script
-->
<
add
key
=
"opera_with_cards_file"
value
=
"true"
/>
<!--
open
file
in
this
.
such
as
lua
-->
<
add
key
=
"open_file_in_this"
value
=
"true"
/>
<!--
check
update
when
opening
application
automatically
-->
<
add
key
=
"auto_check_update"
value
=
"true"
/>
<!--
Cut
Images
Setting
-->
<
add
key
=
"image_quilty"
value
=
"100"
/>
<
add
key
=
"image"
value
=
"44,64,177,254"
/>
<
add
key
=
"image_other"
value
=
"25,54,128,128"
/>
<
add
key
=
"image_xyz"
value
=
"24,51,128,128"
/>
<
add
key
=
"image_pendulum"
value
=
"14,46,149,120"
/>
<!--
CodeEdiotr
Setting
<!--
auto
enter
length
-->
<
add
key
=
"autolength"
value
=
"30"
/>
<!--
MSE
language
data
/
mse_xxx
.
txt
-->
<
add
key
=
"mse"
value
=
"Chinese-Simplified"
/>
<!--
Language
data
/
cardinfo_xxxx
.
txt
data
/
language_xxx
.
txt
-->
<
add
key
=
"language"
value
=
"Chinese
"
/>
<!--
Check
system
language
when
running
program
first
time
-->
<
add
key
=
"check_system_language"
value
=
"fals
e"
/>
<!--
async
load
data
-->
<
add
key
=
"async"
value
=
"false"
/>
<!--
DataEditorX
source
code
-->
<
add
key
=
"sourceURL"
value
=
"https://github.com/247321453/DataEditorX"
/>
<!--
DataEditorX
update
url
-->
<
add
key
=
"updateURL"
value
=
"https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt"
/>
<!--
delete
,
modify
with
card
'
s
files
image
script
-->
<
add
key
=
"opera_with_cards_file"
value
=
"true"
/>
<!--
open
file
in
this
.
such
as
lua
-->
<
add
key
=
"open_file_in_this"
value
=
"true"
/>
<!--
check
update
when
opening
application
automatically
-->
<
add
key
=
"auto_check_update"
value
=
"true"
/>
<!--
Cut
Images
Setting
-->
<
add
key
=
"image_quilty"
value
=
"100"
/>
<
add
key
=
"image"
value
=
"44,64,177,254"
/>
<
add
key
=
"image_other"
value
=
"25,54,128,128"
/>
<
add
key
=
"image_xyz"
value
=
"24,51,128,128"
/>
<
add
key
=
"image_pendulum"
value
=
"14,46,149,120"
/>
<!--
CodeEdiotr
Setting
IME
=
true
使用輸入法,正常顯示文字,反應變慢
IME
=
false
English
-->
<
add
key
=
"IME"
value
=
"false"
/>
<
add
key
=
"wordwrap"
value
=
"true"
/>
<
add
key
=
"tabisspace"
value
=
"false"
/>
<
add
key
=
"fontname"
value
=
"Consolas"
/>
<
add
key
=
"fontsize"
value
=
"14.5"
/>
</
appSettings
>
<
add
key
=
"IME"
value
=
"false"
/>
<
add
key
=
"wordwrap"
value
=
"true"
/>
<
add
key
=
"tabisspace"
value
=
"false"
/>
<
add
key
=
"fontname"
value
=
"Consolas"
/>
<
add
key
=
"fontsize"
value
=
"14.5"
/>
<!--
MSE
path
-->
<
add
key
=
"mse_path"
value
=
"E:\\git\\MagicSetEditor2\\mse.exe"
/>
</
appSettings
>
</
configuration
>
\ No newline at end of file
win32/data/_functions.txt
View file @
12935e7c
...
...
@@ -274,14 +274,14 @@ copy_info=false或者自由时点的效果则只返回这个效果
如果forced为true则不会检查c对e的免疫效果
●bool Card.IsHasEffect(Card c, int code)
检查c是否受到效果种类是code的效果的影响
●void Card.ResetEffect(Card c, int
id
, int reset_type)
以重置类型为reset_type、重置种类为
id
手动重置c受到的效果的影响
重置类型
只能是以下类型,对应的重置种类为
RESET_EVENT 发生事件重置
id
为事件
RESET_PHASE 阶段结束重置
id
为阶段
RESET_CODE 重置指定code的效果
id
为效果的种类code,只能重置EFFECT_TYPE_SINGLE的永续型效果
RESET_COPY 重置复制的效果
id
为copy_id
RESET_CARD 重置卡片的效果
id
为效果owner的卡号
●void Card.ResetEffect(Card c, int
reset_code
, int reset_type)
以重置类型为reset_type、重置种类为
reset_code
手动重置c受到的效果的影响
reset_type
只能是以下类型,对应的重置种类为
RESET_EVENT 发生事件重置
reset_code
为事件
RESET_PHASE 阶段结束重置
reset_code
为阶段
RESET_CODE 重置指定code的效果
reset_code
为效果的种类code,只能重置EFFECT_TYPE_SINGLE的永续型效果
RESET_COPY 重置复制的效果
reset_code
为copy_id
RESET_CARD 重置卡片的效果
reset_code
为效果owner的卡号
●int Card.GetEffectCount(Card c, int code)
返回c受到影响的种类是code的效果的数量
●Effect Card.RegisterFlagEffect(Card c, int code, int reset_flag, int property, int reset_count[, int label, int desc])
...
...
@@ -575,7 +575,8 @@ EFFECT_COUNT_CODE_SINGLE 同一张卡多个效果公共使用次数(不
o_range值影响的对方区域
如果property属性中指定了EFFECT_FLAG_ABSOLUTE_RANGE标志,
那么s_range指玩家1受到影响的区域,o_range指玩家2受到影响的区域
如果这是一个特殊召唤手续(EFFECT_SPSUMMON_PROC)的效果,
如果这是一个召唤(覆盖)/限制召唤(覆盖)/特殊召唤手续
(EFFECT_SUMMON_PROC/EFFECT_LIMIT_SUMMON_PROC/EFFECT_SPSUMMON_PROC等)的效果,
并且property指定了EFFECT_FLAG_SPSUM_PARAM标志,
那么s_range表示特殊召唤到的哪个玩家的场地,
o_range表示可选择的表示形式
...
...
@@ -1018,12 +1019,12 @@ Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
过滤函数,让玩家player从场上·手卡选择min-max张不等于ex的满足条件f的可解放的卡(非上级召唤用)
●Group Duel.GetTributeGroup(Card c)
返回用于通常召唤c可解放(上级召唤用)的卡片组
●int Duel.GetTributeCount(Card c[, Group mg])
返回[mg中]用于通常召唤c的祭品数量
●int Duel.GetTributeCount(Card c[, Group mg
, bool ex=false
])
返回[mg中]用于通常召唤c的祭品数量
,ex=true则允许对方场上的怪兽(太阳神之翼神龙-球体形)
此数量不一定等于Duel.GetTributeGroup的返回值中的卡片数量
因为某些卡可以作为两个祭品来使用
●Group Duel.SelectTribute(int player, Card c, int min, int max[, Group mg])
让玩家player[从mg中]选择用于通常召唤c的min-max个祭品
●Group Duel.SelectTribute(int player, Card c, int min, int max[, Group mg
, bool ex=false
])
让玩家player[从mg中]选择用于通常召唤c的min-max个祭品
,ex=true则允许对方场上的怪兽(太阳神之翼神龙-球体形)
●int Duel.GetTargetCount(function f, int player, int s, int o, Card ex|nil, ...)
基本同Duel.GetMatchingGroupCount,不同之处在于需要追加判定卡片是否能成为当前正在处理的效果的对象
●bool Duel.IsExistingTarget(function f, int player, int s, int o, int count, Card ex|nil, ...)
...
...
@@ -1105,6 +1106,17 @@ void Duel.SetTargetParam(inte param)
让player以reason原因移除指定位置的min-max张叠放卡,返回值表示是否成功
●void Duel.Hint(int hint_type, int player, int desc)
给玩家player发送hint_type类型的消息提示,提示内容为desc
#hint_type只能为以下类型:
#HINT_SELECTMSG 将提示内容写入缓存,用于选择卡片的提示,例如Duel.SelectMatchingCard等
#HINT_OPSELECTED 向player提示“对方选择了:...”,常用于向对方玩家提示选择发动了什么效果
#HINT_CARD 此时desc应为卡号,手动显示卡片发动的动画,常用于提示不入连锁的处理
#HINT_RACE 此时desc应为种族,向player提示“对方宣言了:...”种族
#HINT_ATTRIB 此时desc应为属性,向player提示“对方宣言了:...”属性
#HINT_CODE 此时desc应为卡号,向player提示“对方宣言了:...”卡片
#HINT_NUMBER 此时desc视为单纯的数字,向player提示“对方选择了:...”数字
#HINT_MESSAGE 弹出一个对话框显示信息
#HINT_EVENT 将提示内容写入缓存,用于时点的提示信息(诱发即时效果的提示)
#HINT_EFFECT 同HINT_CARD
●void Duel.HintSelection(Group g)
手动为g显示被选为对象的动画效果,并记录这些卡被选为对象
●bool Duel.SelectEffectYesNo(int player, Card c)
...
...
win32/win32.zip
View file @
12935e7c
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment