Commit 07f99962 authored by TanakaKotoha's avatar TanakaKotoha

dededededededededededede

parent 2b1633a9
......@@ -12,29 +12,24 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.handcon)
e2:SetCost(cm.cost)
c:RegisterEffect(e2)
--spsum limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_CHAINING)
e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetPreviousLocation()~=LOCATION_GRAVE then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end)
c:RegisterEffect(e11)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e1,true)
e:SetLabel(2)
end
function cm.disfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
......@@ -57,7 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
if true then
local dp=tc:GetOwner()
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil,e,dp) and Duel.SelectYesNo(tp,aux.Stringid(12004006,2)) then
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil,e,dp) and Duel.SelectYesNo(dp,aux.Stringid(12004006,2)) then
Duel.Hint(HINT_SELECTMSG,dp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(dp,cm.spfilter1,dp,LOCATION_HAND,0,1,1,nil,e,dp)
if g:GetCount()>0 then
......@@ -65,7 +60,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) and e:GetLabel()~=2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -12,38 +12,33 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.handcon)
e2:SetCost(cm.cost)
c:RegisterEffect(e2)
--spsum limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_CHAINING)
e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetPreviousLocation()~=LOCATION_GRAVE then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end)
c:RegisterEffect(e11)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e1,true)
e:SetLabel(2)
end
function cm.disfilter(c)
return c:IsFaceup() and c:IsAbleToDeck()
return c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and cm.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.disfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.disfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,cm.disfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
local tc=Duel.SelectTarget(tp,cm.disfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function cm.spfilter1(c)
......@@ -52,12 +47,12 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
if true then
local dp=tc:GetOwner()
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(dp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,dp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(dp,cm.spfilter1,dp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
......@@ -65,7 +60,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE)and e:SetLabel()~=2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -12,32 +12,27 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.handcon)
e2:SetCost(cm.cost)
c:RegisterEffect(e2)
--spsum limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_CHAINING)
e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetPreviousLocation()~=LOCATION_GRAVE then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end)
c:RegisterEffect(e11)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e1,true)
e:SetLabel(2)
end
function cm.disfilter(c)
return c:IsFaceup() and not c:IsAbleToDeck()
return c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.disfilter(chkc) end
......@@ -52,12 +47,12 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
if true then
local dp=tc:GetOwner()
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(dp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,dp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(dp,cm.spfilter1,dp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......@@ -65,7 +60,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) and e:GetLabel()~=2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -12,29 +12,24 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.handcon)
e2:SetCost(cm.cost)
c:RegisterEffect(e2)
--spsum limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_CHAINING)
e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetPreviousLocation()~=LOCATION_GRAVE then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end)
c:RegisterEffect(e11)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e1,true)
e:SetLabel(2)
end
function cm.disfilter(c)
return c:IsFaceup() and c:IsAbleToGrave()
......@@ -52,7 +47,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
if true then
......@@ -65,7 +60,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) and e:GetLabel()~=2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -12,39 +12,38 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,4))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_TOHAND)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.activate1)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.handcon)
e2:SetCost(cm.cost)
c:RegisterEffect(e2)
--spsum limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_CHAINING)
e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetPreviousLocation()~=LOCATION_GRAVE then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end)
c:RegisterEffect(e11)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,4))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_TOHAND)
e3:SetTarget(cm.target1)
e3:SetOperation(cm.activate1)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(cm.cost)
c:RegisterEffect(e4)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e1,true)
e:SetLabel(2)
end
function cm.disfilter(c)
return c:IsFaceup() and c:IsAbleToGrave()
......@@ -62,15 +61,12 @@ function cm.spfilter1(c)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local h1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.SendtoGrave(h1,REASON_EFFECT+REASON_DISCARD)
Duel.Draw(tp,h1:GetCount(),REASON_EFFECT)
end
if true then
local dp=tp
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(dp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,dp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(dp,cm.spfilter1,dp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
......@@ -78,7 +74,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) and e:GetLabel()~=2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......@@ -95,15 +91,12 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local h1=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
local h1=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
Duel.SendtoGrave(h1,REASON_EFFECT+REASON_DISCARD)
Duel.Draw(1-tp,h1:GetCount(),REASON_EFFECT)
end
if true then
local dp=1-tp
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(m,1)) then
if Duel.IsExistingMatchingCard(cm.spfilter1,dp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(dp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,dp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(dp,cm.spfilter1,dp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
......@@ -111,7 +104,7 @@ function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) and e:GetLabel()~=2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -12,29 +12,24 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.handcon)
e2:SetCost(cm.cost)
c:RegisterEffect(e2)
--spsum limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_CHAINING)
e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetPreviousLocation()~=LOCATION_GRAVE then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end)
c:RegisterEffect(e11)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e1,true)
e:SetLabel(2)
end
function cm.disfilter(c)
return c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
......@@ -64,7 +59,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) and e:GetLabel()~=2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
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