--[[ Lone Spooky Dogwood Author: D1G1TAL Scripted by: Xarc ]] local s,id=GetID() function s.initial_effect(c) aux.AddCodeList(c,60643553) --If your opponent Special Summons an Effect Monster (except during the Damage Step): You can discard this card; add 1 "Ghost Sister & Spooky Dogwood" from your Deck or GY to your hand. local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_CUSTOM+id) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetRange(LOCATION_HAND) e1:HOPT() e1:SetCondition(s.thcon) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) aux.RegisterMergedDelayedEvent(c,id,EVENT_SPSUMMON_SUCCESS) --You can banish this card from your GY, then target 1 face-up monster your opponent controls whose ATK is less than or equal to the difference between your LP and your opponent's; banish it. local e2=Effect.CreateEffect(c) e2:Desc(1) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:HOPT() e2:SetCost(aux.bfgcost) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end function s.cfilter(c,tp) return c:IsFaceup() and c:IsSummonPlayer(1-tp) and c:IsType(TYPE_EFFECT) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.thcost(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(60643553) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.rmfilter(c,lpdiff) return c:IsAbleToRemove() and c:IsFaceup() and c:IsAttackBelow(lpdiff) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local lpdiff=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp)) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.rmfilter(chkc,lpdiff) end if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE,1,nil,lpdiff) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE,1,1,nil,lpdiff) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end