Commit fce89e4c authored by Tachibana's avatar Tachibana

ndyd

parent b60637bf
......@@ -48,7 +48,7 @@ function c45746833.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c45746833.desfilter(c)
return c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsDestructable()
return c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsDestructable() and c:IsFaceup()
end
function c45746833.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746833.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
......@@ -109,6 +109,7 @@ function c45746837.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746837.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c45746837.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c45746837.filter2,tp,0,LOCATION_ONFIELD,nil)
......@@ -120,12 +121,13 @@ function c45746837.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c45746837.filter3(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToDeck()
end
function c45746837.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746837.filter3,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(c45746837.filter3,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.tdop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c45746837.filter3,tp,0,LOCATION_GRAVE,nil)
......@@ -140,6 +142,7 @@ function c45746837.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
......@@ -177,6 +180,7 @@ function c45746837.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -203,6 +207,7 @@ function c45746837.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c45746837.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.activate3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsExistingMatchingCard(c45746837.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then return end
......
......@@ -43,7 +43,7 @@ function c45746852.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(tc) and c:IsSetCard(0x88e) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c45746852.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45746852.filter(chkc,tp) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45746852.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c45746852.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c45746852.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
......@@ -51,7 +51,7 @@ end
function c45746852.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c45746852.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
if g:GetCount()>0 then
......
......@@ -24,8 +24,8 @@ function c45746854.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c45746854.con)
e3:SetTarget(c45746854.thtg)
e3:SetOperation(c45746854.thop)
e3:SetTarget(c45746854.sumtg)
e3:SetOperation(c45746854.sumop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
......@@ -74,16 +74,18 @@ function c45746854.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) or c:IsReason(REASON_LOST_TARGET)
end
function c45746854.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746854.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
function c45746854.filter(c)
return c:IsSetCard(0x88e) and c:IsSummonable(true,nil)
end
function c45746854.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746854.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c45746854.thop(e,tp,eg,ep,ev,re,r,rp)
function c45746854.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c45746854.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
local g=Duel.SelectMatchingCard(tp,c45746854.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
--e4
......
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