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
xiaoye
ygopro-core
Commits
78c0411a
Commit
78c0411a
authored
Mar 07, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use to_leave_fromex instead of status
parent
90a1b3bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
card.cpp
card.cpp
+5
-4
card.h
card.h
+2
-0
libduel.cpp
libduel.cpp
+4
-4
No files found.
card.cpp
View file @
78c0411a
...
...
@@ -189,6 +189,7 @@ card::card(duel* pd) {
assume_value
=
0
;
spsummon_code
=
0
;
current
.
controler
=
PLAYER_NONE
;
to_leave_fromex
=
FALSE
;
}
inline
void
update_cache
(
uint32
&
tdata
,
uint32
&
cache
,
int32
*&
p
,
uint32
&
query_flag
,
const
uint32
flag
)
{
if
(
tdata
!=
cache
)
{
...
...
@@ -1421,7 +1422,7 @@ uint32 card::get_link_marker() {
return
0
;
for
(
int32
i
=
0
;
i
<
effects3
.
size
();
++
i
)
{
card
*
ocard
=
effects3
[
i
]
->
get_handler
();
if
(
!
(
effects3
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
get_status
(
STATUS_TO_LEAVE_FROMEX
)
))
if
(
!
(
effects3
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
to_leave_fromex
))
link_marker
=
effects3
[
i
]
->
get_value
(
this
);
}
}
...
...
@@ -1430,14 +1431,14 @@ uint32 card::get_link_marker() {
filter_effect
(
EFFECT_CHANGE_LINK_MARKER_KOISHI
,
&
effects2
);
for
(
int32
i
=
0
;
i
<
effects
.
size
();
++
i
)
{
card
*
ocard
=
effects
[
i
]
->
get_handler
();
if
(
effects
[
i
]
->
code
==
EFFECT_ADD_LINK_MARKER_KOISHI
&&
(
!
(
effects
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
get_status
(
STATUS_TO_LEAVE_FROMEX
)
)))
if
(
effects
[
i
]
->
code
==
EFFECT_ADD_LINK_MARKER_KOISHI
&&
(
!
(
effects
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
to_leave_fromex
)))
link_marker
|=
effects
[
i
]
->
get_value
(
this
);
else
if
(
effects
[
i
]
->
code
==
EFFECT_REMOVE_LINK_MARKER_KOISHI
&&
(
!
(
effects
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
get_status
(
STATUS_TO_LEAVE_FROMEX
)
)))
else
if
(
effects
[
i
]
->
code
==
EFFECT_REMOVE_LINK_MARKER_KOISHI
&&
(
!
(
effects
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
to_leave_fromex
)))
link_marker
&=
~
(
effects
[
i
]
->
get_value
(
this
));
}
for
(
int32
i
=
0
;
i
<
effects2
.
size
();
++
i
)
{
card
*
ocard
=
effects2
[
i
]
->
get_handler
();
if
(
!
(
effects2
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
get_status
(
STATUS_TO_LEAVE_FROMEX
)
))
if
(
!
(
effects2
[
i
]
->
type
&
EFFECT_TYPE_FIELD
)
||
!
(
ocard
&&
ocard
->
to_leave_fromex
))
link_marker
=
effects2
[
i
]
->
get_value
(
this
);
}
return
link_marker
;
...
...
card.h
View file @
78c0411a
...
...
@@ -215,6 +215,8 @@ public:
effect_relation
relate_effect
;
effect_set_v
immune_effect
;
uint8
to_leave_fromex
;
explicit
card
(
duel
*
pd
);
~
card
()
=
default
;
static
bool
card_operation_sort
(
card
*
c1
,
card
*
c2
);
...
...
libduel.cpp
View file @
78c0411a
...
...
@@ -2209,12 +2209,12 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
3
&&
!
lua_isnil
(
L
,
3
))
{
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
3
,
TRUE
))
{
mcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
mcard
->
set_status
(
STATUS_TO_LEAVE_FROMEX
,
TRUE
)
;
mcard
->
to_leave_fromex
=
TRUE
;
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
,
TRUE
))
{
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
)
;
gcard
->
to_leave_fromex
=
TRUE
;
}
}
else
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
3
);
...
...
@@ -2258,11 +2258,11 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count_fromex
(
scard
,
playerid
,
uplayer
,
zone
,
&
list
));
lua_pushinteger
(
L
,
list
);
if
(
mcard
)
mcard
->
set_status
(
STATUS_TO_LEAVE_FROMEX
,
FALSE
)
;
mcard
->
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
)
;
gcard
->
to_leave_fromex
=
FALSE
;
}
}
if
(
swapped
)
{
...
...
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