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
6826fb5d
Commit
6826fb5d
authored
Dec 10, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
5b7d6581
e1d21757
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
libduel.cpp
libduel.cpp
+4
-11
No files found.
libduel.cpp
View file @
6826fb5d
...
@@ -433,28 +433,21 @@ int32 scriptlib::duel_sets(lua_State *L) {
...
@@ -433,28 +433,21 @@ int32 scriptlib::duel_sets(lua_State *L) {
uint32 confirm = TRUE;
uint32 confirm = TRUE;
if(lua_gettop(L) > 3)
if(lua_gettop(L) > 3)
confirm = lua_toboolean(L, 4);
confirm = lua_toboolean(L, 4);
card* pcard = 0;
group* pgroup = 0;
group* pgroup = 0;
duel* pduel = 0;
duel* pduel = 0;
if(check_param(L, PARAM_TYPE_CARD, 2, TRUE)) {
if(check_param(L, PARAM_TYPE_CARD, 2, TRUE)) {
pcard = *(card**) lua_touserdata(L, 2);
card*
pcard = *(card**) lua_touserdata(L, 2);
pduel = pcard->pduel;
pduel = pcard->pduel;
pgroup = pduel->new_group(pcard);
} else if(check_param(L, PARAM_TYPE_GROUP, 2, TRUE)) {
} else if(check_param(L, PARAM_TYPE_GROUP, 2, TRUE)) {
pgroup = *(group**) lua_touserdata(L, 2);
pgroup = *(group**) lua_touserdata(L, 2);
if(pgroup->container.empty()) {
if(pgroup->container.empty()) {
return 0;
return 0;
} else if(pgroup->container.size() == 1) {
pcard = *pgroup->container.begin();
pduel = pcard->pduel;
} else {
pduel = pgroup->pduel;
}
}
pduel = pgroup->pduel;
} else
} else
luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 2);
luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 2);
if(pcard)
pduel->game_field->add_process(PROCESSOR_SSET_G, 0, pduel->game_field->core.reason_effect, pgroup, playerid, toplayer, confirm);
pduel->game_field->add_process(PROCESSOR_SSET, 0, pduel->game_field->core.reason_effect, (group*)pcard, playerid, toplayer);
else
pduel->game_field->add_process(PROCESSOR_SSET_G, 0, pduel->game_field->core.reason_effect, pgroup, playerid, toplayer, confirm);
return lua_yield(L, 0);
return lua_yield(L, 0);
}
}
int32 scriptlib::duel_create_token(lua_State *L) {
int32 scriptlib::duel_create_token(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