Commit 6e3d18c8 authored by Tachibana's avatar Tachibana

1145141919810

parent fac24a3b
No preview for this file type
...@@ -45,24 +45,24 @@ function cm.initial_effect(c) ...@@ -45,24 +45,24 @@ function cm.initial_effect(c)
ge1:SetOperation(cm.checkop) ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone() local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS) ge2:SetCode(EVENT_SUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
end end
end end
function cm.cfilter(c,set) function cm.cfilter1(c,set)
return c:IsSetCard(set) return c:IsSetCard(set)
end end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end if not eg then return end
local sg=eg:Filter(cm.cfilter,nil,0xafaa) local sg=eg:Filter(cm.cfilter1,nil,0xafaa)
if #sg>0 then if #sg>0 then
Duel.RegisterFlagEffect(tp,m+100,0,0,1) Duel.RegisterFlagEffect(tp,m+100,0,0,1)
end end
local sg1=eg:Filter(cm.cfilter,nil,0x5fac) local sg1=eg:Filter(cm.cfilter1,nil,0x5fac)
if #sg1>0 then if #sg1>0 then
Duel.RegisterFlagEffect(tp,m+200,0,0,1) Duel.RegisterFlagEffect(tp,m+200,0,0,1)
end end
local sg2=eg:Filter(cm.cfilter,nil,0x6fac) local sg2=eg:Filter(cm.cfilter1,nil,0x6fac)
if #sg2>0 then if #sg2>0 then
Duel.RegisterFlagEffect(tp,m+300,0,0,1) Duel.RegisterFlagEffect(tp,m+300,0,0,1)
end end
......
...@@ -145,7 +145,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -145,7 +145,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
--Effect 3 --Effect 3
function cm.chainop(e,tp,eg,ep,ev,re,r,rp) function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if ep==1-tp then if ep==tp then
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
end end
......
...@@ -47,7 +47,7 @@ function c72411050.operation1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,7 +47,7 @@ function c72411050.operation1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c72411050.filterb(c,e,tp) function c72411050.filterb(c,e,tp)
return ((c:IsSetCard(0x5729) and c:IsType(TYPE_SPELL)) or (c:IsSetCard(0x5729) or Duel.IsPlayerAffectedByEffect(tp,72413440))) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) return ((c:IsSetCard(0x5729) and c:IsType(TYPE_SPELL)) or (c:GetType()==TYPE_SPELL and Duel.IsPlayerAffectedByEffect(tp,72413440))) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end end
function c72411050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c72411050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -41,7 +41,7 @@ function c72411060.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c72411060.operation1(e,tp,eg,ep,ev,re,r,rp)
end end
function c72411060.cpfilter(c,exc,e,tp,eg,ep,ev,re,r,rp) function c72411060.cpfilter(c,exc,e,tp,eg,ep,ev,re,r,rp)
local te=c:CheckActivateEffect(true,true,false) local te=c:CheckActivateEffect(true,true,false)
if not (c:IsSetCard(0x5729) and c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and te and te:GetOperation()) then return false end if not ((c:IsSetCard(0x5729) or Duel.IsPlayerAffectedByEffect(tp,72413440)) and c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and te and te:GetOperation()) then return false end
local tg=te:GetTarget() local tg=te:GetTarget()
return (not tg) or tg(e,tp,eg,ep,ev,re,r,rp,0,nil,exc) return (not tg) or tg(e,tp,eg,ep,ev,re,r,rp,0,nil,exc)
end end
......
...@@ -48,7 +48,7 @@ function cm.xyzfilter(c) ...@@ -48,7 +48,7 @@ function cm.xyzfilter(c)
return c:IsFaceup() and c:IsSetCard(0x581f) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x581f) and c:IsType(TYPE_XYZ)
end end
function cm.matfilter(c,e) function cm.matfilter(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay() and (not e or not c:IsImmuneToEffect(e)) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x581f) and c:IsCanOverlay() and (not e or not c:IsImmuneToEffect(e))
end end
function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.xyzfilter(chkc) end
......
...@@ -39,8 +39,9 @@ function cm.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,8 +39,9 @@ function cm.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end end
function cm.rtgop(e,tp,eg,ep,ev,re,r,rp) function cm.rtgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if tc:IsRelateToEffect(e) then local g=tg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end end
end end
......
...@@ -16,12 +16,11 @@ function cm.initial_effect(c) ...@@ -16,12 +16,11 @@ function cm.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon) e1:SetCondition(cm.thcon)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -35,16 +34,18 @@ function cm.initial_effect(c) ...@@ -35,16 +34,18 @@ function cm.initial_effect(c)
e3:SetTarget(cm.mttg) e3:SetTarget(cm.mttg)
e3:SetOperation(cm.mtop) e3:SetOperation(cm.mtop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsLevel(0)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thfilter(c)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end return c:IsSetCard(0x581f) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
...@@ -53,18 +54,6 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,18 +54,6 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsLevel(0)
end
function cm.thfilter(c)
return c:IsSetCard(0x581f) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -72,6 +61,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,6 +61,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsLevel(0)
end
function cm.mtfilter(c) function cm.mtfilter(c)
return c:IsSetCard(0x581f) and c:IsCanOverlay() return c:IsSetCard(0x581f) and c:IsCanOverlay()
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