Commit ba6051b8 authored by Nemo Ma's avatar Nemo Ma

fix

parent f3c1eb82
......@@ -27,6 +27,18 @@ function cm.initial_effect(c)
e2:SetTarget(cm.actarget)
e2:SetOperation(cm.costop)
c:RegisterEffect(e2)
--type
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e5:SetCode(EFFECT_REMOVE_TYPE)
e5:SetRange(0xff)
e5:SetValue(TYPE_FUSION)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_ADD_TYPE)
e6:SetValue(0x10000000)
c:RegisterEffect(e6)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
......
......@@ -90,7 +90,7 @@ function cm.filter1(c)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial()
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf)
return c:IsType(TYPE_FUSION+0x10000000) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
......@@ -99,7 +99,7 @@ function cm.filter4(c,e)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function cm.filter5(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf)
return c:IsType(TYPE_FUSION+0x10000000) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter6(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
......
......@@ -23,6 +23,18 @@ function cm.initial_effect(c)
e2:SetCondition(cm.setcon)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
--type
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e5:SetCode(EFFECT_REMOVE_TYPE)
e5:SetRange(0xff)
e5:SetValue(TYPE_FUSION)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_ADD_TYPE)
e6:SetValue(0x10000000)
c:RegisterEffect(e6)
end
function cm.ffilter(c,fc,sub,mg,sg)
return c:IsLevelAbove(1) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsLevel,1,c,c:GetLevel()))
......@@ -72,6 +84,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
sg=sg:Select(tp,ft,ft,nil)
end
g:Sub(sg)
Duel.ConfirmCards(1-tp,sg)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
sg=sg:Filter(cm.mzfilter,nil,tp)
Duel.ShuffleSetCard(sg)
......
......@@ -81,7 +81,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
]]
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>0 and sg2:IsExists(cm.filter2a,1,nil) then
local sg3=sg2:Filter(cm.filter2a,nil)
local sg3=sg2:Filter(cm.filter2a,nil):Clone()
Duel.ConfirmCards(tp,sg3)
if Duel.SelectYesNo(aux.Stringid(m,10)) then
local ct=sg3:GetCount()
......
......@@ -55,7 +55,7 @@ end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
......@@ -75,8 +75,8 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=tama.tamas_selectAllSelectForAbove(mg,el,tp)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
......
......@@ -58,7 +58,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
e1:SetValue(cm.efilter)
tc:RegisterEffect(e1)
end
......
......@@ -4,13 +4,14 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(nil),2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e0:SetValue(aux.tgoval)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
......@@ -39,7 +39,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.val(e,re,rp)
return rp==re:GetHandlerPlayer() and re:IsActiveType(TYPE_MONSTER)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER)
end
function cm.fs(c)
return c:IsPreviousLocation(LOCATION_EXTRA) and c:IsType(TYPE_SYNCHRO)
......
......@@ -52,7 +52,7 @@ function cm.filter1(c,e)
return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c))
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and c:IsLevelBelow(9) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c)
......
......@@ -25,7 +25,7 @@ function c82540000.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(c82550000.fuslimit)
e3:SetValue(c82540000.fuslimit)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
......
......@@ -92,6 +92,7 @@ end
function c9910065.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c9910065.repfilter,nil,tp)
if chk==0 then return g:GetCount()>0 end
g:KeepAlive()
e:SetLabelObject(g)
return true
end
......@@ -108,4 +109,5 @@ function c9910065.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tc:GetControler(),1,REASON_EFFECT)
tc=g:GetNext()
end
g:DeleteGroup()
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