Commit 6ea137f8 authored by mercury233's avatar mercury233 Committed by GitHub

add Duel.DisableSelfDestroyCheck (#345)

parent 07add807
......@@ -1487,6 +1487,14 @@ int32 scriptlib::duel_disable_shuffle_check(lua_State *L) {
pduel->game_field->core.shuffle_check_disabled = disable;
return 0;
}
int32 scriptlib::duel_disable_self_destroy_check(lua_State* L) {
duel* pduel = interpreter::get_duel_info(L);
uint8 disable = TRUE;
if(lua_gettop(L) > 0)
disable = lua_toboolean(L, 1);
pduel->game_field->core.selfdes_disabled = disable;
return 0;
}
int32 scriptlib::duel_shuffle_deck(lua_State *L) {
check_param_count(L, 1);
uint32 playerid = (uint32)lua_tointeger(L, 1);
......@@ -4505,6 +4513,7 @@ static const struct luaL_Reg duellib[] = {
{ "DiscardDeck", scriptlib::duel_discard_deck },
{ "DiscardHand", scriptlib::duel_discard_hand },
{ "DisableShuffleCheck", scriptlib::duel_disable_shuffle_check },
{ "DisableSelfDestroyCheck", scriptlib::duel_disable_self_destroy_check },
{ "ShuffleDeck", scriptlib::duel_shuffle_deck },
{ "ShuffleExtra", scriptlib::duel_shuffle_extra },
{ "ShuffleHand", scriptlib::duel_shuffle_hand },
......
......@@ -433,6 +433,7 @@ public:
static int32 duel_discard_deck(lua_State *L);
static int32 duel_discard_hand(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_shuffle_deck(lua_State *L);
static int32 duel_shuffle_extra(lua_State *L);
static int32 duel_shuffle_hand(lua_State *L);
......
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