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
8f6ed154
Commit
8f6ed154
authored
Jun 05, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Duel.IsCanAddCounter
parent
fae7551d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
interpreter.cpp
interpreter.cpp
+1
-0
libduel.cpp
libduel.cpp
+15
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
interpreter.cpp
View file @
8f6ed154
...
@@ -340,6 +340,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -340,6 +340,7 @@ static const struct luaL_Reg duellib[] = {
{
"SpecialSummon"
,
scriptlib
::
duel_special_summon
},
{
"SpecialSummon"
,
scriptlib
::
duel_special_summon
},
{
"SpecialSummonStep"
,
scriptlib
::
duel_special_summon_step
},
{
"SpecialSummonStep"
,
scriptlib
::
duel_special_summon_step
},
{
"SpecialSummonComplete"
,
scriptlib
::
duel_special_summon_complete
},
{
"SpecialSummonComplete"
,
scriptlib
::
duel_special_summon_complete
},
{
"IsCanAddCounter"
,
scriptlib
::
duel_is_can_add_counter
},
{
"RemoveCounter"
,
scriptlib
::
duel_remove_counter
},
{
"RemoveCounter"
,
scriptlib
::
duel_remove_counter
},
{
"IsCanRemoveCounter"
,
scriptlib
::
duel_is_can_remove_counter
},
{
"IsCanRemoveCounter"
,
scriptlib
::
duel_is_can_remove_counter
},
{
"GetCounter"
,
scriptlib
::
duel_get_counter
},
{
"GetCounter"
,
scriptlib
::
duel_get_counter
},
...
...
libduel.cpp
View file @
8f6ed154
...
@@ -490,6 +490,21 @@ int32 scriptlib::duel_get_operated_group(lua_State *L) {
...
@@ -490,6 +490,21 @@ int32 scriptlib::duel_get_operated_group(lua_State *L) {
interpreter::group2value(L, pgroup);
interpreter::group2value(L, pgroup);
return 1;
return 1;
}
}
int32 scriptlib::duel_is_can_add_counter(lua_State *L) {
check_param_count(L, 4);
int32 playerid = lua_tointeger(L, 1);
int32 countertype = lua_tointeger(L, 2);
int32 count = lua_tointeger(L, 3);
check_param(L, PARAM_TYPE_CARD, 4);
card* pcard = *(card**)lua_touserdata(L, 4);
if(playerid != 0 && playerid != 1) {
lua_pushboolean(L, 0);
return 1;
}
duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->is_player_can_place_counter(playerid, pcard, countertype, count));
return 1;
}
int32 scriptlib::duel_remove_counter(lua_State *L) {
int32 scriptlib::duel_remove_counter(lua_State *L) {
check_action_permission(L);
check_action_permission(L);
check_param_count(L, 6);
check_param_count(L, 6);
...
...
scriptlib.h
View file @
8f6ed154
...
@@ -336,6 +336,7 @@ public:
...
@@ -336,6 +336,7 @@ public:
static
int32
duel_sendto_deck
(
lua_State
*
L
);
static
int32
duel_sendto_deck
(
lua_State
*
L
);
static
int32
duel_sendto_extra
(
lua_State
*
L
);
static
int32
duel_sendto_extra
(
lua_State
*
L
);
static
int32
duel_get_operated_group
(
lua_State
*
L
);
static
int32
duel_get_operated_group
(
lua_State
*
L
);
static
int32
duel_is_can_add_counter
(
lua_State
*
L
);
static
int32
duel_remove_counter
(
lua_State
*
L
);
static
int32
duel_remove_counter
(
lua_State
*
L
);
static
int32
duel_is_can_remove_counter
(
lua_State
*
L
);
static
int32
duel_is_can_remove_counter
(
lua_State
*
L
);
static
int32
duel_get_counter
(
lua_State
*
L
);
static
int32
duel_get_counter
(
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