Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
5b7949b2
Commit
5b7949b2
authored
Jan 02, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
7b60f269
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
11 deletions
+19
-11
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+13
-7
Classes/ocgcore/libduel.cpp
Classes/ocgcore/libduel.cpp
+2
-2
Classes/ocgcore/ocgapi.cpp
Classes/ocgcore/ocgapi.cpp
+1
-1
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+3
-1
No files found.
Classes/ocgcore/card.cpp
View file @
5b7949b2
...
@@ -47,7 +47,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
...
@@ -47,7 +47,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
}
else
{
}
else
{
if
(
c1
->
current
.
location
&
0x71
)
if
(
c1
->
current
.
location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
|
LOCATION_GRAVE
|
LOCATION_REMOVED
)
)
return
c1
->
current
.
sequence
>
c2
->
current
.
sequence
;
return
c1
->
current
.
sequence
>
c2
->
current
.
sequence
;
else
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
...
@@ -1845,9 +1845,11 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -1845,9 +1845,11 @@ void card::reset(uint32 id, uint32 reset_type) {
if
(
rrm
->
second
&
0xffff0000
&
id
)
if
(
rrm
->
second
&
0xffff0000
&
id
)
relations
.
erase
(
rrm
);
relations
.
erase
(
rrm
);
}
}
if
(
id
&
0xc7c0000
)
if
(
id
&
(
RESET_TODECK
|
RESET_TOHAND
|
RESET_TOGRAVE
|
RESET_REMOVE
|
RESET_TEMP_REMOVE
|
RESET_OVERLAY
|
RESET_MSCHANGE
))
clear_relate_effect
();
clear_relate_effect
();
if
(
id
&
0xdfc0000
)
{
if
(
id
&
(
RESET_TODECK
|
RESET_TOHAND
|
RESET_TOGRAVE
|
RESET_REMOVE
|
RESET_TEMP_REMOVE
|
RESET_OVERLAY
|
RESET_MSCHANGE
|
RESET_LEAVE
|
RESET_TOFIELD
))
{
indestructable_effects
.
clear
();
indestructable_effects
.
clear
();
announced_cards
.
clear
();
announced_cards
.
clear
();
attacked_cards
.
clear
();
attacked_cards
.
clear
();
...
@@ -1856,17 +1858,20 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -1856,17 +1858,20 @@ void card::reset(uint32 id, uint32 reset_type) {
attacked_count
=
0
;
attacked_count
=
0
;
attack_all_target
=
TRUE
;
attack_all_target
=
TRUE
;
}
}
if
(
id
&
0xdfe0000
)
{
if
(
id
&
(
RESET_TODECK
|
RESET_TOHAND
|
RESET_TOGRAVE
|
RESET_REMOVE
|
RESET_TEMP_REMOVE
|
RESET_OVERLAY
|
RESET_MSCHANGE
|
RESET_LEAVE
|
RESET_TOFIELD
|
RESET_TURN_SET
))
{
battled_cards
.
clear
();
battled_cards
.
clear
();
reset_effect_count
();
reset_effect_count
();
auto
pr
=
field_effect
.
equal_range
(
EFFECT_DISABLE_FIELD
);
auto
pr
=
field_effect
.
equal_range
(
EFFECT_DISABLE_FIELD
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
pr
.
first
->
second
->
value
=
0
;
pr
.
first
->
second
->
value
=
0
;
}
}
if
(
id
&
0xd7e0000
)
{
if
(
id
&
(
RESET_TODECK
|
RESET_TOHAND
|
RESET_TOGRAVE
|
RESET_REMOVE
|
RESET_TEMP_REMOVE
|
RESET_OVERLAY
|
RESET_MSCHANGE
|
RESET_TOFIELD
|
RESET_TURN_SET
))
{
counters
.
clear
();
counters
.
clear
();
}
}
if
(
id
&
0x3fe0000
)
{
if
(
id
&
(
RESET_TODECK
|
RESET_TOHAND
|
RESET_TOGRAVE
|
RESET_REMOVE
|
RESET_TEMP_REMOVE
|
RESET_LEAVE
|
RESET_TOFIELD
|
RESET_TURN_SET
|
RESET_CONTROL
))
{
auto
pr
=
field_effect
.
equal_range
(
EFFECT_USE_EXTRA_MZONE
);
auto
pr
=
field_effect
.
equal_range
(
EFFECT_USE_EXTRA_MZONE
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
pr
.
first
->
second
->
value
=
pr
.
first
->
second
->
value
&
0xffff
;
pr
.
first
->
second
->
value
=
pr
.
first
->
second
->
value
&
0xffff
;
...
@@ -3098,7 +3103,8 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
...
@@ -3098,7 +3103,8 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
if
(
current
.
location
==
LOCATION_REMOVED
&&
(
current
.
position
&
POS_FACEDOWN
))
if
(
current
.
location
==
LOCATION_REMOVED
&&
(
current
.
position
&
POS_FACEDOWN
))
return
FALSE
;
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_REVIVE_LIMIT
)
&&
!
is_status
(
STATUS_PROC_COMPLETE
))
{
if
(
is_affected_by_effect
(
EFFECT_REVIVE_LIMIT
)
&&
!
is_status
(
STATUS_PROC_COMPLETE
))
{
if
((
!
nolimit
&&
(
current
.
location
&
0x38
))
||
(
!
nocheck
&&
!
nolimit
&&
(
current
.
location
&
0x3
)))
if
((
!
nolimit
&&
(
current
.
location
&
(
LOCATION_GRAVE
|
LOCATION_REMOVED
|
LOCATION_SZONE
)))
||
(
!
nocheck
&&
!
nolimit
&&
(
current
.
location
&
(
LOCATION_DECK
|
LOCATION_HAND
))))
return
FALSE
;
return
FALSE
;
if
(
!
nolimit
&&
(
data
.
type
&
TYPE_PENDULUM
)
&&
current
.
location
==
LOCATION_EXTRA
&&
(
current
.
position
&
POS_FACEUP
))
if
(
!
nolimit
&&
(
data
.
type
&
TYPE_PENDULUM
)
&&
current
.
location
==
LOCATION_EXTRA
&&
(
current
.
position
&
POS_FACEUP
))
return
FALSE
;
return
FALSE
;
...
...
Classes/ocgcore/libduel.cpp
View file @
5b7949b2
...
@@ -2080,9 +2080,9 @@ int32 scriptlib::duel_get_chain_info(lua_State *L) {
...
@@ -2080,9 +2080,9 @@ int32 scriptlib::duel_get_chain_info(lua_State *L) {
lua_pushinteger
(
L
,
ch
->
chain_id
);
lua_pushinteger
(
L
,
ch
->
chain_id
);
break
;
break
;
case
CHAININFO_TYPE
:
case
CHAININFO_TYPE
:
if
((
ch
->
triggering_effect
->
card_type
&
0x7
)
==
(
TYPE_TRAP
|
TYPE_MONSTER
))
if
((
ch
->
triggering_effect
->
card_type
&
(
TYPE_MONSTER
|
TYPE_SPELL
|
TYPE_TRAP
)
)
==
(
TYPE_TRAP
|
TYPE_MONSTER
))
lua_pushinteger
(
L
,
TYPE_MONSTER
);
lua_pushinteger
(
L
,
TYPE_MONSTER
);
else
lua_pushinteger
(
L
,
(
ch
->
triggering_effect
->
card_type
&
0x7
));
else
lua_pushinteger
(
L
,
(
ch
->
triggering_effect
->
card_type
&
(
TYPE_MONSTER
|
TYPE_SPELL
|
TYPE_TRAP
)
));
break
;
break
;
case
CHAININFO_EXTTYPE
:
case
CHAININFO_EXTTYPE
:
lua_pushinteger
(
L
,
ch
->
triggering_effect
->
card_type
);
lua_pushinteger
(
L
,
ch
->
triggering_effect
->
card_type
);
...
...
Classes/ocgcore/ocgapi.cpp
View file @
5b7949b2
...
@@ -153,7 +153,7 @@ extern "C" DECL_DLLEXPORT void new_card(ptr pduel, uint32 code, uint8 owner, uin
...
@@ -153,7 +153,7 @@ extern "C" DECL_DLLEXPORT void new_card(ptr pduel, uint32 code, uint8 owner, uin
}
}
extern
"C"
DECL_DLLEXPORT
void
new_tag_card
(
ptr
pduel
,
uint32
code
,
uint8
owner
,
uint8
location
)
{
extern
"C"
DECL_DLLEXPORT
void
new_tag_card
(
ptr
pduel
,
uint32
code
,
uint8
owner
,
uint8
location
)
{
duel
*
ptduel
=
(
duel
*
)
pduel
;
duel
*
ptduel
=
(
duel
*
)
pduel
;
if
(
owner
>
1
||
!
(
location
&
0x41
))
if
(
owner
>
1
||
!
(
location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
)
))
return
;
return
;
card
*
pcard
=
ptduel
->
new_card
(
code
);
card
*
pcard
=
ptduel
->
new_card
(
code
);
switch
(
location
)
{
switch
(
location
)
{
...
...
Classes/ocgcore/processor.cpp
View file @
5b7949b2
...
@@ -3910,7 +3910,7 @@ int32 field::add_chain(uint16 step) {
...
@@ -3910,7 +3910,7 @@ int32 field::add_chain(uint16 step) {
luaL_unref
(
pduel
->
lua
->
lua_state
,
LUA_REGISTRYINDEX
,
ch_lim
.
function
);
luaL_unref
(
pduel
->
lua
->
lua_state
,
LUA_REGISTRYINDEX
,
ch_lim
.
function
);
core
.
chain_limit
.
clear
();
core
.
chain_limit
.
clear
();
peffect
->
card_type
=
phandler
->
get_type
();
peffect
->
card_type
=
phandler
->
get_type
();
if
((
peffect
->
card_type
&
0x5
)
==
0x5
)
if
((
peffect
->
card_type
&
(
TYPE_TRAP
|
TYPE_MONSTER
))
==
(
TYPE_TRAP
|
TYPE_MONSTER
)
)
peffect
->
card_type
-=
TYPE_TRAP
;
peffect
->
card_type
-=
TYPE_TRAP
;
peffect
->
set_active_type
();
peffect
->
set_active_type
();
peffect
->
active_handler
=
peffect
->
handler
->
overlay_target
;
peffect
->
active_handler
=
peffect
->
handler
->
overlay_target
;
...
@@ -4230,6 +4230,8 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4230,6 +4230,8 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
dec_effect_code
(
peffect
->
count_code
,
cait
->
triggering_player
);
dec_effect_code
(
peffect
->
count_code
,
cait
->
triggering_player
);
}
}
check_chain_counter
(
peffect
,
cait
->
triggering_player
,
cait
->
chain_count
,
true
);
check_chain_counter
(
peffect
,
cait
->
triggering_player
,
cait
->
chain_count
,
true
);
core
.
new_fchain
.
remove_if
([
chaincount
=
cait
->
chain_count
](
chain
ch
)
{
return
ch
.
evt
.
event_code
==
EVENT_CHAINING
&&
ch
.
evt
.
event_value
==
chaincount
;
});
core
.
new_ochain
.
remove_if
([
chaincount
=
cait
->
chain_count
](
chain
ch
)
{
return
ch
.
evt
.
event_code
==
EVENT_CHAINING
&&
ch
.
evt
.
event_value
==
chaincount
;
});
raise_event
((
card
*
)
0
,
EVENT_CHAIN_NEGATED
,
peffect
,
0
,
cait
->
triggering_player
,
cait
->
triggering_player
,
cait
->
chain_count
);
raise_event
((
card
*
)
0
,
EVENT_CHAIN_NEGATED
,
peffect
,
0
,
cait
->
triggering_player
,
cait
->
triggering_player
,
cait
->
chain_count
);
process_instant_event
();
process_instant_event
();
core
.
units
.
begin
()
->
step
=
9
;
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