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
b254f2e1
Commit
b254f2e1
authored
Feb 25, 2014
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #711 from sidschingis/patch-2
fix
parents
1bf27c99
d1561688
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
8 deletions
+46
-8
ocgcore/processor.cpp
ocgcore/processor.cpp
+46
-8
No files found.
ocgcore/processor.cpp
View file @
b254f2e1
...
...
@@ -1934,15 +1934,53 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
core.ntpchain.clear();
if(!core.quick_f_chain.size())
return FALSE;
bool act = true;
for(auto ifit = core.quick_f_chain.begin(); ifit != core.quick_f_chain.end(); ++ifit) {
peffect
=
ifit
->
first
;
if
(
peffect
->
is_chainable
(
ifit
->
second
.
triggering_player
)
&&
peffect
->
handler
->
is_has_relation
(
peffect
))
{
if
(
ifit
->
second
.
triggering_player
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
ifit
->
second
);
else
core
.
ntpchain
.
push_back
(
ifit
->
second
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
}
peffect = ifit->first;
if (ifit->second.triggering_player == infos.turn_player){
act = true;
if (peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) {
for (auto cait = core.ntpchain.begin(); cait != core.ntpchain.end(); ++cait) {
if (cait->triggering_effect->handler->data.code == peffect->handler->data.code) {
act = false;
break;
}
}
for (auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) {
if ((cait->triggering_effect->handler->data.code == peffect->handler->data.code) &&
(cait->triggering_effect->get_owner_player() == infos.turn_player)) {
act = false;
break;
}
}
}
if (act){
core.tpchain.push_back(ifit->second);
peffect->handler->set_status(STATUS_CHAINING, TRUE);
}
}
else{
act = true;
if (peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) {
for (auto cait = core.ntpchain.begin(); cait != core.ntpchain.end(); ++cait) {
if (cait->triggering_effect->handler->data.code == peffect->handler->data.code) {
act = false;
break;
}
}
for (auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) {
if ((cait->triggering_effect->handler->data.code == peffect->handler->data.code) &&
(cait->triggering_effect->get_owner_player() != infos.turn_player)) {
act = false;
break;
}
}
}
if (act){
core.ntpchain.push_back(ifit->second);
peffect->handler->set_status(STATUS_CHAINING, TRUE);
}
}
}
core.quick_f_chain.clear();
if(core.tpchain.size() > 1)
...
...
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