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
6ee8b0dd
Commit
6ee8b0dd
authored
Jul 18, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "merge Duel.CheckAdditionalSummon into Duel.IsPlayerCanSummon"
This reverts commit
861b5bcd
.
parent
dff6d024
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
interpreter.cpp
interpreter.cpp
+1
-0
libduel.cpp
libduel.cpp
+18
-13
scriptlib.h
scriptlib.h
+1
-0
No files found.
interpreter.cpp
View file @
6ee8b0dd
...
...
@@ -564,6 +564,7 @@ static const struct luaL_Reg duellib[] = {
{
"IsPlayerCanSendtoHand"
,
scriptlib
::
duel_is_player_can_send_to_hand
},
{
"IsPlayerCanSendtoGrave"
,
scriptlib
::
duel_is_player_can_send_to_grave
},
{
"IsPlayerCanSendtoDeck"
,
scriptlib
::
duel_is_player_can_send_to_deck
},
{
"CheckAdditionalSummon"
,
scriptlib
::
duel_check_additional_summon
},
{
"IsChainNegatable"
,
scriptlib
::
duel_is_chain_negatable
},
{
"IsChainDisablable"
,
scriptlib
::
duel_is_chain_disablable
},
{
"CheckChainTarget"
,
scriptlib
::
duel_check_chain_target
},
...
...
libduel.cpp
View file @
6ee8b0dd
...
...
@@ -3440,23 +3440,14 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
return
1
;
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
int32
check_additional
;
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
));
}
else
{
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
playerid
));
else
{
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
int32
sumtype
=
lua_tointeger
(
L
,
2
);
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
;
}
...
...
@@ -3610,6 +3601,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
));
return
1
;
}
int32
scriptlib
::
duel_check_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
)
{
check_param_count
(
L
,
1
);
int32
chaincount
=
lua_tointeger
(
L
,
1
);
...
...
scriptlib.h
View file @
6ee8b0dd
...
...
@@ -558,6 +558,7 @@ public:
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_deck
(
lua_State
*
L
);
static
int32
duel_check_additional_summon
(
lua_State
*
L
);
static
int32
duel_is_chain_negatable
(
lua_State
*
L
);
static
int32
duel_is_chain_disablable
(
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