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
d5d91f86
Commit
d5d91f86
authored
Nov 28, 2018
by
mercury233
Committed by
GitHub
Nov 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Duel.GrabSelectedCard (#199)
for Group.SelectSubGroup in utility.lua
parent
37faac25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
interpreter.cpp
interpreter.cpp
+1
-0
libduel.cpp
libduel.cpp
+9
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
interpreter.cpp
View file @
d5d91f86
...
...
@@ -509,6 +509,7 @@ static const struct luaL_Reg duellib[] = {
{
"ReleaseRitualMaterial"
,
scriptlib
::
duel_release_ritual_material
},
{
"GetFusionMaterial"
,
scriptlib
::
duel_get_fusion_material
},
{
"SetSelectedCard"
,
scriptlib
::
duel_set_must_select_cards
},
{
"GrabSelectedCard"
,
scriptlib
::
duel_grab_must_select_cards
},
{
"SetTargetCard"
,
scriptlib
::
duel_set_target_card
},
{
"ClearTargetCard"
,
scriptlib
::
duel_clear_target_card
},
{
"SetTargetPlayer"
,
scriptlib
::
duel_set_target_player
},
...
...
libduel.cpp
View file @
d5d91f86
...
...
@@ -2798,6 +2798,15 @@ int32 scriptlib::duel_set_must_select_cards(lua_State *L) {
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
0
;
}
int32
scriptlib
::
duel_grab_must_select_cards
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
if
(
pduel
->
game_field
->
core
.
must_select_cards
.
size
())
pgroup
->
container
.
insert
(
pduel
->
game_field
->
core
.
must_select_cards
.
begin
(),
pduel
->
game_field
->
core
.
must_select_cards
.
end
());
pduel
->
game_field
->
core
.
must_select_cards
.
clear
();
interpreter
::
group2value
(
L
,
pgroup
);
return
1
;
}
int32
scriptlib
::
duel_set_target_card
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
1
);
...
...
scriptlib.h
View file @
d5d91f86
...
...
@@ -503,6 +503,7 @@ public:
static
int32
duel_release_ritual_material
(
lua_State
*
L
);
static
int32
duel_get_fusion_material
(
lua_State
*
L
);
static
int32
duel_set_must_select_cards
(
lua_State
*
L
);
static
int32
duel_grab_must_select_cards
(
lua_State
*
L
);
static
int32
duel_set_target_card
(
lua_State
*
L
);
static
int32
duel_clear_target_card
(
lua_State
*
L
);
static
int32
duel_set_target_player
(
lua_State
*
L
);
...
...
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