Commit 1c7b2f39 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 4d79ae17
......@@ -70,7 +70,7 @@ function cm.filter1(c)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.filter1,1,nil)
return Duel.CheckReleaseGroup(c:GetControler(),cm.filter1,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.filter1,1,1,nil)
......
......@@ -62,8 +62,8 @@ end
function c12825613.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if c:GetOwner()~=e:GetHandlerPlayer() then
if Duel.Draw(p,d,REASON_EFFECT)>0 and c:GetOwner()~=e:GetHandlerPlayer() then
Duel.BreakEffect()
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.GetControl(c,1-tp)
else
......
......@@ -2,7 +2,14 @@
function c50221430.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,c50221430.ffilter,2,99,false)
--fusion material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_FUSION_MATERIAL)
e0:SetCondition(c50221430.fscondition())
e0:SetOperation(c50221430.fsoperation())
c:RegisterEffect(e0)
--atk def down
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
......@@ -45,6 +52,59 @@ function c50221430.initial_effect(c)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function c50221430.fscondition()
return function(e,g,gc,chkf)
if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler()
local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,c)
local tp=e:GetHandlerPlayer()
return mg:GetClassCount(Card.GetFusionAttribute)>=2
end
end
function c50221430.attrfilter(c,sg,fc)
return not sg:IsExists(Card.IsFusionAttribute,1,nil,c:GetFusionAttribute())
and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0
end
function c50221430.fsoperation()
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(Card.IsCanBeFusionMaterial,nil,c)
if mg:GetClassCount(Card.GetFusionAttribute)<2 then return end
local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end
while sg:GetCount()<2 do
local cg=mg:Filter(c50221430.attrfilter,nil,sg,c)
if cg:GetCount()==0 then break end
local cancel_group=sg:Clone()
if gc then cancel_group:RemoveCard(gc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local tc=cg:SelectUnselect(cancel_group,tp,false,false,3,63)
if not tc then break end
if sg:IsContains(tc) then
sg:RemoveCard(tc)
else
sg:AddCard(tc)
end
end
while sg:GetCount()<63 do
local button=true
local cg=mg:Filter(c50221430.attrfilter,nil,sg,c)
if cg:GetCount()==0 then break end
local cancel_group=sg:Clone()
if gc then cancel_group:RemoveCard(gc) end
if sg:GetCount()<2 then button=false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local tc=cg:SelectUnselect(cancel_group,tp,button,false,2,63)
if not tc then break end
if sg:IsContains(tc) then
sg:RemoveCard(tc)
else
sg:AddCard(tc)
end
end
Duel.SetFusionMaterial(sg)
end
end
function c50221430.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()>0
end
......@@ -56,9 +116,6 @@ function c50221430.valcheck(e,c)
local ct=g:GetClassCount(Card.GetAttribute)
e:GetLabelObject():SetLabel(ct)
end
function c50221430.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0xcb5) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c50221430.adcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffectLabel(50221431) and e:GetHandler():GetFlagEffectLabel(50221431)>0
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