--Sands Crest function c11000138.initial_effect(c) --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(11000138,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) e1:SetRange(LOCATION_HAND) e1:SetTarget(c11000138.eqtg) e1:SetOperation(c11000138.eqop) c:RegisterEffect(e1) --indestructible effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetValue(1) c:RegisterEffect(e2) --destroy rep local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP) e5:SetCode(EFFECT_DESTROY_REPLACE) e5:SetTarget(c11000138.reptg) e5:SetOperation(c11000138.repop) c:RegisterEffect(e5) end function c11000138.filter(c) return c:IsFaceup() and c:IsSetCard(0x1F6) end function c11000138.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11000138.filter(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c11000138.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.SelectTarget(tp,c11000138.filter,tp,LOCATION_MZONE,0,1,1,nil) end function c11000138.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsControler(tp) then Duel.SendtoGrave(c,REASON_EFFECT) return end Duel.Equip(tp,c,tc,true) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(c11000138.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) end function c11000138.eqlimit(e,c) return c==e:GetLabelObject() end function c11000138.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local tc=c:GetEquipTarget() if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED) end if Duel.SelectYesNo(tp,aux.Stringid(11000138,1)) then return true else return false end end function c11000138.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) end