Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
86fc498e
Commit
86fc498e
authored
Dec 28, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style
parent
092a640d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
85 deletions
+75
-85
ocgcore/field.cpp
ocgcore/field.cpp
+9
-12
ocgcore/operations.cpp
ocgcore/operations.cpp
+11
-11
ocgcore/processor.cpp
ocgcore/processor.cpp
+55
-62
No files found.
ocgcore/field.cpp
View file @
86fc498e
...
...
@@ -1465,24 +1465,22 @@ void field::check_chain_counter(effect* peffect, int32 playerid, int32 chainid,
}
}
void
field
::
set_spsummon_counter
(
uint8
playerid
,
bool
add
,
bool
chain
)
{
if
(
add
){
if
(
add
)
{
core
.
spsummon_state_count
[
playerid
]
++
;
if
(
chain
)
core
.
spsummon_state_count_rst
[
playerid
]
++
;
}
else
{
if
(
chain
){
core
.
spsummon_state_count
[
playerid
]
-=
core
.
spsummon_state_count_rst
[
playerid
];
}
else
{
if
(
chain
)
{
core
.
spsummon_state_count
[
playerid
]
-=
core
.
spsummon_state_count_rst
[
playerid
];
core
.
spsummon_state_count_rst
[
playerid
]
=
0
;
}
else
}
else
core
.
spsummon_state_count
[
playerid
]
--
;
}
if
(
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_COUNT
)
{
for
(
auto
iter
=
effects
.
spsummon_count_eff
.
begin
();
iter
!=
effects
.
spsummon_count_eff
.
end
();
++
iter
)
{
effect
*
peffect
=
*
iter
;
card
*
pcard
=
peffect
->
handler
;
if
(
add
){
if
(
add
)
{
if
(
pcard
->
is_status
(
STATUS_EFFECT_ENABLED
)
&&
!
pcard
->
is_status
(
STATUS_DISABLED
)
&&
pcard
->
is_position
(
POS_FACEUP
))
{
if
(((
playerid
==
pcard
->
current
.
controler
)
&&
peffect
->
s_range
)
||
((
playerid
!=
pcard
->
current
.
controler
)
&&
peffect
->
o_range
))
{
pcard
->
spsummon_counter
[
playerid
]
++
;
...
...
@@ -1490,9 +1488,8 @@ void field::set_spsummon_counter(uint8 playerid, bool add, bool chain) {
pcard
->
spsummon_counter_rst
[
playerid
]
++
;
}
}
}
else
{
pcard
->
spsummon_counter
[
playerid
]
-=
pcard
->
spsummon_counter_rst
[
playerid
];
}
else
{
pcard
->
spsummon_counter
[
playerid
]
-=
pcard
->
spsummon_counter_rst
[
playerid
];
pcard
->
spsummon_counter_rst
[
playerid
]
=
0
;
}
}
...
...
@@ -1788,7 +1785,7 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
if
(
mg
)
{
uint32
xyz_level
;
core
.
xmaterial_lst
.
clear
();
for
(
auto
cit
=
mg
->
container
.
begin
();
cit
!=
mg
->
container
.
end
();
++
cit
)
{
for
(
auto
cit
=
mg
->
container
.
begin
();
cit
!=
mg
->
container
.
end
();
++
cit
)
{
if
((
xyz_level
=
(
*
cit
)
->
check_xyz_level
(
scard
,
lv
))
&&
(
findex
==
0
||
pduel
->
lua
->
check_matching
(
*
cit
,
findex
,
0
)))
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
((
xyz_level
>>
12
)
&
0xf
,
*
cit
));
}
...
...
ocgcore/operations.cpp
View file @
86fc498e
...
...
@@ -2400,7 +2400,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
return
FALSE
;
}
case
1
:
{
bool
tp
=
false
,
ntp
=
false
;
bool
tp
=
false
,
ntp
=
false
;
if
(
targets
->
container
.
size
()
==
0
)
{
returns
.
ivalue
[
0
]
=
0
;
core
.
operated_set
.
clear
();
...
...
@@ -2409,14 +2409,14 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
}
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();
++
cit
)
{
if
((
*
cit
)
->
summon_player
==
infos
.
turn_player
)
tp
=
true
;
tp
=
true
;
else
ntp
=
true
;
ntp
=
true
;
}
if
(
tp
)
set_spsummon_counter
(
infos
.
turn_player
);
if
(
ntp
)
set_spsummon_counter
(
1
-
infos
.
turn_player
);
set_spsummon_counter
(
1
-
infos
.
turn_player
);
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();
++
cit
)
{
(
*
cit
)
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
if
((
*
cit
)
->
is_position
(
POS_FACEUP
))
...
...
@@ -2968,7 +2968,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return
FALSE
;
}
case
4
:
{
exargs
*
param
=
new
exargs
;
exargs
*
param
=
new
exargs
;
core
.
units
.
begin
()
->
ptarget
=
(
group
*
)
param
;
param
->
targets
=
targets
;
param
->
show_decktop
[
0
]
=
false
;
...
...
@@ -3017,7 +3017,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return
FALSE
;
}
case
5
:
{
exargs
*
param
=
(
exargs
*
)
targets
;
exargs
*
param
=
(
exargs
*
)
targets
;
if
(
param
->
cvit
==
param
->
cv
.
end
())
{
core
.
units
.
begin
()
->
step
=
8
;
return
FALSE
;
...
...
@@ -3063,7 +3063,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
case
6
:
{
if
(
returns
.
ivalue
[
0
])
return
FALSE
;
exargs
*
param
=
(
exargs
*
)
targets
;
exargs
*
param
=
(
exargs
*
)
targets
;
card
*
pcard
=
*
param
->
cvit
;
uint8
oloc
=
pcard
->
current
.
location
;
uint8
playerid
=
(
pcard
->
operation_param
>>
16
)
&
0xf
;
...
...
@@ -3110,7 +3110,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return
FALSE
;
}
case
7
:
{
exargs
*
param
=
(
exargs
*
)
targets
;
exargs
*
param
=
(
exargs
*
)
targets
;
card
*
pcard
=
*
param
->
cvit
;
uint32
flag
;
get_useable_count
(
pcard
->
current
.
controler
,
LOCATION_SZONE
,
pcard
->
current
.
controler
,
LOCATION_REASON_TOFIELD
,
&
flag
);
...
...
@@ -3119,7 +3119,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return
FALSE
;
}
case
8
:
{
exargs
*
param
=
(
exargs
*
)
targets
;
exargs
*
param
=
(
exargs
*
)
targets
;
card
*
pcard
=
*
param
->
cvit
;
uint8
oloc
=
pcard
->
current
.
location
;
uint8
seq
=
returns
.
bvalue
[
2
];
...
...
@@ -3160,7 +3160,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return
FALSE
;
}
case
9
:
{
exargs
*
param
=
(
exargs
*
)
targets
;
exargs
*
param
=
(
exargs
*
)
targets
;
if
(
core
.
global_flag
&
GLOBALFLAG_DECK_REVERSE_CHECK
)
{
if
(
param
->
show_decktop
[
0
])
{
card
*
ptop
=
*
player
[
0
].
list_main
.
rbegin
();
...
...
@@ -3205,7 +3205,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return
FALSE
;
}
case
10
:
{
exargs
*
param
=
(
exargs
*
)
targets
;
exargs
*
param
=
(
exargs
*
)
targets
;
core
.
units
.
begin
()
->
ptarget
=
param
->
targets
;
targets
=
param
->
targets
;
delete
param
;
...
...
ocgcore/processor.cpp
View file @
86fc498e
...
...
@@ -1775,25 +1775,23 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
}
core
.
new_fchain_s
.
clear
();
if
(
core
.
current_player
==
infos
.
turn_player
){
if
(
core
.
current_player
==
infos
.
turn_player
)
{
if
(
core
.
tpchain
.
size
()
>
1
)
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
1
,
infos
.
turn_player
);
}
else
{
}
else
{
if
(
core
.
ntpchain
.
size
()
>
1
)
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
0
,
infos
.
turn_player
);
}
return
FALSE
;
}
case
3
:
{
if
(
core
.
current_player
==
infos
.
turn_player
){
if
(
core
.
current_player
==
infos
.
turn_player
)
{
core
.
new_chains
.
splice
(
core
.
new_chains
.
end
(),
core
.
tpchain
);
if
(
core
.
new_chains
.
size
())
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
core
.
current_player
=
1
-
infos
.
turn_player
;
core
.
current_player
=
1
-
infos
.
turn_player
;
core
.
units
.
begin
()
->
step
=
1
;
}
else
{
}
else
{
core
.
new_chains
.
splice
(
core
.
new_chains
.
end
(),
core
.
ntpchain
);
if
(
core
.
new_chains
.
size
())
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
...
...
@@ -1833,12 +1831,11 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
case
5
:
{
if
(
core
.
new_ochain_s
.
size
()
==
0
)
{
if
(
core
.
current_player
==
infos
.
turn_player
){
if
(
core
.
current_player
==
infos
.
turn_player
)
{
if
(
core
.
tpchain
.
size
()
>
1
)
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
1
,
infos
.
turn_player
);
core
.
new_ochain_s
.
splice
(
core
.
new_ochain_s
.
end
(),
core
.
tmp_chain
);
}
else
{
}
else
{
if
(
core
.
ntpchain
.
size
()
>
1
)
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
0
,
infos
.
turn_player
);
}
...
...
@@ -1879,15 +1876,14 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
else
act
=
false
;
}
else
act
=
false
;
if
(
act
){
if
(
act
)
{
if
(
tp
==
core
.
current_player
)
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
peffect
->
handler
,
tp
,
0
);
else
{
else
{
core
.
tmp_chain
.
push_back
(
*
clit
);
returns
.
ivalue
[
0
]
=
FALSE
;
}
}
else
returns
.
ivalue
[
0
]
=
FALSE
;
}
else
returns
.
ivalue
[
0
]
=
FALSE
;
return
FALSE
;
}
case
6
:
{
...
...
@@ -1965,14 +1961,13 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
return
FALSE
;
}
case
7
:
{
if
(
core
.
current_player
==
infos
.
turn_player
){
if
(
core
.
current_player
==
infos
.
turn_player
)
{
core
.
new_chains
.
splice
(
core
.
new_chains
.
end
(),
core
.
tpchain
);
if
(
core
.
new_chains
.
size
())
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
core
.
current_player
=
1
-
infos
.
turn_player
;
core
.
current_player
=
1
-
infos
.
turn_player
;
core
.
units
.
begin
()
->
step
=
4
;
}
else
{
}
else
{
core
.
new_chains
.
splice
(
core
.
new_chains
.
end
(),
core
.
ntpchain
);
if
(
core
.
new_chains
.
size
())
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
...
...
@@ -4029,7 +4024,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
core
.
flipsummon_state_count
[
p
]
=
0
;
core
.
spsummon_state_count
[
p
]
=
0
;
core
.
spsummon_state_count_rst
[
p
]
=
0
;
core
.
spsummon_rst
=
false
;
core
.
spsummon_rst
=
false
;
core
.
attack_state_count
[
p
]
=
0
;
core
.
battle_phase_count
[
p
]
=
0
;
core
.
summon_count
[
p
]
=
0
;
...
...
@@ -4040,17 +4035,17 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
for
(
auto
rit
=
effects
.
rechargeable
.
begin
();
rit
!=
effects
.
rechargeable
.
end
();
++
rit
)
if
(
!
((
*
rit
)
->
flag
&
EFFECT_FLAG_NO_TURN_RESET
))
(
*
rit
)
->
recharge
();
for
(
auto
iter
=
core
.
summon_counter
.
begin
();
iter
!=
core
.
summon_counter
.
end
();
++
iter
)
for
(
auto
iter
=
core
.
summon_counter
.
begin
();
iter
!=
core
.
summon_counter
.
end
();
++
iter
)
iter
->
second
.
second
=
0
;
for
(
auto
iter
=
core
.
normalsummon_counter
.
begin
();
iter
!=
core
.
normalsummon_counter
.
end
();
++
iter
)
for
(
auto
iter
=
core
.
normalsummon_counter
.
begin
();
iter
!=
core
.
normalsummon_counter
.
end
();
++
iter
)
iter
->
second
.
second
=
0
;
for
(
auto
iter
=
core
.
spsummon_counter
.
begin
();
iter
!=
core
.
spsummon_counter
.
end
();
++
iter
)
for
(
auto
iter
=
core
.
spsummon_counter
.
begin
();
iter
!=
core
.
spsummon_counter
.
end
();
++
iter
)
iter
->
second
.
second
=
0
;
for
(
auto
iter
=
core
.
flipsummon_counter
.
begin
();
iter
!=
core
.
flipsummon_counter
.
end
();
++
iter
)
for
(
auto
iter
=
core
.
flipsummon_counter
.
begin
();
iter
!=
core
.
flipsummon_counter
.
end
();
++
iter
)
iter
->
second
.
second
=
0
;
for
(
auto
iter
=
core
.
attack_counter
.
begin
();
iter
!=
core
.
attack_counter
.
end
();
++
iter
)
for
(
auto
iter
=
core
.
attack_counter
.
begin
();
iter
!=
core
.
attack_counter
.
end
();
++
iter
)
iter
->
second
.
second
=
0
;
for
(
auto
iter
=
core
.
chain_counter
.
begin
();
iter
!=
core
.
chain_counter
.
end
();
++
iter
)
for
(
auto
iter
=
core
.
chain_counter
.
begin
();
iter
!=
core
.
chain_counter
.
end
();
++
iter
)
iter
->
second
.
second
=
0
;
if
(
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_COUNT
)
{
for
(
auto
iter
=
effects
.
spsummon_count_eff
.
begin
();
iter
!=
effects
.
spsummon_count_eff
.
end
();
++
iter
)
{
...
...
@@ -4445,29 +4440,28 @@ int32 field::add_chain(uint16 step) {
}
core
.
phase_action
=
TRUE
;
if
(
clit
.
opinfos
.
count
(
0x200
))
{
core
.
spsummon_rst
=
true
;
core
.
spsummon_rst
=
true
;
set_spsummon_counter
(
clit
.
triggering_player
,
true
,
true
);
if
(
clit
.
opinfos
[
0x200
].
op_player
==
PLAYER_ALL
)
set_spsummon_counter
(
1
-
clit
.
triggering_player
,
true
,
true
);
set_spsummon_counter
(
1
-
clit
.
triggering_player
,
true
,
true
);
if
((
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_ONCE
)
&&
(
peffect
->
flag
&
EFFECT_FLAG_CARD_TARGET
))
{
auto
&
optarget
=
clit
.
opinfos
[
0x200
];
if
(
optarget
.
op_cards
){
if
(
optarget
.
op_player
==
PLAYER_ALL
){
auto
spcard
=
optarget
.
op_cards
->
container
.
begin
();
uint32
plr
=
optarget
.
op_param
;
if
((
*
spcard
)
->
spsummon_code
){
if
(
optarget
.
op_cards
)
{
if
(
optarget
.
op_player
==
PLAYER_ALL
)
{
auto
spcard
=
optarget
.
op_cards
->
container
.
begin
();
uint32
plr
=
optarget
.
op_param
;
if
((
*
spcard
)
->
spsummon_code
)
{
core
.
spsummon_once_map
[
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
core
.
spsummon_once_map_rst
[
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
}
++
spcard
;
if
((
*
spcard
)
->
spsummon_code
){
core
.
spsummon_once_map
[
1
-
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
core
.
spsummon_once_map_rst
[
1
-
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
if
((
*
spcard
)
->
spsummon_code
)
{
core
.
spsummon_once_map
[
1
-
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
core
.
spsummon_once_map_rst
[
1
-
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
}
}
else
{
}
else
{
for
(
auto
spcard
=
optarget
.
op_cards
->
container
.
begin
();
spcard
!=
optarget
.
op_cards
->
container
.
end
();
++
spcard
)
{
if
((
*
spcard
)
->
spsummon_code
){
if
((
*
spcard
)
->
spsummon_code
)
{
core
.
spsummon_once_map
[
clit
.
triggering_player
][(
*
spcard
)
->
spsummon_code
]
++
;
core
.
spsummon_once_map_rst
[
clit
.
triggering_player
][(
*
spcard
)
->
spsummon_code
]
++
;
}
...
...
@@ -4585,17 +4579,17 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
chain_array
::
reverse_iterator
cait
=
core
.
current_chain
.
rbegin
();
switch
(
step
)
{
case
0
:
{
if
(
core
.
spsummon_rst
){
if
(
core
.
spsummon_rst
)
{
set_spsummon_counter
(
0
,
false
,
true
);
set_spsummon_counter
(
1
,
false
,
true
);
for
(
int
plr
=
0
;
plr
<=
1
;
++
plr
)
{
for
(
auto
iter
=
core
.
spsummon_once_map
[
plr
].
begin
();
iter
!=
core
.
spsummon_once_map
[
plr
].
end
();
++
iter
){
auto
spcode
=
iter
->
first
;
core
.
spsummon_once_map
[
plr
][
spcode
]
-=
core
.
spsummon_once_map_rst
[
plr
][
spcode
];
core
.
spsummon_once_map_rst
[
plr
][
spcode
]
=
0
;
for
(
int
plr
=
0
;
plr
<=
1
;
++
plr
)
{
for
(
auto
iter
=
core
.
spsummon_once_map
[
plr
].
begin
();
iter
!=
core
.
spsummon_once_map
[
plr
].
end
();
++
iter
)
{
auto
spcode
=
iter
->
first
;
core
.
spsummon_once_map
[
plr
][
spcode
]
-=
core
.
spsummon_once_map_rst
[
plr
][
spcode
];
core
.
spsummon_once_map_rst
[
plr
][
spcode
]
=
0
;
}
}
core
.
spsummon_rst
=
false
;
core
.
spsummon_rst
=
false
;
}
pduel
->
write_buffer8
(
MSG_CHAIN_SOLVING
);
pduel
->
write_buffer8
(
cait
->
chain_count
);
...
...
@@ -4627,7 +4621,7 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
if((core.global_flag & GLOBALFLAG_SPSUMMON_ONCE) && (peffect->flag & EFFECT_FLAG_CARD_TARGET)) {
auto& optarget = cait->opinfos[0x200];
if(optarget.op_cards) {
for(auto spcard = optarget.op_cards->container.begin(); spcard
!=
optarget.op_cards->container.end(); ++spcard) {
for(auto spcard = optarget.op_cards->container.begin(); spcard
!=
optarget.op_cards->container.end(); ++spcard) {
if((*spcard)->spsummon_code) {
uint8 sumpl = optarget.op_player ? 1 : 0;
core.spsummon_once_map[sumpl][(*spcard)->spsummon_code]--;
...
...
@@ -4719,30 +4713,29 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
}
case
4
:
{
if
(
core
.
units
.
begin
()
->
peffect
==
0
){
if
(
cait
->
opinfos
.
count
(
0x200
)){
if
(
cait
->
opinfos
.
count
(
0x200
))
{
if
(
core
.
spsummon_state_count_tmp
[
cait
->
triggering_player
]
==
core
.
spsummon_state_count
[
cait
->
triggering_player
])
set_spsummon_counter
(
cait
->
triggering_player
);
if
(
cait
->
opinfos
[
0x200
].
op_player
==
PLAYER_ALL
&&
core
.
spsummon_state_count_tmp
[
1
-
cait
->
triggering_player
]
==
core
.
spsummon_state_count
[
1
-
cait
->
triggering_player
])
set_spsummon_counter
(
1
-
cait
->
triggering_player
);
if
(
cait
->
opinfos
[
0x200
].
op_player
==
PLAYER_ALL
&&
core
.
spsummon_state_count_tmp
[
1
-
cait
->
triggering_player
]
==
core
.
spsummon_state_count
[
1
-
cait
->
triggering_player
])
set_spsummon_counter
(
1
-
cait
->
triggering_player
);
//sometimes it may add twice, only works for once per turn
if
(
cait
->
triggering_effect
->
flag
&
EFFECT_FLAG_CARD_TARGET
)
{
auto
&
optarget
=
cait
->
opinfos
[
0x200
];
if
(
optarget
.
op_cards
){
if
(
optarget
.
op_player
==
PLAYER_ALL
){
auto
spcard
=
optarget
.
op_cards
->
container
.
begin
();
uint32
plr
=
optarget
.
op_param
;
if
((
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_ONCE
)
&&
(
*
spcard
)
->
spsummon_code
){
if
(
optarget
.
op_cards
)
{
if
(
optarget
.
op_player
==
PLAYER_ALL
)
{
auto
spcard
=
optarget
.
op_cards
->
container
.
begin
();
uint32
plr
=
optarget
.
op_param
;
if
((
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_ONCE
)
&&
(
*
spcard
)
->
spsummon_code
)
{
core
.
spsummon_once_map
[
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
++
spcard
;
core
.
spsummon_once_map
[
1
-
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
core
.
spsummon_once_map
[
1
-
plr
][(
*
spcard
)
->
spsummon_code
]
++
;
}
spcard
=
optarget
.
op_cards
->
container
.
begin
();
spcard
=
optarget
.
op_cards
->
container
.
begin
();
check_card_counter
(
*
spcard
,
3
,
plr
);
++
spcard
;
check_card_counter
(
*
spcard
,
3
,
1
-
plr
);
}
else
{
for
(
auto
spcard
=
optarget
.
op_cards
->
container
.
begin
();
spcard
!=
optarget
.
op_cards
->
container
.
end
();
++
spcard
)
{
check_card_counter
(
*
spcard
,
3
,
1
-
plr
);
}
else
{
for
(
auto
spcard
=
optarget
.
op_cards
->
container
.
begin
();
spcard
!=
optarget
.
op_cards
->
container
.
end
();
++
spcard
)
{
if
((
core
.
global_flag
&
GLOBALFLAG_SPSUMMON_ONCE
)
&&
(
*
spcard
)
->
spsummon_code
)
core
.
spsummon_once_map
[
cait
->
triggering_player
][(
*
spcard
)
->
spsummon_code
]
++
;
check_card_counter
(
*
spcard
,
3
,
cait
->
triggering_player
);
...
...
@@ -4752,8 +4745,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
}
}
}
core
.
spsummon_state_count_tmp
[
0
]
=
0
;
core
.
spsummon_state_count_tmp
[
1
]
=
0
;
core
.
spsummon_state_count_tmp
[
0
]
=
0
;
core
.
spsummon_state_count_tmp
[
1
]
=
0
;
core
.
chain_solving
=
FALSE
;
effect_vector
::
iterator
eit
;
event_list
::
iterator
evit
;
...
...
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