Commit 98b387fb authored by argon.sun's avatar argon.sun

fix

parent c08a8bd3
......@@ -645,9 +645,9 @@ void interpreter::add_param(ptr param, int32 type, bool front) {
params.push_back(make_pair((void*)param, type));
}
void interpreter::push_param(lua_State* L) {
param_list::iterator it;
uint32 type;
for (it = params.begin(); it != params.end(); ++it) {
int32 pushed = 0;
for (auto it = params.begin(); it != params.end(); ++it) {
type = it->second;
switch(type) {
case PARAM_TYPE_INT:
......@@ -688,10 +688,14 @@ void interpreter::push_param(lua_State* L) {
int32 index = (int32)(ptr)it->first;
if(index > 0)
lua_pushvalue(L, index);
else lua_pushnil(L);
else {
lua_pushnil(L);
// lua_pushvalue(L, index - pushed);
}
break;
}
}
pushed++;
}
params.clear();
}
......
......@@ -1930,7 +1930,7 @@ int32 scriptlib::duel_select_tuner_material(lua_State *L) {
pduel->game_field->core.select_cards.clear();
pduel->game_field->core.select_cards.push_back(tuner);
pduel->game_field->returns.bvalue[1] = 0;
pduel->game_field->add_process(PROCESSOR_SELECT_SYNCHRO, 1, (effect*)1, (group*)pcard, playerid, min + (max << 16));
pduel->game_field->add_process(PROCESSOR_SELECT_SYNCHRO, 1, 0, (group*)pcard, playerid, min + (max << 16));
lua_pushvalue(L, 4);
lua_pushvalue(L, 5);
return lua_yield(L, 2);
......
......@@ -728,7 +728,7 @@ int32 field::process() {
return pduel->bufferlen;
}
case PROCESSOR_SELECT_SYNCHRO: {
if (select_synchro_material(it->step, it->arg1, (card*)it->ptarget, it->arg2 & 0xffff, it->arg2 >> 16))
if (select_synchro_material(it->step, it->arg1, (card*)it->ptarget, it->arg2 & 0xffff, it->arg2 >> 16))
core.units.pop_front();
else
core.units.begin()->step++;
......
......@@ -30,6 +30,6 @@ end
function c1036974.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Damage(1-tp,tc:GetAttack()/2,REASON_EFFECT)
Duel.Damage(1-tp,tc:GetBaseAttack()/2,REASON_EFFECT)
end
end
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