Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
Commits
11476d63
Commit
11476d63
authored
Dec 01, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
90865214
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
Classes/ocgcore/common.h
Classes/ocgcore/common.h
+2
-1
Classes/ocgcore/field.cpp
Classes/ocgcore/field.cpp
+5
-3
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+2
-2
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+4
-0
No files found.
Classes/ocgcore/common.h
View file @
11476d63
...
@@ -155,8 +155,9 @@ struct card_sort {
...
@@ -155,8 +155,9 @@ struct card_sort {
#define REASON_REPLACE 0x1000000 //
#define REASON_REPLACE 0x1000000 //
#define REASON_DRAW 0x2000000 //
#define REASON_DRAW 0x2000000 //
#define REASON_REDIRECT 0x4000000 //
#define REASON_REDIRECT 0x4000000 //
//#define REASON_REVEAL
0x8000000 //
#define REASON_REVEAL
0x8000000 //
#define REASON_LINK 0x10000000 //
#define REASON_LINK 0x10000000 //
#define REASON_LOST_OVERLAY 0x20000000 //
//Status
//Status
#define STATUS_DISABLED 0x0001 //
#define STATUS_DISABLED 0x0001 //
...
...
Classes/ocgcore/field.cpp
View file @
11476d63
...
@@ -2874,13 +2874,15 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) {
...
@@ -2874,13 +2874,15 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) {
return
FALSE
;
return
FALSE
;
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_CANNOT_DISCARD_DECK
))
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_CANNOT_DISCARD_DECK
))
return
FALSE
;
return
FALSE
;
if
((
count
==
1
)
&&
core
.
deck_reversed
)
card
*
topcard
=
player
[
playerid
].
list_main
.
back
();
return
player
[
playerid
].
list_main
.
back
()
->
is_capable_cost_to_grave
(
playerid
);
if
((
count
==
1
)
&&
topcard
->
is_position
(
POS_FACEUP
))
return
topcard
->
is_capable_cost_to_grave
(
playerid
);
bool
cant_remove
=
!
is_player_can_action
(
playerid
,
EFFECT_CANNOT_REMOVE
);
effect_set
eset
;
effect_set
eset
;
filter_field_effect
(
EFFECT_TO_GRAVE_REDIRECT
,
&
eset
);
filter_field_effect
(
EFFECT_TO_GRAVE_REDIRECT
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
uint32
redirect
=
eset
[
i
]
->
get_value
();
uint32
redirect
=
eset
[
i
]
->
get_value
();
if
((
redirect
&
LOCATION_REMOVED
)
&&
player
[
playerid
].
list_main
.
back
()
->
is_affected_by_effect
(
EFFECT_CANNOT_REMOVE
))
if
((
redirect
&
LOCATION_REMOVED
)
&&
(
cant_remove
||
topcard
->
is_affected_by_effect
(
EFFECT_CANNOT_REMOVE
)
))
continue
;
continue
;
uint8
p
=
eset
[
i
]
->
get_handler_player
();
uint8
p
=
eset
[
i
]
->
get_handler_player
();
if
((
p
==
playerid
&&
eset
[
i
]
->
s_range
&
LOCATION_DECK
)
||
(
p
!=
playerid
&&
eset
[
i
]
->
o_range
&
LOCATION_DECK
))
if
((
p
==
playerid
&&
eset
[
i
]
->
s_range
&
LOCATION_DECK
)
||
(
p
!=
playerid
&&
eset
[
i
]
->
o_range
&
LOCATION_DECK
))
...
...
Classes/ocgcore/operations.cpp
View file @
11476d63
...
@@ -4270,7 +4270,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4270,7 +4270,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
if
(
equipings
.
size
())
if
(
equipings
.
size
())
destroy
(
&
equipings
,
0
,
REASON_RULE
+
REASON_LOST_TARGET
,
PLAYER_NONE
);
destroy
(
&
equipings
,
0
,
REASON_RULE
+
REASON_LOST_TARGET
,
PLAYER_NONE
);
if
(
overlays
.
size
())
if
(
overlays
.
size
())
send_to
(
&
overlays
,
0
,
REASON_RULE
+
REASON_LOST_
TARGET
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
send_to
(
&
overlays
,
0
,
REASON_RULE
+
REASON_LOST_
OVERLAY
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
adjust_instant
();
adjust_instant
();
return
FALSE
;
return
FALSE
;
}
}
...
@@ -4580,7 +4580,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4580,7 +4580,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
if
(
target
->
xyz_materials
.
size
())
{
if
(
target
->
xyz_materials
.
size
())
{
card_set
overlays
;
card_set
overlays
;
overlays
.
insert
(
target
->
xyz_materials
.
begin
(),
target
->
xyz_materials
.
end
());
overlays
.
insert
(
target
->
xyz_materials
.
begin
(),
target
->
xyz_materials
.
end
());
send_to
(
&
overlays
,
0
,
REASON_LOST_
TARGET
+
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
send_to
(
&
overlays
,
0
,
REASON_LOST_
OVERLAY
+
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
}
}
}
}
if
((
target
->
previous
.
location
==
LOCATION_SZONE
)
&&
target
->
equiping_target
)
if
((
target
->
previous
.
location
==
LOCATION_SZONE
)
&&
target
->
equiping_target
)
...
...
Classes/ocgcore/processor.cpp
View file @
11476d63
...
@@ -3713,6 +3713,10 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
...
@@ -3713,6 +3713,10 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
pduel
->
write_buffer16
(
infos
.
phase
);
pduel
->
write_buffer16
(
infos
.
phase
);
raise_event
((
card
*
)
0
,
EVENT_PREDRAW
,
0
,
0
,
0
,
turn_player
,
0
);
raise_event
((
card
*
)
0
,
EVENT_PREDRAW
,
0
,
0
,
0
,
turn_player
,
0
);
process_instant_event
();
process_instant_event
();
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_EVENT
);
pduel
->
write_buffer8
(
turn_player
);
pduel
->
write_buffer32
(
27
);
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
())
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
())
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
return
FALSE
;
return
FALSE
;
...
...
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