Commit d0007b49 authored by argon.sun's avatar argon.sun

fix

parent d847a4e5
......@@ -1476,7 +1476,8 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
}
effect_set proc;
int32 res = filter_summon_procedure(playerid, &proc, ignore_count);
if((peffect && res < 0) || (!peffect && (!res || res == -2) && !proc.count)) {
if((peffect && res < 0) || (!peffect && (!res || res == -2) && !proc.count)
|| (peffect && (proc.count == 0) && !pduel->game_field->is_player_can_summon(peffect->get_value(), playerid, this))) {
pduel->game_field->restore_lp_cost();
return FALSE;
}
......
......@@ -2409,7 +2409,7 @@ int32 scriptlib::duel_select_position(lua_State * L) {
card* pcard = *(card**) lua_touserdata(L, 2);
uint32 positions = lua_tointeger(L, 3);
duel* pduel = interpreter::get_duel_info(L);
pduel->game_field->add_process(PROCESSOR_SELECT_POSITION_S, 0, 0, 0, playerid + (positions << 16), (ptr)pcard);
pduel->game_field->add_process(PROCESSOR_SELECT_POSITION_S, 0, 0, 0, playerid + (positions << 16), pcard->data.code);
return lua_yield(L, 0);
}
int32 scriptlib::duel_select_disable_field(lua_State * L) {
......
......@@ -16,9 +16,9 @@ function c35149085.filter(c)
end
function c35149085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35149085.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c35149085.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c35149085.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c35149085.spfilter(c,e,tp,lv)
......
......@@ -57,7 +57,7 @@ function c39712330.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil)
or Duel.SelectOption(tp,aux.Stringid(39712330,2),aux.Stringid(39712330,3))==0) then
or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) then
Duel.Summon(tp,tc,true,nil)
else Duel.MSet(tp,tc,true,nil) end
end
......@@ -92,7 +92,7 @@ function c39712330.activate2(e,tp,eg,ep,ev,re,r,rp)
if tc then
local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil)
if (s1 and s2 and Duel.SelectOption(tp,aux.Stringid(39712330,2),aux.Stringid(39712330,3))==0) or not s2 then
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
......
......@@ -26,7 +26,7 @@ function c45458027.spcon(e,c)
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return g:GetCount()>0 and g:FilterCount(Card.IsRace,nil,0xffffffff-RACE_MACHINE)==0
return g:GetCount()>0 and not g:IsExists(Card.IsRace,1,nil,0xffffffff-RACE_MACHINE)
end
function c45458027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
......
......@@ -52,7 +52,7 @@ function c80604091.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil)
or Duel.SelectOption(tp,aux.Stringid(80604091,2),aux.Stringid(80604091,3))==0) then
or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) then
Duel.Summon(tp,tc,true,nil)
else Duel.MSet(tp,tc,true,nil) end
end
......@@ -85,7 +85,7 @@ function c80604091.activate2(e,tp,eg,ep,ev,re,r,rp)
if tc then
local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil)
if (s1 and s2 and Duel.SelectOption(tp,aux.Stringid(80604091,2),aux.Stringid(80604091,3))==0) or not s2 then
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
......
......@@ -4,6 +4,7 @@ function c80921533.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetValue(SUMMON_TYPE_NORMAL)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
......@@ -69,7 +70,7 @@ function c80921533.operation(e,tp,eg,ep,ev,re,r,rp)
if tc then
local s1=tc:IsSummonable(false,se)
local s2=tc:IsMSetable(false,se)
if (s1 and s2 and Duel.SelectOption(tp,aux.Stringid(80921533,1),aux.Stringid(80921533,2))==0) or not s2 then
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,false,se)
else
Duel.MSet(tp,tc,false,se)
......
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