--Runecrafter's Forge local cid,id=GetID() function cid.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetOperation(cid.activate) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) e2:SetCondition(cid.reccon) e2:SetOperation(cid.recop) c:RegisterEffect(e2) --cannot be target local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetRange(LOCATION_SZONE) e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTarget(cid.xyztarget) e3:SetValue(aux.tgoval) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_INDESTRUCTABLE) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,0) e4:SetTarget(cid.xyztarget) e4:SetValue(cid.indesval) c:RegisterEffect(e4) end function cid.thfilter(c) return (c:IsCode(80000800) or c:IsCode(80000801)) and c:IsAbleToHand() end function cid.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(cid.thfilter,tp,LOCATION_DECK,0,nil) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end end function cid.cfilter(c,tp) return c:IsSetCard(0xfe9) end function cid.reccon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(cid.cfilter,1,nil,nil) end function cid.recop(e,tp,eg,ep,ev,re,r,rp) Duel.GainRP(tp,600) end function cid.indesval(e,re,rp) return rp~=e:GetHandlerPlayer() end function cid.xyztarget(e,c) return c:IsSetCard(0xfe0) and c:IsStatus(STATUS_SPSUMMON_TURN) end