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
nanahira
ygopro
Commits
9e6ec88e
Commit
9e6ec88e
authored
Aug 25, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e7399c5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
2 deletions
+54
-2
ocgcore/playerop.cpp
ocgcore/playerop.cpp
+2
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+52
-2
No files found.
ocgcore/playerop.cpp
View file @
9e6ec88e
...
...
@@ -307,6 +307,8 @@ int32 field::select_chain(uint16 step, uint8 playerid, uint8 spe_count, uint8 fo
for
(
uint32
i
=
0
;
i
<
core
.
select_chains
.
size
();
++
i
)
{
effect
*
peffect
=
core
.
select_chains
[
i
].
triggering_effect
;
card
*
pcard
=
peffect
->
handler
;
if
(
!
(
peffect
->
type
&
EFFECT_TYPE_ACTIONS
))
pcard
=
peffect
->
owner
;
if
(
peffect
->
flag
&
EFFECT_FLAG_FIELD_ONLY
)
pduel
->
write_buffer32
(
1000000000
+
pcard
->
data
.
code
);
else
...
...
ocgcore/processor.cpp
View file @
9e6ec88e
...
...
@@ -1350,6 +1350,24 @@ int32 field::process_phase_event(int16 step, int32 phase) {
core.select_chains.push_back(newchain);
cn_count++;
}
for(auto eit = effects.pheff.begin(); eit != effects.pheff.end(); ++eit) {
peffect = *eit;
if(peffect->code != EFFECT_SET_CONTROL)
continue;
if(peffect->get_owner_player() != check_player)
continue;
if(!(peffect->reset_flag & phase))
continue;
uint8 pid = peffect->get_handler_player();
uint8 tp = infos.turn_player;
if(!(((peffect->reset_flag & RESET_SELF_TURN) && pid == tp) || ((peffect->reset_flag & RESET_OPPO_TURN) && pid != tp)))
continue;
if((peffect->reset_count & 0xff) != 1)
continue;
newchain.triggering_effect = peffect;
core.select_chains.push_back(newchain);
cn_count++;
}
core.spe_effect[check_player] = 0;
if(!core.hand_adjusted) {
pr = effects.trigger_o_effect.equal_range(phase_event);
...
...
@@ -1449,7 +1467,14 @@ int32 field::process_phase_event(int16 step, int32 phase) {
core.units.begin()->arg2 = 2;
newchain = core.select_chains[returns.ivalue[0]];
effect* peffect = newchain.triggering_effect;
if(!(peffect->type & EFFECT_TYPE_CONTINUOUS)) {
if(!(peffect->type & EFFECT_TYPE_ACTIONS)) {
if(peffect->flag & EFFECT_FLAG_FIELD_ONLY)
remove_effect(peffect);
else
peffect->handler->remove_effect(peffect);
adjust_all();
core.units.begin()->step = 3;
} else if(!(peffect->type & EFFECT_TYPE_CONTINUOUS)) {
newchain.flag = 0;
newchain.chain_id = infos.field_id++;
newchain.evt = nil_event;
...
...
@@ -1521,6 +1546,24 @@ int32 field::process_phase_event(int16 step, int32 phase) {
core.select_chains.push_back(newchain);
cn_count++;
}
for(auto eit = effects.pheff.begin(); eit != effects.pheff.end(); ++eit) {
peffect = *eit;
if(peffect->code != EFFECT_SET_CONTROL)
continue;
if(peffect->get_owner_player() != check_player)
continue;
if(!(peffect->reset_flag & phase))
continue;
uint8 pid = peffect->get_handler_player();
uint8 tp = infos.turn_player;
if(!(((peffect->reset_flag & RESET_SELF_TURN) && pid == tp) || ((peffect->reset_flag & RESET_OPPO_TURN) && pid != tp)))
continue;
if((peffect->reset_count & 0xff) != 1)
continue;
newchain.triggering_effect = peffect;
core.select_chains.push_back(newchain);
cn_count++;
}
core.spe_effect[check_player] = 0;
if(!core.hand_adjusted) {
pr = effects.trigger_o_effect.equal_range(phase_event);
...
...
@@ -1622,7 +1665,14 @@ int32 field::process_phase_event(int16 step, int32 phase) {
core.units.begin()->arg2 = 2;
newchain = core.select_chains[returns.ivalue[0]];
effect* peffect = newchain.triggering_effect;
if(!(peffect->type & EFFECT_TYPE_CONTINUOUS)) {
if(!(peffect->type & EFFECT_TYPE_ACTIONS)) {
if(peffect->flag & EFFECT_FLAG_FIELD_ONLY)
remove_effect(peffect);
else
peffect->handler->remove_effect(peffect);
adjust_all();
core.units.begin()->step = 13;
} else if(!(peffect->type & EFFECT_TYPE_CONTINUOUS)) {
newchain.flag = 0;
newchain.chain_id = infos.field_id++;
newchain.evt = nil_event;
...
...
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