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
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
MyCard
ygopro-core
Commits
09d4a3e8
Commit
09d4a3e8
authored
Jun 28, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert and fix
parent
5fac2128
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
22 deletions
+25
-22
operations.cpp
operations.cpp
+25
-22
No files found.
operations.cpp
View file @
09d4a3e8
...
@@ -3081,9 +3081,13 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3081,9 +3081,13 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();)
{
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();)
{
auto
rm
=
cit
++
;
auto
rm
=
cit
++
;
card
*
pcard
=
*
rm
;
card
*
pcard
=
*
rm
;
if
(
!
pcard
->
is_destructable
())
{
indestructable_set
.
insert
(
pcard
);
continue
;
}
if
(
!
(
pcard
->
current
.
reason
&
(
REASON_RULE
|
REASON_COST
)))
{
if
(
!
(
pcard
->
current
.
reason
&
(
REASON_RULE
|
REASON_COST
)))
{
int32
is_destructable = true;
bool
is_destructable
=
true
;
if (pcard->is_
destructable() && pcard->is_
affect_by_effect(pcard->current.reason_effect)) {
if
(
pcard
->
is_affect_by_effect
(
pcard
->
current
.
reason_effect
))
{
effect
*
indestructable_effect
=
pcard
->
check_indestructable_by_effect
(
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason_player
);
effect
*
indestructable_effect
=
pcard
->
check_indestructable_by_effect
(
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason_player
);
if
(
indestructable_effect
)
{
if
(
indestructable_effect
)
{
if
(
reason_player
!=
5
)
if
(
reason_player
!=
5
)
...
@@ -3280,7 +3284,6 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3280,7 +3284,6 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();)
{
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();)
{
auto
rm
=
cit
++
;
auto
rm
=
cit
++
;
card
*
pcard
=
*
rm
;
card
*
pcard
=
*
rm
;
if (!(pcard->current.reason & REASON_RULE)) {
if
(
!
pcard
->
is_destructable
())
{
if
(
!
pcard
->
is_destructable
())
{
pcard
->
current
.
reason
=
pcard
->
temp
.
reason
;
pcard
->
current
.
reason
=
pcard
->
temp
.
reason
;
pcard
->
current
.
reason_effect
=
pcard
->
temp
.
reason_effect
;
pcard
->
current
.
reason_effect
=
pcard
->
temp
.
reason_effect
;
...
@@ -3289,7 +3292,6 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3289,7 +3292,6 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
targets
->
container
.
erase
(
pcard
);
targets
->
container
.
erase
(
pcard
);
continue
;
continue
;
}
}
}
eset
.
clear
();
eset
.
clear
();
pcard
->
filter_effect
(
EFFECT_INDESTRUCTABLE
,
&
eset
);
pcard
->
filter_effect
(
EFFECT_INDESTRUCTABLE
,
&
eset
);
if
(
eset
.
size
())
{
if
(
eset
.
size
())
{
...
@@ -3774,6 +3776,18 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3774,6 +3776,18 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
uint8
playerid
=
pcard
->
sendto_param
.
playerid
&
0x7
;
uint8
playerid
=
pcard
->
sendto_param
.
playerid
&
0x7
;
uint8
dest
=
pcard
->
sendto_param
.
location
;
uint8
dest
=
pcard
->
sendto_param
.
location
;
uint8
seq
=
pcard
->
sendto_param
.
sequence
;
uint8
seq
=
pcard
->
sendto_param
.
sequence
;
uint8
control_player
=
pcard
->
overlay_target
?
pcard
->
overlay_target
->
current
.
controler
:
pcard
->
current
.
controler
;
if
(
dest
==
LOCATION_GRAVE
)
{
core
.
hint_timing
[
control_player
]
|=
TIMING_TOGRAVE
;
}
else
if
(
dest
==
LOCATION_HAND
)
{
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
core
.
hint_timing
[
control_player
]
|=
TIMING_TOHAND
;
}
else
if
(
dest
==
LOCATION_DECK
)
{
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
core
.
hint_timing
[
control_player
]
|=
TIMING_TODECK
;
}
else
if
(
dest
==
LOCATION_REMOVED
)
{
core
.
hint_timing
[
control_player
]
|=
TIMING_REMOVE
;
}
//call move_card()
//call move_card()
if
(
pcard
->
current
.
controler
!=
playerid
||
pcard
->
current
.
location
!=
dest
)
{
if
(
pcard
->
current
.
controler
!=
playerid
||
pcard
->
current
.
location
!=
dest
)
{
pduel
->
write_buffer8
(
MSG_MOVE
);
pduel
->
write_buffer8
(
MSG_MOVE
);
...
@@ -3788,17 +3802,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3788,17 +3802,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
}
}
if(dest == LOCATION_GRAVE) {
core.hint_timing[pcard->current.controler] |= TIMING_TOGRAVE;
} else if(dest == LOCATION_HAND) {
pcard->set_status(STATUS_PROC_COMPLETE, FALSE);
core.hint_timing[pcard->current.controler] |= TIMING_TOHAND;
} else if(dest == LOCATION_DECK) {
pcard->set_status(STATUS_PROC_COMPLETE, FALSE);
core.hint_timing[pcard->current.controler] |= TIMING_TODECK;
} else if(dest == LOCATION_REMOVED) {
core.hint_timing[pcard->current.controler] |= TIMING_REMOVE;
}
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
param
->
show_decktop
[
pcard
->
current
.
controler
]
=
true
;
param
->
show_decktop
[
pcard
->
current
.
controler
]
=
true
;
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
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