--Emelo, Fusionist of Gust Vine function c500317451.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetValue(1) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) c:RegisterEffect(e2) --search local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(500317451,0)) e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e5:SetCode(EVENT_TO_GRAVE) e5:SetCountLimit(1,500317451) e5:SetCondition(c500317451.condition) e5:SetTarget(c500317451.target2) e5:SetOperation(c500317451.operation2) c:RegisterEffect(e5) --fusion substitute local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(500317451) c:RegisterEffect(e6) end function c500317451.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN) end function c500317451.filter(c) return (c:IsSetCard(0x885a) and c:IsType(TYPE_SPELL+TYPE_TRAP)) or (c:IsSetCard(0x47) or c:IsSetCard(0x46) or c:IsCode(24094653)) and c:IsAbleToHand() end function c500317451.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c500317451.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c500317451.operation2(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c500317451.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) e2:SetTarget(c500317451.splimit) e2:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e2,tp) end function c500317451.splimit(e,c) return not c:IsSetCard(0x885a) end