--Oracle Tuning function c249000741.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(c249000741.condition) e1:SetTarget(c249000741.target) e1:SetOperation(c249000741.activate) c:RegisterEffect(e1) end function c249000741.confilter(c) return c:IsSetCard(0x1ED) and c:IsFaceup() and c:IsType(TYPE_MONSTER) end function c249000741.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c249000741.confilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local ct=g:GetClassCount(Card.GetCode) return ct>1 end function c249000741.filter1(c,e,tp) return c:IsType(TYPE_TUNER) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c249000741.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end function c249000741.filter2(c,e,tp,tuner) return (not c:IsType(TYPE_TUNER)) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c249000741.synfilter,tp,LOCATION_EXTRA,0,1,nil,tuner,Group.FromCards(tuner,c)) end function c249000741.synfilter(c,tuner,nontuner) return c:IsSynchroSummonable(tuner,nontuner) end function c249000741.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(c249000741.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg1=Duel.SelectMatchingCard(tp,c249000741.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local tc1=sg1:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg2=Duel.SelectMatchingCard(tp,c249000741.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tc1) sg1:Merge(sg2) Duel.SetTargetCard(sg1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0) end function c249000741.filter3(c,e,tp) return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c249000741.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c249000741.filter3,nil,e,tp) if g:GetCount()<2 then return end local tc=g:GetFirst() while tc do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetReset(RESET_EVENT+RESETS_REDIRECT) e3:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e3,true) tc=g:GetNext() end Duel.SpecialSummonComplete() if Duel.GetLocationCountFromEx(tp,tp,g)<=0 then return end Duel.BreakEffect() local tuner=g:GetFirst() local syng=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,tuner,g) if syng:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sync=syng:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sync:GetFirst(),tuner,g) end end