Commit 9b9aecd3 authored by nanahira's avatar nanahira
parents 72d3f2ce d5d91f86
......@@ -535,6 +535,7 @@ static const struct luaL_Reg duellib[] = {
{ "ReleaseRitualMaterial", scriptlib::duel_release_ritual_material },
{ "GetFusionMaterial", scriptlib::duel_get_fusion_material },
{ "SetSelectedCard", scriptlib::duel_set_must_select_cards },
{ "GrabSelectedCard", scriptlib::duel_grab_must_select_cards },
{ "SetTargetCard", scriptlib::duel_set_target_card },
{ "ClearTargetCard", scriptlib::duel_clear_target_card },
{ "SetTargetPlayer", scriptlib::duel_set_target_player },
......
......@@ -3016,6 +3016,15 @@ int32 scriptlib::duel_set_must_select_cards(lua_State *L) {
luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1);
return 0;
}
int32 scriptlib::duel_grab_must_select_cards(lua_State *L) {
duel* pduel = interpreter::get_duel_info(L);
group* pgroup = pduel->new_group();
if(pduel->game_field->core.must_select_cards.size())
pgroup->container.insert(pduel->game_field->core.must_select_cards.begin(), pduel->game_field->core.must_select_cards.end());
pduel->game_field->core.must_select_cards.clear();
interpreter::group2value(L, pgroup);
return 1;
}
int32 scriptlib::duel_set_target_card(lua_State *L) {
check_action_permission(L);
check_param_count(L, 1);
......
......@@ -525,6 +525,7 @@ public:
static int32 duel_release_ritual_material(lua_State *L);
static int32 duel_get_fusion_material(lua_State *L);
static int32 duel_set_must_select_cards(lua_State *L);
static int32 duel_grab_must_select_cards(lua_State *L);
static int32 duel_set_target_card(lua_State *L);
static int32 duel_clear_target_card(lua_State *L);
static int32 duel_set_target_player(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