Commit cf6f4f92 authored by Momobako's avatar Momobako

update_core

parent eba209a9
......@@ -1828,8 +1828,11 @@ int32 scriptlib::card_is_special_summonable(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 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;
lua_pushboolean(L, pcard->is_special_summonable(p, 0));
lua_pushboolean(L, pcard->is_special_summonable(p, sumtype));
return 1;
}
int32 scriptlib::card_is_synchro_summonable(lua_State *L) {
......
......@@ -266,7 +266,7 @@ int32 scriptlib::duel_summon(lua_State *L) {
uint32 zone = 0x1f;
if(lua_gettop(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->summon(playerid, pcard, peffect, ignore_count, min_tribute, zone);
return lua_yield(L, 0);
......@@ -279,9 +279,12 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
if(playerid != 0 && playerid != 1)
return 0;
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->special_summon_rule(playerid, pcard, 0);
pduel->game_field->special_summon_rule(playerid, pcard, sumtype);
return lua_yield(L, 0);
}
int32 scriptlib::duel_synchro_summon(lua_State *L) {
......@@ -304,7 +307,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
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_syn = mg;
pduel->game_field->core.summon_cancelable = FALSE;
......@@ -330,7 +333,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
int32 maxc = 0;
if(lua_gettop(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_minc = minc;
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