Advertisement
leafbladie

Exodia Codes and Effects

Mar 16th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.73 KB | None | 0 0
  1. Protector Priest Shimon
  2. Spellcaster/DARK/Level 2/ATK 1000/DEF 1000 (Synchro/Tuner)
  3. 1 Tuner + 1 "Forbidden One" monster
  4. 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.
  5.  
  6. --Protector Priest Shimon 210545402
  7. function c210545402.initial_effect(c)
  8. --synchro summon
  9. aux.AddSynchroProcedure(c,nil,1,1,aux.NonTuner(Card.IsSetCard,0x40),1,99)
  10. c:EnableReviveLimit()
  11. --destroy
  12. local e1=Effect.CreateEffect(c)
  13. e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
  14. e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
  15. e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  16. e1:SetProperty(EFFECT_FLAG_DELAY)
  17. e1:SetCondition(c210545402.con)
  18. e1:SetTarget(c210545402.destg)
  19. e1:SetOperation(c210545402.desop)
  20. c:RegisterEffect(e1)
  21. --synchro custom
  22. local e2=Effect.CreateEffect(c)
  23. e2:SetType(EFFECT_TYPE_SINGLE)
  24. e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
  25. e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
  26. e2:SetCondition(c210545402.syncon)
  27. e2:SetTarget(c210545402.syntg)
  28. e2:SetValue(1)
  29. e2:SetOperation(c210545402.synop)
  30. c:RegisterEffect(e2)
  31.  
  32. end
  33. function c210545402.con(e,tp,eg,ep,ev,re,r,rp)
  34. return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
  35. end
  36. function c210545402.thfilter(c)
  37. return c:IsSetCard(0xde) or c:IsCode(64043465) and c:IsAbleToHand()
  38. end
  39. function c210545402.filter(c)
  40. return c:IsSetCard(0x40) and c:IsAbleToGrave()
  41. end
  42. function c210545402.destg(e,tp,eg,ep,ev,re,r,rp,chk)
  43. if chk==0 then return Duel.IsExistingMatchingCard(c210545402.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil)
  44. and Duel.IsExistingMatchingCard(c210545402.thfilter,tp,LOCATION_DECK,0,1,nil) end
  45. Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
  46. end
  47. function c210545402.desop(e,tp,eg,ep,ev,re,r,rp)
  48. Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
  49. local g=Duel.SelectMatchingCard(tp,c210545402.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
  50. if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
  51. Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
  52. local g=Duel.SelectMatchingCard(tp,c210545402.thfilter,tp,LOCATION_DECK,0,1,1,nil)
  53. if g:GetCount()>0 then
  54. Duel.SendtoHand(g,nil,REASON_EFFECT)
  55. Duel.ConfirmCards(1-tp,g)
  56. end
  57. end
  58. end
  59. function c210545402.synfilter(c,syncard,tuner,f)
  60. return (c:IsFaceup() or c:IsLocation(LOCATION_DECK) and c:IsSetCard(0x40)) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c))
  61. end
  62. function c210545402.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
  63. g:AddCard(c)
  64. local ct=g:GetCount()
  65. local res=c210545402.syngoal(g,tp,lv,syncard,minc,ct)
  66. or (ct<maxc and mg:IsExists(c210545402.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc))
  67. g:RemoveCard(c)
  68. return res
  69. end
  70. function c210545402.syngoal(g,tp,lv,syncard,minc,ct)
  71. return ct>=minc
  72. and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
  73. and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
  74. and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
  75. end
  76. function c210545402.syncon(e)
  77. return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
  78. end
  79. function c210545402.syntg(e,syncard,f,min,max)
  80. local minc=min+1
  81. local maxc=max+1
  82. local c=e:GetHandler()
  83. local tp=syncard:GetControler()
  84. local lv=syncard:GetLevel()
  85. if lv<=c:GetLevel() then return false end
  86. local g=Group.FromCards(c)
  87. local mg=Duel.GetMatchingGroup(c210545402.synfilter,tp,LOCATION_MZONE+LOCATION_DECK,LOCATION_MZONE,c,syncard,c,f)
  88. return mg:IsExists(c210545402.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
  89. end
  90. function c210545402.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
  91. local minc=min+1
  92. local maxc=max+1
  93. local c=e:GetHandler()
  94. local lv=syncard:GetLevel()
  95. local g=Group.FromCards(c)
  96. local mg=Duel.GetMatchingGroup(c210545402.synfilter,tp,LOCATION_MZONE+LOCATION_DECK,LOCATION_MZONE,c,syncard,c,f)
  97. for i=1,maxc do
  98. local cg=mg:Filter(c210545402.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
  99. if cg:GetCount()==0 then break end
  100. local minct=1
  101. if c210545402.syngoal(g,tp,lv,syncard,minc,i) then
  102. if not Duel.SelectYesNo(tp,210) then break end
  103. minct=0
  104. end
  105. Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
  106. local sg=cg:Select(tp,minct,1,nil)
  107. if sg:GetCount()==0 then break end
  108. g:Merge(sg)
  109. end
  110. Duel.SetSynchroMaterial(g)
  111. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement