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
54ecda46
Commit
54ecda46
authored
Aug 14, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'mercury/patch-deckseq' into develop
parents
8fd1dc50
f7d980ec
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
9 deletions
+14
-9
card.cpp
card.cpp
+2
-2
common.h
common.h
+1
-0
field.cpp
field.cpp
+3
-0
field.h
field.h
+2
-1
libduel.cpp
libduel.cpp
+5
-5
scriptlib.h
scriptlib.h
+1
-1
No files found.
card.cpp
View file @
54ecda46
...
@@ -95,7 +95,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
...
@@ -95,7 +95,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
else
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
}
else
if
(
c1
->
current
.
location
&
LOCATION_DECK
&&
cp1
==
pduel
->
game_field
->
core
.
selecting_player
&&
!
pduel
->
game_field
->
core
.
select_deck_seq_preserved
)
{
}
else
if
(
c1
->
current
.
location
&
LOCATION_DECK
&&
pduel
->
game_field
->
is_select_hide_deck_sequence
(
cp1
)
)
{
// if deck reversed and the card being at the top, it should go first
// if deck reversed and the card being at the top, it should go first
if
(
pduel
->
game_field
->
core
.
deck_reversed
)
{
if
(
pduel
->
game_field
->
core
.
deck_reversed
)
{
if
(
c1
->
current
.
sequence
==
pduel
->
game_field
->
player
[
cp1
].
list_main
.
size
()
-
1
)
if
(
c1
->
current
.
sequence
==
pduel
->
game_field
->
player
[
cp1
].
list_main
.
size
()
-
1
)
...
@@ -1511,7 +1511,7 @@ int32 card::is_all_column() {
...
@@ -1511,7 +1511,7 @@ int32 card::is_all_column() {
return
FALSE
;
return
FALSE
;
}
}
uint8
card
::
get_select_sequence
(
uint8
*
deck_seq_pointer
)
{
uint8
card
::
get_select_sequence
(
uint8
*
deck_seq_pointer
)
{
if
(
current
.
location
==
LOCATION_DECK
&&
current
.
controler
==
pduel
->
game_field
->
core
.
selecting_player
&&
!
pduel
->
game_field
->
core
.
select_deck_seq_preserved
)
{
if
(
current
.
location
==
LOCATION_DECK
&&
pduel
->
game_field
->
is_select_hide_deck_sequence
(
current
.
controler
)
)
{
return
(
*
deck_seq_pointer
)
++
;
return
(
*
deck_seq_pointer
)
++
;
}
else
{
}
else
{
return
current
.
sequence
;
return
current
.
sequence
;
...
...
common.h
View file @
54ecda46
...
@@ -419,6 +419,7 @@ typedef signed char int8;
...
@@ -419,6 +419,7 @@ typedef signed char int8;
#define DUEL_TAG_MODE 0x20
#define DUEL_TAG_MODE 0x20
#define DUEL_SIMPLE_AI 0x40
#define DUEL_SIMPLE_AI 0x40
#define DUEL_RETURN_DECK_TOP 0x80
#define DUEL_RETURN_DECK_TOP 0x80
#define DUEL_REVEAL_DECK_SEQ 0x100
//Activity
//Activity
#define ACTIVITY_SUMMON 1
#define ACTIVITY_SUMMON 1
...
...
field.cpp
View file @
54ecda46
...
@@ -2296,6 +2296,9 @@ int32 field::check_spsummon_counter(uint8 playerid, uint8 ct) {
...
@@ -2296,6 +2296,9 @@ int32 field::check_spsummon_counter(uint8 playerid, uint8 ct) {
}
}
return
TRUE
;
return
TRUE
;
}
}
bool
field
::
is_select_hide_deck_sequence
(
uint8
playerid
)
{
return
!
core
.
select_deck_sequence_revealed
&&
!
(
core
.
duel_options
&
DUEL_REVEAL_DECK_SEQ
)
&&
playerid
==
core
.
selecting_player
;
}
int32
field
::
check_lp_cost
(
uint8
playerid
,
uint32
lp
,
uint32
must_pay
)
{
int32
field
::
check_lp_cost
(
uint8
playerid
,
uint32
lp
,
uint32
must_pay
)
{
effect_set
eset
;
effect_set
eset
;
int32
val
=
lp
;
int32
val
=
lp
;
...
...
field.h
View file @
54ecda46
...
@@ -351,7 +351,7 @@ struct processor {
...
@@ -351,7 +351,7 @@ struct processor {
uint32
hint_timing
[
2
]{};
uint32
hint_timing
[
2
]{};
uint8
current_player
{
PLAYER_NONE
};
uint8
current_player
{
PLAYER_NONE
};
uint8
conti_player
{
PLAYER_NONE
};
uint8
conti_player
{
PLAYER_NONE
};
uint8
select_deck_seq
_preserv
ed
{
FALSE
};
uint8
select_deck_seq
uence_reveal
ed
{
FALSE
};
uint8
selecting_player
{
PLAYER_NONE
};
uint8
selecting_player
{
PLAYER_NONE
};
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
summon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
summon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
normalsummon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
normalsummon_counter
;
...
@@ -466,6 +466,7 @@ public:
...
@@ -466,6 +466,7 @@ public:
void
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
,
bool
cancel
=
false
);
void
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
,
bool
cancel
=
false
);
void
set_spsummon_counter
(
uint8
playerid
);
void
set_spsummon_counter
(
uint8
playerid
);
int32
check_spsummon_counter
(
uint8
playerid
,
uint8
ct
=
1
);
int32
check_spsummon_counter
(
uint8
playerid
,
uint8
ct
=
1
);
bool
is_select_hide_deck_sequence
(
uint8
playerid
);
int32
check_lp_cost
(
uint8
playerid
,
uint32
cost
,
uint32
must_pay
);
int32
check_lp_cost
(
uint8
playerid
,
uint32
cost
,
uint32
must_pay
);
void
save_lp_cost
()
{}
void
save_lp_cost
()
{}
...
...
libduel.cpp
View file @
54ecda46
...
@@ -1546,12 +1546,12 @@ int32 scriptlib::duel_disable_self_destroy_check(lua_State* L) {
...
@@ -1546,12 +1546,12 @@ int32 scriptlib::duel_disable_self_destroy_check(lua_State* L) {
pduel
->
game_field
->
core
.
selfdes_disabled
=
disable
;
pduel
->
game_field
->
core
.
selfdes_disabled
=
disable
;
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_
preserve_select_deck_seq
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_
reveal_select_deck_sequence
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
uint8
preserve
=
TRUE
;
uint8
reveal
=
TRUE
;
if
(
lua_gettop
(
L
)
>
0
)
if
(
lua_gettop
(
L
)
>
0
)
preserve
=
lua_toboolean
(
L
,
1
);
reveal
=
lua_toboolean
(
L
,
1
);
pduel
->
game_field
->
core
.
select_deck_seq
_preserved
=
preserve
;
pduel
->
game_field
->
core
.
select_deck_seq
uence_revealed
=
reveal
;
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_shuffle_deck
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_shuffle_deck
(
lua_State
*
L
)
{
...
@@ -4898,7 +4898,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -4898,7 +4898,7 @@ static const struct luaL_Reg duellib[] = {
{
"DiscardHand"
,
scriptlib
::
duel_discard_hand
},
{
"DiscardHand"
,
scriptlib
::
duel_discard_hand
},
{
"DisableShuffleCheck"
,
scriptlib
::
duel_disable_shuffle_check
},
{
"DisableShuffleCheck"
,
scriptlib
::
duel_disable_shuffle_check
},
{
"DisableSelfDestroyCheck"
,
scriptlib
::
duel_disable_self_destroy_check
},
{
"DisableSelfDestroyCheck"
,
scriptlib
::
duel_disable_self_destroy_check
},
{
"
PreserveSelectDeckSequence"
,
scriptlib
::
duel_preserve_select_deck_seq
},
{
"
RevealSelectDeckSequence"
,
scriptlib
::
duel_reveal_select_deck_sequence
},
{
"ShuffleDeck"
,
scriptlib
::
duel_shuffle_deck
},
{
"ShuffleDeck"
,
scriptlib
::
duel_shuffle_deck
},
{
"ShuffleExtra"
,
scriptlib
::
duel_shuffle_extra
},
{
"ShuffleExtra"
,
scriptlib
::
duel_shuffle_extra
},
{
"ShuffleHand"
,
scriptlib
::
duel_shuffle_hand
},
{
"ShuffleHand"
,
scriptlib
::
duel_shuffle_hand
},
...
...
scriptlib.h
View file @
54ecda46
...
@@ -462,7 +462,7 @@ public:
...
@@ -462,7 +462,7 @@ public:
static
int32
duel_discard_hand
(
lua_State
*
L
);
static
int32
duel_discard_hand
(
lua_State
*
L
);
static
int32
duel_disable_shuffle_check
(
lua_State
*
L
);
static
int32
duel_disable_shuffle_check
(
lua_State
*
L
);
static
int32
duel_disable_self_destroy_check
(
lua_State
*
L
);
static
int32
duel_disable_self_destroy_check
(
lua_State
*
L
);
static
int32
duel_
preserve_select_deck_seq
(
lua_State
*
L
);
static
int32
duel_
reveal_select_deck_sequence
(
lua_State
*
L
);
static
int32
duel_shuffle_deck
(
lua_State
*
L
);
static
int32
duel_shuffle_deck
(
lua_State
*
L
);
static
int32
duel_shuffle_extra
(
lua_State
*
L
);
static
int32
duel_shuffle_extra
(
lua_State
*
L
);
static
int32
duel_shuffle_hand
(
lua_State
*
L
);
static
int32
duel_shuffle_hand
(
lua_State
*
L
);
...
...
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