Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Protector Priest Shimon
- Spellcaster/DARK/Level 2/ATK 1000/DEF 1000 (Synchro/Tuner)
- 1 Tuner + 1 "Forbidden One" monster
- If this card is Synchro Summoned: You can send 1 "Forbidden One" monster from your hand or Deck to the GY, and if you do, add 1 "Exodia" card or "Obliterate!!!" from your Deck to your hand. If this Synchro Summoned monster would be used as Synchro Material, 1 "Forbidden One" monster in your Deck can be used as 1 of the other Synchro Materials.
- --Protector Priest Shimon 210545402
- function c210545402.initial_effect(c)
- --synchro summon
- aux.AddSynchroProcedure(c,nil,1,1,aux.NonTuner(Card.IsSetCard,0x40),1,99)
- c:EnableReviveLimit()
- --destroy
- local e1=Effect.CreateEffect(c)
- e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
- e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
- e1:SetCode(EVENT_SPSUMMON_SUCCESS)
- e1:SetProperty(EFFECT_FLAG_DELAY)
- e1:SetCondition(c210545402.con)
- e1:SetTarget(c210545402.destg)
- e1:SetOperation(c210545402.desop)
- c:RegisterEffect(e1)
- --synchro custom
- local e2=Effect.CreateEffect(c)
- e2:SetType(EFFECT_TYPE_SINGLE)
- e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
- e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
- e2:SetCondition(c210545402.syncon)
- e2:SetTarget(c210545402.syntg)
- e2:SetValue(1)
- e2:SetOperation(c210545402.synop)
- c:RegisterEffect(e2)
- end
- function c210545402.con(e,tp,eg,ep,ev,re,r,rp)
- return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
- end
- function c210545402.thfilter(c)
- return c:IsSetCard(0xde) or c:IsCode(64043465) and c:IsAbleToHand()
- end
- function c210545402.filter(c)
- return c:IsSetCard(0x40) and c:IsAbleToGrave()
- end
- function c210545402.destg(e,tp,eg,ep,ev,re,r,rp,chk)
- if chk==0 then return Duel.IsExistingMatchingCard(c210545402.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil)
- and Duel.IsExistingMatchingCard(c210545402.thfilter,tp,LOCATION_DECK,0,1,nil) end
- Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
- end
- function c210545402.desop(e,tp,eg,ep,ev,re,r,rp)
- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
- local g=Duel.SelectMatchingCard(tp,c210545402.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
- if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
- local g=Duel.SelectMatchingCard(tp,c210545402.thfilter,tp,LOCATION_DECK,0,1,1,nil)
- if g:GetCount()>0 then
- Duel.SendtoHand(g,nil,REASON_EFFECT)
- Duel.ConfirmCards(1-tp,g)
- end
- end
- end
- function c210545402.synfilter(c,syncard,tuner,f)
- return (c:IsFaceup() or c:IsLocation(LOCATION_DECK) and c:IsSetCard(0x40)) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c))
- end
- function c210545402.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
- g:AddCard(c)
- local ct=g:GetCount()
- local res=c210545402.syngoal(g,tp,lv,syncard,minc,ct)
- or (ct<maxc and mg:IsExists(c210545402.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc))
- g:RemoveCard(c)
- return res
- end
- function c210545402.syngoal(g,tp,lv,syncard,minc,ct)
- return ct>=minc
- and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
- and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
- and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
- end
- function c210545402.syncon(e)
- return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
- end
- function c210545402.syntg(e,syncard,f,min,max)
- local minc=min+1
- local maxc=max+1
- local c=e:GetHandler()
- local tp=syncard:GetControler()
- local lv=syncard:GetLevel()
- if lv<=c:GetLevel() then return false end
- local g=Group.FromCards(c)
- local mg=Duel.GetMatchingGroup(c210545402.synfilter,tp,LOCATION_MZONE+LOCATION_DECK,LOCATION_MZONE,c,syncard,c,f)
- return mg:IsExists(c210545402.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
- end
- function c210545402.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
- local minc=min+1
- local maxc=max+1
- local c=e:GetHandler()
- local lv=syncard:GetLevel()
- local g=Group.FromCards(c)
- local mg=Duel.GetMatchingGroup(c210545402.synfilter,tp,LOCATION_MZONE+LOCATION_DECK,LOCATION_MZONE,c,syncard,c,f)
- for i=1,maxc do
- local cg=mg:Filter(c210545402.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
- if cg:GetCount()==0 then break end
- local minct=1
- if c210545402.syngoal(g,tp,lv,syncard,minc,i) then
- if not Duel.SelectYesNo(tp,210) then break end
- minct=0
- end
- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
- local sg=cg:Select(tp,minct,1,nil)
- if sg:GetCount()==0 then break end
- g:Merge(sg)
- end
- Duel.SetSynchroMaterial(g)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement