Commit 5fb87921 authored by mercury233's avatar mercury233 Committed by GitHub

fix 幻想召喚師 and 閃刀起動-リンケージ (#1821)

parent 0940d511
......@@ -15,9 +15,13 @@ function c14644902.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c14644902.rfilter(c,e,tp)
return c:IsReleasableByEffect() and not c:IsImmuneToEffect(e)
and Duel.IsExistingMatchingCard(c14644902.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c14644902.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
function c14644902.filter(c,e,tp,mc)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c14644902.rfilter2(c,tp)
return c:IsReleasableByEffect() and Duel.GetLocationCountFromEx(tp,tp,c,TYPE_FUSION)>0
end
function c14644902.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -38,6 +42,12 @@ function c14644902.operation(e,tp,eg,ep,ev,re,r,rp)
sg:GetFirst():RegisterEffect(e1)
end
end
if #rg==0 then
rg=Duel.SelectReleaseGroup(tp,c14644902.rfilter2,1,1,aux.ExceptThisCard(e),tp)
if #rg>0 then
Duel.Release(rg,REASON_EFFECT)
end
end
end
function c14644902.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
......
......@@ -17,7 +17,7 @@ function c9726840.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c9726840.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c9726840.tgfilter(c,e,tp)
return c:IsAbleToGrave()
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
and Duel.IsExistingMatchingCard(c9726840.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c9726840.spfilter(c,e,tp,mc)
......@@ -29,6 +29,9 @@ function c9726840.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c9726840.tgfilter2(c,tp)
return c:IsAbleToGrave() and Duel.GetLocationCountFromEx(tp,tp,c,nil,0x60)>0
end
function c9726840.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......@@ -49,6 +52,13 @@ function c9726840.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
tc=Duel.SelectMatchingCard(tp,c9726840.tgfilter2,tp,LOCATION_ONFIELD,0,1,1,c,tp):GetFirst()
if tc then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
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