Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
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
MyCard
ygopro-core
Commits
d85f0da9
Commit
d85f0da9
authored
Aug 30, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert and clean up
parent
88524694
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
16 deletions
+12
-16
playerop.cpp
playerop.cpp
+3
-3
processor.cpp
processor.cpp
+9
-13
No files found.
playerop.cpp
View file @
d85f0da9
...
@@ -269,7 +269,7 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
...
@@ -269,7 +269,7 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
byte
c
[
64
]
=
{};
byte
c
[
64
]
=
{};
uint8
m
=
core
.
select_cards
.
size
();
uint8
m
=
core
.
select_cards
.
size
();
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
u
int8
v
=
returns
.
bvalue
[
i
+
1
];
int8
v
=
returns
.
bvalue
[
i
+
1
];
if
(
v
<
0
||
v
>=
m
||
v
>=
63
||
c
[
v
])
{
if
(
v
<
0
||
v
>=
m
||
v
>=
63
||
c
[
v
])
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
...
@@ -747,12 +747,12 @@ int32 field::sort_card(int16 step, uint8 playerid, uint8 is_chain) {
...
@@ -747,12 +747,12 @@ int32 field::sort_card(int16 step, uint8 playerid, uint8 is_chain) {
}
}
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
if
(
returns
.
i
value
[
0
]
==
-
1
)
if
(
returns
.
b
value
[
0
]
==
-
1
)
return
TRUE
;
return
TRUE
;
byte
c
[
64
]
=
{};
byte
c
[
64
]
=
{};
uint8
m
=
core
.
select_cards
.
size
();
uint8
m
=
core
.
select_cards
.
size
();
for
(
uint8
i
=
0
;
i
<
m
;
++
i
)
{
for
(
uint8
i
=
0
;
i
<
m
;
++
i
)
{
u
int8
v
=
returns
.
bvalue
[
i
];
int8
v
=
returns
.
bvalue
[
i
];
if
(
v
<
0
||
v
>=
m
||
c
[
v
])
{
if
(
v
<
0
||
v
>=
m
||
c
[
v
])
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
...
...
processor.cpp
View file @
d85f0da9
...
@@ -674,9 +674,8 @@ int32 field::process() {
...
@@ -674,9 +674,8 @@ int32 field::process() {
it
->
step
++
;
it
->
step
++
;
}
else
{
}
else
{
group
*
pgroup
=
pduel
->
new_group
();
group
*
pgroup
=
pduel
->
new_group
();
card
*
pcard
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
pgroup
->
container
.
insert
(
pcard
);
pgroup
->
container
.
insert
(
pcard
);
}
}
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
...
@@ -719,9 +718,8 @@ int32 field::process() {
...
@@ -719,9 +718,8 @@ int32 field::process() {
it
->
step
++
;
it
->
step
++
;
}
else
{
}
else
{
group
*
pgroup
=
pduel
->
new_group
();
group
*
pgroup
=
pduel
->
new_group
();
card
*
pcard
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
pgroup
->
container
.
insert
(
pcard
);
pgroup
->
container
.
insert
(
pcard
);
}
}
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
...
@@ -735,9 +733,8 @@ int32 field::process() {
...
@@ -735,9 +733,8 @@ int32 field::process() {
it
->
step
++
;
it
->
step
++
;
}
else
{
}
else
{
group
*
pgroup
=
pduel
->
new_group
();
group
*
pgroup
=
pduel
->
new_group
();
card
*
pcard
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
pgroup
->
container
.
insert
(
pcard
);
pgroup
->
container
.
insert
(
pcard
);
}
}
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
...
@@ -852,11 +849,11 @@ int32 field::process() {
...
@@ -852,11 +849,11 @@ int32 field::process() {
int32
playerid
=
it
->
arg1
;
int32
playerid
=
it
->
arg1
;
int32
count
=
it
->
arg3
;
int32
count
=
it
->
arg3
;
int32
dfflag
=
0
;
int32
dfflag
=
0
;
uint8
p
,
l
,
s
,
p
a
=
0
;
uint8
pa
=
0
;
for
(
int32
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int32
i
=
0
;
i
<
count
;
++
i
)
{
p
=
returns
.
bvalue
[
pa
];
uint8
p
=
returns
.
bvalue
[
pa
];
l
=
returns
.
bvalue
[
pa
+
1
];
uint8
l
=
returns
.
bvalue
[
pa
+
1
];
s
=
returns
.
bvalue
[
pa
+
2
];
uint8
s
=
returns
.
bvalue
[
pa
+
2
];
dfflag
|=
0x1u
<<
(
s
+
(
p
==
playerid
?
0
:
16
)
+
(
l
==
LOCATION_MZONE
?
0
:
8
));
dfflag
|=
0x1u
<<
(
s
+
(
p
==
playerid
?
0
:
16
)
+
(
l
==
LOCATION_MZONE
?
0
:
8
));
pa
+=
3
;
pa
+=
3
;
}
}
...
@@ -1007,9 +1004,8 @@ int32 field::process() {
...
@@ -1007,9 +1004,8 @@ int32 field::process() {
it
->
step
++
;
it
->
step
++
;
}
else
if
(
it
->
step
==
1
)
{
}
else
if
(
it
->
step
==
1
)
{
card_set
cset
;
card_set
cset
;
card
*
pcard
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
cset
.
insert
(
pcard
);
cset
.
insert
(
pcard
);
}
}
if
(
cset
.
size
())
if
(
cset
.
size
())
...
@@ -1050,7 +1046,7 @@ int32 field::process() {
...
@@ -1050,7 +1046,7 @@ int32 field::process() {
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
count
;
++
i
)
player
[
target_player
].
list_main
.
pop_back
();
player
[
target_player
].
list_main
.
pop_back
();
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
count
;
++
i
)
tc
[(
int32
)
returns
.
bvalue
[
i
]]
=
core
.
select_cards
[
i
];
tc
[(
uint8
)
returns
.
bvalue
[
i
]]
=
core
.
select_cards
[
i
];
for
(
i
=
0
;
i
<
count
;
++
i
)
{
for
(
i
=
0
;
i
<
count
;
++
i
)
{
player
[
target_player
].
list_main
.
push_back
(
tc
[
count
-
i
-
1
]);
player
[
target_player
].
list_main
.
push_back
(
tc
[
count
-
i
-
1
]);
tc
[
count
-
i
-
1
]
->
current
.
sequence
=
player
[
target_player
].
list_main
.
size
()
-
1
;
tc
[
count
-
i
-
1
]
->
current
.
sequence
=
player
[
target_player
].
list_main
.
size
()
-
1
;
...
...
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