Commit 029a00f1 authored by Chen Bill's avatar Chen Bill

add CURRENT_RULE

parent 22f069c3
......@@ -37,6 +37,8 @@ struct card_sort {
bool operator()(void* const & c1, void* const & c2) const;
};
#define CURRENT_RULE 5
//Locations
#define LOCATION_DECK 0x01 //
#define LOCATION_HAND 0x02 //
......
......@@ -289,7 +289,7 @@ struct processor {
uint8 extra_summon[2]{ FALSE };
int32 spe_effect[2]{ 0 };
int32 duel_options{ 0 };
int32 duel_rule{ 5 }; //current rule: 5, Master Rule 2020
int32 duel_rule{ CURRENT_RULE }; //current rule: 5, Master Rule 2020
uint32 copy_reset{ 0 };
uint8 copy_reset_count{ 0 };
uint32 last_control_changed_id{ 0 };
......
......@@ -152,7 +152,7 @@ int32 scriptlib::debug_reload_field_begin(lua_State *L) {
else if (flag & DUEL_OBSOLETE_RULING)
pduel->game_field->core.duel_rule = 1;
else
pduel->game_field->core.duel_rule = 5;
pduel->game_field->core.duel_rule = CURRENT_RULE;
return 0;
}
int32 scriptlib::debug_reload_field_end(lua_State *L) {
......
......@@ -72,7 +72,7 @@ extern "C" DECL_DLLEXPORT void start_duel(intptr_t pduel, int32 options) {
else if(options & DUEL_OBSOLETE_RULING) //provide backward compatibility with replay
pd->game_field->core.duel_rule = 1;
else if(!pd->game_field->core.duel_rule)
pd->game_field->core.duel_rule = 5;
pd->game_field->core.duel_rule = CURRENT_RULE;
pd->game_field->core.shuffle_hand_check[0] = FALSE;
pd->game_field->core.shuffle_hand_check[1] = FALSE;
pd->game_field->core.shuffle_deck_check[0] = FALSE;
......
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