Commit 49e81bca authored by fallenstardust's avatar fallenstardust

fix LEDE-JP055\072 script

parent b5b04414
Pipeline #24442 passed with stages
in 50 seconds
......@@ -70,7 +70,7 @@ function c101204055.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c101204055.filter(c)
return c:IsSetCard(0x7) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
return not c:IsCode(101204055) and c:IsSetCard(0x7) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function c101204055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204055.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -44,14 +44,14 @@ end
function c101204072.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c101204072.ffilter(c,tp)
return c:IsOnField() and c:IsCode(83104731)
function c101204072.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)
end
function c101204072.fcheck(tp,sg,fc)
return sg:FilterCount(c101204072.ffilter,nil,tp)>0
return sg:IsExists(c101204072.filter,1,nil)
end
function c101204072.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)
function c101204072.filter(c)
return c:IsLocation(LOCATION_ONFIELD) and c:IsCode(83104731)
end
function c101204072.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -59,9 +59,8 @@ function c101204072.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg1=Duel.GetFusionMaterial(tp):Filter(c101204072.filter0,nil)
local mg2=Duel.GetMatchingGroup(c101204072.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
aux.FGoalCheckAdditional=c101204072.fcheck
aux.FCheckAdditional=c101204072.fcheck
local res=Duel.IsExistingMatchingCard(c101204072.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FGoalCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
......@@ -71,6 +70,7 @@ function c101204072.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c101204072.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -82,9 +82,8 @@ function c101204072.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(c101204072.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c101204072.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
aux.FGoalCheckAdditional=c101204072.fcheck
aux.FCheckAdditional=c101204072.fcheck
local sg1=Duel.GetMatchingGroup(c101204072.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FGoalCheckAdditional=nil
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
......@@ -101,9 +100,7 @@ function c101204072.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
aux.FGoalCheckAdditional=c101204072.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FGoalCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
......@@ -123,4 +120,5 @@ function c101204072.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
aux.FCheckAdditional=nil
end
\ No newline at end of file
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