--created & coded by Lyris, art from "Vylon Element" & at https://us.123rf.com/450wm/racener/racener1605/racener160500001/56306432-abstract-blue-luminous-sound-waves-background-for-parties-clubs-discos-and-concerts-.jpg?ver=6 --インライトメント・金色ヘッドホン local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(1109) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(function(e,tc) return tc:IsSetCard(0xda6) and tc~=c end) e2:SetValue(1) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_BATTLED) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetDescription(1109) e3:SetCondition(s.descon) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() end Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) end function s.filter(c) return c:IsCode(CARD_INLIGHTENED_PSYCHIC_HELMET) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local tg=Duel.GetFirstMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil) if tg then Duel.SendtoGrave(tg,nil,REASON_EFFECT) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if d and d:IsControler(tp) then a,d=d,a end return a:IsSetCard(0xda6) and a~=e:GetHandler() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.filter1(c) return c:GetLevel()==1 and c:IsSetCard(0xda6) and c:IsAbleToHand() end function s.filter2(c) return c:IsSetCard(0x1da6) and c:IsAbleToHand() end function s.thop(e,tp,eg,ep,ev,re,r,rp) local dir=Duel.GetAttackTarget()==nil Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil) if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,g) local mg=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_DECK,0,nil) if dir and #mg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=mg:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end end end