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
c5eee848
Commit
c5eee848
authored
Nov 20, 2023
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Duel.SelectReleaseGroup, SelectReleaseGroupEx
parent
155829a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
26 deletions
+30
-26
field.h
field.h
+2
-2
libduel.cpp
libduel.cpp
+28
-24
No files found.
field.h
View file @
c5eee848
...
...
@@ -447,8 +447,8 @@ public:
int32
filter_field_card
(
uint8
self
,
uint32
location
,
uint32
location2
,
group
*
pgroup
);
effect
*
is_player_affected_by_effect
(
uint8
playerid
,
uint32
code
);
int32
get_release_list
(
uint8
playerid
,
card_set
*
release_list
,
card_set
*
ex_list
,
card_set
*
ex_list_oneof
,
int32
use_con
,
int32
use_hand
,
int32
fun
,
int32
exarg
,
card
*
exc
,
group
*
exg
,
uint32
reason
=
0u
);
int32
check_release_list
(
uint8
playerid
,
int32
count
,
int32
use_con
,
int32
use_hand
,
int32
fun
,
int32
exarg
,
card
*
exc
,
group
*
exg
,
uint32
reason
=
0u
);
int32
get_release_list
(
uint8
playerid
,
card_set
*
release_list
,
card_set
*
ex_list
,
card_set
*
ex_list_oneof
,
int32
use_con
,
int32
use_hand
,
int32
fun
,
int32
exarg
,
card
*
exc
,
group
*
exg
,
uint32
reason
);
int32
check_release_list
(
uint8
playerid
,
int32
count
,
int32
use_con
,
int32
use_hand
,
int32
fun
,
int32
exarg
,
card
*
exc
,
group
*
exg
,
uint32
reason
);
int32
get_summon_release_list
(
card
*
target
,
card_set
*
release_list
,
card_set
*
ex_list
,
card_set
*
ex_list_oneof
,
group
*
mg
=
NULL
,
uint32
ex
=
0
,
uint32
releasable
=
0xff00ff
,
uint32
pos
=
0x1
);
int32
get_summon_count_limit
(
uint8
playerid
);
int32
get_draw_count
(
uint8
playerid
);
...
...
libduel.cpp
View file @
c5eee848
...
...
@@ -2677,30 +2677,32 @@ int32 scriptlib::duel_check_release_group(lua_State *L) {
return
1
;
}
int32
scriptlib
::
duel_select_release_group
(
lua_State
*
L
)
{
const
int32
must_param
=
6
;
check_action_permission
(
L
);
check_param_count
(
L
,
5
);
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
check_param_count
(
L
,
must_param
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
1
);
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
int32
use_con
=
FALSE
;
if
(
!
lua_isnil
(
L
,
2
))
{
check_param
(
L
,
PARAM_TYPE_FUNCTION
,
2
);
if
(
!
lua_isnil
(
L
,
3
))
{
check_param
(
L
,
PARAM_TYPE_FUNCTION
,
3
);
use_con
=
TRUE
;
}
uint32
min
=
(
uint32
)
lua_tointeger
(
L
,
4
);
uint32
max
=
(
uint32
)
lua_tointeger
(
L
,
5
);
card
*
pexception
=
0
;
group
*
pexgroup
=
0
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
5
,
TRUE
))
pexception
=
*
(
card
**
)
lua_touserdata
(
L
,
5
);
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
5
,
TRUE
))
pexgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
5
);
uint32
extraargs
=
lua_gettop
(
L
)
-
5
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
6
,
TRUE
))
pexception
=
*
(
card
**
)
lua_touserdata
(
L
,
6
);
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
6
,
TRUE
))
pexgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
6
);
uint32
extraargs
=
lua_gettop
(
L
)
-
must_param
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
uint32
min
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint32
max
=
(
uint32
)
lua_tointeger
(
L
,
4
);
pduel
->
game_field
->
core
.
release_cards
.
clear
();
pduel
->
game_field
->
core
.
release_cards_ex
.
clear
();
pduel
->
game_field
->
core
.
release_cards_ex_oneof
.
clear
();
pduel
->
game_field
->
get_release_list
(
playerid
,
&
pduel
->
game_field
->
core
.
release_cards
,
&
pduel
->
game_field
->
core
.
release_cards_ex
,
&
pduel
->
game_field
->
core
.
release_cards_ex_oneof
,
use_con
,
FALSE
,
2
,
extraargs
,
pexception
,
pexgroup
);
pduel
->
game_field
->
get_release_list
(
playerid
,
&
pduel
->
game_field
->
core
.
release_cards
,
&
pduel
->
game_field
->
core
.
release_cards_ex
,
&
pduel
->
game_field
->
core
.
release_cards_ex_oneof
,
use_con
,
FALSE
,
3
,
extraargs
,
pexception
,
pexgroup
,
reason
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_RELEASE
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
...
...
@@ -2740,30 +2742,32 @@ int32 scriptlib::duel_check_release_group_ex(lua_State *L) {
return
1
;
}
int32
scriptlib
::
duel_select_release_group_ex
(
lua_State
*
L
)
{
const
int32
must_param
=
6
;
check_action_permission
(
L
);
check_param_count
(
L
,
5
);
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
check_param_count
(
L
,
must_param
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
1
);
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
int32
use_con
=
FALSE
;
if
(
!
lua_isnil
(
L
,
2
))
{
check_param
(
L
,
PARAM_TYPE_FUNCTION
,
2
);
if
(
!
lua_isnil
(
L
,
3
))
{
check_param
(
L
,
PARAM_TYPE_FUNCTION
,
3
);
use_con
=
TRUE
;
}
uint32
min
=
(
uint32
)
lua_tointeger
(
L
,
4
);
uint32
max
=
(
uint32
)
lua_tointeger
(
L
,
5
);
card
*
pexception
=
0
;
group
*
pexgroup
=
0
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
5
,
TRUE
))
pexception
=
*
(
card
**
)
lua_touserdata
(
L
,
5
);
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
5
,
TRUE
))
pexgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
5
);
uint32
extraargs
=
lua_gettop
(
L
)
-
5
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
6
,
TRUE
))
pexception
=
*
(
card
**
)
lua_touserdata
(
L
,
6
);
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
6
,
TRUE
))
pexgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
6
);
uint32
extraargs
=
lua_gettop
(
L
)
-
must_param
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
uint32
min
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint32
max
=
(
uint32
)
lua_tointeger
(
L
,
4
);
pduel
->
game_field
->
core
.
release_cards
.
clear
();
pduel
->
game_field
->
core
.
release_cards_ex
.
clear
();
pduel
->
game_field
->
core
.
release_cards_ex_oneof
.
clear
();
pduel
->
game_field
->
get_release_list
(
playerid
,
&
pduel
->
game_field
->
core
.
release_cards
,
&
pduel
->
game_field
->
core
.
release_cards_ex
,
&
pduel
->
game_field
->
core
.
release_cards_ex_oneof
,
use_con
,
TRUE
,
2
,
extraargs
,
pexception
,
pexgroup
);
pduel
->
game_field
->
get_release_list
(
playerid
,
&
pduel
->
game_field
->
core
.
release_cards
,
&
pduel
->
game_field
->
core
.
release_cards_ex
,
&
pduel
->
game_field
->
core
.
release_cards_ex_oneof
,
use_con
,
TRUE
,
3
,
extraargs
,
pexception
,
pexgroup
,
reason
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_RELEASE
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
...
...
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