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
b16497d3
Commit
b16497d3
authored
Jun 27, 2024
by
mercury233
Committed by
GitHub
Jun 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "check Kaiser Colosseum in Duel.GetMZoneCount & Duel.GetLocationCountF…" (#607)
This reverts commit
c667c123
.
parent
c667c123
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
51 deletions
+4
-51
field.cpp
field.cpp
+0
-23
field.h
field.h
+0
-2
libduel.cpp
libduel.cpp
+4
-26
No files found.
field.cpp
View file @
b16497d3
...
...
@@ -811,29 +811,6 @@ int32 field::get_szone_limit(uint8 playerid, uint8 uplayer, uint32 reason) {
int32
limit
=
max
-
field_used_count
[
used_flag
];
return
limit
;
}
int32
field
::
get_kaiser_limit
(
uint8
playerid
,
card_set
*
using_cards
)
{
if
(
!
is_player_affected_by_effect
(
playerid
,
EFFECT_KAISER_COLOSSEUM
))
return
0xff
;
auto
oppo_monster_count
=
filter_field_card
(
playerid
,
0
,
LOCATION_MZONE
,
0
);
if
(
!
oppo_monster_count
)
return
0xff
;
auto
limit
=
oppo_monster_count
-
filter_field_card
(
playerid
,
LOCATION_MZONE
,
0
,
0
);
for
(
auto
&
pcard
:
*
using_cards
)
{
if
(
pcard
->
current
.
is_location
(
LOCATION_MZONE
))
{
if
(
pcard
->
current
.
controler
==
playerid
)
++
limit
;
else
--
limit
;
}
}
return
limit
;
}
int32
field
::
get_kaiser_limit
(
uint8
playerid
,
card
*
using_card
)
{
card_set
using_cards
;
if
(
using_card
)
using_cards
.
insert
(
using_card
);
return
get_kaiser_limit
(
playerid
,
&
using_cards
);
}
uint32
field
::
get_linked_zone
(
int32
playerid
)
{
uint32
zones
=
0
;
for
(
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
...
...
field.h
View file @
b16497d3
...
...
@@ -405,8 +405,6 @@ public:
int32
get_spsummonable_count_fromex_rule4
(
card
*
pcard
,
uint8
playerid
,
uint8
uplayer
,
uint32
zone
=
0xff
,
uint32
*
list
=
nullptr
);
int32
get_mzone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
);
int32
get_szone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
);
int32
get_kaiser_limit
(
uint8
playerid
,
card_set
*
using_cards
);
int32
get_kaiser_limit
(
uint8
playerid
,
card
*
using_card
);
uint32
get_linked_zone
(
int32
playerid
);
uint32
get_rule_zone_fromex
(
int32
playerid
,
card
*
pcard
);
void
filter_must_use_mzone
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
,
card
*
pcard
,
uint32
*
flag
);
...
...
libduel.cpp
View file @
b16497d3
...
...
@@ -2009,25 +2009,14 @@ int32 scriptlib::duel_get_mzone_count(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
5
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
list
=
0
;
auto
count
=
pduel
->
game_field
->
get_useable_count
(
nullptr
,
playerid
,
LOCATION_MZONE
,
uplayer
,
reason
,
zone
,
&
list
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
nullptr
,
playerid
,
LOCATION_MZONE
,
uplayer
,
reason
,
zone
,
&
list
));
lua_pushinteger
(
L
,
list
);
if
(
swapped
)
{
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
pduel
->
game_field
->
player
[
0
].
list_mzone
.
swap
(
list_mzone
[
0
]);
pduel
->
game_field
->
player
[
1
].
list_mzone
.
swap
(
list_mzone
[
1
]);
}
if
(
uplayer
==
playerid
&&
reason
==
LOCATION_REASON_TOFIELD
)
{
int32
kaiser_limit
=
0xff
;
if
(
mcard
)
{
kaiser_limit
=
pduel
->
game_field
->
get_kaiser_limit
(
playerid
,
mcard
);
}
else
if
(
mgroup
)
{
kaiser_limit
=
pduel
->
game_field
->
get_kaiser_limit
(
playerid
,
&
mgroup
->
container
);
}
if
(
kaiser_limit
<
count
)
count
=
kaiser_limit
;
}
lua_pushinteger
(
L
,
count
);
lua_pushinteger
(
L
,
list
);
return
2
;
}
// Condition: uplayer moves scard or any card with type from Extra Deck to playerid's field
...
...
@@ -2090,25 +2079,14 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
5
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
list
=
0
;
auto
count
=
pduel
->
game_field
->
get_useable_count_fromex
(
scard
,
playerid
,
uplayer
,
zone
,
&
list
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count_fromex
(
scard
,
playerid
,
uplayer
,
zone
,
&
list
));
lua_pushinteger
(
L
,
list
);
if
(
swapped
)
{
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
pduel
->
game_field
->
player
[
0
].
list_mzone
.
swap
(
list_mzone
[
0
]);
pduel
->
game_field
->
player
[
1
].
list_mzone
.
swap
(
list_mzone
[
1
]);
}
if
(
uplayer
==
playerid
)
{
int32
kaiser_limit
=
0xff
;
if
(
mcard
)
{
kaiser_limit
=
pduel
->
game_field
->
get_kaiser_limit
(
playerid
,
mcard
);
}
else
if
(
mgroup
)
{
kaiser_limit
=
pduel
->
game_field
->
get_kaiser_limit
(
playerid
,
&
mgroup
->
container
);
}
if
(
kaiser_limit
<
count
)
count
=
kaiser_limit
;
}
lua_pushinteger
(
L
,
count
);
lua_pushinteger
(
L
,
list
);
if
(
use_temp_card
)
{
scard
->
current
.
location
=
0
;
scard
->
data
.
type
=
0
;
...
...
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