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
482ec512
Commit
482ec512
authored
Jul 18, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fh'
parents
39fa84ee
55c542ec
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
16 deletions
+23
-16
interpreter.cpp
interpreter.cpp
+1
-0
libduel.cpp
libduel.cpp
+18
-13
libgroup.cpp
libgroup.cpp
+3
-3
scriptlib.h
scriptlib.h
+1
-0
No files found.
interpreter.cpp
View file @
482ec512
...
@@ -586,6 +586,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -586,6 +586,7 @@ static const struct luaL_Reg duellib[] = {
{
"IsPlayerCanSendtoHand"
,
scriptlib
::
duel_is_player_can_send_to_hand
},
{
"IsPlayerCanSendtoHand"
,
scriptlib
::
duel_is_player_can_send_to_hand
},
{
"IsPlayerCanSendtoGrave"
,
scriptlib
::
duel_is_player_can_send_to_grave
},
{
"IsPlayerCanSendtoGrave"
,
scriptlib
::
duel_is_player_can_send_to_grave
},
{
"IsPlayerCanSendtoDeck"
,
scriptlib
::
duel_is_player_can_send_to_deck
},
{
"IsPlayerCanSendtoDeck"
,
scriptlib
::
duel_is_player_can_send_to_deck
},
{
"IsPlayerCanAdditionalSummon"
,
scriptlib
::
duel_is_player_can_additional_summon
},
{
"IsChainNegatable"
,
scriptlib
::
duel_is_chain_negatable
},
{
"IsChainNegatable"
,
scriptlib
::
duel_is_chain_negatable
},
{
"IsChainDisablable"
,
scriptlib
::
duel_is_chain_disablable
},
{
"IsChainDisablable"
,
scriptlib
::
duel_is_chain_disablable
},
{
"CheckChainTarget"
,
scriptlib
::
duel_check_chain_target
},
{
"CheckChainTarget"
,
scriptlib
::
duel_check_chain_target
},
...
...
libduel.cpp
View file @
482ec512
...
@@ -3656,22 +3656,13 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
...
@@ -3656,22 +3656,13 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
int32
check_additional
;
if
(
lua_gettop
(
L
)
==
1
)
if
(
lua_gettop
(
L
)
<=
2
)
{
check_additional
=
lua_toboolean
(
L
,
2
);
if
(
check_additional
&&
pduel
->
game_field
->
core
.
extra_summon
[
playerid
])
lua_pushboolean
(
L
,
0
);
else
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
playerid
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
playerid
));
}
else
{
else
{
check_param_count
(
L
,
3
);
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
int32
sumtype
=
lua_tointeger
(
L
,
2
);
int32
sumtype
=
lua_tointeger
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
check_additional
=
lua_toboolean
(
L
,
4
);
if
(
check_additional
&&
pduel
->
game_field
->
core
.
extra_summon
[
playerid
])
lua_pushboolean
(
L
,
0
);
else
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
sumtype
,
playerid
,
pcard
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
sumtype
,
playerid
,
pcard
));
}
}
return
1
;
return
1
;
...
@@ -3826,6 +3817,20 @@ int32 scriptlib::duel_is_player_can_send_to_deck(lua_State * L) {
...
@@ -3826,6 +3817,20 @@ int32 scriptlib::duel_is_player_can_send_to_deck(lua_State * L) {
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_deck
(
playerid
,
pcard
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_deck
(
playerid
,
pcard
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_additional_summon
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
return
1
;
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
pduel
->
game_field
->
core
.
extra_summon
[
playerid
]
==
0
)
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
duel_is_chain_negatable
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_chain_negatable
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
int32
chaincount
=
lua_tointeger
(
L
,
1
);
int32
chaincount
=
lua_tointeger
(
L
,
1
);
...
...
libgroup.cpp
View file @
482ec512
...
@@ -30,9 +30,9 @@ int32 scriptlib::group_from_cards(lua_State *L) {
...
@@ -30,9 +30,9 @@ int32 scriptlib::group_from_cards(lua_State *L) {
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
group
*
pgroup
=
pduel
->
new_group
();
for
(
int32
i
=
0
;
i
<
lua_gettop
(
L
);
++
i
)
{
for
(
int32
i
=
0
;
i
<
lua_gettop
(
L
);
++
i
)
{
void
*
p
=
lua_touserdata
(
L
,
i
+
1
);
if
(
!
lua_isnil
(
L
,
i
+
1
))
{
if
(
p
)
{
check_param
(
L
,
PARAM_TYPE_CARD
,
i
+
1
);
card
*
pcard
=
*
(
card
**
)
p
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
i
+
1
)
;
pgroup
->
container
.
insert
(
pcard
);
pgroup
->
container
.
insert
(
pcard
);
}
}
}
}
...
...
scriptlib.h
View file @
482ec512
...
@@ -576,6 +576,7 @@ public:
...
@@ -576,6 +576,7 @@ public:
static
int32
duel_is_player_can_send_to_hand
(
lua_State
*
L
);
static
int32
duel_is_player_can_send_to_hand
(
lua_State
*
L
);
static
int32
duel_is_player_can_send_to_grave
(
lua_State
*
L
);
static
int32
duel_is_player_can_send_to_grave
(
lua_State
*
L
);
static
int32
duel_is_player_can_send_to_deck
(
lua_State
*
L
);
static
int32
duel_is_player_can_send_to_deck
(
lua_State
*
L
);
static
int32
duel_is_player_can_additional_summon
(
lua_State
*
L
);
static
int32
duel_is_chain_negatable
(
lua_State
*
L
);
static
int32
duel_is_chain_negatable
(
lua_State
*
L
);
static
int32
duel_is_chain_disablable
(
lua_State
*
L
);
static
int32
duel_is_chain_disablable
(
lua_State
*
L
);
static
int32
duel_check_chain_target
(
lua_State
*
L
);
static
int32
duel_check_chain_target
(
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