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
263477ac
Commit
263477ac
authored
Dec 02, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
f71801c6
fbcf0442
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
common.h
common.h
+2
-1
field.cpp
field.cpp
+5
-3
operations.cpp
operations.cpp
+2
-2
processor.cpp
processor.cpp
+4
-0
No files found.
common.h
View file @
263477ac
...
@@ -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 //
...
...
field.cpp
View file @
263477ac
...
@@ -2907,13 +2907,15 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) {
...
@@ -2907,13 +2907,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
))
...
...
operations.cpp
View file @
263477ac
...
@@ -4326,7 +4326,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4326,7 +4326,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
;
}
}
...
@@ -4636,7 +4636,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4636,7 +4636,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
)
...
...
processor.cpp
View file @
263477ac
...
@@ -3726,6 +3726,10 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
...
@@ -3726,6 +3726,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