--超自研的互助 function c33701079.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(33701079,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetRange(LOCATION_SZONE) e2:SetCondition(c33701079.spcon) e2:SetTarget(c33701079.sptg) e2:SetOperation(c33701079.spop) c:RegisterEffect(e2) --cannot attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(c33701079.atktarget) c:RegisterEffect(e2) end function c33701079.atktarget(e,c) return not c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_EARTH) end function c33701079.cfilter(c,tp) return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_EARTH) end function c33701079.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c33701079.cfilter,1,nil,tp) end function c33701079.spfilter(c,e,tp) return c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function c33701079.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33701079.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c33701079.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c33701079.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SendtoHand(c,nil,REASON_EFFECT) end end