Commit b18b4243 authored by wind2009's avatar wind2009

Fix 黒魔導のカーテン

parent 95d942ca
Pipeline #43536 passed with stages
in 4 minutes and 5 seconds
...@@ -14,15 +14,27 @@ function s.initial_effect(c) ...@@ -14,15 +14,27 @@ function s.initial_effect(c)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.spfilter2(c,e,tp) function s.spfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.spfilter2(c,e,tp)
return c:IsPublic() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and
Duel.GetLocationCount(tp,LOCATION_MZONE)>0 Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2=Duel.IsPlayerCanSpecialSummon(1-tp) and local b2=false
(Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 or Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,1,nil)) and if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(1-tp) then
Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 or Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,1,nil) then
for lv=1,12 do
if Duel.IsPlayerCanSpecialSummonMonster(1-tp,0,0,TYPE_MONSTER,-2,-2,lv,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEUP) then
b2=true
break
end
end
end
b2=b2 or Duel.IsExistingMatchingCard(s.spfilter2,1-tp,LOCATION_HAND,0,1,nil,e,1-tp)
end
if chk==0 then return b1 and b2 end if chk==0 then return b1 and b2 end
end end
function s.thfilter(c) function s.thfilter(c)
...@@ -34,10 +46,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,10 +46,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ss=false local ss=false
for p in aux.TurnPlayers() do for p in aux.TurnPlayers() do
if Duel.GetLocationCount(p,LOCATION_MZONE)>0 if Duel.GetLocationCount(p,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter2,p,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,p) and Duel.IsExistingMatchingCard(s.spfilter,p,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,p)
and Duel.SelectYesNo(p,aux.Stringid(id,1)) then and Duel.SelectYesNo(p,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(p,s.spfilter2,p,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,p):GetFirst() local sc=Duel.SelectMatchingCard(p,s.spfilter,p,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,p):GetFirst()
if Duel.SpecialSummonStep(sc,0,p,p,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(sc,0,p,p,false,false,POS_FACEUP) then
ss=true ss=true
local e1=Effect.CreateEffect(c) local e1=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