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
8a15b9e7
Commit
8a15b9e7
authored
Dec 06, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return empty group when fail to select sum
parent
573b7589
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
libgroup.cpp
libgroup.cpp
+6
-2
No files found.
libgroup.cpp
View file @
8a15b9e7
...
@@ -324,7 +324,9 @@ int32 scriptlib::group_select_with_sum_equal(lua_State *L) {
...
@@ -324,7 +324,9 @@ int32 scriptlib::group_select_with_sum_equal(lua_State *L) {
(
*
cit
)
->
sum_param
=
pduel
->
lua
->
get_operation_value
(
*
cit
,
3
,
extraargs
);
(
*
cit
)
->
sum_param
=
pduel
->
lua
->
get_operation_value
(
*
cit
,
3
,
extraargs
);
if
(
!
field
::
check_with_sum_limit_m
(
cv
,
acc
,
0
,
min
,
max
,
mcount
))
{
if
(
!
field
::
check_with_sum_limit_m
(
cv
,
acc
,
0
,
min
,
max
,
mcount
))
{
pduel
->
game_field
->
core
.
must_select_cards
.
clear
();
pduel
->
game_field
->
core
.
must_select_cards
.
clear
();
return
0
;
group
*
empty_group
=
pduel
->
new_group
();
interpreter
::
group2value
(
L
,
empty_group
);
return
1
;
}
}
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_SUM_S
,
0
,
0
,
0
,
acc
,
playerid
+
(
min
<<
16
)
+
(
max
<<
24
));
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_SUM_S
,
0
,
0
,
0
,
acc
,
playerid
+
(
min
<<
16
)
+
(
max
<<
24
));
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
...
@@ -374,7 +376,9 @@ int32 scriptlib::group_select_with_sum_greater(lua_State *L) {
...
@@ -374,7 +376,9 @@ int32 scriptlib::group_select_with_sum_greater(lua_State *L) {
(
*
cit
)
->
sum_param
=
pduel
->
lua
->
get_operation_value
(
*
cit
,
3
,
extraargs
);
(
*
cit
)
->
sum_param
=
pduel
->
lua
->
get_operation_value
(
*
cit
,
3
,
extraargs
);
if
(
!
field
::
check_with_sum_greater_limit_m
(
cv
,
acc
,
0
,
0xffff
,
mcount
))
{
if
(
!
field
::
check_with_sum_greater_limit_m
(
cv
,
acc
,
0
,
0xffff
,
mcount
))
{
pduel
->
game_field
->
core
.
must_select_cards
.
clear
();
pduel
->
game_field
->
core
.
must_select_cards
.
clear
();
return
0
;
group
*
empty_group
=
pduel
->
new_group
();
interpreter
::
group2value
(
L
,
empty_group
);
return
1
;
}
}
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_SUM_S
,
0
,
0
,
0
,
acc
,
playerid
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_SUM_S
,
0
,
0
,
0
,
acc
,
playerid
);
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
...
...
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