黑魔术之幻魂『DIY』
「黑魔术师」+「黑魔术师」+「黑魔术师」
把自己场上存在的上记的卡送去墓地的场合才能从额外卡组特殊召唤(不需要「融合」魔法卡)。①这张卡在场上·墓地存在的场合卡名当作「黑魔术师」使用。②只要这张卡在场上表侧表示存在,场上的「永远之魂」不受对方卡效果的影响。③一回合一次,可以把墓地1只「黑魔术」怪兽除外,选择场上·双方墓地一张卡返回持有者卡组,这个效果在对方回合也能发动。
下面是小白自己写的脚本,有一个小的bug,就是幻魂在墓地时也能发③效果

function c9999.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,46986414,3,true,true)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c9999.spcon)
e1:SetOperation(c9999.spop)
c:RegisterEffect(e1)
--immune effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_SZONE,0)
e2:SetTarget(c9999.etarget)
e2:SetValue(c9999.efilter)
c:RegisterEffect(e2)
--change name
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetValue(46986414)
c:RegisterEffect(e3)
--return
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0x3c0)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE)
e4:SetCondition(c9999.tdcon)
e4:SetCost(c9999.cost)
e4:SetTarget(c9999.tdtg)
e4:SetOperation(c9999.tdop)
c:RegisterEffect(e4)
end
function c9999.etarget(e,c)
return c:IsCode(48680970)
end
function c9999.efilter(e,re,rp)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function c9999.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c9999.spfilter(c)
return c:IsFaceup() and c:IsCode(46986414) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c9999.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c9999.spfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,3,nil)
end
function c9999.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c9999.spfilter,tp,LOCATION_MZONE,0,3,3,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c9999.tdcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9999.tgfilter,tp,LOCATION_GRAVE,0,nil)
return g:GetCount(Card.GetCode)>=1
end
function c9999.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9999.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9999.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c9999.tgfilter(c)
return c:IsSetCard(0xa2) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c9999.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c9999.tgfilter,tp,LOCATION_GRAVE,0,nil)
return g:GetCount(Card.GetCode)>=1
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c9999.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9999.tgfilter,tp,LOCATION_GRAVE,0,nil)
local sg=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end