--Untergang Soldier, Lancelot function c400003.initial_effect(c) --send to grave local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(68989981,0)) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1) e1:SetTarget(c400003.tgtg) e1:SetOperation(c400003.tgop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPSUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetCondition(c400003.condition) e2:SetTarget(c400003.target) e2:SetOperation(c400003.operation) c:RegisterEffect(e2) end function c400003.tgfilter(c) return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0x246) and c:IsAbleToGrave() end function c400003.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c400003.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function c400003.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c400003.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end function c400003.spfilter(c) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x246) and c:IsCanBeSpecialSummoned() end function c400003.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetTurnPlayer()~=tp and re:GetHandler():IsType(TYPE_QUICKPLAY) and re:GetHandler():IsSetCard(0x246) and rp==tp end function c400003.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c400003.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function c400003.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c400003.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end