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
xiaoye
ygopro-core
Commits
3f6066dc
Commit
3f6066dc
authored
Jun 27, 2024
by
mercury233
Committed by
wind2009
Dec 17, 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
bfa930df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
51 deletions
+0
-51
field.cpp
field.cpp
+0
-23
field.h
field.h
+0
-2
libduel.cpp
libduel.cpp
+0
-26
No files found.
field.cpp
View file @
3f6066dc
...
...
@@ -798,29 +798,6 @@ int32_t field::get_szone_limit(uint8_t playerid, uint8_t uplayer, uint32_t reaso
int32_t
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_t
field
::
get_linked_zone
(
int32_t
playerid
)
{
uint32_t
zones
=
0
;
for
(
const
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
...
...
field.h
View file @
3f6066dc
...
...
@@ -395,8 +395,6 @@ public:
int32_t
get_spsummonable_count_fromex_rule4
(
card
*
pcard
,
uint8_t
playerid
,
uint8_t
uplayer
,
uint32_t
zone
=
0xff
,
uint32_t
*
list
=
nullptr
);
int32_t
get_mzone_limit
(
uint8_t
playerid
,
uint8_t
uplayer
,
uint32_t
reason
);
int32_t
get_szone_limit
(
uint8_t
playerid
,
uint8_t
uplayer
,
uint32_t
reason
);
int32
get_kaiser_limit
(
uint8
playerid
,
card_set
*
using_cards
);
int32
get_kaiser_limit
(
uint8
playerid
,
card
*
using_card
);
uint32_t
get_linked_zone
(
int32_t
playerid
);
uint32_t
get_rule_zone_fromex
(
int32_t
playerid
,
card
*
pcard
);
void
filter_must_use_mzone
(
uint8_t
playerid
,
uint8_t
uplayer
,
uint32_t
reason
,
card
*
pcard
,
uint32_t
*
flag
);
...
...
libduel.cpp
View file @
3f6066dc
...
...
@@ -2007,7 +2007,6 @@ int32_t scriptlib::duel_get_mzone_count(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
5
)
zone
=
(
uint32_t
)
lua_tointeger
(
L
,
5
);
uint32_t
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
)
{
...
...
@@ -2016,18 +2015,6 @@ int32_t scriptlib::duel_get_mzone_count(lua_State *L) {
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,7 +2077,6 @@ int32_t scriptlib::duel_get_location_count_fromex(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
5
)
zone
=
(
uint32_t
)
lua_tointeger
(
L
,
5
);
uint32_t
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
)
{
...
...
@@ -2099,18 +2085,6 @@ int32_t scriptlib::duel_get_location_count_fromex(lua_State *L) {
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