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
743805b6
Commit
743805b6
authored
Jun 24, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
30401feb
da5bd916
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
40 deletions
+16
-40
card.cpp
card.cpp
+6
-4
operations.cpp
operations.cpp
+10
-36
No files found.
card.cpp
View file @
743805b6
...
@@ -2611,7 +2611,7 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset, uint32 s
...
@@ -2611,7 +2611,7 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset, uint32 s
toplayer
=
playerid
;
toplayer
=
playerid
;
}
}
if
(
peffect
->
is_available
()
&&
peffect
->
check_count_limit
(
playerid
)
&&
is_spsummonable
(
peffect
)
if
(
peffect
->
is_available
()
&&
peffect
->
check_count_limit
(
playerid
)
&&
is_spsummonable
(
peffect
)
&&
!
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
,
LOCATION_MZONE
))
{
&&
((
topos
&
POS_FACEDOWN
)
||
!
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
,
LOCATION_MZONE
)
))
{
effect
*
sumeffect
=
pduel
->
game_field
->
core
.
reason_effect
;
effect
*
sumeffect
=
pduel
->
game_field
->
core
.
reason_effect
;
if
(
!
sumeffect
)
if
(
!
sumeffect
)
sumeffect
=
peffect
;
sumeffect
=
peffect
;
...
@@ -3012,7 +3012,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
...
@@ -3012,7 +3012,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
effect_set
proc
;
effect_set
proc
;
int32
res
=
filter_summon_procedure
(
playerid
,
&
proc
,
ignore_count
,
min_tribute
,
zone
);
int32
res
=
filter_summon_procedure
(
playerid
,
&
proc
,
ignore_count
,
min_tribute
,
zone
);
if
(
peffect
)
{
if
(
peffect
)
{
if
(
res
<
0
||
!
pduel
->
game_field
->
is_player_can_summon
(
peffect
->
get_value
(),
playerid
,
this
,
playerid
))
{
if
(
res
<
0
||
!
check_summon_procedure
(
peffect
,
playerid
,
ignore_count
,
min_tribute
,
zone
))
{
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
FALSE
;
return
FALSE
;
}
}
...
@@ -3150,7 +3150,9 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
...
@@ -3150,7 +3150,9 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
if
((
data
.
type
&
TYPE_PENDULUM
)
&&
current
.
location
==
LOCATION_EXTRA
&&
(
current
.
position
&
POS_FACEUP
)
if
((
data
.
type
&
TYPE_PENDULUM
)
&&
current
.
location
==
LOCATION_EXTRA
&&
(
current
.
position
&
POS_FACEUP
)
&&
(
sumtype
==
SUMMON_TYPE_FUSION
||
sumtype
==
SUMMON_TYPE_SYNCHRO
||
sumtype
==
SUMMON_TYPE_XYZ
))
&&
(
sumtype
==
SUMMON_TYPE_FUSION
||
sumtype
==
SUMMON_TYPE_SYNCHRO
||
sumtype
==
SUMMON_TYPE_XYZ
))
return
FALSE
;
return
FALSE
;
if
(((
sumpos
&
POS_FACEDOWN
)
==
0
)
&&
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
,
LOCATION_MZONE
))
if
((
sumpos
&
POS_FACEDOWN
)
&&
pduel
->
game_field
->
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DEVINE_LIGHT
))
sumpos
=
(
sumpos
&
POS_FACEUP
)
|
((
sumpos
&
POS_FACEDOWN
)
>>
1
);
if
(
!
(
sumpos
&
POS_FACEDOWN
)
&&
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
,
LOCATION_MZONE
))
return
FALSE
;
return
FALSE
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
if
((
sumplayer
==
0
||
sumplayer
==
1
)
&&
!
pduel
->
game_field
->
is_player_can_spsummon
(
reason_effect
,
sumtype
,
sumpos
,
sumplayer
,
toplayer
,
this
))
if
((
sumplayer
==
0
||
sumplayer
==
1
)
&&
!
pduel
->
game_field
->
is_player_can_spsummon
(
reason_effect
,
sumtype
,
sumpos
,
sumplayer
,
toplayer
,
this
))
...
@@ -3210,7 +3212,7 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
...
@@ -3210,7 +3212,7 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
effect_set
eset
;
effect_set
eset
;
int32
res
=
filter_set_procedure
(
playerid
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
int32
res
=
filter_set_procedure
(
playerid
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
if
(
peffect
)
{
if
(
peffect
)
{
if
(
res
<
0
||
!
pduel
->
game_field
->
is_player_can_mset
(
peffect
->
get_value
(),
playerid
,
this
,
playerid
))
{
if
(
res
<
0
||
!
check_set_procedure
(
peffect
,
playerid
,
ignore_count
,
min_tribute
,
zone
))
{
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
FALSE
;
return
FALSE
;
}
}
...
...
operations.cpp
View file @
743805b6
...
@@ -1554,7 +1554,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1554,7 +1554,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
effect_set
eset
;
effect_set
eset
;
int32
res
=
target
->
filter_summon_procedure
(
sumplayer
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
int32
res
=
target
->
filter_summon_procedure
(
sumplayer
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
if
(
proc
)
{
if
(
proc
)
{
if
(
res
<
0
)
if
(
res
<
0
||
!
target
->
check_summon_procedure
(
proc
,
sumplayer
,
ignore_count
,
min_tribute
,
zone
)
)
return
TRUE
;
return
TRUE
;
}
else
{
}
else
{
if
(
res
==
-
2
)
if
(
res
==
-
2
)
...
@@ -1595,23 +1595,10 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1595,23 +1595,10 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core
.
units
.
begin
()
->
ptr1
=
0
;
core
.
units
.
begin
()
->
ptr1
=
0
;
return
FALSE
;
return
FALSE
;
}
}
if
(
proc
)
{
if
(
!
proc
)
{
core
.
units
.
begin
()
->
step
=
3
;
proc
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
if
(
!
ignore_count
&&
!
core
.
extra_summon
[
sumplayer
])
{
core
.
units
.
begin
()
->
peffect
=
proc
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
std
::
vector
<
int32
>
retval
;
eset
[
i
]
->
get_value
(
target
,
0
,
&
retval
);
if
(
retval
.
size
()
<
2
)
{
core
.
units
.
begin
()
->
ptr1
=
eset
[
i
];
return
FALSE
;
}
}
}
core
.
units
.
begin
()
->
ptr1
=
0
;
return
FALSE
;
}
}
effect
*
proc
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
core
.
units
.
begin
()
->
peffect
=
proc
;
core
.
select_effects
.
clear
();
core
.
select_effects
.
clear
();
core
.
select_options
.
clear
();
core
.
select_options
.
clear
();
if
(
ignore_count
||
core
.
summon_count
[
sumplayer
]
<
get_summon_count_limit
(
sumplayer
))
{
if
(
ignore_count
||
core
.
summon_count
[
sumplayer
]
<
get_summon_count_limit
(
sumplayer
))
{
...
@@ -2137,7 +2124,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
...
@@ -2137,7 +2124,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
effect_set
eset
;
effect_set
eset
;
int32
res
=
target
->
filter_set_procedure
(
setplayer
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
int32
res
=
target
->
filter_set_procedure
(
setplayer
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
if
(
proc
)
{
if
(
proc
)
{
if
(
res
<
0
)
if
(
res
<
0
||
!
target
->
check_set_procedure
(
proc
,
setplayer
,
ignore_count
,
min_tribute
,
zone
)
)
return
TRUE
;
return
TRUE
;
}
else
{
}
else
{
if
(
res
==
-
2
)
if
(
res
==
-
2
)
...
@@ -2163,23 +2150,10 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
...
@@ -2163,23 +2150,10 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
case
1
:
{
case
1
:
{
effect_set
eset
;
effect_set
eset
;
target
->
filter_effect
(
EFFECT_EXTRA_SET_COUNT
,
&
eset
);
target
->
filter_effect
(
EFFECT_EXTRA_SET_COUNT
,
&
eset
);
if
(
proc
)
{
if
(
!
proc
)
{
core
.
units
.
begin
()
->
step
=
3
;
proc
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
if
(
!
ignore_count
&&
!
core
.
extra_summon
[
setplayer
])
{
core
.
units
.
begin
()
->
peffect
=
proc
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
std
::
vector
<
int32
>
retval
;
eset
[
i
]
->
get_value
(
target
,
0
,
&
retval
);
if
(
retval
.
size
()
<
2
)
{
core
.
units
.
begin
()
->
ptr1
=
eset
[
i
];
return
FALSE
;
}
}
}
core
.
units
.
begin
()
->
ptr1
=
0
;
return
FALSE
;
}
}
effect
*
proc
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
core
.
units
.
begin
()
->
peffect
=
proc
;
core
.
select_effects
.
clear
();
core
.
select_effects
.
clear
();
core
.
select_options
.
clear
();
core
.
select_options
.
clear
();
if
(
ignore_count
||
core
.
summon_count
[
setplayer
]
<
get_summon_count_limit
(
setplayer
))
{
if
(
ignore_count
||
core
.
summon_count
[
setplayer
]
<
get_summon_count_limit
(
setplayer
))
{
...
@@ -3130,7 +3104,7 @@ int32 field::special_summon_step(uint16 step, group* targets, card* target, uint
...
@@ -3130,7 +3104,7 @@ int32 field::special_summon_step(uint16 step, group* targets, card* target, uint
}
}
}
}
if
((
target
->
current
.
location
==
LOCATION_MZONE
)
if
((
target
->
current
.
location
==
LOCATION_MZONE
)
||
check_unique_onfield
(
target
,
playerid
,
LOCATION_MZONE
)
||
!
(
positions
&
POS_FACEDOWN
)
&&
check_unique_onfield
(
target
,
playerid
,
LOCATION_MZONE
)
||
!
is_player_can_spsummon
(
core
.
reason_effect
,
target
->
summon_info
&
0xff00ffff
,
positions
,
target
->
summon_player
,
playerid
,
target
)
||
!
is_player_can_spsummon
(
core
.
reason_effect
,
target
->
summon_info
&
0xff00ffff
,
positions
,
target
->
summon_player
,
playerid
,
target
)
||
(
!
nocheck
&&
!
(
target
->
data
.
type
&
TYPE_MONSTER
)))
{
||
(
!
nocheck
&&
!
(
target
->
data
.
type
&
TYPE_MONSTER
)))
{
core
.
units
.
begin
()
->
step
=
4
;
core
.
units
.
begin
()
->
step
=
4
;
...
@@ -4476,7 +4450,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4476,7 +4450,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
uint32
flag
;
uint32
flag
;
uint32
lreason
=
(
target
->
current
.
location
==
LOCATION_MZONE
)
?
LOCATION_REASON_CONTROL
:
LOCATION_REASON_TOFIELD
;
uint32
lreason
=
(
target
->
current
.
location
==
LOCATION_MZONE
)
?
LOCATION_REASON_CONTROL
:
LOCATION_REASON_TOFIELD
;
int32
ct
=
get_useable_count
(
target
,
playerid
,
location
,
move_player
,
lreason
,
zone
,
&
flag
);
int32
ct
=
get_useable_count
(
target
,
playerid
,
location
,
move_player
,
lreason
,
zone
,
&
flag
);
if
((
ret
==
1
)
&&
(
ct
<=
0
||
target
->
is_status
(
STATUS_FORBIDDEN
)
||
check_unique_onfield
(
target
,
playerid
,
location
)))
{
if
((
ret
==
1
)
&&
(
ct
<=
0
||
target
->
is_status
(
STATUS_FORBIDDEN
)
||
!
(
positions
&
POS_FACEDOWN
)
&&
check_unique_onfield
(
target
,
playerid
,
location
)))
{
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
step
=
3
;
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
;
...
...
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