Commit d624cd03 authored by POLYMER's avatar POLYMER

fix

parent 046609f3
......@@ -60,8 +60,7 @@ function c11533717.filter(c,e,tp)
return c:IsSetCard(0x3a) and c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c11533717.ssptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and
Duel.IsExistingMatchingCard(c11533717.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(c11533717.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c11533717.sspop(e,tp,eg,ep,ev,re,r,rp)
......@@ -75,10 +74,6 @@ function c11533717.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c11533717.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c11533717.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
......@@ -109,6 +104,7 @@ function c11533717.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c11533717.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
--immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -63,16 +63,15 @@ function c33200522.tzcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():GetFlagEffect(33200500)>0 and re:IsActiveType(TYPE_MONSTER) and rp==tp
end
function c33200522.tztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_HAND,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
end
function c33200522.tzop(e,tp,eg,ep,ev,re,r,rp)
local typ=e:GetLabel()
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(c33200522.exfilter2,tp,0,LOCATION_HAND,1,nil) then return end
local g=Duel.SelectMatchingCard(c33200522.exfilter2,tp,0,LOCATION_HAND,1,1,nil)
if g>GetCount()>0 then
local g=Duel.GetMatchingGroup(c33200522.exfilter2,tp,0,LOCATION_HAND,nil,typ)
if g:GetCount()>0 then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -30,7 +30,7 @@ end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ck1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_SZONE,1,nil)
local ck2=Duel.IsExistingMatchingCard(s.mf,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return (ck1 and Duel.IsExistingMatchingCard(s.df1,tp,LOCATION_HAND,0,1,e:GetHandler())) or (ck2 and (Duel.IsExistingMatchingCard(s.df2,tp,LOCATION_HAND,0,1,e:GetHandler()) or Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_FZONE,0,1,e:GetHandler(),64800236)) end
if chk==0 then return (ck1 and Duel.IsExistingMatchingCard(s.df1,tp,LOCATION_HAND,0,1,e:GetHandler())) or (ck2 and (Duel.IsExistingMatchingCard(s.df2,tp,LOCATION_HAND,0,1,e:GetHandler()) or Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_FZONE,0,1,e:GetHandler(),64800236))) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.GetMatchingGroup(s.df3,tp,LOCATION_HAND,0,nil,ck1,ck2)
local fg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_FZONE,0,nil,64800236)
......
......@@ -67,10 +67,11 @@ function cm.tg0(e,c)
end
function cm.thfil(c,tp)
return c:IsCode(m-1) and c:GetActivateEffect():IsActivatable(tp,true,true)
return c:IsCode(m-1) --and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_DECK,0,1,1,nil,tp)
local g=Duel.GetMatchingGroup(cm.thfil,tp,LOCATION_DECK,0,1,1,nil,tp)
Debug.Message(#g)
if chk==0 then return #g>0 end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -44,14 +44,14 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
Duel.ConfirmDecktop(tp,4)
local g=Duel.GetDecktopGroup(tp,4)
local g1=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
g:Merge(g1)
local ct=g:GetCount()
local spsum=0
local istear=0
local acg=g
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local mg=g:Filter(cm.filter0,nil,e)
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_MZONE,0,nil,e)
mg:Merge(mg1)
if ct>0 then
local mg=g:Filter(cm.filter0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg2=nil
local sg2=nil
......@@ -84,7 +84,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
fop(ce,e,tp,tc,mat2)
acg:Sub(mat2)
end
tc:CompleteProcedure()
tc:CompleteProcedure()
end
Duel.ShuffleDeck(tp)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -46,14 +46,14 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=1 then return end
Duel.ConfirmDecktop(tp,2)
local g=Duel.GetDecktopGroup(tp,2)
local g1=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
g:Merge(g1)
local ct=g:GetCount()
local spsum=0
local istear=0
local acg=g
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local mg=g:Filter(cm.filter0,nil,e)
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,e)
mg:Merge(mg1)
if ct>0 then
local mg=g:Filter(cm.filter0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg2=nil
local sg2=nil
......
......@@ -26,27 +26,26 @@ function c91040034.initial_effect(c)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.spcostfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsRace(RACE_ZOMBIE)
function cm.spcostfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE)and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spcostfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.spcostfilter,tp,LOCATION_MZONE,0,1,nil,c,tp,Card.IsAbleToGraveAsCost) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.spcostfilter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.spcostfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
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