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
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-core
Commits
b4e44eb5
Commit
b4e44eb5
authored
Apr 27, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
48955fb8
ab84cd93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
interpreter.cpp
interpreter.cpp
+1
-0
libgroup.cpp
libgroup.cpp
+19
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
interpreter.cpp
View file @
b4e44eb5
...
@@ -373,6 +373,7 @@ static const struct luaL_Reg grouplib[] = {
...
@@ -373,6 +373,7 @@ static const struct luaL_Reg grouplib[] = {
{
"Equal"
,
scriptlib
::
group_equal
},
{
"Equal"
,
scriptlib
::
group_equal
},
{
"IsContains"
,
scriptlib
::
group_is_contains
},
{
"IsContains"
,
scriptlib
::
group_is_contains
},
{
"SearchCard"
,
scriptlib
::
group_search_card
},
{
"SearchCard"
,
scriptlib
::
group_search_card
},
{
"GetBinClassCount"
,
scriptlib
::
group_get_bin_class_count
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
...
...
libgroup.cpp
View file @
b4e44eb5
...
@@ -707,3 +707,22 @@ int32 scriptlib::group_search_card(lua_State *L) {
...
@@ -707,3 +707,22 @@ int32 scriptlib::group_search_card(lua_State *L) {
}
}
return
0
;
return
0
;
}
}
int32
scriptlib
::
group_get_bin_class_count
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
check_param
(
L
,
PARAM_TYPE_FUNCTION
,
2
);
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
duel
*
pduel
=
pgroup
->
pduel
;
int32
extraargs
=
lua_gettop
(
L
)
-
2
;
int32
er
=
0
;
for
(
auto
cit
=
pgroup
->
container
.
begin
();
cit
!=
pgroup
->
container
.
end
();
++
cit
)
{
er
|=
pduel
->
lua
->
get_operation_value
(
*
cit
,
2
,
extraargs
);
}
int32
ans
=
0
;
while
(
er
)
{
er
&=
er
-
1
;
ans
++
;
}
lua_pushinteger
(
L
,
ans
);
return
1
;
}
scriptlib.h
View file @
b4e44eb5
...
@@ -376,6 +376,7 @@ public:
...
@@ -376,6 +376,7 @@ public:
static
int32
group_equal
(
lua_State
*
L
);
static
int32
group_equal
(
lua_State
*
L
);
static
int32
group_is_contains
(
lua_State
*
L
);
static
int32
group_is_contains
(
lua_State
*
L
);
static
int32
group_search_card
(
lua_State
*
L
);
static
int32
group_search_card
(
lua_State
*
L
);
static
int32
group_get_bin_class_count
(
lua_State
*
L
);
//Duel functions
//Duel functions
static
int32
duel_enable_global_flag
(
lua_State
*
L
);
static
int32
duel_enable_global_flag
(
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