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
70d74470
Commit
70d74470
authored
Feb 08, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update SetUniqueOnField
parent
7e4c827d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
27 deletions
+36
-27
card.cpp
card.cpp
+6
-6
card.h
card.h
+1
-0
effect.cpp
effect.cpp
+1
-1
field.cpp
field.cpp
+5
-4
field.h
field.h
+1
-1
libcard.cpp
libcard.cpp
+9
-2
operations.cpp
operations.cpp
+13
-13
No files found.
card.cpp
View file @
70d74470
...
@@ -982,7 +982,7 @@ void card::apply_field_effect() {
...
@@ -982,7 +982,7 @@ void card::apply_field_effect() {
pduel
->
game_field
->
add_effect
(
it
->
second
);
pduel
->
game_field
->
add_effect
(
it
->
second
);
}
}
}
}
if
(
unique_code
&&
(
current
.
location
&
LOCATION_ONFIELD
))
if
(
unique_code
&&
(
current
.
location
&
unique_location
))
pduel
->
game_field
->
add_unique_card
(
this
);
pduel
->
game_field
->
add_unique_card
(
this
);
spsummon_counter
[
0
]
=
spsummon_counter
[
1
]
=
0
;
spsummon_counter
[
0
]
=
spsummon_counter
[
1
]
=
0
;
spsummon_counter_rst
[
0
]
=
spsummon_counter_rst
[
1
]
=
0
;
spsummon_counter_rst
[
0
]
=
spsummon_counter_rst
[
1
]
=
0
;
...
@@ -996,7 +996,7 @@ void card::cancel_field_effect() {
...
@@ -996,7 +996,7 @@ void card::cancel_field_effect() {
pduel
->
game_field
->
remove_effect
(
it
->
second
);
pduel
->
game_field
->
remove_effect
(
it
->
second
);
}
}
}
}
if
(
unique_code
&&
(
current
.
location
&
LOCATION_ONFIELD
))
if
(
unique_code
&&
(
current
.
location
&
unique_location
))
pduel
->
game_field
->
remove_unique_card
(
this
);
pduel
->
game_field
->
remove_unique_card
(
this
);
}
}
void
card
::
enable_field_effect
(
int32
enabled
)
{
void
card
::
enable_field_effect
(
int32
enabled
)
{
...
@@ -1810,7 +1810,7 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset, uint32 s
...
@@ -1810,7 +1810,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_summonable
(
peffect
)
if
(
peffect
->
is_available
()
&&
peffect
->
check_count_limit
(
playerid
)
&&
is_summonable
(
peffect
)
&&
!
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
))
{
&&
!
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
;
...
@@ -2007,7 +2007,7 @@ int32 card::is_summonable(effect* peffect, uint8 min_tribute) {
...
@@ -2007,7 +2007,7 @@ int32 card::is_summonable(effect* peffect, uint8 min_tribute) {
int32
card
::
is_can_be_summoned
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
)
{
int32
card
::
is_can_be_summoned
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
)
{
if
(
!
is_summonable
())
if
(
!
is_summonable
())
return
FALSE
;
return
FALSE
;
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
playerid
))
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
playerid
,
LOCATION_MZONE
))
return
FALSE
;
return
FALSE
;
if
(
!
ignore_count
&&
(
pduel
->
game_field
->
core
.
extra_summon
[
playerid
]
||
!
is_affected_by_effect
(
EFFECT_EXTRA_SUMMON_COUNT
))
if
(
!
ignore_count
&&
(
pduel
->
game_field
->
core
.
extra_summon
[
playerid
]
||
!
is_affected_by_effect
(
EFFECT_EXTRA_SUMMON_COUNT
))
&&
pduel
->
game_field
->
core
.
summon_count
[
playerid
]
>=
pduel
->
game_field
->
get_summon_count_limit
(
playerid
))
&&
pduel
->
game_field
->
core
.
summon_count
[
playerid
]
>=
pduel
->
game_field
->
get_summon_count_limit
(
playerid
))
...
@@ -2119,7 +2119,7 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) {
...
@@ -2119,7 +2119,7 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) {
return
FALSE
;
return
FALSE
;
if
(
!
(
current
.
position
&
POS_FACEDOWN
))
if
(
!
(
current
.
position
&
POS_FACEDOWN
))
return
FALSE
;
return
FALSE
;
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
playerid
))
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
playerid
,
LOCATION_MZONE
))
return
FALSE
;
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_player_can_flipsummon
(
playerid
,
this
))
if
(
!
pduel
->
game_field
->
is_player_can_flipsummon
(
playerid
,
this
))
return
FALSE
;
return
FALSE
;
...
@@ -2190,7 +2190,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
...
@@ -2190,7 +2190,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
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_SYNCHRO
||
sumtype
==
SUMMON_TYPE_XYZ
))
(
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
))
if
(((
sumpos
&
POS_FACEDOWN
)
==
0
)
&&
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
))
...
...
card.h
View file @
70d74470
...
@@ -121,6 +121,7 @@ public:
...
@@ -121,6 +121,7 @@ public:
uint8
unique_pos
[
2
];
uint8
unique_pos
[
2
];
uint16
unique_uid
;
uint16
unique_uid
;
uint32
unique_code
;
uint32
unique_code
;
uint32
unique_location
;
uint32
spsummon_code
;
uint32
spsummon_code
;
uint16
spsummon_counter
[
2
];
uint16
spsummon_counter
[
2
];
uint16
spsummon_counter_rst
[
2
];
uint16
spsummon_counter_rst
[
2
];
...
...
effect.cpp
View file @
70d74470
...
@@ -150,7 +150,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -150,7 +150,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
(
type
&
EFFECT_TYPE_ACTIVATE
)
{
if
(
type
&
EFFECT_TYPE_ACTIVATE
)
{
if
(
handler
->
current
.
controler
!=
playerid
)
if
(
handler
->
current
.
controler
!=
playerid
)
return
FALSE
;
return
FALSE
;
if
(
pduel
->
game_field
->
check_unique_onfield
(
handler
,
playerid
))
if
(
pduel
->
game_field
->
check_unique_onfield
(
handler
,
playerid
,
LOCATION_SZONE
))
return
FALSE
;
return
FALSE
;
if
(
!
(
handler
->
data
.
type
&
TYPE_COUNTER
))
{
if
(
!
(
handler
->
data
.
type
&
TYPE_COUNTER
))
{
if
((
code
<
1132
||
code
>
1149
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
!
(
is_flag
(
EFFECT_FLAG_DAMAGE_STEP
)))
if
((
code
<
1132
||
code
>
1149
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
!
(
is_flag
(
EFFECT_FLAG_DAMAGE_STEP
)))
...
...
field.cpp
View file @
70d74470
...
@@ -1456,7 +1456,7 @@ void field::adjust_self_destroy_set() {
...
@@ -1456,7 +1456,7 @@ void field::adjust_self_destroy_set() {
effect
*
peffect
;
effect
*
peffect
;
for
(
auto
cit
=
cset
.
begin
();
cit
!=
cset
.
end
();
++
cit
)
{
for
(
auto
cit
=
cset
.
begin
();
cit
!=
cset
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
card
*
pcard
=
*
cit
;
if
((
!
pcard
->
is_status
(
STATUS_DISABLED
)
&&
(
peffect
=
check_unique_onfield
(
pcard
,
pcard
->
current
.
controler
)))
if
((
!
pcard
->
is_status
(
STATUS_DISABLED
)
&&
(
peffect
=
check_unique_onfield
(
pcard
,
pcard
->
current
.
controler
,
pcard
->
current
.
location
)))
||
(
peffect
=
pcard
->
is_affected_by_effect
(
EFFECT_SELF_DESTROY
)))
{
||
(
peffect
=
pcard
->
is_affected_by_effect
(
EFFECT_SELF_DESTROY
)))
{
core
.
self_destroy_set
.
insert
(
pcard
);
core
.
self_destroy_set
.
insert
(
pcard
);
pcard
->
current
.
reason_effect
=
peffect
;
pcard
->
current
.
reason_effect
=
peffect
;
...
@@ -1495,13 +1495,14 @@ void field::remove_unique_card(card* pcard) {
...
@@ -1495,13 +1495,14 @@ void field::remove_unique_card(card* pcard) {
core
.
unique_cards
[
1
-
con
].
erase
(
pcard
);
core
.
unique_cards
[
1
-
con
].
erase
(
pcard
);
}
}
effect
*
field
::
check_unique_onfield
(
card
*
pcard
,
uint8
controler
)
{
effect
*
field
::
check_unique_onfield
(
card
*
pcard
,
uint8
controler
,
uint8
location
)
{
if
(
!
pcard
->
unique_code
)
if
(
!
pcard
->
unique_code
)
return
0
;
return
0
;
for
(
auto
iter
=
core
.
unique_cards
[
controler
].
begin
();
iter
!=
core
.
unique_cards
[
controler
].
end
();
++
iter
)
{
for
(
auto
iter
=
core
.
unique_cards
[
controler
].
begin
();
iter
!=
core
.
unique_cards
[
controler
].
end
();
++
iter
)
{
card
*
ucard
=
*
iter
;
card
*
ucard
=
*
iter
;
if
((
ucard
!=
pcard
)
&&
ucard
->
get_status
(
STATUS_EFFECT_ENABLED
)
&&
(
ucard
->
unique_code
==
pcard
->
unique_code
)
if
((
ucard
!=
pcard
)
&&
ucard
->
get_status
(
STATUS_EFFECT_ENABLED
)
&&
(
!
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
||
pcard
->
is_position
(
POS_FACEDOWN
)
||
(
ucard
->
unique_uid
<
pcard
->
unique_uid
)))
&&
(
ucard
->
unique_code
==
pcard
->
unique_code
)
&&
(
ucard
->
unique_location
&
location
)
&&
(
!
(
pcard
->
current
.
location
&
ucard
->
unique_location
)
||
pcard
->
is_position
(
POS_FACEDOWN
)
||
(
ucard
->
unique_uid
<
pcard
->
unique_uid
)))
return
pcard
->
unique_effect
;
return
pcard
->
unique_effect
;
}
}
return
0
;
return
0
;
...
...
field.h
View file @
70d74470
...
@@ -372,7 +372,7 @@ public:
...
@@ -372,7 +372,7 @@ public:
void
adjust_self_destroy_set
();
void
adjust_self_destroy_set
();
void
add_unique_card
(
card
*
pcard
);
void
add_unique_card
(
card
*
pcard
);
void
remove_unique_card
(
card
*
pcard
);
void
remove_unique_card
(
card
*
pcard
);
effect
*
check_unique_onfield
(
card
*
pcard
,
uint8
controler
);
effect
*
check_unique_onfield
(
card
*
pcard
,
uint8
controler
,
uint8
location
);
int32
check_spsummon_once
(
card
*
pcard
,
uint8
playerid
);
int32
check_spsummon_once
(
card
*
pcard
,
uint8
playerid
);
void
check_card_counter
(
card
*
pcard
,
int32
counter_type
,
int32
playerid
);
void
check_card_counter
(
card
*
pcard
,
int32
counter_type
,
int32
playerid
);
void
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
,
bool
cancel
=
false
);
void
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
,
bool
cancel
=
false
);
...
...
libcard.cpp
View file @
70d74470
...
@@ -2222,6 +2222,10 @@ int32 scriptlib::card_set_unique_onfield(lua_State *L) {
...
@@ -2222,6 +2222,10 @@ int32 scriptlib::card_set_unique_onfield(lua_State *L) {
pcard
->
unique_pos
[
0
]
=
lua_tointeger
(
L
,
2
);
pcard
->
unique_pos
[
0
]
=
lua_tointeger
(
L
,
2
);
pcard
->
unique_pos
[
1
]
=
lua_tointeger
(
L
,
3
);
pcard
->
unique_pos
[
1
]
=
lua_tointeger
(
L
,
3
);
pcard
->
unique_code
=
lua_tointeger
(
L
,
4
);
pcard
->
unique_code
=
lua_tointeger
(
L
,
4
);
uint32
location
=
LOCATION_ONFIELD
;
if
(
lua_gettop
(
L
)
>
4
)
location
=
lua_tointeger
(
L
,
5
)
&
LOCATION_ONFIELD
;
pcard
->
unique_location
=
location
;
effect
*
peffect
=
pcard
->
pduel
->
new_effect
();
effect
*
peffect
=
pcard
->
pduel
->
new_effect
();
peffect
->
owner
=
pcard
;
peffect
->
owner
=
pcard
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
...
@@ -2229,7 +2233,7 @@ int32 scriptlib::card_set_unique_onfield(lua_State *L) {
...
@@ -2229,7 +2233,7 @@ int32 scriptlib::card_set_unique_onfield(lua_State *L) {
peffect
->
flag
[
0
]
=
EFFECT_FLAG_COPY_INHERIT
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_COPY_INHERIT
;
pcard
->
add_effect
(
peffect
);
pcard
->
add_effect
(
peffect
);
pcard
->
unique_effect
=
peffect
;
pcard
->
unique_effect
=
peffect
;
if
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
if
(
pcard
->
current
.
location
&
location
)
pcard
->
pduel
->
game_field
->
add_unique_card
(
pcard
);
pcard
->
pduel
->
game_field
->
add_unique_card
(
pcard
);
return
0
;
return
0
;
}
}
...
@@ -2238,7 +2242,10 @@ int32 scriptlib::card_check_unique_onfield(lua_State *L) {
...
@@ -2238,7 +2242,10 @@ int32 scriptlib::card_check_unique_onfield(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
check_player
=
lua_tointeger
(
L
,
2
);
uint32
check_player
=
lua_tointeger
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
pduel
->
game_field
->
check_unique_onfield
(
pcard
,
check_player
)
?
0
:
1
);
uint32
check_location
=
LOCATION_ONFIELD
;
if
(
lua_gettop
(
L
)
>
2
)
check_location
=
lua_tointeger
(
L
,
3
)
&
LOCATION_ONFIELD
;
lua_pushboolean
(
L
,
pcard
->
pduel
->
game_field
->
check_unique_onfield
(
pcard
,
check_player
,
check_location
)
?
0
:
1
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_reset_negate_effect
(
lua_State
*
L
)
{
int32
scriptlib
::
card_reset_negate_effect
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
70d74470
...
@@ -800,14 +800,14 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
...
@@ -800,14 +800,14 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
if
(
!
pcard
->
is_affect_by_effect
(
reason_effect
))
if
(
!
pcard
->
is_affect_by_effect
(
reason_effect
))
return
TRUE
;
return
TRUE
;
pcard
->
filter_disable_related_cards
();
pcard
->
filter_disable_related_cards
();
if
(
pcard
->
unique_code
)
if
(
pcard
->
unique_code
&&
(
pcard
->
unique_location
&
LOCATION_MZONE
)
)
remove_unique_card
(
pcard
);
remove_unique_card
(
pcard
);
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
);
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
);
pcard
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
pcard
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
if
(
pcard
->
unique_code
)
if
(
pcard
->
unique_code
&&
(
pcard
->
unique_location
&
LOCATION_MZONE
)
)
add_unique_card
(
pcard
);
add_unique_card
(
pcard
);
set_control
(
pcard
,
playerid
,
reset_phase
,
reset_count
);
set_control
(
pcard
,
playerid
,
reset_phase
,
reset_count
);
pcard
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
pcard
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
...
@@ -848,17 +848,17 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play
...
@@ -848,17 +848,17 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play
return
TRUE
;
return
TRUE
;
pcard1
->
filter_disable_related_cards
();
pcard1
->
filter_disable_related_cards
();
pcard2
->
filter_disable_related_cards
();
pcard2
->
filter_disable_related_cards
();
if
(
pcard1
->
unique_code
)
if
(
pcard1
->
unique_code
&&
(
pcard1
->
unique_location
&
LOCATION_MZONE
)
)
remove_unique_card
(
pcard1
);
remove_unique_card
(
pcard1
);
if
(
pcard2
->
unique_code
)
if
(
pcard2
->
unique_code
&&
(
pcard2
->
unique_location
&
LOCATION_MZONE
)
)
remove_unique_card
(
pcard2
);
remove_unique_card
(
pcard2
);
remove_card
(
pcard1
);
remove_card
(
pcard1
);
remove_card
(
pcard2
);
remove_card
(
pcard2
);
add_card
(
p2
,
pcard1
,
l2
,
s2
);
add_card
(
p2
,
pcard1
,
l2
,
s2
);
add_card
(
p1
,
pcard2
,
l1
,
s1
);
add_card
(
p1
,
pcard2
,
l1
,
s1
);
if
(
pcard1
->
unique_code
)
if
(
pcard1
->
unique_code
&&
(
pcard1
->
unique_location
&
LOCATION_MZONE
)
)
add_unique_card
(
pcard1
);
add_unique_card
(
pcard1
);
if
(
pcard2
->
unique_code
)
if
(
pcard2
->
unique_code
&&
(
pcard2
->
unique_location
&
LOCATION_MZONE
)
)
add_unique_card
(
pcard2
);
add_unique_card
(
pcard2
);
set_control
(
pcard1
,
p2
,
reset_phase
,
reset_count
);
set_control
(
pcard1
,
p2
,
reset_phase
,
reset_count
);
set_control
(
pcard2
,
p1
,
reset_phase
,
reset_count
);
set_control
(
pcard2
,
p1
,
reset_phase
,
reset_count
);
...
@@ -960,11 +960,11 @@ int32 field::control_adjust(uint16 step) {
...
@@ -960,11 +960,11 @@ int32 field::control_adjust(uint16 step) {
}
}
case
2
:
{
case
2
:
{
for
(
auto
cit
=
core
.
control_adjust_set
[
0
].
begin
();
cit
!=
core
.
control_adjust_set
[
0
].
end
();
++
cit
)
{
for
(
auto
cit
=
core
.
control_adjust_set
[
0
].
begin
();
cit
!=
core
.
control_adjust_set
[
0
].
end
();
++
cit
)
{
if
((
*
cit
)
->
unique_code
)
if
((
*
cit
)
->
unique_code
&&
((
*
cit
)
->
unique_location
&
LOCATION_MZONE
)
)
remove_unique_card
(
*
cit
);
remove_unique_card
(
*
cit
);
}
}
for
(
auto
cit
=
core
.
control_adjust_set
[
1
].
begin
();
cit
!=
core
.
control_adjust_set
[
1
].
end
();
++
cit
)
{
for
(
auto
cit
=
core
.
control_adjust_set
[
1
].
begin
();
cit
!=
core
.
control_adjust_set
[
1
].
end
();
++
cit
)
{
if
((
*
cit
)
->
unique_code
)
if
((
*
cit
)
->
unique_code
&&
((
*
cit
)
->
unique_location
&
LOCATION_MZONE
)
)
remove_unique_card
(
*
cit
);
remove_unique_card
(
*
cit
);
}
}
auto
cit1
=
core
.
control_adjust_set
[
0
].
begin
();
auto
cit1
=
core
.
control_adjust_set
[
0
].
begin
();
...
@@ -1016,7 +1016,7 @@ int32 field::control_adjust(uint16 step) {
...
@@ -1016,7 +1016,7 @@ int32 field::control_adjust(uint16 step) {
continue
;
continue
;
}
}
pcard
->
filter_disable_related_cards
();
pcard
->
filter_disable_related_cards
();
if
(
pcard
->
unique_code
)
if
(
pcard
->
unique_code
&&
(
pcard
->
unique_location
&
LOCATION_MZONE
)
)
add_unique_card
(
pcard
);
add_unique_card
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_CONTROL_CHANGED
,
0
,
REASON_RULE
,
0
,
0
,
0
);
raise_single_event
(
pcard
,
0
,
EVENT_CONTROL_CHANGED
,
0
,
REASON_RULE
,
0
,
0
,
0
);
}
}
...
@@ -1183,7 +1183,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
...
@@ -1183,7 +1183,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
if
((
proc
&&
res
<
0
)
||
res
==
-
2
)
if
((
proc
&&
res
<
0
)
||
res
==
-
2
)
return
TRUE
;
return
TRUE
;
}
}
if
(
check_unique_onfield
(
target
,
sumplayer
))
if
(
check_unique_onfield
(
target
,
sumplayer
,
LOCATION_MZONE
))
return
TRUE
;
return
TRUE
;
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_SUMMON
))
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_SUMMON
))
return
TRUE
;
return
TRUE
;
...
@@ -1599,7 +1599,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
...
@@ -1599,7 +1599,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
return
TRUE
;
return
TRUE
;
if
(
!
(
target
->
current
.
position
&
POS_FACEDOWN
))
if
(
!
(
target
->
current
.
position
&
POS_FACEDOWN
))
return
TRUE
;
return
TRUE
;
if
(
check_unique_onfield
(
target
,
sumplayer
))
if
(
check_unique_onfield
(
target
,
sumplayer
,
LOCATION_MZONE
))
return
TRUE
;
return
TRUE
;
effect_set
eset
;
effect_set
eset
;
target
->
filter_effect
(
EFFECT_FLIPSUMMON_COST
,
&
eset
);
target
->
filter_effect
(
EFFECT_FLIPSUMMON_COST
,
&
eset
);
...
@@ -2280,7 +2280,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2280,7 +2280,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
card
*
pcard
=
*
cit
++
;
card
*
pcard
=
*
cit
++
;
if
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
if
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
||
(
pcard
->
current
.
location
==
LOCATION_MZONE
)
||
(
pcard
->
current
.
location
==
LOCATION_MZONE
)
||
check_unique_onfield
(
pcard
,
sumplayer
)
||
check_unique_onfield
(
pcard
,
sumplayer
,
LOCATION_MZONE
)
||
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
{
||
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
{
pgroup
->
container
.
erase
(
pcard
);
pgroup
->
container
.
erase
(
pcard
);
continue
;
continue
;
...
@@ -2425,7 +2425,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
...
@@ -2425,7 +2425,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
result
=
FALSE
;
result
=
FALSE
;
}
}
if
(
!
result
||
(
target
->
current
.
location
==
LOCATION_MZONE
)
if
(
!
result
||
(
target
->
current
.
location
==
LOCATION_MZONE
)
||
check_unique_onfield
(
target
,
playerid
)
||
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
)
||
get_useable_count
(
playerid
,
LOCATION_MZONE
,
target
->
summon_player
,
LOCATION_REASON_TOFIELD
)
<=
0
||
get_useable_count
(
playerid
,
LOCATION_MZONE
,
target
->
summon_player
,
LOCATION_REASON_TOFIELD
)
<=
0
||
(
!
nocheck
&&
!
(
target
->
data
.
type
&
TYPE_MONSTER
)))
||
(
!
nocheck
&&
!
(
target
->
data
.
type
&
TYPE_MONSTER
)))
...
...
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