Commit 05add4ed authored by POLYMER's avatar POLYMER

fix

parent 14cc27a5
...@@ -132,13 +132,13 @@ end ...@@ -132,13 +132,13 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler()--限制为怪兽区 local tp=c:GetControler()--限制为怪兽区
return Duel.IsExistingMatchingCard(cm.fusfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.fusfilter2,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.fusfilter1,tp,LOCATION_MZONE,0,1,nil,tp) --and Duel.IsExistingMatchingCard(cm.fusfilter2,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local ga=Duel.SelectMatchingCard(tp,cm.fusfilter1,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local ga=Duel.SelectMatchingCard(tp,cm.fusfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
local gb=Duel.SelectMatchingCard(tp,cm.fusfilter2,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local gb=Duel.SelectMatchingCard(tp,cm.fusfilter2,tp,LOCATION_MZONE,0,1,1,ga):GetFirst()
Duel.MoveToField(ga,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(ga,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
...@@ -156,8 +156,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -156,8 +156,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
gb:RegisterEffect(e2) gb:RegisterEffect(e2)
end end
function cm.fusfilter1(c) function cm.fusfilter1(c,tp)
return c:IsLevel(1) or c:IsLink(1) return c:IsLevel(1) or c:IsLink(1) and Duel.IsExistingMatchingCard(cm.fusfilter2,tp,LOCATION_MZONE,0,1,c)
end end
function cm.fusfilter2(c) function cm.fusfilter2(c)
return c:IsLevel(12) or c:IsType(TYPE_NORMAL) return c:IsLevel(12) or c:IsType(TYPE_NORMAL)
......
...@@ -29,9 +29,7 @@ function cm.initial_effect(c) ...@@ -29,9 +29,7 @@ function cm.initial_effect(c)
e3:SetOperation(cm.smop) e3:SetOperation(cm.smop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.spcon(e,c) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end end
function cm.repfilter(c,tp) function cm.repfilter(c,tp)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
...@@ -12,6 +13,7 @@ function s.initial_effect(c) ...@@ -12,6 +13,7 @@ function s.initial_effect(c)
e4:SetOperation(s.synop) e4:SetOperation(s.synop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(1190)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
......
...@@ -6,11 +6,15 @@ function s.initial_effect(c) ...@@ -6,11 +6,15 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.condition)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function s.costfilter(c) function s.costfilter(c)
return c:IsSetCard(0xc33) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToDeckAsCost() return c:IsSetCard(0xc33) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToDeckAsCost()
end end
...@@ -25,12 +29,14 @@ end ...@@ -25,12 +29,14 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end end
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then local ec=re:GetHandler()
Duel.SendtoDeck(eg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoDeck(ec,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end end
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