Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
b487cb05
Commit
b487cb05
authored
Oct 20, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forcemzone
parent
0650faa5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+21
-2
ocgcore/field.h
ocgcore/field.h
+2
-1
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+1
-1
No files found.
ocgcore/effect.h
View file @
b487cb05
...
...
@@ -381,6 +381,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_USE_EXTRA_SZONE 262
#define EFFECT_MAX_MZONE 263
#define EFFECT_MAX_SZONE 264
#define EFFECT_FORCE_MZONE 265
#define EFFECT_HAND_LIMIT 270
#define EFFECT_DRAW_COUNT 271
#define EFFECT_SPIRIT_DONOT_RETURN 280
...
...
ocgcore/field.cpp
View file @
b487cb05
...
...
@@ -574,7 +574,7 @@ int32 field::get_spsummonable_count(card* pcard, uint8 playerid, uint32 zone, ui
return
get_tofield_count
(
playerid
,
LOCATION_MZONE
,
zone
,
list
);
}
int32
field
::
get_useable_count
(
uint8
playerid
,
uint8
location
,
uint8
uplayer
,
uint32
reason
,
uint32
zone
,
uint32
*
list
,
uint8
neglect_used
)
{
int32
count
=
get_tofield_count
(
playerid
,
location
,
zone
,
list
,
neglect_used
);
int32
count
=
get_tofield_count
(
playerid
,
location
,
zone
,
list
,
neglect_used
,
reason
);
int32
limit
;
if
(
location
==
LOCATION_MZONE
)
limit
=
get_mzone_limit
(
playerid
,
uplayer
,
LOCATION_REASON_TOFIELD
);
...
...
@@ -584,10 +584,20 @@ int32 field::get_useable_count(uint8 playerid, uint8 location, uint8 uplayer, ui
count
=
limit
;
return
count
;
}
int32
field
::
get_tofield_count
(
uint8
playerid
,
uint8
location
,
uint32
zone
,
uint32
*
list
,
uint8
neglect_used
)
{
int32
field
::
get_tofield_count
(
uint8
playerid
,
uint8
location
,
uint32
zone
,
uint32
*
list
,
uint8
neglect_used
,
uint32
reason
)
{
if
(
location
!=
LOCATION_MZONE
&&
location
!=
LOCATION_SZONE
)
return
0
;
uint32
flag
=
player
[
playerid
].
disabled_location
|
(
neglect_used
?
0
:
player
[
playerid
].
used_location
);
effect_set
eset
;
uint32
value
;
if
((
reason
&
(
LOCATION_REASON_TOFIELD
|
LOCATION_REASON_CONTROL
)
!=
0
)
&&
location
==
LOCATION_MZONE
)
filter_player_effect
(
playerid
,
EFFECT_FORCE_MZONE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
value
=
eset
[
i
]
->
get_value
();
if
((
flag
&
value
)
==
0
)
flag
|=
~
(
value
>>
16
*
playerid
)
&
0xff7f
;
}
eset
.
clear
();
if
(
location
==
LOCATION_MZONE
)
flag
=
(
flag
|
~
zone
)
&
0x1f
;
else
...
...
@@ -608,6 +618,15 @@ int32 field::get_useable_count_fromex(card* pcard, uint8 playerid, uint8 uplayer
}
int32
field
::
get_spsummonable_count_fromex
(
card
*
pcard
,
uint8
playerid
,
uint32
zone
,
uint32
*
list
)
{
uint32
flag
=
player
[
playerid
].
disabled_location
|
player
[
playerid
].
used_location
;
effect_set
eset
;
uint32
value
;
filter_player_effect
(
playerid
,
EFFECT_FORCE_MZONE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
value
=
eset
[
i
]
->
get_value
();
if
((
flag
&
value
)
==
0
)
flag
|=
~
(
value
>>
16
*
playerid
)
&
0xff7f
;
}
eset
.
clear
();
uint32
linked_zone
=
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
);
flag
=
flag
|
~
zone
|
~
linked_zone
;
if
(
player
[
playerid
].
list_mzone
[
5
]
&&
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
)
...
...
ocgcore/field.h
View file @
b487cb05
...
...
@@ -356,7 +356,7 @@ public:
int32
get_useable_count
(
card
*
pcard
,
uint8
playerid
,
uint8
location
,
uint8
uplayer
,
uint32
reason
,
uint32
zone
=
0xff
,
uint32
*
list
=
0
,
uint8
neglect_used
=
0
);
int32
get_spsummonable_count
(
card
*
pcard
,
uint8
playerid
,
uint32
zone
=
0xff
,
uint32
*
list
=
0
);
int32
get_useable_count
(
uint8
playerid
,
uint8
location
,
uint8
uplayer
,
uint32
reason
,
uint32
zone
=
0xff
,
uint32
*
list
=
0
,
uint8
neglect_used
=
0
);
int32
get_tofield_count
(
uint8
playerid
,
uint8
location
,
uint32
zone
=
0xff
,
uint32
*
list
=
0
,
uint8
neglect_used
=
0
);
int32
get_tofield_count
(
uint8
playerid
,
uint8
location
,
uint32
zone
=
0xff
,
uint32
*
list
=
0
,
uint8
neglect_used
=
0
,
uint32
reason
=
0x1
);
int32
get_useable_count_fromex
(
card
*
pcard
,
uint8
playerid
,
uint8
uplayer
,
uint32
zone
=
0xff
,
uint32
*
list
=
0
);
int32
get_spsummonable_count_fromex
(
card
*
pcard
,
uint8
playerid
,
uint32
zone
=
0xff
,
uint32
*
list
=
0
);
int32
get_mzone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
);
...
...
@@ -589,6 +589,7 @@ public:
//Location Use Reason
#define LOCATION_REASON_TOFIELD 0x1
#define LOCATION_REASON_CONTROL 0x2
#define LOCATION_REASON_COUNT 0x4
//Chain Info
#define CHAIN_DISABLE_ACTIVATE 0x01
#define CHAIN_DISABLE_EFFECT 0x02
...
...
ocgcore/libduel.cpp
View file @
b487cb05
...
...
@@ -1550,7 +1550,7 @@ int32 scriptlib::duel_get_location_count(lua_State *L) {
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
uint32
uplayer
=
pduel
->
game_field
->
core
.
reason_player
;
uint32
reason
=
LOCATION_REASON_TOFIELD
;
if
(
lua_gettop
(
L
)
>=
3
)
if
(
lua_gettop
(
L
)
>=
3
&&
!
lua_isnil
(
L
,
3
)
)
uplayer
=
lua_tointeger
(
L
,
3
);
if
(
lua_gettop
(
L
)
>=
4
)
reason
=
lua_tointeger
(
L
,
4
);
...
...
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