Commit 3d2ddc73 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro-core into develop

parents 0c4898b2 a006a56b
......@@ -21,7 +21,11 @@ Interface provided function that handles error messages.
These functions create the game itself and then manipulate it.
- `intptr_t create_duel(uint_fast32_t seed);`
Create a the instance of the duel with a PRNG seed.
(Deprecated) Create an instance of `duel` with 1 uint32 PRNG seed.
This function is reserved for replay mode only.
- `intptr_t create_duel_v2(uint32_t seed_sequence[]);`
Create an instance of `duel` with PRNG seed `seed_sequence[]` of length `SEED_COUNT`.
- `void start_duel(intptr_t pduel, uint32_t options);`
Start the duel.
......
......@@ -155,6 +155,10 @@ int32_t scriptlib::debug_reload_field_begin(lua_State *L) {
pduel->game_field->core.duel_rule = 1;
else
pduel->game_field->core.duel_rule = CURRENT_RULE;
if (pduel->game_field->core.duel_rule == MASTER_RULE3) {
pduel->game_field->player[0].szone_size = 8;
pduel->game_field->player[1].szone_size = 8;
}
return 0;
}
int32_t scriptlib::debug_reload_field_end(lua_State *L) {
......@@ -185,10 +189,12 @@ int32_t scriptlib::debug_set_ai_name(lua_State *L) {
int32_t scriptlib::debug_show_hint(lua_State *L) {
#if !defined(YGOPRO_SERVER_MODE) || defined(YGOPRO_ENABLE_DEBUG_FUNC)
check_param_count(L, 1);
check_param(L, PARAM_TYPE_STRING, 1);
duel* pduel = interpreter::get_duel_info(L);
lua_getglobal(L, "tostring");
lua_pushvalue(L, -2);
lua_pcall(L, 1, 1, 0);
pduel->write_buffer8(MSG_SHOW_HINT);
const char* pstr = lua_tostring(L, 1);
const char* pstr = lua_tostring(L, -1);
int len = (int)std::strlen(pstr);
if (len > SIZE_HINT_MSG - 1)
len = SIZE_HINT_MSG - 1;
......
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