Commit 221b46c5 authored by Chen Bill's avatar Chen Bill

fix 閃刀起動-リンケージ

tgfilter1:
Select c s.t. there is a sp summonable Sky Striker Ace after removing c.

tgfilter2:
Select c s.t. the Extra Monster Zone is available.
parent 8eb953f7
...@@ -16,29 +16,36 @@ end ...@@ -16,29 +16,36 @@ end
function c9726840.condition(e,tp,eg,ep,ev,re,r,rp) function c9726840.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c9726840.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c9726840.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c9726840.tgfilter(c,e,tp) --send to grave filter before activation
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e) function c9726840.tgfilter1(c,e,tp)
and Duel.IsExistingMatchingCard(c9726840.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c9726840.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function c9726840.spfilter(c,e,tp,mc) function c9726840.spfilter1(c,e,tp,mc)
return c:IsSetCard(0x1115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x1115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c,0x60)>0 and Duel.GetLocationCountFromEx(tp,tp,mc,c,0x60)>0
end end
function c9726840.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9726840.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9726840.tgfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c9726840.tgfilter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c9726840.tgfilter2(c,tp) --send to grave filter after activation
return c:IsAbleToGrave() and Duel.GetLocationCountFromEx(tp,tp,c,nil,0x60)>0 function c9726840.tgfilter2(c,e,tp)
return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c9726840.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c9726840.exfilter(c,e,tp,mc)
return c:IsSetCard(0x1115) and Duel.GetLocationCountFromEx(tp,tp,mc,c,0x60)>0
end
function c9726840.spfilter2(c,e,tp)
return c:IsSetCard(0x1115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,0x60)
end end
function c9726840.activate(e,tp,eg,ep,ev,re,r,rp) function c9726840.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c9726840.tgfilter,tp,LOCATION_ONFIELD,0,1,1,c,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c9726840.tgfilter2,tp,LOCATION_ONFIELD,0,1,1,c,e,tp):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c9726840.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() local sc=Duel.SelectMatchingCard(tp,c9726840.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if sc then if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,0x60) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,0x60)
local fg=Duel.GetMatchingGroup(c9726840.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) local fg=Duel.GetMatchingGroup(c9726840.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
...@@ -52,13 +59,6 @@ function c9726840.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,13 +59,6 @@ function c9726840.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end 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 if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) 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