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
a9bc336e
Commit
a9bc336e
authored
Jan 01, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset time limit after picking deck
parent
e454e517
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
2 deletions
+21
-2
2pick/pick.lua
2pick/pick.lua
+1
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+5
-0
ocgcore/field.h
ocgcore/field.h
+2
-1
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+11
-1
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
2pick/pick.lua
View file @
a9bc336e
...
...
@@ -173,6 +173,7 @@ function Auxiliary.StartPick(e)
for
p
=
0
,
1
do
if
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
Duel
.
ShuffleDeck
(
p
)
Duel
.
ResetTimeLimit
(
p
)
end
end
for
p
=
0
,
1
do
...
...
gframe/single_duel.cpp
View file @
a9bc336e
...
...
@@ -743,6 +743,11 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
pick_deck_saved
[
player
]
=
true
;
break
;
}
case
MSG_RESET_TIME
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
time_limit
[
player
]
=
host_info
.
time_limit
;
break
;
}
case
MSG_RETRY
:
{
WaitforResponse
(
last_response
);
NetServer
::
SendBufferToPlayer
(
players
[
last_response
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
ocgcore/field.h
View file @
a9bc336e
...
...
@@ -914,5 +914,6 @@ public:
#define MSG_SELECT_UNSELECT_CARD 190
//2pick
#define MSG_SAVE_PICK_DECK 222
#define MSG_SAVE_PICK_DECK 220
#define MSG_RESET_TIME 221
#endif
/* FIELD_H_ */
ocgcore/interpreter.cpp
View file @
a9bc336e
...
...
@@ -373,6 +373,7 @@ static const struct luaL_Reg duellib[] = {
{
"SavePickDeck"
,
scriptlib
::
duel_save_pick_deck
},
{
"IsPlayerNeedToPickDeck"
,
scriptlib
::
duel_is_player_need_to_pick_deck
},
{
"GetStartCount"
,
scriptlib
::
duel_get_start_count
},
{
"ResetTimeLimit"
,
scriptlib
::
duel_reset_time_limit
},
//modded
{
"SelectField"
,
scriptlib
::
duel_select_field
},
{
"GetMasterRule"
,
scriptlib
::
duel_get_master_rule
},
...
...
ocgcore/libduel.cpp
View file @
a9bc336e
...
...
@@ -19,7 +19,7 @@ int32 scriptlib::duel_save_pick_deck(lua_State * L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
);
int32
playerid
=
lua_tonumberint
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
luaL_error
(
L
,
"Parameter 1 should be 0 or 1."
,
2
)
;
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pgroup
->
pduel
;
if
(
pgroup
->
container
.
size
()
==
0
)
...
...
@@ -50,6 +50,16 @@ int32 scriptlib::duel_get_start_count(lua_State * L) {
lua_pushinteger
(
L
,
pduel
->
game_field
->
player
[
p
].
start_count
);
return
1
;
}
int32
scriptlib
::
duel_reset_time_limit
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
int32
p
=
lua_tonumberint
(
L
,
1
);
if
(
p
!=
0
&&
p
!=
1
)
luaL_error
(
L
,
"Parameter 1 should be 0 or 1."
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
write_buffer8
(
MSG_RESET_TIME
);
pduel
->
write_buffer8
(
p
);
return
0
;
}
//modded
int32
scriptlib
::
duel_select_field
(
lua_State
*
L
)
{
check_action_permission
(
L
);
...
...
ocgcore/scriptlib.h
View file @
a9bc336e
...
...
@@ -20,6 +20,7 @@ public:
static
int32
duel_save_pick_deck
(
lua_State
*
L
);
static
int32
duel_is_player_need_to_pick_deck
(
lua_State
*
L
);
static
int32
duel_get_start_count
(
lua_State
*
L
);
static
int32
duel_reset_time_limit
(
lua_State
*
L
);
//millux
static
int32
card_is_ritual_type
(
lua_State
*
L
);
//modded
...
...
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