Commit f7d980ec authored by mercury233's avatar mercury233

add is_select_hide_deck_sequence, and DUEL_REVEAL_DECK_SEQ for single mode

parent f3821dfa
......@@ -95,7 +95,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
return c1->overlay_target->current.sequence < c2->overlay_target->current.sequence;
else
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(pduel->game_field->core.deck_reversed) {
if(c1->current.sequence == pduel->game_field->player[cp1].list_main.size() - 1)
......@@ -1511,7 +1511,7 @@ int32 card::is_all_column() {
return FALSE;
}
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)++;
} else {
return current.sequence;
......
......@@ -418,6 +418,7 @@ typedef signed char int8;
#define DUEL_TAG_MODE 0x20
#define DUEL_SIMPLE_AI 0x40
#define DUEL_RETURN_DECK_TOP 0x80
#define DUEL_REVEAL_DECK_SEQ 0x100
//Activity
#define ACTIVITY_SUMMON 1
......
......@@ -2293,6 +2293,9 @@ int32 field::check_spsummon_counter(uint8 playerid, uint8 ct) {
}
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) {
effect_set eset;
int32 val = lp;
......
......@@ -463,6 +463,7 @@ public:
void check_chain_counter(effect* peffect, int32 playerid, int32 chainid, bool cancel = false);
void set_spsummon_counter(uint8 playerid);
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);
void save_lp_cost() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment