Commit eb58eb23 authored by Chen Bill's avatar Chen Bill Committed by GitHub

fix 閃刀起動-リンケージ (#2257)

* Revert "fix 閃刀起動-リンケージ"

This reverts commit 979831be.

* fix 閃刀起動-リンケージ
parent 705de6c5
...@@ -31,8 +31,7 @@ function c9726840.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,8 +31,7 @@ function c9726840.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
--send to grave filter after activation --send to grave filter after activation
function c9726840.tgfilter2(c,e,tp) function c9726840.tgfilter2(c,e,tp)
return c:IsAbleToGrave() return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c9726840.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and (not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_EXTRA,0,1,nil,0x1115) or Duel.IsExistingMatchingCard(c9726840.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c))
end end
function c9726840.exfilter(c,e,tp,mc) function c9726840.exfilter(c,e,tp,mc)
return c:IsSetCard(0x1115) and Duel.GetLocationCountFromEx(tp,tp,mc,c,0x60)>0 return c:IsSetCard(0x1115) and Duel.GetLocationCountFromEx(tp,tp,mc,c,0x60)>0
...@@ -40,25 +39,44 @@ end ...@@ -40,25 +39,44 @@ end
function c9726840.spfilter2(c,e,tp) function c9726840.spfilter2(c,e,tp)
return c:IsSetCard(0x1115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,0x60) return c:IsSetCard(0x1115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,0x60)
end end
function c9726840.tgfilter3(c,tp)
return c:IsAbleToGrave() and Duel.GetLocationCountFromEx(tp,tp,c,nil,0x60)>0
end
function c9726840.tgfilter4(c)
return c:IsAbleToGrave()
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) local tg2=Duel.GetMatchingGroup(c9726840.tgfilter2,tp,LOCATION_ONFIELD,0,c,e,tp)
local tc=Duel.SelectMatchingCard(tp,c9726840.tgfilter2,tp,LOCATION_ONFIELD,0,1,1,c,e,tp):GetFirst() local tg3=(#tg2==0) and Duel.GetMatchingGroup(c9726840.tgfilter3,tp,LOCATION_ONFIELD,0,c,tp) or nil
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then local tg4=(tg3 and #tg3==0) and Duel.GetMatchingGroup(c9726840.tgfilter4,tp,LOCATION_ONFIELD,0,c) or nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if #tg2>0 then
local sc=Duel.SelectMatchingCard(tp,c9726840.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if sc then local tc=tg2:Select(tp,1,1,c):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,0x60) if Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
local fg=Duel.GetMatchingGroup(c9726840.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if fg:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK) then local sc=Duel.SelectMatchingCard(tp,c9726840.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
local e1=Effect.CreateEffect(c) if sc then
e1:SetType(EFFECT_TYPE_SINGLE) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,0x60)
e1:SetCode(EFFECT_UPDATE_ATTACK) local fg=Duel.GetMatchingGroup(c9726840.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
e1:SetValue(1000) if fg:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK) then
e1:SetReset(RESET_EVENT+RESETS_STANDARD) local e1=Effect.CreateEffect(c)
sc:RegisterEffect(e1) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
end end
end end
elseif tg3 and #tg3>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=tg3:Select(tp,1,1,c):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
elseif tg4 and #tg4>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=tg4:Select(tp,1,1,c):GetFirst()
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)
......
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