Commit 7621ec56 authored by Vury Leo's avatar Vury Leo

pick

parent c93dd8ff
--ジェムナイト・フュージョン --ジェムナイト・フュージョン
function c1264319.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) FusionSpell.RegisterSummonEffect(c,{
e1:SetDescription(aux.Stringid(1264319,0)) fusfilter=s.fusfilter
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) })
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1264319.target)
e1:SetOperation(c1264319.activate)
c:RegisterEffect(e1)
--salvage --salvage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(1264319,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1264319.thcost) e2:SetCost(s.thcost)
e2:SetTarget(c1264319.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(c1264319.thop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c1264319.filter1(c,e)
return not c:IsImmuneToEffect(e) function s.fusfilter(c)
return c:IsSetCard(0x1047)
end end
function c1264319.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c)) function s.thfilter(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c1264319.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1264319.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c1264319.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c1264319.thfilter(c)
return c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function c1264319.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1264319.thfilter,tp,LOCATION_GRAVE,0,1,nil) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1264319.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c1264319.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c1264319.thop(e,tp,eg,ep,ev,re,r,rp)
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
......
--ブリリアント・フュージョン --ブリリアント・フュージョン
function c7394770.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=FusionSpell.CreateSummonEffect(c,{
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES) fusfilter=s.fusfilter,
e1:SetType(EFFECT_TYPE_ACTIVATE) pre_select_mat_location=LOCATION_DECK,
e1:SetCode(EVENT_FREE_CHAIN) stage_x_operation=s.stage_x_operation
e1:SetCountLimit(1,7394770+EFFECT_COUNT_CODE_OATH) })
e1:SetTarget(c7394770.target) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c7394770.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Destroy --Destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetOperation(c7394770.desop) e2:SetOperation(s.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk --atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -22,59 +22,20 @@ function c7394770.initial_effect(c) ...@@ -22,59 +22,20 @@ function c7394770.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c7394770.atkcon) e3:SetCondition(s.atkcon)
e3:SetCost(c7394770.atkcost) e3:SetCost(s.atkcost)
e3:SetTarget(c7394770.atktg) e3:SetTarget(s.atktg)
e3:SetOperation(c7394770.atkop) e3:SetOperation(s.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c7394770.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() function s.fusfilter(c)
return c:IsSetCard(0x1047)
end end
function c7394770.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) ---@type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
end function s.stage_x_operation(e,tc,tp,stage)
function c7394770.filter2(c,e,tp,m,f,chkf) if stage==FusionSpell.STAGE_BEFORE_SUMMON_COMPLETE then
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c7394770.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c7394770.filter0,tp,LOCATION_DECK,0,nil)
local res=Duel.IsExistingMatchingCard(c7394770.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c7394770.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c7394770.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(c7394770.filter1,tp,LOCATION_DECK,0,nil,e)
local sg1=Duel.GetMatchingGroup(c7394770.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c7394770.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
...@@ -84,41 +45,36 @@ function c7394770.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,41 +45,36 @@ function c7394770.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then elseif stage==FusionSpell.STAGE_AT_SUMMON_OPERATION_FINISH then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
e:GetHandler():SetCardTarget(tc) e:GetHandler():SetCardTarget(tc)
end end
end end
function c7394770.desop(e,tp,eg,ep,ev,re,r,rp)
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget() local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c7394770.atkcon(e,tp,eg,ep,ev,re,r,rp)
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFirstCardTarget() return e:GetHandler():GetFirstCardTarget()
end end
function c7394770.cfilter(c)
function s.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable() return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end end
function c7394770.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7394770.cfilter,tp,LOCATION_HAND,0,1,nil) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,c7394770.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end end
function c7394770.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFirstCardTarget() end if chk==0 then return e:GetHandler():GetFirstCardTarget() end
end end
function c7394770.atkop(e,tp,eg,ep,ev,re,r,rp)
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget() local tc=e:GetHandler():GetFirstCardTarget()
if not tc then return end if not tc then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
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