Commit 52a09ce6 authored by Tachibana's avatar Tachibana

nmbd

parent b687641a
...@@ -70,6 +70,8 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,6 +70,8 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsAbleToHand() then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsAbleToHand() then
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g1=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) local g1=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
local rc=re:GetHandler()
if rc:IsType(TYPE_SPELL+TYPE_TRAP) then rc:CancelToGrave() end
if Duel.SendtoHand(eg,tp,REASON_EFFECT)==0 then return end if Duel.SendtoHand(eg,tp,REASON_EFFECT)==0 then return end
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
......
...@@ -28,10 +28,13 @@ function c66915002.filter(c) ...@@ -28,10 +28,13 @@ function c66915002.filter(c)
return ((c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x374)) or c:IsCode(66915001)) and c:IsSSetable() return ((c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x374)) or c:IsCode(66915001)) and c:IsSSetable()
end end
function c66915002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66915002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c66915002.filter,tp,LOCATION_DECK,0,1,nil) end local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c66915002.filter,tp,LOCATION_DECK,0,1,nil) and ct>1 end
end end
function c66915002.activate(e,tp,eg,ep,ev,re,r,rp) function c66915002.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if ct==0 then return end
local g=Duel.SelectMatchingCard(tp,c66915002.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c66915002.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g) Duel.SSet(tp,g)
...@@ -54,7 +57,7 @@ function c66915002.targets(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,7 +57,7 @@ function c66915002.targets(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66915002.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66915002.filter(chkc) end
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_GRAVE) then ct=ct-1 end if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_GRAVE) then ct=ct-1 end
if chk==0 then return ct>0 and Duel.IsExistingTarget(c66915002.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return ct>-1 and Duel.IsExistingTarget(c66915002.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c66915002.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c66915002.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
......
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