--Primalgeddon Flora --Scripted by: XGlitchy30 local cid,id=GetID() function cid.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCost(cid.spcost) e1:SetTarget(cid.sptg) e1:SetOperation(cid.spop) c:RegisterEffect(e1) --destroy local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,id+100) e3:SetCondition(cid.descon) e3:SetCost(aux.bfgcost) e3:SetTarget(cid.destg) e3:SetOperation(cid.desop) c:RegisterEffect(e3) end --SPSUMMON function cid.costfilter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DINOSAUR+RACE_DRAGON+RACE_SEASERPENT+RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsPublic() end ---------- function cid.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) if chk==0 then return true end end function cid.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=100 then return false end e:SetLabel(0) return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsExistingMatchingCard(cid.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,cid.costfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler(),e,tp) if #g>0 then Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) e:SetLabelObject(g:GetFirst()) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(e:GetHandler(),g:GetFirst()),2,0,0) end end function cid.spop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if not e:GetHandler():IsRelateToEffect(e) or not tc or not tc:IsLocation(LOCATION_HAND) or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end local g=Group.FromCards(e:GetHandler(),tc) if #g==2 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end --DESTROY function cid.sprfilter(c) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT+TYPE_PENDULUM+TYPE_PANDEMONIUM) end ---------- function cid.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(cid.sprfilter,tp,LOCATION_MZONE,0,1,nil) end function cid.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function cid.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end