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
5ca4cd4b
Commit
5ca4cd4b
authored
Aug 12, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CHAININFO_TRIGGERING_POSITION
parent
5aae09ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
field.cpp
field.cpp
+1
-0
field.h
field.h
+2
-0
libduel.cpp
libduel.cpp
+4
-2
No files found.
field.cpp
View file @
5ca4cd4b
...
@@ -29,6 +29,7 @@ void chain::set_triggering_place(card* pcard) {
...
@@ -29,6 +29,7 @@ void chain::set_triggering_place(card* pcard) {
else
else
triggering_location
=
pcard
->
current
.
location
;
triggering_location
=
pcard
->
current
.
location
;
triggering_sequence
=
pcard
->
current
.
sequence
;
triggering_sequence
=
pcard
->
current
.
sequence
;
triggering_position
=
pcard
->
current
.
position
;
}
}
bool
tevent
::
operator
<
(
const
tevent
&
v
)
const
{
bool
tevent
::
operator
<
(
const
tevent
&
v
)
const
{
return
memcmp
(
this
,
&
v
,
sizeof
(
tevent
))
<
0
;
return
memcmp
(
this
,
&
v
,
sizeof
(
tevent
))
<
0
;
...
...
field.h
View file @
5ca4cd4b
...
@@ -51,6 +51,7 @@ struct chain {
...
@@ -51,6 +51,7 @@ struct chain {
uint8
triggering_controler
;
uint8
triggering_controler
;
uint16
triggering_location
;
uint16
triggering_location
;
uint8
triggering_sequence
;
uint8
triggering_sequence
;
uint8
triggering_position
;
effect
*
triggering_effect
;
effect
*
triggering_effect
;
group
*
target_cards
;
group
*
target_cards
;
int32
replace_op
;
int32
replace_op
;
...
@@ -599,6 +600,7 @@ public:
...
@@ -599,6 +600,7 @@ public:
#define CHAININFO_CHAIN_ID 0x800
#define CHAININFO_CHAIN_ID 0x800
#define CHAININFO_TYPE 0x1000
#define CHAININFO_TYPE 0x1000
#define CHAININFO_EXTTYPE 0x2000
#define CHAININFO_EXTTYPE 0x2000
#define CHAININFO_TRIGGERING_POSITION 0x4000
//Timing
//Timing
#define TIMING_DRAW_PHASE 0x1
#define TIMING_DRAW_PHASE 0x1
#define TIMING_STANDBY_PHASE 0x2
#define TIMING_STANDBY_PHASE 0x2
...
...
libduel.cpp
View file @
5ca4cd4b
...
@@ -1663,14 +1663,13 @@ int32 scriptlib::duel_get_current_chain(lua_State *L) {
...
@@ -1663,14 +1663,13 @@ int32 scriptlib::duel_get_current_chain(lua_State *L) {
int32
scriptlib
::
duel_get_chain_info
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_get_chain_info
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
uint32
c
=
lua_tointeger
(
L
,
1
);
uint32
c
=
lua_tointeger
(
L
,
1
);
uint32
flag
;
uint32
args
=
lua_gettop
(
L
)
-
1
;
uint32
args
=
lua_gettop
(
L
)
-
1
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
chain
*
ch
=
pduel
->
game_field
->
get_chain
(
c
);
chain
*
ch
=
pduel
->
game_field
->
get_chain
(
c
);
if
(
!
ch
)
if
(
!
ch
)
return
0
;
return
0
;
for
(
uint32
i
=
0
;
i
<
args
;
++
i
)
{
for
(
uint32
i
=
0
;
i
<
args
;
++
i
)
{
flag
=
lua_tointeger
(
L
,
2
+
i
);
uint32
flag
=
lua_tointeger
(
L
,
2
+
i
);
switch
(
flag
)
{
switch
(
flag
)
{
case
CHAININFO_CHAIN_COUNT
:
case
CHAININFO_CHAIN_COUNT
:
lua_pushinteger
(
L
,
ch
->
chain_count
);
lua_pushinteger
(
L
,
ch
->
chain_count
);
...
@@ -1690,6 +1689,9 @@ int32 scriptlib::duel_get_chain_info(lua_State *L) {
...
@@ -1690,6 +1689,9 @@ int32 scriptlib::duel_get_chain_info(lua_State *L) {
case
CHAININFO_TRIGGERING_SEQUENCE
:
case
CHAININFO_TRIGGERING_SEQUENCE
:
lua_pushinteger
(
L
,
ch
->
triggering_sequence
);
lua_pushinteger
(
L
,
ch
->
triggering_sequence
);
break
;
break
;
case
CHAININFO_TRIGGERING_POSITION
:
lua_pushinteger
(
L
,
ch
->
triggering_position
);
break
;
case
CHAININFO_TARGET_CARDS
:
case
CHAININFO_TARGET_CARDS
:
interpreter
::
group2value
(
L
,
ch
->
target_cards
);
interpreter
::
group2value
(
L
,
ch
->
target_cards
);
break
;
break
;
...
...
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