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
nanahira
ygopro-core
Commits
f6d55d74
You need to sign in or sign up before continuing.
Commit
f6d55d74
authored
Jul 04, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix EVENT_DISCARD
parent
cc50da86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
operations.cpp
operations.cpp
+9
-12
No files found.
operations.cpp
View file @
f6d55d74
...
...
@@ -3611,7 +3611,7 @@ int32 field::send_to(uint16 step, group * targets, card * target) {
int32
field
::
send_to
(
uint16
step
,
group
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
)
{
struct
exargs
{
group
*
targets
;
card_set
leave
,
d
iscard
,
d
etach
;
card_set
leave
,
detach
;
bool
show_decktop
[
2
];
card_vector
cv
;
card_vector
::
iterator
cvit
;
...
...
@@ -3897,8 +3897,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pcard
->
reset
(
RESET_LEAVE
,
RESET_EVENT
);
param
->
leave
.
insert
(
pcard
);
}
if
(
pcard
->
current
.
reason
&
REASON_DISCARD
)
param
->
discard
.
insert
(
pcard
);
++
param
->
cvit
;
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
...
...
@@ -3941,8 +3939,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pcard
->
reset
(
RESET_LEAVE
+
RESET_MSCHANGE
,
RESET_EVENT
);
param
->
leave
.
insert
(
pcard
);
}
if
(
pcard
->
current
.
reason
&
REASON_DISCARD
)
param
->
discard
.
insert
(
pcard
);
if
(
param
->
predirect
->
operation
)
{
tevent
e
;
e
.
event_cards
=
targets
;
...
...
@@ -3984,8 +3980,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
}
for
(
auto
iter
=
param
->
leave
.
begin
();
iter
!=
param
->
leave
.
end
();
++
iter
)
raise_single_event
(
*
iter
,
0
,
EVENT_LEAVE_FIELD
,
(
*
iter
)
->
current
.
reason_effect
,
(
*
iter
)
->
current
.
reason
,
(
*
iter
)
->
current
.
reason_player
,
0
,
0
);
for
(
auto
iter
=
param
->
discard
.
begin
();
iter
!=
param
->
discard
.
end
();
++
iter
)
raise_single_event
(
*
iter
,
0
,
EVENT_DISCARD
,
(
*
iter
)
->
current
.
reason_effect
,
(
*
iter
)
->
current
.
reason
,
(
*
iter
)
->
current
.
reason_player
,
0
,
0
);
if
((
core
.
global_flag
&
GLOBALFLAG_DETACH_EVENT
)
&&
param
->
detach
.
size
())
{
for
(
auto
iter
=
param
->
detach
.
begin
();
iter
!=
param
->
detach
.
end
();
++
iter
)
{
if
((
*
iter
)
->
current
.
location
&
LOCATION_MZONE
)
...
...
@@ -3995,8 +3989,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
process_single_event
();
if
(
param
->
leave
.
size
())
raise_event
(
&
param
->
leave
,
EVENT_LEAVE_FIELD
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
param
->
discard
.
size
())
raise_event
(
&
param
->
discard
,
EVENT_DISCARD
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
((
core
.
global_flag
&
GLOBALFLAG_DETACH_EVENT
)
&&
param
->
detach
.
size
())
raise_event
(
&
param
->
detach
,
EVENT_DETACH_MATERIAL
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
process_instant_event
();
...
...
@@ -4008,12 +4000,11 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
core
.
units
.
begin
()
->
ptarget
=
param
->
targets
;
targets
=
param
->
targets
;
delete
param
;
uint8
nloc
;
card_set
tohand
,
todeck
,
tograve
,
remove
,
released
,
destroyed
,
retgrave
;
card_set
tohand
,
todeck
,
tograve
,
remove
,
discard
,
released
,
destroyed
,
retgrave
;
card_set
equipings
,
overlays
;
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
nloc
=
pcard
->
current
.
location
;
uint8
nloc
=
pcard
->
current
.
location
;
if
(
pcard
->
equiping_target
)
pcard
->
unequip
();
if
(
pcard
->
equiping_cards
.
size
())
{
...
...
@@ -4053,6 +4044,10 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pcard
->
reset
(
RESET_REMOVE
,
RESET_EVENT
);
raise_single_event
(
pcard
,
0
,
EVENT_REMOVE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
if
(
pcard
->
current
.
reason
&
REASON_DISCARD
)
{
discard
.
insert
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_DISCARD
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
if
(
pcard
->
current
.
reason
&
REASON_RELEASE
)
{
released
.
insert
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_RELEASE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
...
...
@@ -4076,6 +4071,8 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
raise_event
(
&
tograve
,
EVENT_TO_GRAVE
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
remove
.
size
())
raise_event
(
&
remove
,
EVENT_REMOVE
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
discard
.
size
())
raise_event
(
&
discard
,
EVENT_DISCARD
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
released
.
size
())
raise_event
(
&
released
,
EVENT_RELEASE
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
destroyed
.
size
())
...
...
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