--Runeforged Karakuri Shogen local cid,id=GetID() function cid.initial_effect(c) c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,80000800,aux.FilterBoolFunction(Card.IsFusionSetCard,0x11),1,true,true) Auxiliary.Add_Runeslots(c,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsDefensePos)) e1:SetValue(1) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_POSITION) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(cid.rpcon) e2:SetTarget(cid.postg) e2:SetOperation(cid.posop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_CHANGE_POS) e3:SetRange(LOCATION_SZONE) e3:SetOperation(cid.acop) c:RegisterEffect(e3) end function cid.rpcon(e,tp,eg,ep,ev,re,r,rp) local red = 0x1ff5 local blue = 0x2ff5 local purple = 0x3ff5 local yellow = 0x4ff5 local orange = 0x5ff5 local green = 0x6ff5 local prismatic = 0x7ff5 return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,blue) end function cid.filter(c) return c:IsCanChangePosition() end function cid.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and cid.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(cid.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectTarget(tp,cid.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) end function cid.posop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end end function cid.acop(e,tp,eg,ep,ev,re,r,rp) Duel.GainRP(e:GetHandlerPlayer(),100) end