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
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
xiaoye
ygopro-core
Commits
f3ca5e77
Commit
f3ca5e77
authored
Jun 11, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
a6009896
6abb008e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
playerop.cpp
playerop.cpp
+16
-16
No files found.
playerop.cpp
View file @
f3ca5e77
...
@@ -226,8 +226,8 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
...
@@ -226,8 +226,8 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
returns
.
bvalue
[
0
]
=
0
;
returns
.
bvalue
[
0
]
=
0
;
if
(
max
==
0
||
core
.
select_cards
.
empty
())
if
(
max
==
0
||
core
.
select_cards
.
empty
())
return
TRUE
;
return
TRUE
;
if
(
max
>
63
)
if
(
max
>
127
)
max
=
63
;
max
=
127
;
if
(
max
>
core
.
select_cards
.
size
())
if
(
max
>
core
.
select_cards
.
size
())
max
=
(
uint8
)
core
.
select_cards
.
size
();
max
=
(
uint8
)
core
.
select_cards
.
size
();
if
(
min
>
max
)
if
(
min
>
max
)
...
@@ -258,15 +258,15 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
...
@@ -258,15 +258,15 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
byte
c
[
64
]
=
{}
;
std
::
set
<
int8
>
c
;
uint8
m
=
(
uint8
)
core
.
select_cards
.
size
();
uint8
m
=
(
uint8
)
core
.
select_cards
.
size
();
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
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
||
c
.
count
(
v
)
)
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
c
[
v
]
=
1
;
c
.
insert
(
v
)
;
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -528,15 +528,15 @@ int32 field::select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8
...
@@ -528,15 +528,15 @@ int32 field::select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
byte
c
[
64
]
=
{}
;
std
::
set
<
int8
>
c
;
uint8
m
=
(
uint8
)
core
.
select_cards
.
size
(),
tt
=
0
;
uint8
m
=
(
uint8
)
core
.
select_cards
.
size
(),
tt
=
0
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
int8
v
=
returns
.
bvalue
[
i
+
1
];
int8
v
=
returns
.
bvalue
[
i
+
1
];
if
(
v
<
0
||
v
>=
m
||
c
[
v
]
)
{
if
(
v
<
0
||
v
>=
m
||
c
.
count
(
v
)
)
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
c
[
v
]
=
1
;
c
.
insert
(
v
)
;
tt
+=
core
.
select_cards
[
v
]
->
release_param
;
tt
+=
core
.
select_cards
[
v
]
->
release_param
;
}
}
if
(
tt
<
min
)
{
if
(
tt
<
min
)
{
...
@@ -651,7 +651,7 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
...
@@ -651,7 +651,7 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
}
}
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
byte
c
[
64
]
=
{}
;
std
::
set
<
int32
>
c
;
if
(
max
)
{
if
(
max
)
{
int32
oparam
[
16
];
int32
oparam
[
16
];
int32
mcount
=
(
int32
)
core
.
must_select_cards
.
size
();
int32
mcount
=
(
int32
)
core
.
must_select_cards
.
size
();
...
@@ -664,11 +664,11 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
...
@@ -664,11 +664,11 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
int32
m
=
(
int32
)
core
.
select_cards
.
size
();
int32
m
=
(
int32
)
core
.
select_cards
.
size
();
for
(
int32
i
=
mcount
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
mcount
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
int32
v
=
returns
.
bvalue
[
i
+
1
];
int32
v
=
returns
.
bvalue
[
i
+
1
];
if
(
v
<
0
||
v
>=
m
||
c
[
v
]
)
{
if
(
v
<
0
||
v
>=
m
||
c
.
count
(
v
)
)
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
c
[
v
]
=
1
;
c
.
insert
(
v
)
;
oparam
[
i
]
=
core
.
select_cards
[
v
]
->
sum_param
;
oparam
[
i
]
=
core
.
select_cards
[
v
]
->
sum_param
;
}
}
if
(
!
select_sum_check1
(
oparam
,
returns
.
bvalue
[
0
],
0
,
acc
,
0xffff
))
{
if
(
!
select_sum_check1
(
oparam
,
returns
.
bvalue
[
0
],
0
,
acc
,
0xffff
))
{
...
@@ -692,11 +692,11 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
...
@@ -692,11 +692,11 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
int32
m
=
(
int32
)
core
.
select_cards
.
size
();
int32
m
=
(
int32
)
core
.
select_cards
.
size
();
for
(
int32
i
=
mcount
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
mcount
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
int32
v
=
returns
.
bvalue
[
i
+
1
];
int32
v
=
returns
.
bvalue
[
i
+
1
];
if
(
v
<
0
||
v
>=
m
||
c
[
v
]
)
{
if
(
v
<
0
||
v
>=
m
||
c
.
count
(
v
)
)
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
c
[
v
]
=
1
;
c
.
insert
(
v
)
;
int32
op
=
core
.
select_cards
[
v
]
->
sum_param
;
int32
op
=
core
.
select_cards
[
v
]
->
sum_param
;
int32
o1
=
op
&
0xffff
;
int32
o1
=
op
&
0xffff
;
int32
o2
=
op
>>
16
;
int32
o2
=
op
>>
16
;
...
@@ -737,15 +737,15 @@ int32 field::sort_card(int16 step, uint8 playerid) {
...
@@ -737,15 +737,15 @@ int32 field::sort_card(int16 step, uint8 playerid) {
}
else
{
}
else
{
if
(
returns
.
bvalue
[
0
]
==
-
1
)
if
(
returns
.
bvalue
[
0
]
==
-
1
)
return
TRUE
;
return
TRUE
;
byte
c
[
64
]
=
{}
;
std
::
set
<
int8
>
c
;
uint8
m
=
(
uint8
)
core
.
select_cards
.
size
();
uint8
m
=
(
uint8
)
core
.
select_cards
.
size
();
for
(
uint8
i
=
0
;
i
<
m
;
++
i
)
{
for
(
uint8
i
=
0
;
i
<
m
;
++
i
)
{
int8
v
=
returns
.
bvalue
[
i
];
int8
v
=
returns
.
bvalue
[
i
];
if
(
v
<
0
||
v
>=
m
||
c
[
v
]
)
{
if
(
v
<
0
||
v
>=
m
||
c
.
count
(
v
)
)
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
c
[
v
]
=
1
;
c
.
insert
(
v
)
;
}
}
return
TRUE
;
return
TRUE
;
}
}
...
...
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