Commit 85631cf5 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c16348051.lua

parent 1e7b1cf0
......@@ -25,31 +25,33 @@ c16348051.fusion_effect=true
function c16348051.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x6dc2) and c:IsCanBeFusionMaterial()
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c16348051.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.IsExistingMatchingCard(c16348051.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function c16348051.spfilter(c,e,tp,tc)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6dc2) and c:IsLevel(6) and aux.IsMaterialListCode(c,tc:GetCode())
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true)
and ((Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 and c:IsLocation(LOCATION_EXTRA)) or
(Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_GRAVE)))
end
function c16348051.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16348051.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c16348051.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16348051.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c16348051.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_FMATERIAL) then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c16348051.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sg=Duel.SelectMatchingCard(tp,c16348051.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp,tc)
local sc=sg:GetFirst()
if sc then
sc:SetMaterial(Group.FromCards(tc))
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
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