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
c49a463f
Commit
c49a463f
authored
Mar 14, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8687a6ab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
effect.cpp
effect.cpp
+3
-2
field.cpp
field.cpp
+3
-3
processor.cpp
processor.cpp
+15
-3
No files found.
effect.cpp
View file @
c49a463f
...
@@ -192,7 +192,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -192,7 +192,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
(
handler
->
data
.
type
&
TYPE_MONSTER
)
{
if
(
handler
->
data
.
type
&
TYPE_MONSTER
)
{
if
(
!
(
handler
->
data
.
type
&
TYPE_PENDULUM
))
if
(
!
(
handler
->
data
.
type
&
TYPE_PENDULUM
))
return
FALSE
;
return
FALSE
;
if
(
pduel
->
game_field
->
player
[
playerid
].
list_szone
[
6
]
&&
pduel
->
game_field
->
player
[
playerid
].
list_szone
[
7
])
if
(
!
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_SZONE
,
6
)
&&
!
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_SZONE
,
7
))
return
FALSE
;
return
FALSE
;
}
else
if
(
!
(
handler
->
data
.
type
&
TYPE_FIELD
)
}
else
if
(
!
(
handler
->
data
.
type
&
TYPE_FIELD
)
&&
pduel
->
game_field
->
get_useable_count
(
playerid
,
LOCATION_SZONE
,
playerid
,
LOCATION_REASON_TOFIELD
)
<=
0
)
&&
pduel
->
game_field
->
get_useable_count
(
playerid
,
LOCATION_SZONE
,
playerid
,
LOCATION_REASON_TOFIELD
)
<=
0
)
...
...
field.cpp
View file @
c49a463f
...
@@ -484,7 +484,7 @@ card* field::get_field_card(uint8 playerid, uint8 location, uint8 sequence) {
...
@@ -484,7 +484,7 @@ card* field::get_field_card(uint8 playerid, uint8 location, uint8 sequence) {
int32
field
::
is_location_useable
(
uint8
playerid
,
uint8
location
,
uint8
sequence
)
{
int32
field
::
is_location_useable
(
uint8
playerid
,
uint8
location
,
uint8
sequence
)
{
if
(
location
!=
LOCATION_MZONE
&&
location
!=
LOCATION_SZONE
)
if
(
location
!=
LOCATION_MZONE
&&
location
!=
LOCATION_SZONE
)
return
TRUE
;
return
TRUE
;
int32
flag
=
player
[
playerid
].
disabled_location
|
player
[
playerid
].
used_location
;
u
int32
flag
=
player
[
playerid
].
disabled_location
|
player
[
playerid
].
used_location
;
if
(
location
==
LOCATION_MZONE
&&
flag
&
(
0x1u
<<
sequence
))
if
(
location
==
LOCATION_MZONE
&&
flag
&
(
0x1u
<<
sequence
))
return
FALSE
;
return
FALSE
;
if
(
location
==
LOCATION_SZONE
&&
flag
&
(
0x100u
<<
sequence
))
if
(
location
==
LOCATION_SZONE
&&
flag
&
(
0x100u
<<
sequence
))
...
@@ -506,8 +506,8 @@ int32 field::get_useable_count(uint8 playerid, uint8 location, uint8 uplayer, ui
...
@@ -506,8 +506,8 @@ int32 field::get_useable_count(uint8 playerid, uint8 location, uint8 uplayer, ui
if
(
uplayer
<
2
)
if
(
uplayer
<
2
)
filter_player_effect
(
playerid
,
EFFECT_MAX_MZONE
,
&
eset
);
filter_player_effect
(
playerid
,
EFFECT_MAX_MZONE
,
&
eset
);
}
else
{
}
else
{
flag
=
(
flag
&
0x1f00
)
>>
8
;
flag
=
(
flag
>>
8
)
&
0x1f
;
used_flag
=
(
used_flag
&
0x1f00
)
>>
8
;
used_flag
=
(
used_flag
>>
8
)
&
0x1f
;
if
(
uplayer
<
2
)
if
(
uplayer
<
2
)
filter_player_effect
(
playerid
,
EFFECT_MAX_SZONE
,
&
eset
);
filter_player_effect
(
playerid
,
EFFECT_MAX_SZONE
,
&
eset
);
}
}
...
...
processor.cpp
View file @
c49a463f
...
@@ -4821,9 +4821,15 @@ void field::adjust_all() {
...
@@ -4821,9 +4821,15 @@ void field::adjust_all() {
void
field
::
refresh_location_info_instant
()
{
void
field
::
refresh_location_info_instant
()
{
effect_set
eset
;
effect_set
eset
;
uint32
value
,
p
;
uint32
value
,
p
;
int32
dis1
=
player
[
0
].
disabled_location
|
(
player
[
1
].
disabled_location
<<
16
);
u
int32
dis1
=
player
[
0
].
disabled_location
|
(
player
[
1
].
disabled_location
<<
16
);
player
[
0
].
disabled_location
=
0
;
player
[
0
].
disabled_location
=
0
;
player
[
1
].
disabled_location
=
0
;
player
[
1
].
disabled_location
=
0
;
if
(
core
.
duel_rule
>=
4
)
{
uint32
loc
=
player
[
0
].
used_location
;
player
[
0
].
disabled_location
=
((
loc
&
0x100
)
<<
6
)
|
((
loc
&
0x1000
)
<<
3
)
|
((
loc
>>
6
)
&
0x100
)
|
((
loc
>>
3
)
&
0x1000
);
loc
=
player
[
1
].
used_location
;
player
[
1
].
disabled_location
=
((
loc
&
0x100
)
<<
6
)
|
((
loc
&
0x1000
)
<<
3
)
|
((
loc
>>
6
)
&
0x100
)
|
((
loc
>>
3
)
&
0x1000
);
}
filter_field_effect
(
EFFECT_DISABLE_FIELD
,
&
eset
);
filter_field_effect
(
EFFECT_DISABLE_FIELD
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
value
=
eset
[
i
]
->
get_value
();
value
=
eset
[
i
]
->
get_value
();
...
@@ -4844,7 +4850,7 @@ void field::refresh_location_info_instant() {
...
@@ -4844,7 +4850,7 @@ void field::refresh_location_info_instant() {
value
=
eset
[
i
]
->
get_value
();
value
=
eset
[
i
]
->
get_value
();
player
[
p
].
disabled_location
|=
(
value
>>
8
)
&
0x1f00
;
player
[
p
].
disabled_location
|=
(
value
>>
8
)
&
0x1f00
;
}
}
int32
dis2
=
player
[
0
].
disabled_location
|
(
player
[
1
].
disabled_location
<<
16
);
u
int32
dis2
=
player
[
0
].
disabled_location
|
(
player
[
1
].
disabled_location
<<
16
);
if
(
dis1
!=
dis2
)
{
if
(
dis1
!=
dis2
)
{
pduel
->
write_buffer8
(
MSG_FIELD_DISABLED
);
pduel
->
write_buffer8
(
MSG_FIELD_DISABLED
);
pduel
->
write_buffer32
(
dis2
);
pduel
->
write_buffer32
(
dis2
);
...
@@ -4859,6 +4865,12 @@ int32 field::refresh_location_info(uint16 step) {
...
@@ -4859,6 +4865,12 @@ int32 field::refresh_location_info(uint16 step) {
core
.
units
.
begin
()
->
arg2
=
player
[
0
].
disabled_location
|
(
player
[
1
].
disabled_location
<<
16
);
core
.
units
.
begin
()
->
arg2
=
player
[
0
].
disabled_location
|
(
player
[
1
].
disabled_location
<<
16
);
player
[
0
].
disabled_location
=
0
;
player
[
0
].
disabled_location
=
0
;
player
[
1
].
disabled_location
=
0
;
player
[
1
].
disabled_location
=
0
;
if
(
core
.
duel_rule
>=
4
)
{
uint32
loc
=
player
[
0
].
used_location
;
player
[
0
].
disabled_location
=
((
loc
&
0x100
)
<<
6
)
|
((
loc
&
0x1000
)
<<
3
)
|
((
loc
>>
6
)
&
0x100
)
|
((
loc
>>
3
)
&
0x1000
);
loc
=
player
[
1
].
used_location
;
player
[
1
].
disabled_location
=
((
loc
&
0x100
)
<<
6
)
|
((
loc
&
0x1000
)
<<
3
)
|
((
loc
>>
6
)
&
0x100
)
|
((
loc
>>
3
)
&
0x1000
);
}
core
.
disfield_effects
.
clear
();
core
.
disfield_effects
.
clear
();
core
.
extram_effects
.
clear
();
core
.
extram_effects
.
clear
();
core
.
extras_effects
.
clear
();
core
.
extras_effects
.
clear
();
...
@@ -4974,7 +4986,7 @@ int32 field::refresh_location_info(uint16 step) {
...
@@ -4974,7 +4986,7 @@ int32 field::refresh_location_info(uint16 step) {
core
.
units
.
begin
()
->
peffect
=
peffect
;
core
.
units
.
begin
()
->
peffect
=
peffect
;
core
.
extras_effects
.
remove_item
(
0
);
core
.
extras_effects
.
remove_item
(
0
);
uint32
p
=
peffect
->
get_handler_player
();
uint32
p
=
peffect
->
get_handler_player
();
uint32
szone_flag
=
((
player
[
p
].
disabled_location
|
player
[
p
].
used_location
)
&
0x1f00
)
>>
8
;
uint32
szone_flag
=
((
player
[
p
].
disabled_location
|
player
[
p
].
used_location
)
>>
8
)
&
0x1f
;
if
(
szone_flag
==
0x1f
)
{
if
(
szone_flag
==
0x1f
)
{
core
.
units
.
begin
()
->
step
=
6
;
core
.
units
.
begin
()
->
step
=
6
;
return
FALSE
;
return
FALSE
;
...
...
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