--瑚太朗 ~重生的收获祭~ function c33701072.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,nil,5,2,nil,nil,99) c:EnableReviveLimit() --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(33701072,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(c33701072.cost) e1:SetTarget(c33701072.target) e1:SetOperation(c33701072.operation) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(33701072,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCost(c33701072.cost) e2:SetTarget(c33701072.sptg) e2:SetOperation(c33701072.spop) c:RegisterEffect(e2) --add local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(33701072,2)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCost(c33701072.cost) e2:SetTarget(c33701072.addct) e2:SetOperation(c33701072.addc) c:RegisterEffect(e2) --spsummon bgm local e8=Effect.CreateEffect(c) e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e8:SetCode(EVENT_SPSUMMON_SUCCESS) e8:SetOperation(c33701072.sumsuc) c:RegisterEffect(e8) local e9=e8:Clone() e9:SetCode(EVENT_SUMMON_SUCCESS) c:RegisterEffect(e9) end function c33701072.sumsuc(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_MUSIC,0,aux.Stringid(33701072,3)) end function c33701072.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c33701072.filter(c,e,tp) return c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c33701072.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33701072.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c33701072.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c33701072.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c33701072.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end function c33701072.filter2(c,e,tp) return c:IsSetCard(0x6440) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c33701072.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_HAND) and chkc:IsControler(tp) and c33701072.filter2(chkc,e,tp) end if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(c33701072.filter2,tp,LOCATION_HAND,0,2,nil,e,tp) end local ct=math.min(4,(Duel.GetLocationCount(tp,LOCATION_MZONE))) if Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1) then ct=2 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c33701072.filter2,tp,LOCATION_HAND,0,2,ct,nil) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),tp,LOCATION_HAND) end function c33701072.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if g:GetCount()>3 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if g:GetCount()>ft then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) g=g:Select(tp,ft,ft,nil) end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end function c33701072.addct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x1021) end function c33701072.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then e:GetHandler():AddCounter(0x1021,3) end end