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
e454e517
Commit
e454e517
authored
Jan 01, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update starting
parent
30ac8f7f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
4 deletions
+18
-4
2pick/pick.lua
2pick/pick.lua
+3
-2
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+2
-1
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+10
-1
ocgcore/ocgapi.cpp
ocgcore/ocgapi.cpp
+2
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
2pick/pick.lua
View file @
e454e517
...
...
@@ -175,8 +175,9 @@ function Auxiliary.StartPick(e)
Duel
.
ShuffleDeck
(
p
)
end
end
Duel
.
Draw
(
0
,
5
,
REASON_RULE
)
Duel
.
Draw
(
1
,
5
,
REASON_RULE
)
for
p
=
0
,
1
do
Duel
.
Draw
(
p
,
Duel
.
GetStartCount
(
p
),
REASON_RULE
)
end
e
:
Reset
()
end
...
...
ocgcore/interpreter.cpp
View file @
e454e517
...
...
@@ -372,6 +372,7 @@ static const struct luaL_Reg duellib[] = {
//2pick
{
"SavePickDeck"
,
scriptlib
::
duel_save_pick_deck
},
{
"IsPlayerNeedToPickDeck"
,
scriptlib
::
duel_is_player_need_to_pick_deck
},
{
"GetStartCount"
,
scriptlib
::
duel_get_start_count
},
//modded
{
"SelectField"
,
scriptlib
::
duel_select_field
},
{
"GetMasterRule"
,
scriptlib
::
duel_get_master_rule
},
...
...
ocgcore/libduel.cpp
View file @
e454e517
...
...
@@ -36,11 +36,20 @@ int32 scriptlib::duel_is_player_need_to_pick_deck(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
);
;
luaL_error
(
L
,
"Parameter 1 should be 0 or 1."
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
player
[
p
].
pick_needed
);
return
1
;
}
int32
scriptlib
::
duel_get_start_count
(
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
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
player
[
p
].
start_count
);
return
1
;
}
//modded
int32
scriptlib
::
duel_select_field
(
lua_State
*
L
)
{
check_action_permission
(
L
);
...
...
ocgcore/ocgapi.cpp
View file @
e454e517
...
...
@@ -78,10 +78,12 @@ extern "C" DECL_DLLEXPORT void start_duel(ptr pduel, int options) {
pd
->
game_field
->
core
.
shuffle_hand_check
[
1
]
=
FALSE
;
pd
->
game_field
->
core
.
shuffle_deck_check
[
0
]
=
FALSE
;
pd
->
game_field
->
core
.
shuffle_deck_check
[
1
]
=
FALSE
;
/*
if(pd->game_field->player[0].start_count > 0)
pd->game_field->draw(0, REASON_RULE, PLAYER_NONE, 0, pd->game_field->player[0].start_count);
if(pd->game_field->player[1].start_count > 0)
pd->game_field->draw(0, REASON_RULE, PLAYER_NONE, 1, pd->game_field->player[1].start_count);
*/
if
(
options
&
DUEL_TAG_MODE
)
{
for
(
int
i
=
0
;
i
<
pd
->
game_field
->
player
[
0
].
start_count
&&
pd
->
game_field
->
player
[
0
].
tag_list_main
.
size
();
++
i
)
{
card
*
pcard
=
pd
->
game_field
->
player
[
0
].
tag_list_main
.
back
();
...
...
ocgcore/scriptlib.h
View file @
e454e517
...
...
@@ -19,6 +19,7 @@ public:
//2pick
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
);
//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