Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
ce1bb7ff
Commit
ce1bb7ff
authored
Oct 07, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updc
parent
d045f2e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+35
-0
No files found.
ocgcore/libduel.cpp
View file @
ce1bb7ff
...
...
@@ -3155,7 +3155,42 @@ int32 scriptlib::duel_announce_level(lua_State * L) {
check_action_permission(L);
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
int32 min = 1;
int32 max = 12;
if(lua_gettop(L) >= 2 && !lua_isnil(L, 2))
min = lua_tointeger(L, 2);
if(lua_gettop(L) >= 3 && !lua_isnil(L, 3))
max = lua_tointeger(L, 3);
if(min > max) {
int32 aux = max;
max = min;
min = aux;
}
duel* pduel = interpreter::get_duel_info(L);
pduel->game_field->core.select_options.clear();
int32 count = 0;
if(lua_gettop(L) > 3) {
for(int32 i = min; i <= max; ++i) {
int32 chk = 1;
for(int32 j = 4; j <= lua_gettop(L); ++j) {
if (!lua_isnil(L, j) && i == lua_tointeger(L, j)) {
chk = 0;
break;
}
}
if(chk) {
count += 1;
pduel->game_field->core.select_options.push_back(i);
}
}
} else {
for(int32 i = min; i <= max; ++i) {
count += 1;
pduel->game_field->core.select_options.push_back(i);
}
}
if(count == 0)
return 0;
pduel->game_field->add_process(PROCESSOR_ANNOUNCE_NUMBER, 0, 0, 0, playerid + 0x10000, 0xc0001);
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