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
da2d7dc2
Commit
da2d7dc2
authored
Jan 02, 2020
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make some numbers intuitive
card types, location, reset
parent
9a1c407d
Changes
4
Show 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 @
da2d7dc2
...
...
@@ -47,7 +47,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
}
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
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
...
...
@@ -1841,9 +1841,11 @@ void card::reset(uint32 id, uint32 reset_type) {
if
(
rrm
->
second
&
0xffff0000
&
id
)
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
();
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
();
announced_cards
.
clear
();
attacked_cards
.
clear
();
...
...
@@ -1852,17 +1854,20 @@ void card::reset(uint32 id, uint32 reset_type) {
attacked_count
=
0
;
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
();
reset_effect_count
();
auto
pr
=
field_effect
.
equal_range
(
EFFECT_DISABLE_FIELD
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
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
();
}
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
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
pr
.
first
->
second
->
value
=
pr
.
first
->
second
->
value
&
0xffff
;
...
...
@@ -3094,7 +3099,8 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
if
(
current
.
location
==
LOCATION_REMOVED
&&
(
current
.
position
&
POS_FACEDOWN
))
return
FALSE
;
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
;
if
(
!
nolimit
&&
(
data
.
type
&
TYPE_PENDULUM
)
&&
current
.
location
==
LOCATION_EXTRA
&&
(
current
.
position
&
POS_FACEUP
))
return
FALSE
;
...
...
libduel.cpp
View file @
da2d7dc2
...
...
@@ -2080,9 +2080,9 @@ int32 scriptlib::duel_get_chain_info(lua_State *L) {
lua_pushinteger
(
L
,
ch
->
chain_id
);
break
;
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
);
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
;
case
CHAININFO_EXTTYPE
:
lua_pushinteger
(
L
,
ch
->
triggering_effect
->
card_type
);
...
...
ocgapi.cpp
View file @
da2d7dc2
...
...
@@ -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
)
{
duel
*
ptduel
=
(
duel
*
)
pduel
;
if
(
owner
>
1
||
!
(
location
&
0x41
))
if
(
owner
>
1
||
!
(
location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
)
))
return
;
card
*
pcard
=
ptduel
->
new_card
(
code
);
switch
(
location
)
{
...
...
processor.cpp
View file @
da2d7dc2
...
...
@@ -3910,7 +3910,7 @@ int32 field::add_chain(uint16 step) {
luaL_unref
(
pduel
->
lua
->
lua_state
,
LUA_REGISTRYINDEX
,
ch_lim
.
function
);
core
.
chain_limit
.
clear
();
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
->
set_active_type
();
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