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
00bfdd04
Commit
00bfdd04
authored
Aug 10, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Duel.Exile
parent
cf2d9bb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+22
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
ocgcore/interpreter.cpp
View file @
00bfdd04
...
@@ -354,6 +354,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -354,6 +354,7 @@ static const struct luaL_Reg duellib[] = {
{
"GetMasterRule"
,
scriptlib
::
duel_get_master_rule
},
{
"GetMasterRule"
,
scriptlib
::
duel_get_master_rule
},
{
"FilterPlayerEffect"
,
scriptlib
::
duel_filter_player_effect
},
{
"FilterPlayerEffect"
,
scriptlib
::
duel_filter_player_effect
},
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
{
"Exile"
,
scriptlib
::
duel_exile
},
{
"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 @
00bfdd04
...
@@ -125,6 +125,28 @@ int32 scriptlib::duel_read_card(lua_State *L) {
...
@@ -125,6 +125,28 @@ int32 scriptlib::duel_read_card(lua_State *L) {
}
}
return
args
;
return
args
;
}
}
int32
scriptlib
::
duel_exile
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
2
);
card
*
pcard
=
0
;
group
*
pgroup
=
0
;
duel
*
pduel
=
0
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pcard
->
pduel
;
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
,
TRUE
))
{
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
reason
=
lua_tointeger
(
L
,
2
);
if
(
pcard
)
pduel
->
game_field
->
send_to
(
pcard
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
pduel
->
game_field
->
core
.
reason_player
,
PLAYER_NONE
,
0
,
0
,
POS_FACEUP
);
else
pduel
->
game_field
->
send_to
(
&
(
pgroup
->
container
),
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
pduel
->
game_field
->
core
.
reason_player
,
PLAYER_NONE
,
0
,
0
,
POS_FACEUP
);
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_SENDTO_S
;
return
lua_yield
(
L
,
0
);
}
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 @
00bfdd04
...
@@ -25,6 +25,7 @@ public:
...
@@ -25,6 +25,7 @@ public:
static
int32
duel_get_master_rule
(
lua_State
*
L
);
static
int32
duel_get_master_rule
(
lua_State
*
L
);
static
int32
duel_filter_player_effect
(
lua_State
*
L
);
static
int32
duel_filter_player_effect
(
lua_State
*
L
);
static
int32
duel_read_card
(
lua_State
*
L
);
static
int32
duel_read_card
(
lua_State
*
L
);
static
int32
duel_exile
(
lua_State
*
L
);
//card lib
//card lib
static
int32
card_get_code
(
lua_State
*
L
);
static
int32
card_get_code
(
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