--Girl of Gust Vine function c500318103.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(500318103,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,500318103) e1:SetTarget(c500318103.target) e1:SetOperation(c500318103.operation) c:RegisterEffect(e1) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) local e3=e1:Clone() e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e3) --tograve local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(500318103,1)) e4:SetCategory(CATEGORY_TOGRAVE) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e4:SetCode(EVENT_TO_GRAVE) e4:SetCountLimit(1,500318104) e4:SetCondition(c500318103.tgcon) e4:SetTarget(c500318103.tgtg) e4:SetOperation(c500318103.tgop) c:RegisterEffect(e4) --lv change local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,500318105) e4:SetTarget(c500318103.lvtg) e4:SetOperation(c500318103.lvop) c:RegisterEffect(e4) end function c500318103.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c500318103.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function c500318103.filter(c,e,tp) return c:IsSetCard(0x885a) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c500318103.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c500318103.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetOperation(c500318103.desop) e1:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e1) end end function c500318103.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function c500318103.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN) end function c500318103.kfilter(c) return c:IsSetCard(0x885a) and c:IsType(TYPE_MONSTER) and not c:IsCode(500318103) and c:IsAbleToGrave() end function c500318103.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c500318103.kfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function c500318103.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c500318103.kfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end function c500318103.baefilter(c) return c:IsFaceup() and c:IsSetCard(0x85a) and c:GetLevel()>0 end function c500318103.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c500318103.baefilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c500318103.baefilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,c500318103.baefilter,tp,LOCATION_MZONE,0,1,1,nil) local t={} local i=1 local p=1 local lv=g:GetFirst():GetLevel() for i=1,5 do if lv~=i then t[p]=i p=p+1 end end t[p]=nil Duel.Hint(HINT_SELECTMSG,tp,567) e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t))) end function c500318103.lvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(e:GetLabel()) e1:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e1) end end