Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
wyykak
ygopro
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
Expand all
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
This diff is collapsed.
Click to expand it.
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