--Fusion-Transcender Sorceress function c249000901.initial_effect(c) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(63060238,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetTarget(c249000901.thtg) e1:SetOperation(c249000901.thop) c:RegisterEffect(e1) --change name local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCost(c249000901.cost) e2:SetOperation(c249000901.operation) c:RegisterEffect(e2) end function c249000901.filter(c) return c:IsCode(249000900) and c:IsAbleToHand() end function c249000901.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c249000901.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c249000901.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c249000901.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c249000901.costfilter(c) return c:IsCode(249000900) and not c:IsPublic() end function c249000901.costfilter2(c) return c:IsType(TYPE_FUSION) and c.material end function c249000901.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c249000901.costfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c249000901.costfilter2,tp,LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,c249000901.costfilter,tp,LOCATION_HAND,0,1,1,nil) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) g=Duel.SelectMatchingCard(tp,c249000901.costfilter2,tp,LOCATION_EXTRA,0,1,1,nil) Duel.ConfirmCards(1-tp,g) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) local material_table={} local i=1 local key local value for key,value in pairs(g:GetFirst().material) do material_table[i]=key i=i+1 end local code_table = {material_table[1],OPCODE_ISCODE} if #material_table > 1 then code_table[3]=material_table[2] code_table[4]=OPCODE_ISCODE code_table[5]=OPCODE_OR i=3 local j=6 while material_table[i] do code_table[j]=material_table[i] i=i+1 j=j+1 code_table[j]=OPCODE_ISCODE j=j+1 code_table[j]=OPCODE_OR j=j+1 end else code_table[3]=material_table[1] code_table[4]=OPCODE_ISCODE code_table[5]=OPCODE_OR end getmetatable(e:GetHandler()).announce_filter={table.unpack(code_table)} local ac=Duel.AnnounceCardFilter(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter)) Duel.SetTargetParam(ac) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0) end function c249000901.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(ac) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(89312388,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetLabelObject(e1) e2:SetOperation(c249000901.rstop) c:RegisterEffect(e2) end function c249000901.rstop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=e:GetLabelObject() e1:Reset() Duel.HintSelection(Group.FromCards(c)) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end