--Doomsday Artifice Sechs --Scripted by Zerry function c67864749.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(nil),1) c:EnableReviveLimit() --Special Summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,67864749) e1:SetCost(c67864749.cost) e1:SetTarget(c67864749.sptg) e1:SetOperation(c67864749.spop) c:RegisterEffect(e1) --Natural Tune local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1,67864849) e4:SetCost(c67864749.cost2) e4:SetTarget(c67864749.target) e4:SetOperation(c67864749.operation) c:RegisterEffect(e4) end function c67864749.spfilter1(c,e,tp) return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemoveAsCost() end function c67864749.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c67864749.spfilter1,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,c67864749.spfilter1,tp,LOCATION_HAND,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function c67864749.filter1(c,e,tp) return c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(67864749) end function c67864749.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67864749.filter1(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c67864749.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c67864749.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c67864749.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(c67864749.splimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function c67864749.splimit(e,c) return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) end function c67864749.cost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function c67864749.filter(c) return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and not c:IsType(TYPE_TUNER) end function c67864749.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67864749.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c67864749.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,c67864749.filter,tp,LOCATION_MZONE,0,1,1,nil) end function c67864749.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and c67864749.filter(tc) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end end