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
b6982e67
Commit
b6982e67
authored
Feb 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add GetCardsInZone
parent
c9c5ad88
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+2
-1
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+16
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
ocgcore/interpreter.cpp
View file @
b6982e67
...
@@ -383,6 +383,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -383,6 +383,7 @@ static const struct luaL_Reg duellib[] = {
{
"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
},
{
"MoveTurnCount"
,
scriptlib
::
duel_move_turn_count
},
{
"GetCardsInZone"
,
scriptlib
::
duel_get_cards_in_zone
},
{
"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 @
b6982e67
...
@@ -153,6 +153,22 @@ int32 scriptlib::duel_move_turn_count(lua_State *L) {
...
@@ -153,6 +153,22 @@ int32 scriptlib::duel_move_turn_count(lua_State *L) {
pduel
->
write_buffer8
(
turn_player
|
0x2
);
pduel
->
write_buffer8
(
turn_player
|
0x2
);
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_get_cards_in_zone
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
uint32
rplayer
=
lua_tonumberint
(
L
,
1
);
if
(
rplayer
!=
0
&&
rplayer
!=
1
)
return
0
;
uint32
zone
=
lua_tonumberint
(
L
,
2
);
uint32
zone_s
=
zone
&
0xffff
;
uint32
zone_o
=
(
zone
>>
16
)
&
0xff
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
field
::
card_set
cset
;
pduel
->
game_field
->
get_cards_in_zone
(
&
cset
,
zone_s
,
rplayer
,
LOCATION_ONFIELD
);
pduel
->
game_field
->
get_cards_in_zone
(
&
cset
,
zone_o
,
1
-
rplayer
,
LOCATION_ONFIELD
);
group
*
pgroup
=
pduel
->
new_group
(
cset
);
interpreter
::
group2value
(
L
,
pgroup
);
return
1
;
}
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 @
b6982e67
...
@@ -33,6 +33,7 @@ public:
...
@@ -33,6 +33,7 @@ public:
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
);
static
int32
duel_move_turn_count
(
lua_State
*
L
);
static
int32
duel_get_cards_in_zone
(
lua_State
*
L
);
//metatable
//metatable
static
int32
group_meta_add
(
lua_State
*
L
);
static
int32
group_meta_add
(
lua_State
*
L
);
static
int32
group_meta_sub
(
lua_State
*
L
);
static
int32
group_meta_sub
(
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