Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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
fallenstardust
YGOMobile-Cn-Ko-En
Commits
615a10d5
Commit
615a10d5
authored
Apr 18, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
7d3657cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
8 deletions
+38
-8
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+36
-0
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+2
-8
No files found.
Classes/ocgcore/card.cpp
View file @
615a10d5
...
...
@@ -1416,6 +1416,42 @@ void card::xyz_overlay(card_set* materials) {
for
(
auto
&
pcard
:
*
materials
)
cv
.
push_back
(
pcard
);
std
::
sort
(
cv
.
begin
(),
cv
.
end
(),
card
::
card_operation_sort
);
if
(
pduel
->
game_field
->
core
.
global_flag
&
GLOBALFLAG_DECK_REVERSE_CHECK
)
{
int32
d0
=
(
int32
)
pduel
->
game_field
->
player
[
0
].
list_main
.
size
()
-
1
,
s0
=
d0
;
int32
d1
=
(
int32
)
pduel
->
game_field
->
player
[
1
].
list_main
.
size
()
-
1
,
s1
=
d1
;
for
(
auto
&
pcard
:
cv
)
{
if
(
pcard
->
current
.
location
!=
LOCATION_DECK
)
continue
;
if
((
pcard
->
current
.
controler
==
0
)
&&
(
pcard
->
current
.
sequence
==
s0
))
s0
--
;
if
((
pcard
->
current
.
controler
==
1
)
&&
(
pcard
->
current
.
sequence
==
s1
))
s1
--
;
}
if
((
s0
!=
d0
)
&&
(
s0
>
0
))
{
card
*
ptop
=
pduel
->
game_field
->
player
[
0
].
list_main
[
s0
];
if
(
pduel
->
game_field
->
core
.
deck_reversed
||
(
ptop
->
current
.
position
==
POS_FACEUP_DEFENSE
))
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer8
(
d0
-
s0
);
if
(
ptop
->
current
.
position
!=
POS_FACEUP_DEFENSE
)
pduel
->
write_buffer32
(
ptop
->
data
.
code
);
else
pduel
->
write_buffer32
(
ptop
->
data
.
code
|
0x80000000
);
}
}
if
((
s1
!=
d1
)
&&
(
s1
>
0
))
{
card
*
ptop
=
pduel
->
game_field
->
player
[
1
].
list_main
[
s1
];
if
(
pduel
->
game_field
->
core
.
deck_reversed
||
(
ptop
->
current
.
position
==
POS_FACEUP_DEFENSE
))
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
1
);
pduel
->
write_buffer8
(
d1
-
s1
);
if
(
ptop
->
current
.
position
!=
POS_FACEUP_DEFENSE
)
pduel
->
write_buffer32
(
ptop
->
data
.
code
);
else
pduel
->
write_buffer32
(
ptop
->
data
.
code
|
0x80000000
);
}
}
}
for
(
auto
&
pcard
:
cv
)
{
if
(
pcard
->
overlay_target
==
this
)
continue
;
...
...
Classes/ocgcore/processor.cpp
View file @
615a10d5
...
...
@@ -1036,8 +1036,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
cn_count
++
;
}
//all effects taking control non-permanently are only until End Phase, not until Turn end
for
(
auto
eit
=
effects
.
pheff
.
begin
();
eit
!=
effects
.
pheff
.
end
();)
{
effect
*
peffect
=
*
eit
++
;
for
(
auto
*
peffect
:
effects
.
pheff
)
{
if
(
peffect
->
code
!=
EFFECT_SET_CONTROL
)
continue
;
if
(
!
(
peffect
->
reset_flag
&
phase
))
...
...
@@ -1051,13 +1050,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
if
(
peffect
->
reset_count
!=
1
)
continue
;
card
*
phandler
=
peffect
->
get_handler
();
if
(
pid
!=
phandler
->
current
.
controler
)
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
remove_effect
(
peffect
);
else
peffect
->
handler
->
remove_effect
(
peffect
);
if
(
peffect
->
get_value
(
phandler
)
!=
phandler
->
current
.
controler
)
continue
;
}
newchain
.
triggering_effect
=
peffect
;
core
.
select_chains
.
push_back
(
newchain
);
cn_count
++
;
...
...
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