Commit 459dce57 authored by 未闻皂名's avatar 未闻皂名

2023/11/6 新增:融合术取消

parent 71fe4c20
Pipeline #23965 passed with stages
in 7 minutes and 8 seconds
No preview for this file type
......@@ -4,10 +4,12 @@ local cm=_G["c"..m]
cm.name="青眼究极龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedureSP(c,cm.matfilter,cm.check,2,3)
if not c:IsStatus(STATUS_COPYING_EFFECT) then
local mt=getmetatable(c)
if mt.material==nil then
mat={}
if c.material==nil then
local mat={}
mat[120120000]=true
mt.material=mat
end
......@@ -15,11 +17,9 @@ function cm.initial_effect(c)
mt.material_count={3,3}
end
end
--Fusion Material
RD.AddFusionProcedureSP(c,cm.material,cm.check,2,3)
end
--Fusion Material
function cm.material(c,fc,sub)
function cm.matfilter(c,fc,sub)
return c:IsFusionCode(list[1]) or (sub and c:CheckFusionSubstitute(fc))
end
function cm.exfilter(c)
......
local m=120253066
local cm=_G["c"..m]
cm.name="融合术取消"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsAbleToExtra()
end
function cm.spfilter(c,e,tp,fc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and aux.IsMaterialListCode(fc,c:GetCode())
and c:GetReason()&(REASON_FUSION+REASON_MATERIAL)==(REASON_FUSION+REASON_MATERIAL) and c:GetReasonCard()==fc
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
and fc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
local mg=tc:GetMaterial()
local ct=mg:GetCount()
local min,max=aux.GetMaterialListCount(tc)
local sump=tc:GetControler()
local sumtype=tc:GetSummonType()
if RD.SendToDeckAndExists(tc) and sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
and ct>0 and min==max and min==ct and ct<=Duel.GetLocationCount(sump,LOCATION_MZONE)
and mg:FilterCount(aux.NecroValleyFilter(cm.spfilter),nil,e,tp,tc,mg)==ct
and not Duel.IsPlayerAffectedByEffect(sump,59822133)
and Duel.SelectYesNo(sump,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(mg,0,sump,sump,false,false,POS_FACEUP)
end
end)
end
\ No newline at end of file
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