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
1
Issues
1
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
nanahira
DataEditorX
Commits
12965e0c
Commit
12965e0c
authored
May 20, 2017
by
keyongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5 types
parent
f285997d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
12 deletions
+31
-12
DataEditorX/Core/Info/CardType.cs
DataEditorX/Core/Info/CardType.cs
+20
-7
DataEditorX/Core/Mse/MseMaker.cs
DataEditorX/Core/Mse/MseMaker.cs
+11
-5
No files found.
DataEditorX/Core/Info/CardType.cs
View file @
12965e0c
...
...
@@ -73,11 +73,12 @@ public enum CardType : long
public
static
class
CardTypes
{
public
static
readonly
CardType
[]
TYPE1
=
{
CardType
.
TYPE_LINK
,
CardType
.
TYPE_RITUAL
,
CardType
.
TYPE_FUSION
,
CardType
.
TYPE_XYZ
,
CardType
.
TYPE_SYNCHRO
,
CardType
.
TYPE_PENDULUM
,
CardType
.
TYPE_RITUAL
,
CardType
.
TYPE_FUSION
,
CardType
.
TYPE_SPIRIT
,
CardType
.
TYPE_UNION
,
CardType
.
TYPE_DUAL
,
...
...
@@ -85,8 +86,10 @@ public static class CardTypes{
CardType
.
TYPE_TOON
,
};
public
static
readonly
CardType
[]
TYPE2
=
{
CardType
.
TYPE_
PENDULUM
,
CardType
.
TYPE_
XYZ
,
CardType
.
TYPE_SYNCHRO
,
CardType
.
TYPE_PENDULUM
,
CardType
.
TYPE_SPIRIT
,
CardType
.
TYPE_UNION
,
CardType
.
TYPE_DUAL
,
...
...
@@ -94,17 +97,27 @@ public static class CardTypes{
CardType
.
TYPE_TOON
};
public
static
readonly
CardType
[]
TYPE3
={
CardType
.
TYPE_SYNCHRO
,
CardType
.
TYPE_PENDULUM
,
CardType
.
TYPE_SPIRIT
,
CardType
.
TYPE_UNION
,
CardType
.
TYPE_DUAL
,
CardType
.
TYPE_FLIP
,
CardType
.
TYPE_TOON
,
};
public
static
readonly
CardType
[]
TYPE4
={
CardType
.
TYPE_TUNER
,
CardType
.
TYPE_EFFECT
};
public
static
CardType
[]
GetMonsterTypes
(
long
type
){
var
list
=
new
List
<
CardType
>(
4
);
var
typeList
=
new
List
<
CardType
[
]>
(
4
);
var
list
=
new
List
<
CardType
>(
5
);
var
typeList
=
new
List
<
CardType
[
]>
(
5
);
typeList
.
Add
(
TYPE1
);
typeList
.
Add
(
TYPE2
);
typeList
.
Add
(
TYPE3
);
typeList
.
Add
(
TYPE
3
);
typeList
.
Add
(
TYPE
3
);
typeList
.
Add
(
TYPE
4
);
typeList
.
Add
(
TYPE
4
);
int
count
=
typeList
.
Count
;
for
(
int
i
=
0
;
i
<
count
;
i
++){
CardType
[]
types
=
typeList
[
i
];
...
...
DataEditorX/Core/Mse/MseMaker.cs
View file @
12965e0c
...
...
@@ -277,20 +277,22 @@ public string GetType(CardType ctype)
public
string
[]
GetTypes
(
Card
c
)
{
//卡片类型,效果1,效果2,效果3
string
[]
types
=
{
MseCardType
.
CARD_NORMAL
,
""
,
""
,
""
,
""
,
""
};
int
MAX_TYPE
=
5
;
var
types
=
new
string
[
MAX_TYPE
+
1
];
types
[
0
]
=
MseCardType
.
CARD_NORMAL
;
for
(
int
i
=
1
;
i
<
types
.
Length
;
i
++){
types
[
i
]=
""
;
}
if
(
c
.
IsType
(
CardType
.
TYPE_MONSTER
))
{
CardType
[]
cardTypes
=
CardTypes
.
GetMonsterTypes
(
c
.
type
);
int
count
=
cardTypes
.
Length
;
for
(
int
i
=
0
;
i
<
count
&&
i
<
4
;
i
++){
for
(
int
i
=
0
;
i
<
count
&&
i
<
MAX_TYPE
;
i
++){
types
[
i
+
1
]
=
GetType
(
cardTypes
[
i
]);
}
if
(
cardTypes
.
Length
>
0
){
if
(
c
.
IsType
(
CardType
.
TYPE_LINK
)){
types
[
0
]
=
MseCardType
.
CARD_LINK
;
}
else
if
(
c
.
IsType
(
CardType
.
TYPE_XYZ
))
{
types
[
0
]
=
MseCardType
.
CARD_XYZ
;
}
else
if
(
c
.
IsType
(
CardType
.
TYPE_TOKEN
))
{
...
...
@@ -310,6 +312,10 @@ public string[] GetTypes(Card c)
{
types
[
0
]
=
MseCardType
.
CARD_SYNCHRO
;
}
else
if
(
c
.
IsType
(
CardType
.
TYPE_XYZ
))
{
types
[
0
]
=
MseCardType
.
CARD_XYZ
;
}
else
if
(
c
.
IsType
(
CardType
.
TYPE_EFFECT
))
{
types
[
0
]
=
MseCardType
.
CARD_EFFECT
;
...
...
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