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
List
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
nanahira
ygopro-core
Commits
2b5f53ce
Commit
2b5f53ce
authored
Feb 07, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Debug.PreSummon
parent
794914f1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
interpreter.cpp
interpreter.cpp
+1
-0
libdebug.cpp
libdebug.cpp
+11
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
interpreter.cpp
View file @
2b5f53ce
...
...
@@ -505,6 +505,7 @@ static const struct luaL_Reg debuglib[] = {
{
"Message"
,
scriptlib
::
debug_message
},
{
"AddCard"
,
scriptlib
::
debug_add_card
},
{
"SetPlayerInfo"
,
scriptlib
::
debug_set_player_info
},
{
"PreSummon"
,
scriptlib
::
debug_pre_summon
},
{
"PreEquip"
,
scriptlib
::
debug_pre_equip
},
{
"PreSetTarget"
,
scriptlib
::
debug_pre_set_target
},
{
"PreAddCounter"
,
scriptlib
::
debug_pre_add_counter
},
...
...
libdebug.cpp
View file @
2b5f53ce
...
...
@@ -78,6 +78,17 @@ int32 scriptlib::debug_set_player_info(lua_State *L) {
pduel
->
game_field
->
player
[
playerid
].
draw_count
=
drawcount
;
return
0
;
}
int32
scriptlib
::
debug_pre_summon
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
summon_type
=
lua_tointeger
(
L
,
2
);
uint8
summon_location
=
0
;
if
(
lua_gettop
(
L
)
>
2
)
summon_location
=
lua_tointeger
(
L
,
3
);
pcard
->
summon_info
=
summon_type
|
(
summon_location
<<
16
);
return
0
;
}
int32
scriptlib
::
debug_pre_equip
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
scriptlib.h
View file @
2b5f53ce
...
...
@@ -505,6 +505,7 @@ public:
static
int32
debug_message
(
lua_State
*
L
);
static
int32
debug_add_card
(
lua_State
*
L
);
static
int32
debug_set_player_info
(
lua_State
*
L
);
static
int32
debug_pre_summon
(
lua_State
*
L
);
static
int32
debug_pre_equip
(
lua_State
*
L
);
static
int32
debug_pre_set_target
(
lua_State
*
L
);
static
int32
debug_pre_add_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