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
67567b78
Commit
67567b78
authored
May 14, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
84751394
923c6699
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
libgroup.cpp
libgroup.cpp
+18
-13
processor.cpp
processor.cpp
+2
-0
No files found.
libgroup.cpp
View file @
67567b78
...
@@ -269,20 +269,23 @@ int32 scriptlib::group_select_unselect(lua_State *L) {
...
@@ -269,20 +269,23 @@ int32 scriptlib::group_select_unselect(lua_State *L) {
check_action_permission
(
L
);
check_action_permission
(
L
);
check_param_count
(
L
,
3
);
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
);
group
*
select_group
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
group
*
pgroup1
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
group
*
unselect_group
=
0
;
group
*
pgroup2
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
duel
*
pduel
=
pgroup1
->
pduel
;
unselect_group
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
select_group
->
pduel
;
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
3
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
if
(
pgroup1
->
container
.
size
()
+
pgroup2
->
container
.
size
()
==
0
)
if
(
select_group
->
container
.
size
()
==
0
&&
(
!
unselect_group
||
unselect_group
->
container
.
size
()
==
0
)
)
return
0
;
return
0
;
for
(
auto
it
=
pgroup2
->
container
.
begin
();
it
!=
pgroup2
->
container
.
end
();
++
it
)
{
if
(
unselect_group
)
{
card
*
pcard
=
*
it
;
for
(
auto
it
=
unselect_group
->
container
.
begin
();
it
!=
unselect_group
->
container
.
end
();
++
it
)
{
for
(
auto
it2
=
pgroup1
->
container
.
begin
();
it2
!=
pgroup1
->
container
.
end
();
++
it2
)
{
card
*
pcard
=
*
it
;
if
((
*
it2
)
==
pcard
)
{
for
(
auto
it2
=
select_group
->
container
.
begin
();
it2
!=
select_group
->
container
.
end
();
++
it2
)
{
return
0
;
if
((
*
it2
)
==
pcard
)
{
return
0
;
}
}
}
}
}
}
}
...
@@ -306,11 +309,13 @@ int32 scriptlib::group_select_unselect(lua_State *L) {
...
@@ -306,11 +309,13 @@ int32 scriptlib::group_select_unselect(lua_State *L) {
min
=
max
;
min
=
max
;
pduel
->
game_field
->
core
.
select_cards
.
clear
();
pduel
->
game_field
->
core
.
select_cards
.
clear
();
pduel
->
game_field
->
core
.
unselect_cards
.
clear
();
pduel
->
game_field
->
core
.
unselect_cards
.
clear
();
for
(
auto
it
=
pgroup1
->
container
.
begin
();
it
!=
pgroup1
->
container
.
end
();
++
it
)
{
for
(
auto
it
=
select_group
->
container
.
begin
();
it
!=
select_group
->
container
.
end
();
++
it
)
{
pduel
->
game_field
->
core
.
select_cards
.
push_back
(
*
it
);
pduel
->
game_field
->
core
.
select_cards
.
push_back
(
*
it
);
}
}
for
(
auto
it
=
pgroup2
->
container
.
begin
();
it
!=
pgroup2
->
container
.
end
();
++
it
)
{
if
(
unselect_group
)
{
pduel
->
game_field
->
core
.
unselect_cards
.
push_back
(
*
it
);
for
(
auto
it
=
unselect_group
->
container
.
begin
();
it
!=
unselect_group
->
container
.
end
();
++
it
)
{
pduel
->
game_field
->
core
.
unselect_cards
.
push_back
(
*
it
);
}
}
}
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_UNSELECT_CARD
,
0
,
0
,
0
,
playerid
+
(
cancelable
<<
16
),
min
+
(
max
<<
16
),
finishable
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_UNSELECT_CARD
,
0
,
0
,
0
,
playerid
+
(
cancelable
<<
16
),
min
+
(
max
<<
16
),
finishable
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
...
...
processor.cpp
View file @
67567b78
...
@@ -3839,6 +3839,8 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
...
@@ -3839,6 +3839,8 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
return
FALSE
;
return
FALSE
;
}
}
case
10
:
{
case
10
:
{
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
())
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE_START
,
0
);
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE_START
,
0
);
return
FALSE
;
return
FALSE
;
}
}
...
...
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