function c79854525.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(79854525,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCondition(c79854525.spcon) e1:SetTarget(c79854525.sptg) e1:SetOperation(c79854525.spop) c:RegisterEffect(e1) --float effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(79854525,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_GRAVE) e2:SetCondition(c79854525.thcon2) e2:SetTarget(c79854525.target) e2:SetOperation(c79854525.operation) e2:SetCountLimit(1,79854525) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCondition(c79854525.thcon3) c:RegisterEffect(e3) end --SS effect function c79854525.cfilter1(c) return c:IsFaceup() and c:IsRace(RACE_PLANT) end function c79854525.cfilter2(c) return c:IsFacedown() or not c:IsRace(RACE_PLANT) end function c79854525.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c79854525.cfilter1,tp,LOCATION_MZONE,0,2,nil) and not Duel.IsExistingMatchingCard(c79854525.cfilter2,tp,LOCATION_MZONE,0,1,nil) end function c79854525.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return 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 c79854525.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then Duel.SendtoGrave(c,REASON_RULE) end end --float effect function c79854525.thcon2(e,tp,eg,ep,ev,re,r,rp) return bit.band(r,REASON_SYNCHRO)==0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function c79854525.filter(c,e,tp) return c:IsRace(RACE_PLANT) and c:IsLevel(1) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c79854525.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c79854525.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c79854525.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c79854525.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e2) end local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetTargetRange(1,0) e3:SetTarget(c79854525.splimit) e3:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e3,tp) end function c79854525.splimit(e,c,tp,sumtp,sumpos) return c:GetRace()~=RACE_PLANT end function c79854525.thcon3(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsRace(RACE_PLANT) end