Commit 9a15ea11 authored by salix5's avatar salix5 Committed by GitHub

effect: use uint64 label (#667)

parent 87a3541a
......@@ -52,7 +52,7 @@ public:
uint16 active_sequence{ 0 };
card* active_handler{ nullptr };
uint16 status{ 0 };
std::vector<uint32> label;
std::vector<uint64> label;
int32 label_object{ 0 };
int32 condition{ 0 };
int32 cost{ 0 };
......
......@@ -1893,10 +1893,10 @@ int32 scriptlib::card_register_flag_effect(lua_State *L) {
int32 reset = (int32)lua_tointeger(L, 3);
uint32 flag = (uint32)lua_tointeger(L, 4);
int32 count = (int32)lua_tointeger(L, 5);
int32 lab = 0;
lua_Integer lab = 0;
int32 desc = 0;
if(lua_gettop(L) >= 6)
lab = (int32)lua_tointeger(L, 6);
lab = lua_tointeger(L, 6);
if(lua_gettop(L) >= 7)
desc = (int32)lua_tointeger(L, 7);
if(count == 0)
......@@ -1940,7 +1940,7 @@ int32 scriptlib::card_set_flag_effect_label(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
uint32 code = (lua_tointeger(L, 2) & MAX_CARD_ID) | EFFECT_FLAG_EFFECT;
int32 lab = (int32)lua_tointeger(L, 3);
auto lab = lua_tointeger(L, 3);
auto eit = pcard->single_effect.find(code);
if(eit == pcard->single_effect.end())
lua_pushboolean(L, FALSE);
......
......@@ -99,9 +99,9 @@ int32 scriptlib::duel_register_flag_effect(lua_State *L) {
int32 reset = (int32)lua_tointeger(L, 3);
uint32 flag = (uint32)lua_tointeger(L, 4);
int32 count = (int32)lua_tointeger(L, 5);
int32 lab = 0;
lua_Integer lab = 0;
if(lua_gettop(L) >= 6)
lab = (int32)lua_tointeger(L, 6);
lab = lua_tointeger(L, 6);
if(count == 0)
count = 1;
if(reset & (RESET_PHASE) && !(reset & (RESET_SELF_TURN | RESET_OPPO_TURN)))
......@@ -157,7 +157,7 @@ int32 scriptlib::duel_set_flag_effect_label(lua_State *L) {
if(playerid != 0 && playerid != 1)
return 0;
uint32 code = (lua_tointeger(L, 2) & MAX_CARD_ID) | EFFECT_FLAG_EFFECT;
int32 lab = (int32)lua_tointeger(L, 3);
auto lab = lua_tointeger(L, 3);
duel* pduel = interpreter::get_duel_info(L);
effect_set eset;
pduel->game_field->filter_player_effect(playerid, code, &eset);
......
......@@ -238,8 +238,7 @@ int32 scriptlib::effect_set_label(lua_State *L) {
effect* peffect = *(effect**) lua_touserdata(L, 1);
peffect->label.clear();
for(int32 i = 2; i <= lua_gettop(L); ++i) {
uint32 v = (uint32)lua_tointeger(L, i);
peffect->label.push_back(v);
peffect->label.push_back(lua_tointeger(L, i));
}
return 0;
}
......
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