Commit f2088235 authored by VanillaSalt's avatar VanillaSalt

fix

parent bfb78c6e
......@@ -126,9 +126,10 @@ function c1561110.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c1561110.spfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsType(TYPE_UNION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsType(TYPE_UNION) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1561110.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
function c1561110.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c1561110.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and g:GetClassCount(Card.GetCode)>2
......@@ -141,7 +142,7 @@ function c1561110.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
sg:Merge(g1)
end
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,0,0)
end
function c1561110.spop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
......@@ -16,6 +16,7 @@ function c2783661.filter(c)
end
function c2783661.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2783661.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c2783661.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
......
......@@ -25,7 +25,7 @@ function c39778366.initial_effect(c)
end
function c39778366.filter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsType(TYPE_NORMAL+TYPE_UNION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsType(TYPE_NORMAL+TYPE_UNION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c39778366.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c39778366.filter(chkc,e,tp) end
......@@ -59,7 +59,7 @@ function c39778366.thfilter(c)
and c:IsType(TYPE_NORMAL+TYPE_UNION) and c:IsAbleToHand()
end
function c39778366.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:IsLocation(LOCATION_REMOVED) and c39778366.filter(chkc) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c39778366.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c39778366.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c39778366.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
......
......@@ -32,7 +32,7 @@ function c42901635.initial_effect(c)
c:RegisterEffect(e3)
end
function c42901635.cfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and IsAbleToRemoveAsCost()
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToRemoveAsCost()
end
function c42901635.sprfilter1(c,mg,ft)
local mg2=mg:Clone()
......
......@@ -83,11 +83,11 @@ function c65172015.spop(e,tp,eg,ep,ev,re,r,rp,c)
g:AddCard(tc)
if i==1 then
g1:Clear()
if tc:IsFusionCode(1561110) then
if tc:GetOriginalCode()==1561110 then
local sg=Duel.GetMatchingGroup(c65172015.spfilter,tp,LOCATION_ONFIELD,0,tc,91998119)
g1:Merge(sg)
end
if tc:IsFusionCode(91998119) then
if tc:GetOriginalCode()==91998119 then
local sg=Duel.GetMatchingGroup(c65172015.spfilter,tp,LOCATION_ONFIELD,0,tc,1561110)
g1:Merge(sg)
end
......@@ -127,7 +127,8 @@ end
function c65172015.spfilter3(c,e,tp)
return c:IsFaceup() and c:IsCode(91998119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65172015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c65172015.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c65172015.spfilter2,tp,LOCATION_REMOVED,0,1,nil,e,tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
......
......@@ -40,19 +40,20 @@ end
function c66399653.tgfilter(c,e,tp,chk)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_UNION)
and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp) and c:IsCanBeEffectTarget(e)
and (chk or Duel.IsExistingTarget(c66399653.cfilter,tp,LOCATION_DECK,0,1,nil,c))
and (chk or Duel.IsExistingMatchingCard(c66399653.cfilter,tp,LOCATION_DECK,0,1,nil,c))
end
function c66399653.cfilter(c,ec)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsType(TYPE_UNION) and c:CheckEquipTarget(ec) and not c:IsCode(ec:GetCode())
end
function c66399653.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c66399653.tgfilter(chkc,e,tp,true) end
if chkc then return eg:IsContains(chkc) and c66399653.tgfilter(chkc,e,tp,true) end
local g=eg:Filter(c66399653.tgfilter,nil,e,tp,false)
if chk==0 then return g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if g:GetCount()==1 then
Duel.SetTargetCard(g:GetFirst())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=g:Select(tp,1,1,nil)
Duel.SetTargetCard(tc)
end
......
......@@ -47,7 +47,7 @@ function c77133792.spfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c77133792.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:IsLocation(LOCATION_REMOVED) and c77133792.filter(chkc,e,tp) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c77133792.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c77133792.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c77133792.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
......
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