Commit 7c253fc5 authored by Tachibana's avatar Tachibana

ndyd

parent 55513271
...@@ -92,7 +92,7 @@ end ...@@ -92,7 +92,7 @@ end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return ep==1-tp and Duel.IsChainNegatable(ev) and c:GetFlagEffect(m)==0 return ep==1-tp and Duel.IsChainNegatable(ev) and c:GetFlagEffect(m)==0 and( not c:IsLocation(LOCATION_HAND))
end end
function cm.discfilter(c) function cm.discfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsAbleToRemoveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED) return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsAbleToRemoveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
......
...@@ -24,7 +24,7 @@ end ...@@ -24,7 +24,7 @@ end
function sr_kmmm.limitcon(e,tp,eg,ep,ev,re,r,rp) function sr_kmmm.limitcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
return Duel.GetTurnPlayer()==tp or ( Duel.GetFlagEffect(tp,12034010)>0 and ph==PHASE_MAIN1 ) return Duel.GetTurnPlayer()==tp or ( Duel.GetFlagEffect(tp,12034010)>0 and phase==PHASE_MAIN1 )
end end
function sr_kmmm.fusion_effect(c,m,des) function sr_kmmm.fusion_effect(c,m,des)
--Activate --Activate
......
...@@ -17,13 +17,13 @@ function cm.spfilter(c) ...@@ -17,13 +17,13 @@ function cm.spfilter(c)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.spfilter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.SelectTarget(tp,cm.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -53,6 +53,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,6 +53,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end end
end end
function cm.retop(e,tp,eg,ep,ev,re,r,rp) function cm.retop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -191,7 +191,7 @@ function Suyu_Cjz_root.adsum(c,tep) ...@@ -191,7 +191,7 @@ function Suyu_Cjz_root.adsum(c,tep)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,function(c) local g=Duel.SelectMatchingCard(tp,function(c)
return not c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSummonable(true,nil,1) return not c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSummonable(true,nil)
end,tp,LOCATION_HAND,0,1,1,nil) end,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
...@@ -212,8 +212,7 @@ function Suyu_Cjz_root.tograveorrel(c,typ,mloc,tloc,toloc,cat) ...@@ -212,8 +212,7 @@ function Suyu_Cjz_root.tograveorrel(c,typ,mloc,tloc,toloc,cat)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Suyu_Cjz_root.togrcon,tp,mloc,tloc,1,nil,toloc,typ) end if chk==0 then return Duel.IsExistingMatchingCard(Suyu_Cjz_root.togrcon,tp,mloc,tloc,1,nil,toloc,typ) end
local g=Duel.GetMatchingGroup(Suyu_Cjz_root.togrcon,tp,mloc,tloc,nil,toloc,typ) Duel.SetOperationInfo(0,cat,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
...@@ -231,10 +230,11 @@ function Suyu_Cjz_root.tograveorrel(c,typ,mloc,tloc,toloc,cat) ...@@ -231,10 +230,11 @@ function Suyu_Cjz_root.tograveorrel(c,typ,mloc,tloc,toloc,cat)
return e1,e2 return e1,e2
end end
function Suyu_Cjz_root.togrcon(c,toloc,typ) function Suyu_Cjz_root.togrcon(c,toloc,typ)
local res=false
if toloc==LOCATION_DECK then if toloc==LOCATION_DECK then
local res=c:IsAbleToDeck() res=c:IsAbleToDeck()
else else
local res=c:IsAbleToHand() res=c:IsAbleToHand()
end end
return c:IsType(typ) and res return c:IsType(typ) and res
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