--Heterochromic Dark Sorceress function c249000440.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(249000440,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(c249000440.spcon) e1:SetTarget(c249000440.sptg) e1:SetOperation(c249000440.spop) c:RegisterEffect(e1) --draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(31786629,0)) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCost(c249000440.cost) e2:SetTarget(c249000440.target) e2:SetOperation(c249000440.operation) c:RegisterEffect(e2) end function c249000440.spfilter(c,tp) return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER) end function c249000440.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c249000440.spfilter,1,nil,tp) end function c249000440.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c249000440.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end end function c249000440.filter(c) return c:IsSetCard(0x1BE) and c:IsDiscardable() end function c249000440.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c249000440.filter,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,c249000440.filter,1,1,REASON_COST+REASON_DISCARD) end function c249000440.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function c249000440.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g2=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) if g2:GetCount()>0 then Duel.HintSelection(g2) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(-600) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) g2:GetFirst():RegisterEffect(e2) end end