Commit 50cdbbfb authored by TanakaKotoha's avatar TanakaKotoha

sjb

parent 7aff7a01
No preview for this file type
...@@ -195,7 +195,7 @@ function cm.cfilter(c) ...@@ -195,7 +195,7 @@ function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function cm.actarget2(e,te,tp) function cm.actarget2(e,te,tp)
return te:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) return te:GetHandler():GetOriginalType()==TYPE_SPELL or te:GetHandler():GetOriginalType()==TYPE_TRAP
end end
function cm.costchk2(e,te_or_c,tp) function cm.costchk2(e,te_or_c,tp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil)
......
...@@ -58,10 +58,10 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,10 +58,10 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.thsplimit(e,c,sump,sumtype,sumpos,targetp,se) function cm.thsplimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsLevel(10) or c:IsRank(10) or c:IsSetCard(0xcc3)) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return not (c:IsLevel(10) or c:IsRank(10) or c:IsSetCard(0xcc3))
end end
function cm.splimit(e,c,tp,sumtp,sumpos) function cm.splimit(e,c,tp,sumtp,sumpos)
return not (c:IsSetCard(0xcc3) or c:IsLevel(10) or c:IsRank(10)) return not (c:IsSetCard(0xcc3) or c:IsLevel(10) or c:IsRank(10)) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:GetLevel()>0 and c:GetLevel()~=1 return c:IsFaceup() and c:GetLevel()>0 and c:GetLevel()~=1
......
...@@ -154,7 +154,7 @@ function cm.thfilter(c) ...@@ -154,7 +154,7 @@ function cm.thfilter(c)
return c:IsLevel(10) and c:IsAbleToHand() return c:IsLevel(10) and c:IsAbleToHand()
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
...@@ -169,7 +169,7 @@ function cm.thsplimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -169,7 +169,7 @@ function cm.thsplimit(e,c,sump,sumtype,sumpos,targetp,se)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_MZONE,0,1,nil,10) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_EXTRA)
end end
...@@ -182,4 +182,5 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -182,4 +182,5 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,cm.thfiter,tp,LOCATION_GRAVE,0,1,1,nil) local tc=Duel.SelectMatchingCard(tp,cm.thfiter,tp,LOCATION_GRAVE,0,1,1,nil)
g:Merge(tc) g:Merge(tc)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
\ No newline at end of file
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