--篝 ~收获祭的覆唱~ function c33701064.initial_effect(c) --link summon c:EnableReviveLimit() aux.AddLinkProcedure(c,nil,2,99,c33701064.lcheck) --special summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(33701064,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e3:SetCountLimit(1,EFFECT_COUNT_CODE_OATH) e3:SetTarget(c33701064.sptg) e3:SetOperation(c33701064.spop) c:RegisterEffect(e3) --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(33701064,1)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetCountLimit(1,EFFECT_COUNT_CODE_OATH) e1:SetTarget(c33701064.thtg) e1:SetOperation(c33701064.thop) c:RegisterEffect(e1) --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(33701064,2)) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetCountLimit(1,EFFECT_COUNT_CODE_OATH) e1:SetCost(c33701064.cost) e1:SetOperation(c33701064.operation) c:RegisterEffect(e1) --spsummon bgm local e8=Effect.CreateEffect(c) e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e8:SetCode(EVENT_SPSUMMON_SUCCESS) e8:SetOperation(c33701064.sumsuc) c:RegisterEffect(e8) local e9=e8:Clone() e9:SetCode(EVENT_SUMMON_SUCCESS) c:RegisterEffect(e9) end function c33701064.sumsuc(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_MUSIC,0,aux.Stringid(33701064,3)) end function c33701064.lcheck(g,lc) return g:IsExists(Card.IsLevelAbove,1,nil,5) end function c33701064.spfilter(c,e,tp,zone) return c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function c33701064.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33701064.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c33701064.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c33701064.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c33701064.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f) if tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) end end function c33701064.filter(c) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3440,0x441) and c:IsAbleToHand() end function c33701064.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c33701064.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c33701064.check(g) if #g==1 then return true end local res=0x0 if g:IsExists(Card.IsSetCard,1,nil,0x3440) then res=res+0x1 end if g:IsExists(Card.IsSetCard,1,nil,0x441) then res=res+0x2 end return res~=0x1 and res~=0x2 end function c33701064.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c33701064.filter,tp,LOCATION_DECK,0,nil) if g:GetCount()==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g1=g:SelectSubGroup(tp,c33701064.check,false,1,2) Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g1) end function c33701064.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() end Duel.Release(e:GetHandler(),REASON_COST) end function c33701064.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(c33701064.damval) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) Duel.RegisterEffect(e2,tp) end function c33701064.damval(e,re,val,r,rp,rc) if bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 then return 0 else return val end end