Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
a90c625e
Commit
a90c625e
authored
Jan 03, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
86a64f83
da2d7dc2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
11 deletions
+17
-11
card.cpp
card.cpp
+13
-7
libduel.cpp
libduel.cpp
+2
-2
ocgapi.cpp
ocgapi.cpp
+1
-1
processor.cpp
processor.cpp
+1
-1
No files found.
card.cpp
View file @
a90c625e
...
@@ -92,7 +92,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
...
@@ -92,7 +92,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
;
...
@@ -1951,9 +1951,11 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -1951,9 +1951,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
();
...
@@ -1963,17 +1965,20 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -1963,17 +1965,20 @@ void card::reset(uint32 id, uint32 reset_type) {
removed_overlay_count
=
0
;
removed_overlay_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
;
...
@@ -3205,7 +3210,8 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
...
@@ -3205,7 +3210,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
;
...
...
libduel.cpp
View file @
a90c625e
...
@@ -2318,9 +2318,9 @@ int32 scriptlib::duel_get_chain_info(lua_State *L) {
...
@@ -2318,9 +2318,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
);
...
...
ocgapi.cpp
View file @
a90c625e
...
@@ -158,7 +158,7 @@ extern "C" DECL_DLLEXPORT void new_card(ptr pduel, uint32 code, uint8 owner, uin
...
@@ -158,7 +158,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
)
{
...
...
processor.cpp
View file @
a90c625e
...
@@ -3927,7 +3927,7 @@ int32 field::add_chain(uint16 step) {
...
@@ -3927,7 +3927,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
;
...
...
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