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
baf79be6
Commit
baf79be6
authored
Aug 31, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
90037a26
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
ocgcore/card.cpp
ocgcore/card.cpp
+5
-2
ocgcore/card.h
ocgcore/card.h
+2
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+14
-0
No files found.
ocgcore/card.cpp
View file @
baf79be6
...
@@ -1129,8 +1129,11 @@ uint32 card::get_link_marker() {
...
@@ -1129,8 +1129,11 @@ uint32 card::get_link_marker() {
effect_set
effects
;
effect_set
effects
;
uint32
link_marker
=
data
.
link_marker
;
uint32
link_marker
=
data
.
link_marker
;
filter_effect
(
710253
,
&
effects
);
filter_effect
(
710253
,
&
effects
);
for
(
int32
i
=
0
;
i
<
effects
.
size
();
++
i
)
for
(
int32
i
=
0
;
i
<
effects
.
size
();
++
i
){
card
*
ocard
=
effects
[
i
]
->
get_handler
();
if
(
!
(
effects
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
get_status
(
STATUS_TO_LEAVE_FROMEX
)))
link_marker
=
effects
[
i
]
->
get_value
(
this
);
link_marker
=
effects
[
i
]
->
get_value
(
this
);
}
return
link_marker
;
return
link_marker
;
}
}
int32
card
::
is_link_marker
(
uint32
dir
)
{
int32
card
::
is_link_marker
(
uint32
dir
)
{
...
...
ocgcore/card.h
View file @
baf79be6
...
@@ -499,6 +499,8 @@ public:
...
@@ -499,6 +499,8 @@ public:
#define STATUS_OPPO_BATTLE 0x10000000
#define STATUS_OPPO_BATTLE 0x10000000
#define STATUS_FLIP_SUMMON_TURN 0x20000000
#define STATUS_FLIP_SUMMON_TURN 0x20000000
#define STATUS_SPSUMMON_TURN 0x40000000
#define STATUS_SPSUMMON_TURN 0x40000000
//222DIY
#define STATUS_TO_LEAVE_FROMEX 0x80000000
//Counter
//Counter
#define COUNTER_WITHOUT_PERMIT 0x1000
#define COUNTER_WITHOUT_PERMIT 0x1000
#define COUNTER_NEED_ENABLE 0x2000
#define COUNTER_NEED_ENABLE 0x2000
...
...
ocgcore/libduel.cpp
View file @
baf79be6
...
@@ -1653,6 +1653,7 @@ int32 scriptlib::duel_get_location_count(lua_State *L) {
...
@@ -1653,6 +1653,7 @@ int32 scriptlib::duel_get_location_count(lua_State *L) {
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
playerid
,
location
,
uplayer
,
reason
,
zone
));
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
playerid
,
location
,
uplayer
,
reason
,
zone
));
return
1
;
return
1
;
}
}
//222DIY modded by Flandre
int32
scriptlib
::
duel_get_location_count_fromex
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_get_location_count_fromex
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
uint32
playerid
=
lua_tointeger
(
L
,
1
);
uint32
playerid
=
lua_tointeger
(
L
,
1
);
...
@@ -1670,8 +1671,13 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
...
@@ -1670,8 +1671,13 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
3
&&
!
lua_isnil
(
L
,
3
))
{
if
(
lua_gettop
(
L
)
>=
3
&&
!
lua_isnil
(
L
,
3
))
{
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
3
,
TRUE
))
{
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
3
,
TRUE
))
{
mcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
mcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
mcard
->
set_status
(
STATUS_TO_LEAVE_FROMEX
,
TRUE
);
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
,
TRUE
))
{
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
,
TRUE
))
{
mgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
mgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
for
(
auto
cit
=
mgroup
->
container
.
begin
();
cit
!=
mgroup
->
container
.
end
();
++
cit
)
{
card
*
gcard
=
*
cit
;
gcard
->
set_status
(
STATUS_TO_LEAVE_FROMEX
,
TRUE
);
}
}
else
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
3
);
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
3
);
for
(
int32
p
=
0
;
p
<
2
;
p
++
)
{
for
(
int32
p
=
0
;
p
<
2
;
p
++
)
{
...
@@ -1701,6 +1707,14 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
...
@@ -1701,6 +1707,14 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count_fromex
(
scard
,
playerid
,
uplayer
,
zone
));
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count_fromex
(
scard
,
playerid
,
uplayer
,
zone
));
else
else
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
playerid
,
LOCATION_MZONE
,
uplayer
,
LOCATION_REASON_TOFIELD
,
zone
));
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
playerid
,
LOCATION_MZONE
,
uplayer
,
LOCATION_REASON_TOFIELD
,
zone
));
if
(
mcard
)
mcard
->
set_status
(
STATUS_TO_LEAVE_FROMEX
,
FALSE
);
if
(
mgroup
){
for
(
auto
cit
=
mgroup
->
container
.
begin
();
cit
!=
mgroup
->
container
.
end
();
++
cit
)
{
card
*
gcard
=
*
cit
;
gcard
->
set_status
(
STATUS_TO_LEAVE_FROMEX
,
FALSE
);
}
}
if
(
swapped
)
{
if
(
swapped
)
{
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
...
...
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