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
aab80a30
Commit
aab80a30
authored
Apr 04, 2022
by
Chrono-Genex
Committed by
GitHub
Apr 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Duel.SSet, Duel.MoveToField (#440)
parent
9139d20c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
15 deletions
+35
-15
field.h
field.h
+1
-1
operations.cpp
operations.cpp
+34
-14
No files found.
field.h
View file @
aab80a30
...
@@ -236,7 +236,7 @@ struct processor {
...
@@ -236,7 +236,7 @@ struct processor {
instant_f_list
quick_f_chain
;
instant_f_list
quick_f_chain
;
card_set
leave_confirmed
;
card_set
leave_confirmed
;
card_set
special_summoning
;
card_set
special_summoning
;
card_set
ss_tograve
_set
;
card_set
unable_tofield
_set
;
card_set
equiping_cards
;
card_set
equiping_cards
;
card_set
control_adjust_set
[
2
];
card_set
control_adjust_set
[
2
];
card_set
unique_destroy_set
;
card_set
unique_destroy_set
;
...
...
operations.cpp
View file @
aab80a30
...
@@ -2422,20 +2422,25 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
...
@@ -2422,20 +2422,25 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
case
0
:
{
case
0
:
{
card_set
*
set_cards
=
new
card_set
;
card_set
*
set_cards
=
new
card_set
;
core
.
operated_set
.
clear
();
core
.
operated_set
.
clear
();
core
.
set_group_set
.
clear
();
for
(
auto
&
target
:
ptarget
->
container
)
{
for
(
auto
&
target
:
ptarget
->
container
)
{
if
((
!
(
target
->
data
.
type
&
TYPE_FIELD
)
&&
get_useable_count
(
target
,
toplayer
,
LOCATION_SZONE
,
setplayer
,
LOCATION_REASON_TOFIELD
)
<=
0
)
if
((
target
->
data
.
type
&
TYPE_MONSTER
&&
!
target
->
is_affected_by_effect
(
EFFECT_MONSTER_SSET
))
||
(
target
->
data
.
type
&
TYPE_MONSTER
&&
!
target
->
is_affected_by_effect
(
EFFECT_MONSTER_SSET
))
||
(
target
->
current
.
location
==
LOCATION_SZONE
)
||
(
target
->
current
.
location
==
LOCATION_SZONE
)
||
(
!
is_player_can_sset
(
setplayer
,
target
))
||
(
!
is_player_can_sset
(
setplayer
,
target
))
||
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_SSET
)))
{
||
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_SSET
)))
{
continue
;
continue
;
}
}
if
(
!
(
target
->
data
.
type
&
TYPE_FIELD
)
&&
get_useable_count
(
target
,
toplayer
,
LOCATION_SZONE
,
setplayer
,
LOCATION_REASON_TOFIELD
)
<=
0
)
{
if
(
target
->
current
.
location
!=
LOCATION_GRAVE
)
core
.
unable_tofield_set
.
insert
(
target
);
continue
;
}
set_cards
->
insert
(
target
);
set_cards
->
insert
(
target
);
}
}
if
(
set_cards
->
empty
())
{
if
(
set_cards
->
empty
())
{
delete
set_cards
;
delete
set_cards
;
returns
.
ivalue
[
0
]
=
0
;
core
.
units
.
begin
()
->
step
=
4
;
return
TRU
E
;
return
FALS
E
;
}
}
effect_set
eset
;
effect_set
eset
;
for
(
auto
&
pcard
:
*
set_cards
)
{
for
(
auto
&
pcard
:
*
set_cards
)
{
...
@@ -2449,7 +2454,6 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
...
@@ -2449,7 +2454,6 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
}
}
}
}
core
.
set_group_pre_set
.
clear
();
core
.
set_group_pre_set
.
clear
();
core
.
set_group_set
.
clear
();
core
.
set_group_used_zones
=
0
;
core
.
set_group_used_zones
=
0
;
core
.
phase_action
=
TRUE
;
core
.
phase_action
=
TRUE
;
core
.
units
.
begin
()
->
ptarget
=
(
group
*
)
set_cards
;
core
.
units
.
begin
()
->
ptarget
=
(
group
*
)
set_cards
;
...
@@ -2536,6 +2540,16 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
...
@@ -2536,6 +2540,16 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
return
FALSE
;
return
FALSE
;
}
}
case
5
:
{
case
5
:
{
if
(
core
.
unable_tofield_set
.
size
())
send_to
(
&
core
.
unable_tofield_set
,
0
,
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
return
FALSE
;
}
case
6
:
{
core
.
unable_tofield_set
.
clear
();
if
(
core
.
set_group_set
.
size
()
==
0
)
{
returns
.
ivalue
[
0
]
=
0
;
return
TRUE
;
}
if
(
confirm
)
{
if
(
confirm
)
{
pduel
->
write_buffer8
(
MSG_CONFIRM_CARDS
);
pduel
->
write_buffer8
(
MSG_CONFIRM_CARDS
);
pduel
->
write_buffer8
(
toplayer
);
pduel
->
write_buffer8
(
toplayer
);
...
@@ -2549,7 +2563,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
...
@@ -2549,7 +2563,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
}
}
return
FALSE
;
return
FALSE
;
}
}
case
6
:
{
case
7
:
{
core
.
operated_set
.
clear
();
core
.
operated_set
.
clear
();
for
(
auto
&
pcard
:
core
.
set_group_set
)
{
for
(
auto
&
pcard
:
core
.
set_group_set
)
{
core
.
operated_set
.
insert
(
pcard
);
core
.
operated_set
.
insert
(
pcard
);
...
@@ -2578,7 +2592,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
...
@@ -2578,7 +2592,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
}
}
return
FALSE
;
return
FALSE
;
}
}
case
7
:
{
case
8
:
{
adjust_instant
();
adjust_instant
();
raise_event
(
&
core
.
operated_set
,
EVENT_SSET
,
reason_effect
,
0
,
setplayer
,
setplayer
,
0
);
raise_event
(
&
core
.
operated_set
,
EVENT_SSET
,
reason_effect
,
0
,
setplayer
,
setplayer
,
0
);
process_instant_event
();
process_instant_event
();
...
@@ -2589,7 +2603,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
...
@@ -2589,7 +2603,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
}
}
return
FALSE
;
return
FALSE
;
}
}
case
8
:
{
case
9
:
{
returns
.
ivalue
[
0
]
=
(
int32
)
core
.
operated_set
.
size
();
returns
.
ivalue
[
0
]
=
(
int32
)
core
.
operated_set
.
size
();
return
TRUE
;
return
TRUE
;
}
}
...
@@ -3093,7 +3107,7 @@ int32 field::special_summon_step(uint16 step, group* targets, card* target, uint
...
@@ -3093,7 +3107,7 @@ int32 field::special_summon_step(uint16 step, group* targets, card* target, uint
}
}
if
(
get_useable_count
(
target
,
playerid
,
LOCATION_MZONE
,
target
->
summon_player
,
LOCATION_REASON_TOFIELD
,
zone
)
<=
0
)
{
if
(
get_useable_count
(
target
,
playerid
,
LOCATION_MZONE
,
target
->
summon_player
,
LOCATION_REASON_TOFIELD
,
zone
)
<=
0
)
{
if
(
target
->
current
.
location
!=
LOCATION_GRAVE
)
if
(
target
->
current
.
location
!=
LOCATION_GRAVE
)
core
.
ss_tograve
_set
.
insert
(
target
);
core
.
unable_tofield
_set
.
insert
(
target
);
core
.
units
.
begin
()
->
step
=
4
;
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
return
FALSE
;
}
}
...
@@ -3211,12 +3225,12 @@ int32 field::special_summon(uint16 step, effect* reason_effect, uint8 reason_pla
...
@@ -3211,12 +3225,12 @@ int32 field::special_summon(uint16 step, effect* reason_effect, uint8 reason_pla
return
FALSE
;
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
if
(
core
.
ss_tograve
_set
.
size
())
if
(
core
.
unable_tofield
_set
.
size
())
send_to
(
&
core
.
ss_tograve
_set
,
0
,
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
send_to
(
&
core
.
unable_tofield
_set
,
0
,
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
return
FALSE
;
return
FALSE
;
}
}
case
2
:
{
case
2
:
{
core
.
ss_tograve
_set
.
clear
();
core
.
unable_tofield
_set
.
clear
();
if
(
targets
->
container
.
size
()
==
0
)
{
if
(
targets
->
container
.
size
()
==
0
)
{
returns
.
ivalue
[
0
]
=
0
;
returns
.
ivalue
[
0
]
=
0
;
core
.
operated_set
.
clear
();
core
.
operated_set
.
clear
();
...
@@ -4429,8 +4443,11 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4429,8 +4443,11 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
flag
|=
0x1u
<<
(
core
.
duel_rule
>=
4
?
8
:
14
);
flag
|=
0x1u
<<
(
core
.
duel_rule
>=
4
?
8
:
14
);
if
(
is_location_useable
(
playerid
,
LOCATION_PZONE
,
1
))
if
(
is_location_useable
(
playerid
,
LOCATION_PZONE
,
1
))
flag
|=
0x1u
<<
(
core
.
duel_rule
>=
4
?
12
:
15
);
flag
|=
0x1u
<<
(
core
.
duel_rule
>=
4
?
12
:
15
);
if
(
!
flag
)
if
(
!
flag
)
{
if
(
target
->
current
.
location
!=
LOCATION_GRAVE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
return
TRUE
;
return
TRUE
;
}
if
(
move_player
!=
playerid
)
if
(
move_player
!=
playerid
)
flag
=
flag
<<
16
;
flag
=
flag
<<
16
;
flag
=
~
flag
;
flag
=
~
flag
;
...
@@ -4448,8 +4465,11 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4448,8 +4465,11 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
send_to
(
target
,
core
.
reason_effect
,
REASON_RULE
,
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
0
);
send_to
(
target
,
core
.
reason_effect
,
REASON_RULE
,
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
0
);
return
FALSE
;
return
FALSE
;
}
}
if
(
ct
<=
0
)
if
(
ct
<=
0
)
{
if
(
target
->
current
.
location
!=
LOCATION_GRAVE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
return
TRUE
;
return
TRUE
;
}
if
((
zone
&
zone
-
1
)
==
0
)
{
if
((
zone
&
zone
-
1
)
==
0
)
{
for
(
uint8
seq
=
0
;
seq
<
8
;
seq
++
)
{
for
(
uint8
seq
=
0
;
seq
<
8
;
seq
++
)
{
if
((
1
<<
seq
)
&
zone
)
{
if
((
1
<<
seq
)
&
zone
)
{
...
...
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