Commit 3a941b4d authored by Tachibana's avatar Tachibana

ndyd

parent feba7e85
......@@ -43,7 +43,7 @@ end
function cm.olcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
function cm.olop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
......
......@@ -22,7 +22,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
......
......@@ -45,31 +45,26 @@ function c19500000.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3990) and c:IsRace(RACE_MACHINE) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c19500000.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19500000.desfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c19500000.desfilter,tp,LOCATION_DECK,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c19500000.desfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function c19500000.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c19500000.desfilter,tp,LOCATION_DECK,0,1,1,aux.ExceptThisCard(e))
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 and not c:IsFacedown() then
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c19500000.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c19500000.desfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c19500000.eqlimit)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c19500000.eqlimit)
tc:RegisterEffect(e2)
end
end
function c19500000.eqlimit(e,c)
......
......@@ -49,7 +49,7 @@ end
function c19500039.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c19500039[0]>2
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c19500039[0]>6
end
function c19500039.fselect(g)
return g:GetClassCount(Card.GetOriginalCode)==g:GetCount()
......
......@@ -41,13 +41,16 @@ function cm.initial_effect(c)
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
end
function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
function cm.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(cm.ccfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp)
end
function cm.ccfilter(c,tp)
return c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
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