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
b43c3762
You need to sign in or sign up before continuing.
Commit
b43c3762
authored
Sep 06, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Duel.ResetTimeLimit
parent
713fa284
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
common.h
common.h
+2
-0
libduel.cpp
libduel.cpp
+16
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
common.h
View file @
b43c3762
...
@@ -320,6 +320,8 @@ struct card_sort {
...
@@ -320,6 +320,8 @@ struct card_sort {
#define MSG_MATCH_KILL 170
#define MSG_MATCH_KILL 170
#define MSG_CUSTOM_MSG 180
#define MSG_CUSTOM_MSG 180
#define MSG_RESET_TIME 221
//Hints
//Hints
#define HINT_EVENT 1
#define HINT_EVENT 1
#define HINT_MESSAGE 2
#define HINT_MESSAGE 2
...
...
libduel.cpp
View file @
b43c3762
...
@@ -230,6 +230,21 @@ int32 scriptlib::duel_load_script(lua_State *L) {
...
@@ -230,6 +230,21 @@ int32 scriptlib::duel_load_script(lua_State *L) {
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_reset_time_limit
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
int32
p
=
lua_tointeger
(
L
,
1
);
int32
time
=
0
;
if
(
p
!=
0
&&
p
!=
1
)
luaL_error
(
L
,
"Parameter 1 should be 0 or 1."
,
2
);
if
(
lua_gettop
(
L
)
>=
2
)
time
=
lua_tointeger
(
L
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
write_buffer8
(
MSG_RESET_TIME
);
pduel
->
write_buffer8
(
p
);
pduel
->
write_buffer8
(
time
);
return
0
;
}
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
int32
flag
=
(
int32
)
lua_tointeger
(
L
,
1
);
int32
flag
=
(
int32
)
lua_tointeger
(
L
,
1
);
...
@@ -4696,6 +4711,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -4696,6 +4711,7 @@ static const struct luaL_Reg duellib[] = {
{
"XyzSummonByRose"
,
scriptlib
::
duel_xyz_summon_by_rose
},
{
"XyzSummonByRose"
,
scriptlib
::
duel_xyz_summon_by_rose
},
{
"LoadScript"
,
scriptlib
::
duel_load_script
},
{
"LoadScript"
,
scriptlib
::
duel_load_script
},
{
"AnnounceCardFilter"
,
scriptlib
::
duel_announce_card
},
// For compat
{
"AnnounceCardFilter"
,
scriptlib
::
duel_announce_card
},
// For compat
{
"ResetTimeLimit"
,
scriptlib
::
duel_reset_time_limit
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
...
...
scriptlib.h
View file @
b43c3762
...
@@ -37,6 +37,7 @@ public:
...
@@ -37,6 +37,7 @@ public:
static
int32
duel_get_cards_in_zone
(
lua_State
*
L
);
static
int32
duel_get_cards_in_zone
(
lua_State
*
L
);
static
int32
duel_xyz_summon_by_rose
(
lua_State
*
L
);
static
int32
duel_xyz_summon_by_rose
(
lua_State
*
L
);
static
int32
duel_load_script
(
lua_State
*
L
);
static
int32
duel_load_script
(
lua_State
*
L
);
static
int32
duel_reset_time_limit
(
lua_State
*
L
);
//card lib
//card lib
static
int32
card_get_code
(
lua_State
*
L
);
static
int32
card_get_code
(
lua_State
*
L
);
static
int32
card_get_origin_code
(
lua_State
*
L
);
static
int32
card_get_origin_code
(
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