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
f7c3c8a2
Commit
f7c3c8a2
authored
Jan 26, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/purerosefallen/ygopro-222DIY
parents
090258a1
f89fb279
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
13 deletions
+26
-13
cards.cdb
cards.cdb
+0
-0
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+15
-13
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+9
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
cards.cdb
View file @
f7c3c8a2
No preview for this file type
gframe/tag_duel.cpp
View file @
f7c3c8a2
...
@@ -1032,7 +1032,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -1032,7 +1032,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
break
;
break
;
}
}
case
MSG_NEW_TURN
:
{
case
MSG_NEW_TURN
:
{
pbuf++
;
int
r_player
=
BufferIO
::
ReadInt8
(
pbuf
)
;
time_limit
[
0
]
=
host_info
.
time_limit
;
time_limit
[
0
]
=
host_info
.
time_limit
;
time_limit
[
1
]
=
host_info
.
time_limit
;
time_limit
[
1
]
=
host_info
.
time_limit
;
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
@@ -1044,20 +1044,22 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -1044,20 +1044,22 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
#ifdef YGOPRO_SERVER_MODE
#ifdef YGOPRO_SERVER_MODE
NetServer
::
ReSendToPlayers
(
cache_recorder
,
replay_recorder
);
NetServer
::
ReSendToPlayers
(
cache_recorder
,
replay_recorder
);
#endif
#endif
if(turn_count > 0) {
if
(
!
(
r_player
&
0x2
))
{
if(turn_count % 2 == 0) {
if
(
turn_count
>
0
)
{
if(cur_player[0] == players[0])
if
(
turn_count
%
2
==
0
)
{
cur_player[0] = players[1];
if
(
cur_player
[
0
]
==
players
[
0
])
else
cur_player
[
0
]
=
players
[
1
];
cur_player[0] = players[0];
else
} else {
cur_player
[
0
]
=
players
[
0
];
if(cur_player[1] == players[2])
}
else
{
cur_player[1] = players[3];
if
(
cur_player
[
1
]
==
players
[
2
])
else
cur_player
[
1
]
=
players
[
3
];
cur_player[1] = players[2];
else
cur_player
[
1
]
=
players
[
2
];
}
}
}
turn_count
++
;
}
}
turn_count++;
break
;
break
;
}
}
case
MSG_NEW_PHASE
:
{
case
MSG_NEW_PHASE
:
{
...
...
ocgcore/interpreter.cpp
View file @
f7c3c8a2
...
@@ -382,6 +382,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -382,6 +382,7 @@ static const struct luaL_Reg duellib[] = {
{
"Exile"
,
scriptlib
::
duel_exile
},
{
"Exile"
,
scriptlib
::
duel_exile
},
{
"DisableActionCheck"
,
scriptlib
::
duel_disable_action_check
},
{
"DisableActionCheck"
,
scriptlib
::
duel_disable_action_check
},
{
"SetMetatable"
,
scriptlib
::
duel_setmetatable
},
{
"SetMetatable"
,
scriptlib
::
duel_setmetatable
},
{
"MoveTurnCount"
,
scriptlib
::
duel_move_turn_count
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
...
...
ocgcore/libduel.cpp
View file @
f7c3c8a2
...
@@ -195,6 +195,15 @@ int32 scriptlib::duel_setmetatable(lua_State *L) {
...
@@ -195,6 +195,15 @@ int32 scriptlib::duel_setmetatable(lua_State *L) {
lua_setmetatable
(
L
,
1
);
lua_setmetatable
(
L
,
1
);
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_move_turn_count
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
int32
turn_player
=
pduel
->
game_field
->
infos
.
turn_player
;
pduel
->
game_field
->
infos
.
turn_id
++
;
pduel
->
game_field
->
infos
.
turn_id_by_player
[
turn_player
]
++
;
pduel
->
write_buffer8
(
MSG_NEW_TURN
);
pduel
->
write_buffer8
(
turn_player
|
0x2
);
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
);
...
...
ocgcore/scriptlib.h
View file @
f7c3c8a2
...
@@ -37,6 +37,7 @@ public:
...
@@ -37,6 +37,7 @@ public:
static
int32
duel_exile
(
lua_State
*
L
);
static
int32
duel_exile
(
lua_State
*
L
);
static
int32
duel_disable_action_check
(
lua_State
*
L
);
static
int32
duel_disable_action_check
(
lua_State
*
L
);
static
int32
duel_setmetatable
(
lua_State
*
L
);
static
int32
duel_setmetatable
(
lua_State
*
L
);
static
int32
duel_move_turn_count
(
lua_State
*
L
);
//card lib
//card lib
static
int32
card_get_code
(
lua_State
*
L
);
static
int32
card_get_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