--Little Hayley of Magnificent VINE function c16000069.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c16000069.spcon) c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(16000069,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetTarget(c16000069.pstg) e2:SetOperation(c16000069.psop) c:RegisterEffect(e2) -- local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(16000069,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,0x11e0) e3:SetCost(aux.bfgcost) e3:SetTarget(c16000069.target) e3:SetOperation(c16000069.activate) c:RegisterEffect(e3) end function c16000069.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function c16000069.psfilter(c) return c:IsSetCard(0x285a) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function c16000069.pstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c16000069.psfilter,tp,LOCATION_DECK,0,1,nil) end end function c16000069.psop(e,tp,eg,ep,ev,re,r,rp) if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and c16000069.psfilter(chkc) end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local c=e:GetHandler() local g=Duel.SelectMatchingCard(tp,c16000069.psfilter,tp,LOCATION_DECK,0,1,1,nil) local tc=g:GetFirst() if g:GetCount()>0 then Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) end end function c16000069.filter(c,e,tp) return c:IsType(TYPE_XYZ) and c:IsSetCard(0x85a) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsRankBelow(4) end function c16000069.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(c16000069.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function c16000069.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCountFromEx(tp)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c16000069.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end tc:SetMaterial(nil) if Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)~=0 then c:CancelToGrave() Duel.Overlay(tc,Group.FromCards(c)) end end