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
e95d9ca2
Commit
e95d9ca2
authored
Dec 23, 2014
by
Argon.Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chain counter
parent
339c1aa3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
ocgcore/field.cpp
ocgcore/field.cpp
+13
-10
ocgcore/field.h
ocgcore/field.h
+1
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+1
-0
No files found.
ocgcore/field.cpp
View file @
e95d9ca2
...
...
@@ -1440,22 +1440,25 @@ void field::check_card_counter(card* pcard, int32 counter_type, int32 playerid)
}
}
}
void
field
::
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
)
{
for
(
auto
iter
=
core
.
chain_counter
.
begin
();
iter
!=
core
.
chain_counter
.
end
();
++
iter
)
{
void
field
::
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
,
bool
cancel
)
{
for
(
auto
iter
=
core
.
chain_counter
.
begin
();
iter
!=
core
.
chain_counter
.
end
();
++
iter
)
{
auto
&
info
=
iter
->
second
;
if
((
playerid
==
0
)
&&
(
info
.
second
&
0xffff
)
!=
0
)
continue
;
if
((
playerid
==
1
)
&&
(
info
.
second
&
0xffff0000
)
!=
0
)
continue
;
if
(
info
.
first
)
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
chainid
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
3
))
{
if
(
playerid
==
0
)
info
.
second
+=
0x1
;
else
info
.
second
+=
0x10000
;
if
(
playerid
==
0
)
{
if
(
!
cancel
)
info
.
second
+=
0x1
;
else
if
(
info
.
second
&
0xffff
)
info
.
second
-=
0x1
;
}
else
{
if
(
!
cancel
)
info
.
second
+=
0x10000
;
else
if
(
info
.
second
&
0xffff0000
)
info
.
second
-=
0x10000
;
}
break
;
}
}
...
...
ocgcore/field.h
View file @
e95d9ca2
...
...
@@ -360,7 +360,7 @@ public:
effect
*
check_unique_onfield
(
card
*
pcard
,
uint8
controler
);
int32
check_spsummon_once
(
card
*
pcard
,
uint8
playerid
);
void
check_card_counter
(
card
*
pcard
,
int32
counter_type
,
int32
playerid
);
void
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
);
void
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
,
bool
cancel
=
false
);
int32
check_lp_cost
(
uint8
playerid
,
uint32
cost
);
void
save_lp_cost
();
...
...
ocgcore/processor.cpp
View file @
e95d9ca2
...
...
@@ -4577,6 +4577,7 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
dec_effect_code(peffect->count_code, cait->triggering_player);
}
}
check_chain_counter(peffect, cait->triggering_player, cait->chain_count, true);
raise_event((card*)0, EVENT_CHAIN_NEGATED, peffect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count);
process_instant_event();
core.units.begin()->step = 9;
...
...
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