--Pastel Palettes - Band Maya --Script by XyLeN function c20015008.initial_effect(c) --enable return aux.EnablePastelPalettesReturn(c,aux.Stringid(20015008,1),aux.Stringid(20015008,2),20015008,20015008) --change pose local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_POSITION+CATEGORY_HANDES) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,20015008+200) e1:SetTarget(c20015008.postg) e1:SetOperation(c20015008.posop) c:RegisterEffect(e1) end function c20015008.filter(c) return c:IsFaceup() and c:IsCanTurnSet() end function c20015008.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and c20015008.filter(chkc) end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsExistingTarget(c20015008.filter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,c20015008.filter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) end function c20015008.posop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end end end dofile("script/Pastel Palettes Core.lua")