--Lava Glider --Scripted by: XGlitchy30 local cid,id=GetID() function cid.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(cid.sprcon) c:RegisterEffect(e1) --equip local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCategory(CATEGORY_EQUIP) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetTarget(cid.eqtg) e2:SetOperation(cid.eqop) c:RegisterEffect(e2) --unequip local e2x=Effect.CreateEffect(c) e2x:SetDescription(aux.Stringid(id,1)) e2x:SetCategory(CATEGORY_SPECIAL_SUMMON) e2x:SetType(EFFECT_TYPE_IGNITION) e2x:SetRange(LOCATION_SZONE) e2x:SetTarget(cid.sptg) e2x:SetOperation(cid.spop) c:RegisterEffect(e2x) --stats boost local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(500) c:RegisterEffect(e3) --desrep local e3x=Effect.CreateEffect(c) e3x:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP) e3x:SetCode(EFFECT_DESTROY_REPLACE) e3x:SetTarget(cid.desreptg) e3x:SetOperation(cid.desrepop) c:RegisterEffect(e3x) --search local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DAMAGE) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetCondition(cid.sccon) e4:SetCost(cid.sccost) e4:SetTarget(cid.sctg) e4:SetOperation(cid.scop) c:RegisterEffect(e4) --eqlimit local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_EQUIP_LIMIT) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e5:SetValue(cid.eqlimit) c:RegisterEffect(e5) c:SetUniqueOnField(1,0,id,LOCATION_SZONE) end --SPSUMMON PROC function cid.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x32) and c:GetAttack()>=1800 end function cid.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cid.cfilter,tp,LOCATION_MZONE,0,1,nil) end --EQUIP --filters function cid.filter(c) local ct1,ct2=c:GetUnionCount() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x32) and ct2==0 end --------- function cid.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc~=c and cid.filter(chkc) end if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(cid.filter,tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,cid.filter,tp,LOCATION_MZONE,0,1,1,c) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) c:RegisterFlagEffect(id,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function cid.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not tc:IsRelateToEffect(e) or not cid.filter(tc) then Duel.SendtoGrave(c,REASON_EFFECT) return end if not Duel.Equip(tp,c,tc,false) then return end aux.SetUnionState(c) end --UNEQUIP function cid.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) c:RegisterFlagEffect(id,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function cid.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) end --DESTROY REPLACE function cid.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local tg=c:GetEquipTarget() if chk==0 then return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) and tg and tg:IsReason(REASON_BATTLE+REASON_EFFECT) and not tg:IsReason(REASON_REPLACE) end return Duel.SelectEffectYesNo(tp,c,96) end function cid.desrepop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) end --SEARCH --filters function cid.scfilter(c) return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(id) end --------- function cid.sccon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() return ec and ec:IsControler(tp) end function cid.sccost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,800) end Duel.PayLPCost(tp,800) end function cid.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cid.scfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end function cid.scop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cid.scfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) local sg=g:Filter(Card.IsLocation,nil,LOCATION_HAND) if #sg>0 then Duel.ConfirmCards(1-tp,sg) Duel.Damage(1-tp,200,REASON_EFFECT) end end end --EQUIP LIMIT function cid.eqlimit(e,c) return c:IsSetCard(0x32) or e:GetHandler():GetEquipTarget()==c end