Commit ce5c66b5 authored by Momobako's avatar Momobako

Merge branch 'master' of /root/7210

parents 5850958a cf6f4f92
...@@ -1916,8 +1916,11 @@ int32 scriptlib::card_is_special_summonable(lua_State *L) { ...@@ -1916,8 +1916,11 @@ int32 scriptlib::card_is_special_summonable(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
uint32 sumtype = 0;
if(lua_gettop(L) >= 2)
sumtype = lua_tonumberint(L, 2);
uint32 p = pcard->pduel->game_field->core.reason_player; uint32 p = pcard->pduel->game_field->core.reason_player;
lua_pushboolean(L, pcard->is_special_summonable(p, 0)); lua_pushboolean(L, pcard->is_special_summonable(p, sumtype));
return 1; return 1;
} }
int32 scriptlib::card_is_synchro_summonable(lua_State *L) { int32 scriptlib::card_is_synchro_summonable(lua_State *L) {
......
...@@ -398,7 +398,7 @@ int32 scriptlib::duel_summon(lua_State *L) { ...@@ -398,7 +398,7 @@ int32 scriptlib::duel_summon(lua_State *L) {
uint32 zone = 0x1f; uint32 zone = 0x1f;
if(lua_gettop(L) >= 6) if(lua_gettop(L) >= 6)
zone = lua_tonumberint(L, 6); zone = lua_tonumberint(L, 6);
duel * pduel = pcard->pduel; duel* pduel = pcard->pduel;
pduel->game_field->core.summon_cancelable = FALSE; pduel->game_field->core.summon_cancelable = FALSE;
pduel->game_field->summon(playerid, pcard, peffect, ignore_count, min_tribute, zone); pduel->game_field->summon(playerid, pcard, peffect, ignore_count, min_tribute, zone);
return lua_yield(L, 0); return lua_yield(L, 0);
...@@ -411,9 +411,12 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) { ...@@ -411,9 +411,12 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
if(playerid != 0 && playerid != 1) if(playerid != 0 && playerid != 1)
return 0; return 0;
card* pcard = *(card**)lua_touserdata(L, 2); card* pcard = *(card**)lua_touserdata(L, 2);
duel * pduel = pcard->pduel; duel* pduel = pcard->pduel;
uint32 sumtype = 0;
if(lua_gettop(L) >= 3)
sumtype = lua_tonumberint(L, 3);
pduel->game_field->core.summon_cancelable = FALSE; pduel->game_field->core.summon_cancelable = FALSE;
pduel->game_field->special_summon_rule(playerid, pcard, 0); pduel->game_field->special_summon_rule(playerid, pcard, sumtype);
return lua_yield(L, 0); return lua_yield(L, 0);
} }
int32 scriptlib::duel_synchro_summon(lua_State *L) { int32 scriptlib::duel_synchro_summon(lua_State *L) {
...@@ -436,7 +439,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) { ...@@ -436,7 +439,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
mg = *(group**) lua_touserdata(L, 4); mg = *(group**) lua_touserdata(L, 4);
} }
} }
duel * pduel = pcard->pduel; duel* pduel = pcard->pduel;
pduel->game_field->core.limit_tuner = tuner; pduel->game_field->core.limit_tuner = tuner;
pduel->game_field->core.limit_syn = mg; pduel->game_field->core.limit_syn = mg;
pduel->game_field->core.summon_cancelable = FALSE; pduel->game_field->core.summon_cancelable = FALSE;
...@@ -462,7 +465,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) { ...@@ -462,7 +465,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
int32 maxc = 0; int32 maxc = 0;
if(lua_gettop(L) >= 5) if(lua_gettop(L) >= 5)
maxc = lua_tonumberint(L, 5); maxc = lua_tonumberint(L, 5);
duel * pduel = pcard->pduel; duel* pduel = pcard->pduel;
pduel->game_field->core.limit_xyz = materials; pduel->game_field->core.limit_xyz = materials;
pduel->game_field->core.limit_xyz_minc = minc; pduel->game_field->core.limit_xyz_minc = minc;
pduel->game_field->core.limit_xyz_maxc = maxc; pduel->game_field->core.limit_xyz_maxc = maxc;
......
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