Commit 6f22a221 authored by Tachibana's avatar Tachibana

ndyd

parent 1ddc58c1
No preview for this file type
......@@ -33,7 +33,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCost(cm.cost)
e3:SetCost(cm.cost2)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
......@@ -65,6 +65,11 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000)
end
if Duel.IsCanRemoveCounter(tp,1,1,0x1015,3,REASON_COST) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,1,0x1015,3,REASON_COST)
e:SetLabel(1)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
......@@ -72,9 +77,15 @@ end
function cm.thfilter2(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_SZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
if e:GetLabel()~=0 then
Duel.SetChainLimit(cm.chlimit)
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
......@@ -87,6 +98,11 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg2,nil,REASON_EFFECT)
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000)
end
end
function cm.setfilter(c)
return c:IsSetCard(0x3344) and c:IsType(TYPE_SPELL) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and not c:IsForbidden()
end
......
......@@ -85,19 +85,19 @@ function cm.cfilter(c)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return g:GetCount()>0
return g:GetClassCount(Card.GetCode)>0
end
function cm.atkfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x341,0x340) and (c:IsType(TYPE_FIELD) or c:IsType(TYPE_CONTINUOUS))
end
function cm.val(e,c)
local g=Duel.GetMatchingGroup(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
return g:GetCount()*500
return g:GetClassCount(Card.GetCode)*500
end
function cm.con2(e)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return g:GetCount()>1
return g:GetClassCount(Card.GetCode)>1
end
function cm.tglimit(e,c)
return c:IsSetCard(0x341)
......@@ -105,7 +105,7 @@ end
function cm.con3(e)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return g:GetCount()>2
return g:GetClassCount(Card.GetCode)>2
end
function cm.thfilter(c)
return c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......@@ -135,7 +135,7 @@ end
function cm.con4(e)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return g:GetCount()>3
return g:GetClassCount(Card.GetCode)>3
end
function cm.thfilter2(c)
return c:IsSetCard(0x340,0x341) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden()
......@@ -164,7 +164,7 @@ end
function cm.con5(e)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return g:GetCount()>4
return g:GetClassCount(Card.GetCode)>4
end
function cm.target(e,c)
return c:IsSetCard(0x341,0x340)
......@@ -177,7 +177,7 @@ end
function cm.con6(e)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return g:GetCount()>5
return g:GetClassCount(Card.GetCode)>5
end
function cm.tdfilter(c)
return c:IsSetCard(0x340,0x341) and c:IsType(TYPE_CONTINUOUS+TYPE_FIELD) and c:IsAbleToRemove()
......
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