Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
22f3ed54
Commit
22f3ed54
authored
May 27, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
3c34ed0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
23 deletions
+38
-23
Classes/ocgcore/field.h
Classes/ocgcore/field.h
+1
-1
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+34
-18
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+3
-4
No files found.
Classes/ocgcore/field.h
View file @
22f3ed54
...
@@ -192,7 +192,7 @@ struct processor {
...
@@ -192,7 +192,7 @@ struct processor {
event_list
sub_solving_event
;
event_list
sub_solving_event
;
chain_array
select_chains
;
chain_array
select_chains
;
chain_array
current_chain
;
chain_array
current_chain
;
chain_array
tmp
_chains
;
chain_array
ignition_priority
_chains
;
chain_list
continuous_chain
;
chain_list
continuous_chain
;
chain_list
solving_continuous
;
chain_list
solving_continuous
;
chain_list
sub_solving_continuous
;
chain_list
sub_solving_continuous
;
...
...
Classes/ocgcore/operations.cpp
View file @
22f3ed54
...
@@ -683,7 +683,7 @@ int32 field::remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplay
...
@@ -683,7 +683,7 @@ int32 field::remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplay
if
(
core
.
select_options
.
size
()
==
1
)
if
(
core
.
select_options
.
size
()
==
1
)
returns
.
ivalue
[
0
]
=
0
;
returns
.
ivalue
[
0
]
=
0
;
else
if
(
core
.
select_effects
[
0
]
==
0
&&
core
.
select_effects
.
size
()
==
2
)
else
if
(
core
.
select_effects
[
0
]
==
0
&&
core
.
select_effects
.
size
()
==
2
)
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_effects
[
1
]
->
handler
,
rplayer
,
2
19
);
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_effects
[
1
]
->
handler
,
rplayer
,
2
20
);
else
else
add_process
(
PROCESSOR_SELECT_OPTION
,
0
,
0
,
0
,
rplayer
,
0
);
add_process
(
PROCESSOR_SELECT_OPTION
,
0
,
0
,
0
,
rplayer
,
0
);
return
FALSE
;
return
FALSE
;
...
@@ -759,7 +759,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
...
@@ -759,7 +759,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
if
(
core
.
select_options
.
size
()
==
1
)
if
(
core
.
select_options
.
size
()
==
1
)
returns
.
ivalue
[
0
]
=
0
;
returns
.
ivalue
[
0
]
=
0
;
else
if
(
core
.
select_effects
[
0
]
==
0
&&
core
.
select_effects
.
size
()
==
2
)
else
if
(
core
.
select_effects
[
0
]
==
0
&&
core
.
select_effects
.
size
()
==
2
)
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_effects
[
1
]
->
handler
,
rplayer
,
2
20
);
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
core
.
select_effects
[
1
]
->
handler
,
rplayer
,
2
19
);
else
else
add_process
(
PROCESSOR_SELECT_OPTION
,
0
,
0
,
0
,
rplayer
,
0
);
add_process
(
PROCESSOR_SELECT_OPTION
,
0
,
0
,
0
,
rplayer
,
0
);
return
FALSE
;
return
FALSE
;
...
@@ -5944,16 +5944,19 @@ int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player,
...
@@ -5944,16 +5944,19 @@ int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player,
effect
*
peffect
=
0
;
effect
*
peffect
=
0
;
tevent
e
;
tevent
e
;
e
.
event_cards
=
0
;
e
.
event_cards
=
0
;
e
.
reason_effect
=
core
.
reason_effect
;
e
.
reason_player
=
core
.
reason_player
;
e
.
event_player
=
playerid
;
e
.
event_player
=
playerid
;
e
.
event_value
=
count
;
e
.
event_value
=
count
;
e
.
reason
=
0
;
e
.
reason_effect
=
reason_effect
;
e
.
reason_player
=
reason_player
;
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
core
.
coin_result
[
i
]
=
0
;
core
.
coin_result
[
i
]
=
0
;
filter_field_effect
(
EFFECT_TOSS_COIN_REPLACE
,
&
eset
);
auto
pr
=
effects
.
continuous_effect
.
equal_range
(
EFFECT_TOSS_COIN_REPLACE
);
for
(
int32
i
=
eset
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
auto
eit
=
pr
.
first
;
eit
!=
pr
.
second
;)
{
if
(
eset
[
i
]
->
is_activateable
(
eset
[
i
]
->
get_handler_player
(),
e
))
{
effect
*
pe
=
eit
->
second
;
peffect
=
eset
[
i
];
++
eit
;
if
(
pe
->
is_activateable
(
pe
->
get_handler_player
(),
e
))
{
peffect
=
pe
;
break
;
break
;
}
}
}
}
...
@@ -5967,17 +5970,22 @@ int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player,
...
@@ -5967,17 +5970,22 @@ int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player,
}
}
raise_event
((
card
*
)
0
,
EVENT_TOSS_COIN_NEGATE
,
reason_effect
,
0
,
reason_player
,
playerid
,
count
);
raise_event
((
card
*
)
0
,
EVENT_TOSS_COIN_NEGATE
,
reason_effect
,
0
,
reason_player
,
playerid
,
count
);
process_instant_event
();
process_instant_event
();
return
FALSE
;
}
else
{
}
else
{
solve_continuous
(
peffect
->
get_handler_player
(),
peffect
,
e
);
solve_continuous
(
peffect
->
get_handler_player
(),
peffect
,
e
);
return
TRUE
;
core
.
units
.
begin
()
->
step
=
1
;
}
}
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
raise_event
((
card
*
)
0
,
EVENT_TOSS_COIN
,
reason_effect
,
0
,
reason_player
,
playerid
,
count
);
raise_event
((
card
*
)
0
,
EVENT_TOSS_COIN
,
reason_effect
,
0
,
reason_player
,
playerid
,
count
);
process_instant_event
();
process_instant_event
();
return
TRUE
;
return
TRUE
;
}
}
case
2
:
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
core
.
coin_result
[
i
]
=
(
returns
.
ivalue
[
0
]
>>
(
i
*
4
))
&
0xf
;
return
TRUE
;
}
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -5988,16 +5996,19 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
...
@@ -5988,16 +5996,19 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
effect
*
peffect
=
0
;
effect
*
peffect
=
0
;
tevent
e
;
tevent
e
;
e
.
event_cards
=
0
;
e
.
event_cards
=
0
;
e
.
reason_effect
=
core
.
reason_effect
;
e
.
reason_player
=
core
.
reason_player
;
e
.
event_player
=
playerid
;
e
.
event_player
=
playerid
;
e
.
event_value
=
count1
+
(
count2
<<
16
);
e
.
event_value
=
count1
+
(
count2
<<
16
);
e
.
reason
=
0
;
e
.
reason_effect
=
reason_effect
;
e
.
reason_player
=
reason_player
;
for
(
int32
i
=
0
;
i
<
5
;
++
i
)
for
(
int32
i
=
0
;
i
<
5
;
++
i
)
core
.
dice_result
[
i
]
=
0
;
core
.
dice_result
[
i
]
=
0
;
filter_field_effect
(
EFFECT_TOSS_DICE_REPLACE
,
&
eset
);
auto
pr
=
effects
.
continuous_effect
.
equal_range
(
EFFECT_TOSS_DICE_REPLACE
);
for
(
int32
i
=
eset
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
auto
eit
=
pr
.
first
;
eit
!=
pr
.
second
;)
{
if
(
eset
[
i
]
->
is_activateable
(
eset
[
i
]
->
get_handler_player
(),
e
))
{
effect
*
pe
=
eit
->
second
;
peffect
=
eset
[
i
];
++
eit
;
if
(
pe
->
is_activateable
(
pe
->
get_handler_player
(),
e
))
{
peffect
=
pe
;
break
;
break
;
}
}
}
}
...
@@ -6020,17 +6031,22 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
...
@@ -6020,17 +6031,22 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
}
}
raise_event
((
card
*
)
0
,
EVENT_TOSS_DICE_NEGATE
,
reason_effect
,
0
,
reason_player
,
playerid
,
count1
+
(
count2
<<
16
));
raise_event
((
card
*
)
0
,
EVENT_TOSS_DICE_NEGATE
,
reason_effect
,
0
,
reason_player
,
playerid
,
count1
+
(
count2
<<
16
));
process_instant_event
();
process_instant_event
();
return
FALSE
;
}
else
{
}
else
{
solve_continuous
(
peffect
->
get_handler_player
(),
peffect
,
e
);
solve_continuous
(
peffect
->
get_handler_player
(),
peffect
,
e
);
return
TRUE
;
core
.
units
.
begin
()
->
step
=
1
;
}
}
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
raise_event
((
card
*
)
0
,
EVENT_TOSS_DICE
,
reason_effect
,
0
,
reason_player
,
playerid
,
count1
+
(
count2
<<
16
));
raise_event
((
card
*
)
0
,
EVENT_TOSS_DICE
,
reason_effect
,
0
,
reason_player
,
playerid
,
count1
+
(
count2
<<
16
));
process_instant_event
();
process_instant_event
();
return
TRUE
;
return
TRUE
;
}
}
case
2
:
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
core
.
dice_result
[
i
]
=
(
returns
.
ivalue
[
0
]
>>
(
i
*
4
))
&
0xf
;
return
TRUE
;
}
}
}
return
TRUE
;
return
TRUE
;
}
}
...
...
Classes/ocgcore/processor.cpp
View file @
22f3ed54
...
@@ -1646,7 +1646,6 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1646,7 +1646,6 @@ int32 field::process_phase_event(int16 step, int32 phase) {
}
}
return
TRUE
;
return
TRUE
;
}
}
// core.tmp_chains: used in step 8 (obsolete ignition effect ruling)
int32
field
::
process_point_event
(
int16
step
,
int32
skip_trigger
,
int32
skip_freechain
,
int32
skip_new
)
{
int32
field
::
process_point_event
(
int16
step
,
int32
skip_trigger
,
int32
skip_freechain
,
int32
skip_new
)
{
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
...
@@ -1824,7 +1823,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
...
@@ -1824,7 +1823,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
newchain
.
triggering_effect
=
peffect
;
newchain
.
triggering_effect
=
peffect
;
newchain
.
set_triggering_state
(
phandler
);
newchain
.
set_triggering_state
(
phandler
);
newchain
.
triggering_player
=
infos
.
turn_player
;
newchain
.
triggering_player
=
infos
.
turn_player
;
core
.
tmp
_chains
.
push_back
(
newchain
);
core
.
ignition_priority
_chains
.
push_back
(
newchain
);
}
}
}
}
}
}
...
@@ -1983,8 +1982,8 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
...
@@ -1983,8 +1982,8 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
}
}
case
2
:
{
case
2
:
{
chain
newchain
;
chain
newchain
;
if
(
core
.
tmp
_chains
.
size
())
if
(
core
.
ignition_priority
_chains
.
size
())
core
.
select_chains
.
swap
(
core
.
tmp
_chains
);
core
.
select_chains
.
swap
(
core
.
ignition_priority
_chains
);
for
(
auto
evit
=
core
.
point_event
.
begin
();
evit
!=
core
.
instant_event
.
end
();
++
evit
)
{
for
(
auto
evit
=
core
.
point_event
.
begin
();
evit
!=
core
.
instant_event
.
end
();
++
evit
)
{
if
(
evit
==
core
.
point_event
.
end
())
if
(
evit
==
core
.
point_event
.
end
())
evit
=
core
.
instant_event
.
begin
();
evit
=
core
.
instant_event
.
begin
();
...
...
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