From b09dc43a674e7eaa1793473e11037e7c669eb726 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:19:48 +0200 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c100200288.lua | 122 ---------------------------- pre-release/c100295121.lua | 111 -------------------------- pre-release/c100451001.lua | 73 ----------------- pre-release/c100451002.lua | 97 ----------------------- pre-release/c100451003.lua | 67 ---------------- pre-release/c100451004.lua | 74 ----------------- pre-release/c100451005.lua | 72 ----------------- pre-release/c100451006.lua | 80 ------------------- pre-release/c100451007.lua | 89 --------------------- pre-release/c100451008.lua | 84 -------------------- pre-release/c100451009.lua | 93 ---------------------- pre-release/c100451010.lua | 104 ------------------------ pre-release/c100451011.lua | 71 ----------------- pre-release/c100451012.lua | 110 -------------------------- pre-release/c100451013.lua | 130 ------------------------------ pre-release/c100451014.lua | 121 ---------------------------- pre-release/c100451015.lua | 158 ------------------------------------- pre-release/c100451016.lua | 74 ----------------- pre-release/c100451017.lua | 119 ---------------------------- pre-release/c100451018.lua | 93 ---------------------- pre-release/c100451019.lua | 90 --------------------- pre-release/c100451020.lua | 69 ---------------- pre-release/c100451021.lua | 47 ----------- pre-release/c100451022.lua | 117 --------------------------- pre-release/c100451023.lua | 87 -------------------- pre-release/c100451024.lua | 55 ------------- pre-release/c100451025.lua | 112 -------------------------- pre-release/c100451026.lua | 153 ----------------------------------- pre-release/c100452001.lua | 94 ---------------------- pre-release/c100452002.lua | 111 -------------------------- pre-release/c100452004.lua | 69 ---------------- pre-release/c100452006.lua | 87 -------------------- pre-release/c100452007.lua | 94 ---------------------- pre-release/c100452009.lua | 100 ----------------------- pre-release/c100452010.lua | 97 ----------------------- pre-release/c100452012.lua | 93 ---------------------- pre-release/c100452013.lua | 76 ------------------ pre-release/c100452014.lua | 80 ------------------- pre-release/c100452016.lua | 77 ------------------ pre-release/c100452017.lua | 94 ---------------------- pre-release/c100452019.lua | 89 --------------------- pre-release/c100452020.lua | 141 --------------------------------- pre-release/c100452021.lua | 45 ----------- pre-release/c100452022.lua | 89 --------------------- pre-release/c100452023.lua | 106 ------------------------- pre-release/c100452024.lua | 76 ------------------ pre-release/c100452025.lua | 94 ---------------------- pre-release/c100452026.lua | 109 ------------------------- pre-release/c100452027.lua | 85 -------------------- pre-release/c100452028.lua | 89 --------------------- pre-release/c100454001.lua | 97 ----------------------- pre-release/c100454002.lua | 84 -------------------- pre-release/c101305001.lua | 105 ------------------------ pre-release/c101305002.lua | 88 --------------------- pre-release/c101305003.lua | 95 ---------------------- pre-release/c101305004.lua | 78 ------------------ pre-release/c101305005.lua | 82 ------------------- pre-release/c101305006.lua | 104 ------------------------ pre-release/c101305007.lua | 93 ---------------------- pre-release/c101305008.lua | 75 ------------------ pre-release/c101305009.lua | 108 ------------------------- pre-release/c101305027.lua | 89 --------------------- pre-release/c101305028.lua | 74 ----------------- pre-release/c101305029.lua | 91 --------------------- pre-release/c101305042.lua | 74 ----------------- pre-release/c101305044.lua | 49 ------------ pre-release/c101305045.lua | 98 ----------------------- pre-release/c101305046.lua | 101 ------------------------ pre-release/c101305047.lua | 66 ---------------- pre-release/c101305048.lua | 95 ---------------------- pre-release/c101305049.lua | 83 ------------------- pre-release/c101305065.lua | 84 -------------------- pre-release/c101305066.lua | 69 ---------------- pre-release/c101305067.lua | 101 ------------------------ pre-release/c101305076.lua | 96 ---------------------- pre-release/c101305127.lua | 3 - pre-release/c101305128.lua | 3 - pre-release/c101305129.lua | 3 - 78 files changed, 6855 deletions(-) delete mode 100644 pre-release/c100200288.lua delete mode 100644 pre-release/c100295121.lua delete mode 100644 pre-release/c100451001.lua delete mode 100644 pre-release/c100451002.lua delete mode 100644 pre-release/c100451003.lua delete mode 100644 pre-release/c100451004.lua delete mode 100644 pre-release/c100451005.lua delete mode 100644 pre-release/c100451006.lua delete mode 100644 pre-release/c100451007.lua delete mode 100644 pre-release/c100451008.lua delete mode 100644 pre-release/c100451009.lua delete mode 100644 pre-release/c100451010.lua delete mode 100644 pre-release/c100451011.lua delete mode 100644 pre-release/c100451012.lua delete mode 100644 pre-release/c100451013.lua delete mode 100644 pre-release/c100451014.lua delete mode 100644 pre-release/c100451015.lua delete mode 100644 pre-release/c100451016.lua delete mode 100644 pre-release/c100451017.lua delete mode 100644 pre-release/c100451018.lua delete mode 100644 pre-release/c100451019.lua delete mode 100644 pre-release/c100451020.lua delete mode 100644 pre-release/c100451021.lua delete mode 100644 pre-release/c100451022.lua delete mode 100644 pre-release/c100451023.lua delete mode 100644 pre-release/c100451024.lua delete mode 100644 pre-release/c100451025.lua delete mode 100644 pre-release/c100451026.lua delete mode 100644 pre-release/c100452001.lua delete mode 100644 pre-release/c100452002.lua delete mode 100644 pre-release/c100452004.lua delete mode 100644 pre-release/c100452006.lua delete mode 100644 pre-release/c100452007.lua delete mode 100644 pre-release/c100452009.lua delete mode 100644 pre-release/c100452010.lua delete mode 100644 pre-release/c100452012.lua delete mode 100644 pre-release/c100452013.lua delete mode 100644 pre-release/c100452014.lua delete mode 100644 pre-release/c100452016.lua delete mode 100644 pre-release/c100452017.lua delete mode 100644 pre-release/c100452019.lua delete mode 100644 pre-release/c100452020.lua delete mode 100644 pre-release/c100452021.lua delete mode 100644 pre-release/c100452022.lua delete mode 100644 pre-release/c100452023.lua delete mode 100644 pre-release/c100452024.lua delete mode 100644 pre-release/c100452025.lua delete mode 100644 pre-release/c100452026.lua delete mode 100644 pre-release/c100452027.lua delete mode 100644 pre-release/c100452028.lua delete mode 100644 pre-release/c100454001.lua delete mode 100644 pre-release/c100454002.lua delete mode 100644 pre-release/c101305001.lua delete mode 100644 pre-release/c101305002.lua delete mode 100644 pre-release/c101305003.lua delete mode 100644 pre-release/c101305004.lua delete mode 100644 pre-release/c101305005.lua delete mode 100644 pre-release/c101305006.lua delete mode 100644 pre-release/c101305007.lua delete mode 100644 pre-release/c101305008.lua delete mode 100644 pre-release/c101305009.lua delete mode 100644 pre-release/c101305027.lua delete mode 100644 pre-release/c101305028.lua delete mode 100644 pre-release/c101305029.lua delete mode 100644 pre-release/c101305042.lua delete mode 100644 pre-release/c101305044.lua delete mode 100644 pre-release/c101305045.lua delete mode 100644 pre-release/c101305046.lua delete mode 100644 pre-release/c101305047.lua delete mode 100644 pre-release/c101305048.lua delete mode 100644 pre-release/c101305049.lua delete mode 100644 pre-release/c101305065.lua delete mode 100644 pre-release/c101305066.lua delete mode 100644 pre-release/c101305067.lua delete mode 100644 pre-release/c101305076.lua delete mode 100644 pre-release/c101305127.lua delete mode 100644 pre-release/c101305128.lua delete mode 100644 pre-release/c101305129.lua diff --git a/pre-release/c100200288.lua b/pre-release/c100200288.lua deleted file mode 100644 index f25b505b7c..0000000000 --- a/pre-release/c100200288.lua +++ /dev/null @@ -1,122 +0,0 @@ ---月輪鏡 ---Full Moon Mirror -local s,id=GetID() -local COUNTER_FULL_MOON=0x219 -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_FULL_MOON) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Each time a monster(s) is destroyed by battle or card effect, place 1 Full Moon Counter on this card for each - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_SZONE) - e1:SetOperation(s.ctop) - c:RegisterEffect(e1) - --You can remove Full Moon Counters from this card, then activate 1 of these effects; - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.counter_place_list={COUNTER_FULL_MOON} -function s.ctfilter(c) - return ((c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) or c:IsPreviousLocation(LOCATION_MZONE)) - and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.ctop(e,tp,eg,ep,ev,re,r,rp) - local des_count=eg:FilterCount(s.ctfilter,nil) - if des_count==0 then return end - local c=e:GetHandler() - if not Duel.IsChainSolving() then - c:AddCounter(COUNTER_FULL_MOON,des_count) - else - --Place 1 Full Moon Counter on this card at the end of the Chain Link - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_SZONE) - e1:SetOperation(function() c:AddCounter(COUNTER_FULL_MOON,des_count) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) - c:RegisterEffect(e1) - --Reset "e1" at the end of the Chain Link - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetOperation(function() e1:Reset() end) - e2:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e2,tp) - end -end -function s.lv6spfilter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.thfilter(c) - return c:IsLevel(10) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function s.lv10spfilter(c,e,tp) - return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - --● 1: Special Summon 1 Level 6 or lower monster (Fiend or Fairy) from your hand or GY - local b1=c:IsCanRemoveCounter(tp,COUNTER_FULL_MOON,1,REASON_COST) and mmz_chk - and Duel.IsExistingMatchingCard(s.lv6spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) - --● 3: Add 1 Level 10 DARK monster from your Deck to your hand - local b2=c:IsCanRemoveCounter(tp,COUNTER_FULL_MOON,3,REASON_COST) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - --● 5: Special Summon 1 Level 10 monster from your hand or GY - local b3=c:IsCanRemoveCounter(tp,COUNTER_FULL_MOON,5,REASON_COST) and mmz_chk - and Duel.IsExistingMatchingCard(s.lv10spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) - if chk==0 then return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}) - e:SetLabel(op) - c:RemoveCounter(tp,COUNTER_FULL_MOON,2*op-1,REASON_COST) - if (op==1 or op==3) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - elseif op==2 then - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if op==1 then - --● 1: Special Summon 1 Level 6 or lower monster (Fiend or Fairy) from your hand or GY - if not mmz_chk then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lv6spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --● 3: Add 1 Level 10 DARK monster from your Deck to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - elseif op==3 then - --● 5: Special Summon 1 Level 10 monster from your hand or GY - if not mmz_chk then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lv10spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100295121.lua b/pre-release/c100295121.lua deleted file mode 100644 index 435eae5dbc..0000000000 --- a/pre-release/c100295121.lua +++ /dev/null @@ -1,111 +0,0 @@ ---道化の一座 ハット ---Clown Crew Hat ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --During your Main Phase: You can send 1 "Clown Crew" card from your Deck to your GY, except a Pendulum Monster, and if you do, Special Summon this card, also you cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetTarget(s.gytg) - e1:SetOperation(s.gyop) - e1:SetCountLimit(1,{id,0}) - c:RegisterEffect(e1) - --Monsters your opponent controls lose 1500 DEF while you control a Tribute Summoned monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_DEFENSE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) - e2:SetValue(-1500) - c:RegisterEffect(e2) - --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Hat" once per turn); - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_RELEASE) - e3:SetTarget(s.efftg) - e3:SetOperation(s.effop) - c:RegisterEffect(e3) -end -s.listed_series={SET_CLOWN_CREW} -function s.gyfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and not c:IsPendulumMonster() and c:IsAbleToGrave() -end -function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.gyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.actval) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function s.actval(e,re,tp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsLocation(LOCATION_MZONE) and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) -end -function s.spfilter(c,e,tp) - if c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return false end - return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and not c:IsPendulumMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TODECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_EXTRA) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Shuffle all Pendulum Monsters on the field and face-up Extra Decks into the Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,nil) - if #g>0 then - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - elseif op==2 then - --● Special Summon 1 non-Pendulum "Clown Crew" monster from your Deck or Extra Deck, ignoring its Summoning conditions - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451001.lua b/pre-release/c100451001.lua deleted file mode 100644 index 1aa75dcfbc..0000000000 --- a/pre-release/c100451001.lua +++ /dev/null @@ -1,73 +0,0 @@ ---王のしもべ-ブラック・マジシャン ---Dark Magician, the Pharaoh's Servant ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Change name - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e1:SetValue(CARD_DARK_MAGICIAN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.Reveal(function(c) return c:IsSpell() end)) - e2:SetTarget(s.hsptg) - e2:SetOperation(s.hspop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetCost(Cost.Discard(function(c) return c:IsSpell() end)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) - c:RegisterEffect(e3) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.setfilter(c) - return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and c:IsSSetable() -end -function s.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SSet(tp,sg) - end - end - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100451002.lua b/pre-release/c100451002.lua deleted file mode 100644 index 266435ccd2..0000000000 --- a/pre-release/c100451002.lua +++ /dev/null @@ -1,97 +0,0 @@ ---増殖するクリボー! ---Multiplying Kuriboh! ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect, or an opponent's monster declares an attack (Quick Effect): You can Special Summon this card from your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1a:SetType(EFFECT_TYPE_QUICK_O) - e1a:SetCode(EVENT_CHAINING) - e1a:SetRange(LOCATION_HAND) - e1a:SetCountLimit(1,id) - e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() end) - e1a:SetTarget(s.selfsptg) - e1a:SetOperation(s.selfspop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_ATTACK_ANNOUNCE) - e1b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - c:RegisterEffect(e1b) - --Once per turn, when your opponent activates a monster effect on the field, or during damage calculation, when an opponent's monster attacks (Quick Effect): You can add to your hand, or Special Summon, 1 "Dark Magician" or 1 monster with 300 ATK/200 DEF from your Deck or GY, then you can change that opponent's monster's ATK to 0 - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e2a:SetType(EFFECT_TYPE_QUICK_O) - e2a:SetCode(EVENT_CHAINING) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_MZONE>0 end) - e2a:SetTarget(s.thsptg) - e2a:SetOperation(s.thspop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - c:RegisterEffect(e2b) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thspfilter(c,e,tp,mmz_chk) - return (c:IsCode(CARD_DARK_MAGICIAN) or (c:IsAttack(300) and c:IsDefense(200))) and (c:IsAbleToHand() - or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,mmz_chk) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not sc then return end - local res=aux.ToHandOrElse(sc,tp, - function() return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function() return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,3) - ) - if res==0 then return end - if sc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end - local opp_card=nil - local relation_chk=false - if not Duel.IsDamageStep() then - opp_card=re:GetHandler() - relation_chk=opp_card:IsRelateToEffect(re) - else - opp_card=Duel.GetAttacker() - relation_chk=opp_card:IsRelateToBattle() - end - if relation_chk and opp_card:IsFaceup() and opp_card:IsControler(1-tp) and not opp_card:IsAttack(0) - and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.BreakEffect() - --Change that opponent's monster's ATK to 0 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - opp_card:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100451003.lua b/pre-release/c100451003.lua deleted file mode 100644 index 936305ee6a..0000000000 --- a/pre-release/c100451003.lua +++ /dev/null @@ -1,67 +0,0 @@ ---黒魔導のカーテン ---Dark Magical Curtain ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Each player can Special Summon 1 DARK Spellcaster monster from their hand or Deck (but neither player can activate their effects this turn), then if you Special Summoned a monster whose original name is "Dark Magician" or "Dark Magician Girl", you can add 1 Spell/Trap that mentions "Dark Magician" from your Deck to your hand, except "Dark Magical Curtain" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL,id} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_EITHER,LOCATION_HAND|LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.spfilter(c,e,sp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEUP,sp) -end -function s.spresolution(e,sp) - local name_chk=false - if Duel.GetLocationCount(sp,LOCATION_MZONE,sp)>0 - and Duel.IsExistingMatchingCard(s.spfilter,sp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,sp) - and Duel.SelectYesNo(sp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,sp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(sp,s.spfilter,sp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,sp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,sp,sp,false,false,POS_FACEUP) then - name_chk=sc:IsOriginalCodeRule(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) - --Neither player can activate their effects this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3302) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - end - return name_chk -end -function s.thfilter(c) - return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local turn_player=Duel.GetTurnPlayer() - local non_turn_player=1-turn_player - local turn_player_name_chk=s.spresolution(e,turn_player) - local non_turn_player_name_chk=s.spresolution(e,non_turn_player) - if Duel.SpecialSummonComplete()==0 then return end - if not ((turn_player_name_chk and tp==turn_player) or (non_turn_player_name_chk and tp==non_turn_player)) then return end - if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451004.lua b/pre-release/c100451004.lua deleted file mode 100644 index 94070de536..0000000000 --- a/pre-release/c100451004.lua +++ /dev/null @@ -1,74 +0,0 @@ ---F・HERO シャイニング・フレア・ウィングマン ---Favorite HERO Shining Flare Wingman ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Fusion Monster + 1 face-up monster on the field - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),s.matfilter) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW|CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) - --Inflict damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdcon) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.matfilter(c) - return c:IsFaceup() and c:IsOnField() -end -function s.tdfilter(c) - return c:IsMonster() and c:IsAbleToDeck() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) - and Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) - if #g~=5 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 then - if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - Duel.BreakEffect() - if Duel.Draw(p,d,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then - c:UpdateAttack(1000) - end - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c100451005.lua b/pre-release/c100451005.lua deleted file mode 100644 index 00dac8af39..0000000000 --- a/pre-release/c100451005.lua +++ /dev/null @@ -1,72 +0,0 @@ ---F・HERO フレイム・ウィングマン ---Favorite HERO Flame Wingman ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 monsters with the same Type but different Attributes - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - --When an attack is declared involving this card and a monster with 2200 or more ATK: You can make this card gain 1000 ATK, then you can Special Summon 1 Level 4 or lower monster from your hand in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.atkspcon) - e1:SetTarget(s.atksptg) - e1:SetOperation(s.atkspop) - e1:SetCountLimit(1,{id,0}) - c:RegisterEffect(e1) - --If a monster(s) was destroyed by battle this turn (Quick Effect): You can Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters from your hand or field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function() return Duel.HasFlagEffect(0,id) end) - e2:SetTarget(Fusion.SummonEffTG()) - e2:SetOperation(Fusion.SummonEffOP()) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) - --Keep track of a monster being destroyed by battle - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DESTROYED) - ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.matfilter(c,fc,sumtype,sp,sub,mg,sg) - return not sg or sg:FilterCount(aux.TRUE,c)==0 or (sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp) and not sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(),fc,sumtype,sp)) -end -function s.atkspcon(e,tp,eg,ep,ev,re,r,rp) - local bc0,bc1=Duel.GetBattleMonster(tp) - return bc0 and bc1 and bc0==e:GetHandler() and bc1:IsAttackAbove(2200) and bc1:IsFaceup() -end -function s.atksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,1000) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.atkspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:UpdateAttack(1000)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451006.lua b/pre-release/c100451006.lua deleted file mode 100644 index cd0c62ba51..0000000000 --- a/pre-release/c100451006.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ハネクリボー・サバティエル LV10 ---Winged Kuriboh Sabatiel LV10 ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand and pay half your LP; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck to your hand, and if you do, shuffle this card into the Deck, also you cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.AND(Cost.SelfReveal,Cost.PayLP(1/2))) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --During your opponent's turn, if your LP are 1000 or less (Quick Effect): You can Special Summon this card from your hand, then you can inflict damage to your opponent equal to the highest ATK among the monsters they control (your choice, if tied) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.GetLP(tp)<=1000 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.LVnum=10 -s.LVset=SET_WINGED_KURIBOH -s.listed_series={SET_FUSION,SET_HERO} -function s.thfilter(c) - return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local _,dam=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) - if dam and dam>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451007.lua b/pre-release/c100451007.lua deleted file mode 100644 index 1f8566084b..0000000000 --- a/pre-release/c100451007.lua +++ /dev/null @@ -1,89 +0,0 @@ ---スターダスト・ドラゴン-ヴィクテム・サンクチュアリ ---Stardust Dragon - Victim Sanctuary ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --When your opponent activates a card or effect in response to your card or effect activation (Quick Effect): You can Tribute this card; negate that opponent's effect, and if you do, destroy that card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.discon) - e1:SetCost(Cost.AND(aux.StardustCost,Cost.HardOncePerChain(id))) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --If a monster(s) in your possession was Tributed this turn (Quick Effect): You can banish this card from your GY; Special Summon 1 "Stardust" Synchro Monster from your Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id+100) end) - e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.HardOncePerChain(id))) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) - --Keep track of monsters being Tributed - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_RELEASE) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_STARDUST} -function s.checkfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(s.checkfilter,nil) - if g:IsExists(Card.IsPreviousControler,1,nil,0) then - Duel.RegisterFlagEffect(0,id+100,RESET_PHASE|PHASE_END,0,1) - end - if g:IsExists(Card.IsPreviousControler,1,nil,1) then - Duel.RegisterFlagEffect(1,id+100,RESET_PHASE|PHASE_END,0,1) - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local ch=Duel.GetCurrentChain()-1 - return ch>0 and ep==1-tp and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER)==tp and Duel.IsChainDisablable(ev) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_STARDUST) and c:IsSynchroMonster() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100451008.lua b/pre-release/c100451008.lua deleted file mode 100644 index a32e949b6a..0000000000 --- a/pre-release/c100451008.lua +++ /dev/null @@ -1,84 +0,0 @@ ---スタージャンク・シンクロン ---Starjunk Synchron -local s,id=GetID() -function s.initial_effect(c) - --For a Synchro Summon, you can substitute this card for any 1 "Synchron" Tuner ("Quickdraw Synchron") - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(20932152) - c:RegisterEffect(e0) - --If this card is in your hand: You can target 1 Level 2 or lower monster in your GY; Special Summon this card, and if you do, Special Summon that monster, but negate its effects, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --You can banish this card from your GY; "Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SYNCHRON} -s.listed_names={CARD_JUNK_WARRIOR} -function s.spfilter(c,e,tp) - return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - local c=e:GetHandler() - if chk==0 then return Duel.GetMZoneCount(tp)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g:AddCard(c),2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(c) - end - Duel.SpecialSummonComplete() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --"Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(LOCATION_ONFIELD,0) - e1:SetTarget(function(e,c) return c:IsCode(CARD_JUNK_WARRIOR) and c:IsFaceup() end) - e1:SetValue(aux.indoval) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100451009.lua b/pre-release/c100451009.lua deleted file mode 100644 index d01aff381c..0000000000 --- a/pre-release/c100451009.lua +++ /dev/null @@ -1,93 +0,0 @@ ---シンクロ・エマージェンシー ---Synchro Emergency ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If only your opponent controls a monster, you can activate this card from your hand - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e0:SetCondition(function(e) local tp=e:GetHandlerPlayer() return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) - c:RegisterEffect(e0) - --Special Summon 1 monster from your hand (but negate its effects), then if your opponent controls a monster Special Summoned from the Extra Deck, you can Special Summon 1 "Synchron" monster from your Deck. Until the end of the next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) - c:RegisterEffect(e1) - --You can banish this card from your GY; immediately after this effect resolves, Synchro Summon 1 Synchro Monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.synctg) - e2:SetOperation(s.syncop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) - c:RegisterEffect(e2) -end -s.listed_series={SET_SYNCHRON} -function s.handspfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.deckspfilter(c,e,tp) - return c:IsSetCard(SET_SYNCHRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(c) - if Duel.SpecialSummonComplete()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --Until the end of the next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function s.synctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.syncop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local synchro=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if synchro then - Duel.SynchroSummon(tp,synchro,nil) - end -end \ No newline at end of file diff --git a/pre-release/c100451010.lua b/pre-release/c100451010.lua deleted file mode 100644 index 7df68f2449..0000000000 --- a/pre-release/c100451010.lua +++ /dev/null @@ -1,104 +0,0 @@ ---No.39 光の使者 希望皇ホープ ---Number 39: Utopia the Envoy of Light ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters - Xyz.AddProcedure(c,nil,4,2) - --Cannot be destroyed by battle, except with a "Number" monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) - c:RegisterEffect(e1) - --(Quick Effect): You can detach 1 material from this card, then target 1 monster you control; the first time it would be destroyed by battle or card effect this turn, it is not destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.DetachFromSelf(1)) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) - --When the second attack of this turn is declared: You can make this card gain 2500 ATK, and if you do, it gains this effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(function() return Duel.GetFlagEffect(0,id)==1 end) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) - --Keep track of attacks being declared - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_NUMBER} -s.xyz_number=39 -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - --The first time it would be destroyed by battle or card effect this turn, it is not destroyed - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3001) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(s.indesval) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.indesval(e,re,r,rp) - if r&(REASON_BATTLE|REASON_EFFECT)>0 then - e:Reset() - return true - end - return false -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --This card gains 2500 ATK - c:UpdateAttack(2500) - --When this card destroys a monster by battle and sends it to the GY: You can Special Summon it to your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdgcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100451011.lua b/pre-release/c100451011.lua deleted file mode 100644 index 06d2747b3e..0000000000 --- a/pre-release/c100451011.lua +++ /dev/null @@ -1,71 +0,0 @@ ---ガガガマジシャン-ガガガマジック ---Gagaga Magician - Gagaga Magic ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can Special Summon both it and 1 other "Zubaba", "Gagaga", "Gogogo", or "Dododo" monster from your hand or GY, except "Gagaga Magician - Gagaga Magic", and if you do, immediately after this effect resolves, Xyz Summon 1 "Zubaba", "Gagaga", "Gogogo", "Dododo", "Djinn", "Heroic Champion", "Number", "ZW -", or "ZS -" Xyz Monster using only those 2 monsters. When you do, treat the Level of 1 of the monsters the same as the other monster's - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS} -s.listed_names={id} -local function samexyzlevel(handler,mc,lv) - --When you do, treat the Level of 1 of the monsters the same as the other monster's - local e1=Effect.CreateEffect(handler) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - mc:RegisterEffect(e1,true) - return e1 -end -function s.handgyspfilter(c,e,tp,mc) - if c:IsCode(id) then return false end - if not (c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - local e1=samexyzlevel(c,c,mc:GetLevel()) - local e2=samexyzlevel(c,mc,c:GetLevel()) - local res=Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(mc,c)) - if e1 then e1:Reset() end - if e2 then e2:Reset() end - return res -end -function s.extraspfilter(c,e,tp,mg) - return c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS}) - and c:IsXyzMonster() and c:IsXyzSummonable(nil,mg,2,2) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetMZoneCount(tp)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.handgyspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,c,e,tp,c) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>=2) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.handgyspfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,c):GetFirst() - if not sc then return end - local g=Group.FromCards(c,sc) - if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then - local e1=samexyzlevel(c,c,sc:GetLevel()) - local e2=samexyzlevel(c,sc,c:GetLevel()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g):GetFirst() - if xyz then - Duel.XyzSummon(tp,xyz,g,nil,2,2) - else - if e1 then e1:Reset() end - if e2 then e2:Reset() end - end - end -end \ No newline at end of file diff --git a/pre-release/c100451012.lua b/pre-release/c100451012.lua deleted file mode 100644 index 9377b89b91..0000000000 --- a/pre-release/c100451012.lua +++ /dev/null @@ -1,110 +0,0 @@ ---ガガガガール-ゼロゼロコール ---Gagaga Girl - Cell Phone Subtraction ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If your opponent Special Summons a monster(s) from the Extra Deck: You can target 1 face-up monster you control; Special Summon this card from your hand, then immediately after this effect resolves, Xyz Summon using only this card and the targeted monster. When you do, treat this card's Level as the same as the targeted monster's - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is detached from an Xyz Monster to activate that monster's effect: You can change the ATK of 1 face-up monster your opponent controls to 0 - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_ATKCHANGE) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_TO_GRAVE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(s.atkcon) - e2a:SetTarget(s.atktg) - e2a:SetOperation(s.atkop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_REMOVE) - c:RegisterEffect(e2b) -end -function s.spconfilter(c,opp) - return c:IsSummonPlayer(opp) and c:IsSummonLocation(LOCATION_EXTRA) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,1-tp) -end -function s.tgfilter(c,tp,hc) - if not (c:IsFaceup() and c:HasLevel()) then return false end - --When you do, treat this card's Level as the same as the targeted monster's - local e1=Effect.CreateEffect(hc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(c:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - hc:RegisterEffect(e1,true) - local res=Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,Group.FromCards(c,hc),2,2) - if e1 then e1:Reset() end - return res -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp,c) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local mg=Group.FromCards(c,tc) - --When you do, treat this card's Level as the same as the targeted monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1,true) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=Duel.SelectMatchingCard(tp,Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,2,2):GetFirst() - if xyz then - Duel.XyzSummon(tp,xyz,mg,nil,2,2) - else - if e1 then e1:Reset() end - end - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,1-tp,0) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local sc=Duel.SelectMatchingCard(tp,Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --Its ATK becomes 0 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100451013.lua b/pre-release/c100451013.lua deleted file mode 100644 index 5aa26c910d..0000000000 --- a/pre-release/c100451013.lua +++ /dev/null @@ -1,130 +0,0 @@ ---四天の龍 オッドアイズ・ペンデュラム・ドラゴン ---Odd-Eyes Pendulum Dragon of the Four Heavenly Dragons ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --search and destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY|CATEGORY_TOHAND|CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - e2:SetValue(s.atkval) - c:RegisterEffect(e2) - --double damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) - e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - c:RegisterEffect(e3) - --to hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.thcon2) - e4:SetTarget(s.thtg2) - e4:SetOperation(s.thop2) - c:RegisterEffect(e4) -end -function s.thfilter(c) - return c:IsPendulumMonster() and c:IsAttackBelow(1500) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetLabelObject(e1) - e0:SetOperation(s.checkop) - e0:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e0,tp) -end -function s.actlimit(e,re) - local rc=re:GetHandler() - return rc and rc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() -end -function s.psfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local ef=e:GetLabelObject() - if ef and eg and eg:IsExists(s.psfilter,1,nil,tp) then - ef:Reset() - e:Reset() - end -end -function s.atkval(e,c) - local pg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_PZONE,0) - if #pg~=2 then return 0 end - local pc1,pc2=pg:GetFirst(),pg:GetNext() - return math.abs(pc1:GetScale()-pc2:GetScale())*300 -end -function s.thcon2(e,tp,eg,ep,ev,re,r,rp) - return r&(REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - if rp==1-tp then - e:SetLabel(1) - else - e:SetLabel(0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - if e:GetLabel()==1 then - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) - end -end -function s.thop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 - and e:GetLabel()==1 and c:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451014.lua b/pre-release/c100451014.lua deleted file mode 100644 index 3b6209cf6f..0000000000 --- a/pre-release/c100451014.lua +++ /dev/null @@ -1,121 +0,0 @@ ---星読みの魔術師-ホロスコープ・マジシャン ---Horoscope Sorcerer, the Stargazer Magician ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --When a Spell Card or effect activated by your opponent resolves, if you control a "Magician" Pendulum Monster or "Odd-Eyes" monster, you can negate that effect, then destroy this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_PZONE) - e1:SetCondition(s.discon) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --You can discard 1 other "Magician" Pendulum Monster, "Performapal" monster, or "Odd-Eyes" monster; Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.Discard(s.spcostfilter,true)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --If this card is Special Summoned: You can add 1 Pendulum Monster with 2500 ATK from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.deckthtg) - e3:SetOperation(s.deckthop) - c:RegisterEffect(e3) - --You can target 1 Pendulum Monster Card you control; destroy it, then you can add 1 face-up Pendulum Monster from your Extra Deck to your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,2}) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_series={SET_MAGICIAN,SET_ODD_EYES,SET_PERFORMAPAL} -function s.disconfilter(c) - return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard(SET_ODD_EYES)) and c:IsFaceup() -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,3)) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.Hint(HINT_CARD,0,id) - if Duel.NegateEffect(ev) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end -function s.spcostfilter(c) - return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard({SET_ODD_EYES,SET_PERFORMAPAL})) and c:IsMonster() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.deckthfilter(c) - return c:IsPendulumMonster() and c:IsAttack(2500) and c:IsAbleToHand() -end -function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.deckthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsType(TYPE_PENDULUM) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) -end -function s.extrathfilter(c) - return c:IsPendulumMonster() and c:IsFaceup() and c:IsAbleToHand() -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(s.extrathfilter,tp,LOCATION_EXTRA,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.extrathfilter,tp,LOCATION_EXTRA,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451015.lua b/pre-release/c100451015.lua deleted file mode 100644 index 4cc14559e8..0000000000 --- a/pre-release/c100451015.lua +++ /dev/null @@ -1,158 +0,0 @@ ---星霜の魔術師-アストログラフ・マジシャン ---Astrograph Sorcerer, the Star Magician ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --During your Main Phase: You can destroy this card, and if you do, place 1 Pendulum Monster whose Pendulum Scale is 1 from your hand or Deck in your Pendulum Zone, except "Astrograph Sorcerer, the Star Magician", but it cannot activate its Pendulum Effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --If a face-up Monster Card(s) you control is destroyed by battle or card effect: You can Special Summon this card from your hand, then you can Special Summon 1 of those destroyed monsters from your GY or face-up Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Keep track of the destroyed monsters - aux.GlobalCheck(s,function() - s.desgroup=Group.CreateGroup() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(s.desgroupregop) - Duel.RegisterEffect(ge1,0) - end) - --During the Main Phase (Quick Effect): You can Tribute this card, then you can Fusion Summon 1 Dragon Fusion Monster from your Extra Deck, by shuffling its materials from your field and/or face-up Extra Deck into the Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_RELEASE+CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function() return Duel.IsMainPhase() end) - e3:SetTarget(s.tribtg) - e3:SetOperation(s.tribop) - e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.plfilter(c) - return c:IsPendulumMonster() and c:IsScale(1) and not c:IsCode(id) and not c:IsForbidden() -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.CheckPendulumZones(tp) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then - --It cannot activate its Pendulum Effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3302) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - end -end -function s.spconfilter(c) - return c:IsMonsterCard() and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) - and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.desgroupregop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.spconfilter,nil) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - if Duel.GetCurrentChain()==0 then s.desgroup:Clear() end - s.desgroup:Merge(tg) - s.desgroup:Remove(function(c) return not c:HasFlagEffect(id) end,nil) - if tg:IsExists(Card.IsPreviousControler,1,nil,0) then - local g=s.desgroup:Filter(Card.IsPreviousControler,nil,0) - Duel.RaiseEvent(g,EVENT_CUSTOM+id,re,r,rp,0,ev) - end - if tg:IsExists(Card.IsPreviousControler,1,nil,1) then - local g=s.desgroup:Filter(Card.IsPreviousControler,nil,1) - Duel.RaiseEvent(g,EVENT_CUSTOM+id,re,r,rp,1,ev) - end - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return ep==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - local g=s.desgroup:Filter(s.spconfilter,nil) - e:SetLabelObject(g) - for ec in g:Iter() do - ec:CreateEffectRelation(e) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spfilter(c,e,tp,mmz_chk) - if not (c:IsControler(tp) and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_GRAVE) then - return mmz_chk - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local g=e:GetLabelObject():Filter(aux.NecroValleyFilter(s.spfilter),nil,e,tp,mmz_chk) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.tribtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasableByEffect() end - Duel.SetOperationInfo(0,CATEGORY_RELEASE,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD|LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.tribop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Release(c,REASON_EFFECT)>0 then - local fusion_params={ - fusfilter=function(c) return c:IsRace(RACE_DRAGON) end, - extraop=Fusion.ShuffleMaterial, - matfilter=Fusion.OnFieldMat, - extrafil=function(e,tp,mg) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToDeck),tp,LOCATION_EXTRA,0,nil) - end - } - if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.BreakEffect() - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451016.lua b/pre-release/c100451016.lua deleted file mode 100644 index ceef53244d..0000000000 --- a/pre-release/c100451016.lua +++ /dev/null @@ -1,74 +0,0 @@ ---デコード・トーカー・インテグレーション ---Decode Talker Integration ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_EMZONE) - e1:SetValue(s.atkval) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_EMZONE) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetCost(s.cost) - e3:SetTarget(s.target) - e3:SetOperation(s.operation) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsLinkMonster,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,e:GetHandler())*500 -end -function s.cfilter(c,g) - return g:IsContains(c) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local lg=e:GetHandler():GetLinkedGroup() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,lg) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,lg) - Duel.Release(g,REASON_COST) -end -function s.filter(c) - return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil) - if #g==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100451017.lua b/pre-release/c100451017.lua deleted file mode 100644 index 60c06594ae..0000000000 --- a/pre-release/c100451017.lua +++ /dev/null @@ -1,119 +0,0 @@ ---サイバース・コード・マジシャン ---Cyberse Code Magician ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --If a Link Monster you control would be used as Link Material for a Cyberse monster, this card in your hand can also be used as material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_EXTRA_MATERIAL) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(1,0) - e1:SetOperation(s.extracon) - e1:SetValue(s.extraval) - c:RegisterEffect(e1) - if s.flagmap1==nil then - s.flagmap1={} - end - if s.flagmap1[c]==nil then - s.flagmap1[c] = {} - end - --If this card is sent from the hand or field to the GY: You can send 1 Cyberse monster from your Deck to the GY, or if this Ritual Summoned card was sent to the GY, you can Special Summon that monster instead, also in either case, you cannot Special Summon for the rest of this turn, except Cyberse monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end) - e2:SetTarget(s.tgsptg) - e2:SetOperation(s.tgspop) - c:RegisterEffect(e2) -end -s.listed_names={34767865} --"Cynet Ritual" -function s.extrafilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function s.extracon(c,e,tp,sg,mg,lc,og,chk) - return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsLinkMonster,1,og) and - sg:FilterCount(Card.HasFlagEffect,nil,id)<2 -end -function s.extraval(chk,summon_type,e,...) - local c=e:GetHandler() - if chk==0 then - local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsRace(RACE_CYBERSE) or Duel.GetFlagEffect(tp,id)>0 then - return Group.CreateGroup() - else - table.insert(s.flagmap1[c],c:RegisterFlagEffect(id,0,0,1)) - return Group.FromCards(c) - end - elseif chk==1 then - local sg,sc,tp=... - if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then - Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - end - elseif chk==2 then - for _,eff in ipairs(s.flagmap1[c]) do - eff:Reset() - end - s.flagmap1[c]={} - end -end -function s.tgspfilter(c,e,tp,mmz_ritsum_chk) - return c:IsRace(RACE_CYBERSE) and (c:IsAbleToGrave() or (mmz_ritsum_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ritual_summoned_chk=e:GetHandler():IsRitualSummoned() - if chk==0 then - local mmz_ritsum_chk=ritual_summoned_chk and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.tgspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_ritsum_chk) - end - if not ritual_summoned_chk then - e:SetLabel(0) - e:SetCategory(CATEGORY_TOGRAVE) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - else - e:SetLabel(1) - e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - end -end -function s.tgspop(e,tp,eg,ep,ev,re,r,rp) - local mmz_ritsum_chk=e:GetLabel()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local hint=mmz_ritsum_chk and aux.Stringid(id,1) or HINTMSG_TOGRAVE - Duel.Hint(HINT_SELECTMSG,tp,hint) - local sc=Duel.SelectMatchingCard(tp,s.tgspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_ritsum_chk):GetFirst() - if sc then - local op=nil - if not mmz_ritsum_chk then - op=1 - else - local b1=sc:IsAbleToGrave() - local b2=sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - end - if op==1 then - Duel.SendtoGrave(sc,REASON_EFFECT) - elseif op==2 then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon for the rest of this turn, except Cyberse monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_CYBERSE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100451018.lua b/pre-release/c100451018.lua deleted file mode 100644 index dcdc090684..0000000000 --- a/pre-release/c100451018.lua +++ /dev/null @@ -1,93 +0,0 @@ ---サイバース・コントラクト・ウィッチ ---Cyberse Contract Witch ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 monsters with the same Type - Link.AddProcedure(c,nil,2,nil,s.matcheck) - --If this card is Link Summoned, or a monster(s) is Special Summoned to a zone(s) this card points to: You can send 1 Spell from your hand or face-up field to the GY; add 1 Ritual Monster from your Deck to your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SPSUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1a:SetCost(s.thcost) - e1a:SetTarget(s.thtg) - e1a:SetOperation(s.thop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1b:SetRange(LOCATION_MZONE) - e1b:SetCondition(aux.zptcon(nil)) - c:RegisterEffect(e1b) - --You can target 1 Ritual, Fusion, Synchro, or Xyz Monster this card points to; Special Summon 1 monster from your GY with the same Type but a different card type (Ritual, Fusion, Synchro, or Xyz) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -local TYPES_RITUAL_FUSION_SYNCHRO_XYZ=TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ -function s.matcheck(g,lc,sumtype,tp) - return g:CheckSameProperty(Card.GetRace,lc,sumtype,tp) -end -function s.thcostfilter(c) - return c:IsSpell() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.thfilter(c) - return c:IsRitualMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.tgfilter(c,e,tp,lg) - return c:IsType(TYPES_RITUAL_FUSION_SYNCHRO_XYZ) and lg:IsContains(c) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetRace(),c:GetType()&TYPES_RITUAL_FUSION_SYNCHRO_XYZ) -end -function s.spfilter(c,e,tp,race,card_type) - return c:IsType(TYPES_RITUAL_FUSION_SYNCHRO_XYZ) and c:IsRace(race) and not c:IsType(card_type) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local lg=e:GetHandler():GetLinkedGroup() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp,lg) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,lg) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,lg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetRace(),tc:GetType()&TYPES_RITUAL_FUSION_SYNCHRO_XYZ) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451019.lua b/pre-release/c100451019.lua deleted file mode 100644 index d3ccd4dfdb..0000000000 --- a/pre-release/c100451019.lua +++ /dev/null @@ -1,90 +0,0 @@ ---黄泉天輪 ---Underworld Circle ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Allow each player to Special Summon 1 monster from their GY during the Standby Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,5,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_GRAVE,5,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spnormalfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - local rg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToRemove,Card.IsMonster),tp,LOCATION_DECK,LOCATION_DECK,nil) - if #rg==0 then return end - Duel.BreakEffect() - if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.ignoresumconsp(e,p) - if Duel.GetLocationCount(p,LOCATION_MZONE)==0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,p,LOCATION_GRAVE,0,nil,e,p) - if #g==0 or not Duel.SelectYesNo(p,aux.Stringid(id,3)) then return end - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) - local tc=g:Select(p,1,1,nil):GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,p,p,true,false,POS_FACEUP) then - --Banish it if it leaves the field - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - tc:RegisterEffect(e1,true) - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local turn_p=Duel.GetTurnPlayer() - s.ignoresumconsp(e,turn_p) - s.ignoresumconsp(e,1-turn_p) - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100451020.lua b/pre-release/c100451020.lua deleted file mode 100644 index bb6f080c18..0000000000 --- a/pre-release/c100451020.lua +++ /dev/null @@ -1,69 +0,0 @@ ---オレイカルコスの魔封剣 ---Orichalcos Sword of Sealing ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - aux.AddEquipProcedure(c) - --The equipped monster's effects are negated - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e1) - --If you have a card in your Field Zone: You can target 1 Effect Monster you control; that Effect Monster gains this effect until the end of your opponent's turn. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)>0 end) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsEffectMonster() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsEffectMonster),tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,LOCATION_MZONE,0,1,1,nil) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsEffectMonster() and tc:IsFaceup() then - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,1)) - --● Once per turn (Quick Effect): You can send 1 card from your hand to the GY, then target 1 face-up card on the field; destroy that target - local e1=Effect.CreateEffect(tc) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(s.descost) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - e1:SetReset(RESETS_STANDARD_PHASE_END,2) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - tc:RegisterEffect(e1) - end -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100451021.lua b/pre-release/c100451021.lua deleted file mode 100644 index ee08aaa1e9..0000000000 --- a/pre-release/c100451021.lua +++ /dev/null @@ -1,47 +0,0 @@ ---虹の橋 ビフレスト ---Rainbow Bridge Bifrost ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish 3 Level 10 or higher monsters from your Extra Deck, including a LIGHT Synchro Monster; add 1 Field Spell from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.costfilter(c) - return c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost() -end -function s.includingfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSynchroMonster() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(s.includingfilter,1,nil) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_EXTRA,0,nil) - if chk==0 then return #g>=3 and g:IsExists(s.includingfilter,1,nil) end - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE) - Duel.Remove(sg,POS_FACEUP,REASON_COST) -end -function s.thfilter(c) - return c:IsFieldSpell() and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c100451022.lua b/pre-release/c100451022.lua deleted file mode 100644 index 8f6333fa51..0000000000 --- a/pre-release/c100451022.lua +++ /dev/null @@ -1,117 +0,0 @@ ---Sin Force ---Malefic Force ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Target 1 face-up monster on the field; equip this card to it as an Equip Card with these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(aux.RemainFieldCost) - e1:SetTarget(s.eqtg) - e1:SetOperation(s.eqop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If a card is in the Field Zone: You can banish this card and 1 other "Malefic" card from your GY; destroy all monsters on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsExistingMatchingCard(nil,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) end) - e2:SetCost(s.descost) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_MALEFIC} -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then - --Equip limit - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) - e0:SetValue(1) - e0:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e0) - --● The equipped monster is unaffected by Spell effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(function(e,te) return te:IsSpellEffect() end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - --● Once per turn: You can destroy this card, and if you do, add 1 "Malefic" card from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.desthtg) - e2:SetOperation(s.desthop) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_MALEFIC) and c:IsAbleToHand() -end -function s.desthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.desthop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.descostfilter(c) - return c:IsSetCard(SET_MALEFIC) and c:IsAbleToRemoveAsCost() -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_GRAVE,0,1,1,c) - Duel.Remove(g+c,POS_FACEUP,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100451023.lua b/pre-release/c100451023.lua deleted file mode 100644 index 387431f37d..0000000000 --- a/pre-release/c100451023.lua +++ /dev/null @@ -1,87 +0,0 @@ ---Sin Paradigm Shift ---Malefic Paradigm Shift ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can activate this card from your hand by paying half your LP - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e0:SetValue(function(e,c) e:SetLabel(1) end) - c:RegisterEffect(e0) - --Add to your hand, or place face-up in your Field Zone, 1 "Malefic World" from your Deck or GY, then Special Summon 1 "Malefic" monster from your Deck or Extra Deck in Defense Position, ignoring its Summoning conditions, then if your opponent controls a monster with 2500 or more ATK, all face-up monsters they currently control lose 2500 ATK until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetLabelObject(e0) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_names={27564031} --"Malefic World" -s.listed_series={SET_MALEFIC} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local label_obj=e:GetLabelObject() - if chk==0 then label_obj:SetLabel(0) return true end - if label_obj:GetLabel()==1 then - label_obj:SetLabel(0) - Duel.PayLPCost(tp,Duel.GetLP(tp)//2) - end -end -function s.maleficworldfilter(c) - return c:IsCode(27564031) and (c:IsAbleToHand() or not c:IsForbidden()) -end -function s.spfilter(c,e,tp) - if not (c:IsSetCard(SET_MALEFIC) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE)) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.maleficworldfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,Duel.GetFieldGroup(tp,0,LOCATION_MZONE),1,tp,-2500) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.maleficworldfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() - local tohand_or_place_chk=aux.ToHandOrElse(sc,tp, - function() - return not sc:IsForbidden() - end, - function() - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - return Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - end, - aux.Stringid(id,3) - ) - if not tohand_or_place_chk then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #sg==0 then return end - Duel.BreakEffect() - if Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP_DEFENSE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackAbove,2500),tp,0,LOCATION_MZONE,1,nil) then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local c=e:GetHandler() - Duel.BreakEffect() - for tc in g:Iter() do - --All face-up monsters they currently control lose 2500 ATK until the end of this turn - tc:UpdateAttack(-2500,RESETS_STANDARD_PHASE_END,c) - end - end -end \ No newline at end of file diff --git a/pre-release/c100451024.lua b/pre-release/c100451024.lua deleted file mode 100644 index d451e7b495..0000000000 --- a/pre-release/c100451024.lua +++ /dev/null @@ -1,55 +0,0 @@ ---A BF-叢雲のクサナギ ---Assault Blackwing - Kusanagi the Gathering Storm ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuners - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Material check - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():IsExists(Card.IsSetCard,1,nil,SET_BLACKWING) and 1 or 0) end) - c:RegisterEffect(e0) - --If this card is Synchro Summoned using a "Blackwing" monster as material, it is treated as a Tuner while face-up on the field. After this card is Synchro Summoned, for the rest of this turn, it gains ATK equal to the total original ATK of the Synchro Monsters used as its material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetLabelObject(e0) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Can attack all your opponent's monsters, once each - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - c:RegisterEffect(e2) - --If this card attacks a Defense Position monster, nflict piercing battle damage to your opponent - local e3=e2:Clone() - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLACKWING} -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local mg=c:GetMaterial() - if #mg==0 then return end - if e:GetLabelObject():GetLabel()==1 then - --If this card is Synchro Summoned using a "Blackwing" monster as material, it is treated as a Tuner while face-up on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end - if c:IsDisabled() then return end - local atk=mg:Match(Card.IsSynchroMonster,nil):GetSum(Card.GetBaseAttack,nil) - if atk==0 then return end - --After this card is Synchro Summoned, for the rest of this turn, it gains ATK equal to the total original ATK of the Synchro Monsters used as its material - c:UpdateAttack(atk,RESETS_STANDARD_DISABLE_PHASE_END) -end diff --git a/pre-release/c100451025.lua b/pre-release/c100451025.lua deleted file mode 100644 index 66b9443318..0000000000 --- a/pre-release/c100451025.lua +++ /dev/null @@ -1,112 +0,0 @@ ---大精霊機巧軍-ペンデュラム・ルーラー ---Master Spirit Tech Force - Pendulum Ruler ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c,false) - --Fusion Materials: 1 Level 7 or higher Pendulum Monster + 1 Pendulum Monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) - --During your Main Phase: You can return this card to the Extra Deck, then you can add 1 Level 7 Pendulum Monster from your Deck or face-up Extra Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.textg) - e1:SetOperation(s.texop) - c:RegisterEffect(e1) - --Cannot be destroyed by card effects - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Your opponent's monsters cannot attack, except Pendulum Monsters without a Level - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(function(e,c) return not (c:IsPendulumMonster() and not c:HasLevel()) end) - e3:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e3) - --You can Tribute 1 monster, then target 1 card your opponent controls; destroy it, and if you do, inflict 1600 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(2,{id,1}) - e4:SetCost(s.descost) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) - --Once per turn: You can place this card in your Pendulum Zone - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,2)) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e5:SetOperation(s.plop) - c:RegisterEffect(e5) -end -function s.matfilter(c,fc,sumtype,tp) - return c:IsLevelAbove(7) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) -end -function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.thfilter(c) - return c:IsLevel(7) and c:IsPendulumMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToHand() -end -function s.texop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.descostfilter(c,tp) - local exg=c:GetEquipGroup()+c - return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,exg) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,1,false,nil,nil,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,1,1,false,nil,nil,tp) - Duel.Release(g,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1600,REASON_EFFECT) - end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c100451026.lua b/pre-release/c100451026.lua deleted file mode 100644 index 012c754cab..0000000000 --- a/pre-release/c100451026.lua +++ /dev/null @@ -1,153 +0,0 @@ ---W:Pファンシーボール ---W:P Fancy Ball ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) - --When your opponent activates a monster effect on the field or GY (Quick Effect): You can banish this card that was Special Summoned this turn until the End Phase; negate that effect, and if you do, banish it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.discon) - e1:SetCost(s.discost) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --During your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Link Summon 1 Link Monster, and if this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) - e2:SetTarget(s.linktg) - e2:SetOperation(s.linkop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -function s.discon(e,tp,eg,ep,ev,re,r,rp,chk) - if not e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) then return false end - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_MZONE|LOCATION_GRAVE)>0 and Duel.IsChainDisablable(ev) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() end - --Banish this card until the End Phase - aux.RemoveUntil(c,nil,REASON_COST,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local rc=re:GetHandler() - local relation=rc:IsRelateToEffect(re) - if chk==0 then return rc:IsAbleToRemove(tp) - or (not relation and Duel.IsPlayerCanRemove(tp)) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - if relation then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,rc:GetPreviousLocation()) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end -function s.linktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_MATERIAL) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetOperation(s.extracon) - e1:SetValue(s.extraval) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - local res=Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil) - e1:Reset() - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetChainLimit(function(re,rp,tp) return not (re:IsMonsterEffect() and re:GetHandler():IsLinkMonster()) end) -end -function s.linkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=nil - if c:IsRelateToEffect(e) then - --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls - e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_MATERIAL) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetOperation(s.extracon) - e1:SetValue(s.extraval) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc then - Duel.LinkSummon(tp,sc) - if e1 then - local eff_code=Duel.GetCurrentChain()==1 and EVENT_SPSUMMON or EVENT_SPSUMMON_SUCCESS - --Reset e1 - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(eff_code) - e2:SetOperation(function(e) e1:Reset() e:Reset() end) - Duel.RegisterEffect(e2,tp) - end - elseif e1 then - e1:Reset() - end -end -function s.extracon(c,e,tp,sg,mg,lc,og,chk) - if not sg:IsContains(e:GetHandler()) then return false end - local g=Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) - if #g==0 then return true end - local max_count=1 - local must_include=Group.CreateGroup() - local effs={Duel.GetPlayerEffect(tp,EFFECT_EXTRA_MATERIAL)} - for _,eff in ipairs(effs) do - if not eff:GetOwner():IsCode(id) then - if #(eff:GetValue()(0,SUMMON_TYPE_LINK,eff,tp,lc))>0 then - local handler=eff:GetHandler() - must_include:Merge(handler) - if #(sg&must_include)>0 or lc==handler then - max_count=max_count+1 - end - end - end - end - return #(sg&g)>0 and #(sg&g)<=max_count -end -function s.extraval(chk,summon_type,e,...) - local c=e:GetHandler() - if chk==0 then - local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK then - return Group.CreateGroup() - else - return Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) - end - elseif chk==1 then - local sg,sc,tp=... - if summon_type&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK and #sg>0 then - Duel.Hint(HINT_CARD,tp,id) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452001.lua b/pre-release/c100452001.lua deleted file mode 100644 index 20708329b8..0000000000 --- a/pre-release/c100452001.lua +++ /dev/null @@ -1,94 +0,0 @@ ---白き幻獣-青眼の白龍 ---Blue-Eyes White Dragon, the White Phantom Beast ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When a card or effect is activated that targets this card on the field (Quick Effect): You can discard 1 card; negate that effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.discon) - e1:SetCost(Cost.Discard()) - e1:SetTarget(s.distg) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e1) - --When this card is added from the Deck to your hand, or your monster is destroyed by battle: You can reveal this card in your hand; Special Summon it - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_TO_HAND) - e2a:SetCountLimit(1,{id,0}) - e2a:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_DECK) end) - e2a:SetCost(Cost.SelfReveal) - e2a:SetTarget(s.sptg) - e2a:SetOperation(s.spop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2b:SetCode(EVENT_BATTLE_DESTROYED) - e2b:SetRange(LOCATION_HAND) - e2b:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsPreviousControler,1,nil,tp) end) - c:RegisterEffect(e2b) - --If this card is Special Summoned from the hand or Deck: You can destroy all monsters your opponent controls, also you cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND|LOCATION_DECK) end) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLUE_EYES} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(c) and Duel.IsChainDisablable(ev) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) - --You cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_BLUE_EYES) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100452002.lua b/pre-release/c100452002.lua deleted file mode 100644 index 63b89f84d8..0000000000 --- a/pre-release/c100452002.lua +++ /dev/null @@ -1,111 +0,0 @@ ---蒼の深淵 ディープアイズ・ホワイト・ドラゴン ---Deep-Eyes White Dragon, the Blue Abyss ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can discard this card; add 1 Level 1 LIGHT Tuner from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If a "Blue-Eyes" Ritual Monster(s) and/or "Blue-Eyes White Dragon" is sent to your GY: You can target 1 of them; Special Summon this card from your GY (if it was there when the monster was sent) or hand (even if not), and if you do, its ATK becomes that monster's, also banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_GRAVE|LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Keep track of "Blue-Eyes" Ritual Monsters and "Blue-Eyes White Dragon" sent to the GY - aux.GlobalCheck(s,function() - s.gygroup=Group.CreateGroup() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_TO_GRAVE) - ge1:SetOperation(s.regop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_BLUE_EYES} -s.listed_names={CARD_BLUEEYES_W_DRAGON} -function s.thfilter(c) - return c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.tgfilter(c,e) - return ((c:IsSetCard(SET_BLUE_EYES) and c:IsRitualMonster()) or c:IsCode(CARD_BLUEEYES_W_DRAGON)) - and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.tgfilter,nil,e) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - if Duel.GetCurrentChain()==0 then s.gygroup:Clear() end - s.gygroup:Merge(tg) - s.gygroup:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - Duel.RaiseEvent(s.gygroup,EVENT_CUSTOM+id,e,0,rp,ep,ev) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=s.gygroup:Filter(s.tgfilter,nil,e):Match(Card.IsControler,nil,tp) - if chkc then return g:IsContains(chkc) and chkc:IsControler(tp) and s.tgfilter(chkc,e) end - local c=e:GetHandler() - if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - --Its ATK becomes that monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - --Banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(3300) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetValue(LOCATION_REMOVED) - e2:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e2,true) - end -end \ No newline at end of file diff --git a/pre-release/c100452004.lua b/pre-release/c100452004.lua deleted file mode 100644 index d61e3dab89..0000000000 --- a/pre-release/c100452004.lua +++ /dev/null @@ -1,69 +0,0 @@ ---終撃竜-サイバー・エンド・ドラゴン ---Cyber End Dragon the Decisive Strike Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Machine monsters with 2100 or more ATK - Fusion.AddProcMixN(c,true,true,s.matfilter,3) - c:AddMustBeFusionSummoned() - --material check - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(s.valcheck) - c:RegisterEffect(e0) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e0:GetLabel()==1 end) - e1:SetCost(Cost.PayLP(4000)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --extra att - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EXTRA_ATTACK) - e3:SetCondition(s.atcon) - e3:SetValue(2) - c:RegisterEffect(e3) -end -s.listed_names={23171610} -function s.matfilter(c,sc,st,tp) - return c:IsRace(RACE_MACHINE,sc,st,tp) and c:IsAttackAbove(2100) -end -function s.valcheck(e,c) - local mg=c:GetMaterial() - e:SetLabel(mg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)==#mg and 1 or 0) -end -function s.thfilter(c) - return c:IsCode(23171610) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.atcon(e) - local c=e:GetHandler() - return c:GetAttack()>c:GetBaseAttack() -end \ No newline at end of file diff --git a/pre-release/c100452006.lua b/pre-release/c100452006.lua deleted file mode 100644 index 17bf1b8ee3..0000000000 --- a/pre-release/c100452006.lua +++ /dev/null @@ -1,87 +0,0 @@ ---未来融合-フューチャー・フュージョン・ノヴァ ---Future Fusion Nova ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: Fusion Summon 1 LIGHT Machine Fusion Monster from your Extra Deck, using monsters from your Deck, including "Cyber Dragon", also for the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters, also you cannot declare attacks, except with the Summoned monster - local fusion_params={ - handler=c, - fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) end, - matfilter=aux.FALSE, - extrafil=s.fextra, - extratg=s.extratg, - stage2=s.stage2 - } - local e1=Fusion.CreateSummonEff(fusion_params) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - c:RegisterEffect(e1) - --When this card leaves the field, destroy that monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_LEAVE_FIELD_P) - e2:SetOperation(function(e) e:SetLabel(e:GetHandler():IsDisabled() and 1 or 0) end) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(s.mondesop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --When that monster is destroyed, destroy this card - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(s.selfdescon) - e4:SetOperation(function(e) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end) - c:RegisterEffect(e4) -end -s.listed_names={CARD_CYBER_DRAGON} -function s.fcheck(tp,sg,fc) - return sg:IsExists(Card.IsCode,1,nil,CARD_CYBER_DRAGON) -end -function s.fextra(e,tp,mg1) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil),s.fcheck -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.stage2(e,fc,tp,sg,chk) - if chk==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then - local c=e:GetHandler() - c:SetCardTarget(fc) - --For the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_MACHINE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local fid=fc:GetFieldID() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --Also you cannot declare attacks, except with the Summoned monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(function(e,c) return c:GetFieldID()~=fid end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) - end -end -function s.mondesop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function s.selfdescon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end \ No newline at end of file diff --git a/pre-release/c100452007.lua b/pre-release/c100452007.lua deleted file mode 100644 index 75211ae5e5..0000000000 --- a/pre-release/c100452007.lua +++ /dev/null @@ -1,94 +0,0 @@ ---赤き竜-ケッツァーコアトル ---Crimson Dragon Quetzacoatl ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.atkval) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOEXTRA|CATEGORY_NEGATE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.negcon) - e3:SetTarget(s.negtg) - e3:SetOperation(s.negop) - c:RegisterEffect(e3) -end -function s.spfilter(c,e,tp) - return c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),#g) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end - if ft>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.atkval(e,c) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()):GetSum(Card.GetBaseAttack) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and rp==1-tp and re:IsMonsterEffect() -end -function s.negfilter(c) - return c:IsFaceup() and c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.negfilter,tp,LOCATION_MZONE,0,1,1,exc) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then - Duel.NegateActivation(ev) - end -end \ No newline at end of file diff --git a/pre-release/c100452009.lua b/pre-release/c100452009.lua deleted file mode 100644 index 48f550cecd..0000000000 --- a/pre-release/c100452009.lua +++ /dev/null @@ -1,100 +0,0 @@ ---レッド・デーモンズ・チェーン ---Red Dragon Archfiend's Chain ---scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --You can activate this card the turn it was Set, by revealing 1 "Red Dragon Archfiend" in your Extra Deck - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e0:SetValue(function(e) e:SetLabel(1) end) - e0:SetCondition(function(e) return Duel.IsExistingMatchingCard(s.extracostfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,1,nil) end) - c:RegisterEffect(e0) - --Activate this card by revealing any number of monsters in your hand, then target Effect Monsters your opponent controls equal to the number of Tuners revealed +1; they lose 100 ATK for each card revealed, also their effects are negated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetLabelObject(e0) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --They lose 100 ATK for each card revealed - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.PersistentTargetFilter) - e2:SetValue(function() return e1:GetLabel()*-100 end) - c:RegisterEffect(e2) - --Also their effects are negated - local e3=e2:Clone() - e3:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.handcostfilter(c) - return c:IsMonster() and not c:IsPublic() -end -function s.rescon(max_target_count) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1<=max_target_count - end -end -function s.extracostfilter(c) - return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and not c:IsPublic() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local label_obj=e:GetLabelObject() - local hg=Duel.GetMatchingGroup(s.handcostfilter,tp,LOCATION_HAND,0,nil) - local max_target_count=Duel.GetTargetCount(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) - local rescon=s.rescon(max_target_count) - if chk==0 then label_obj:SetLabel(0) return #hg>0 and max_target_count>0 - and aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,0) end - if label_obj:GetLabel()>0 then - label_obj:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.extracostfilter,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleExtra(tp) - end - local sg=aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,1,tp,HINTMSG_CONFIRM,rescon) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - e:SetLabel(sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1,#sg) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsEffectMonster() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end - local target_count,reveal_count=e:GetLabel() - e:SetLabel(reveal_count) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,target_count,target_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) - if #tg>0 then - local c=e:GetHandler() - for tc in tg:Iter() do - c:SetCardTarget(tc) - end - --If the last of those monsters is not on the field, destroy this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(function(e) return #(e:GetHandler():GetCardTarget())==0 end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100452010.lua b/pre-release/c100452010.lua deleted file mode 100644 index b39ef063a8..0000000000 --- a/pre-release/c100452010.lua +++ /dev/null @@ -1,97 +0,0 @@ ---超銀河眼の光子龍-フォトン・ハウリング ---Neo Galaxy-Eyes Photon Dragon - Photon Howling ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 8 monsters OR 1 Rank 8 Xyz Monster - Xyz.AddProcedure(c,nil,8,3,s.altmatfilter,aux.Stringid(id,0),3,s.xyzop) - --Take 1 "Photon" monster from your Deck, and either Special Summon it in Defense Position or attach it to this card as material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetTarget(s.spattachtg) - e1:SetOperation(s.spattachop) - c:RegisterEffect(e1) - --Tribute 1 other Xyz Monster, and if you do, negate the effects of all other face-up cards currently on the field until the end of this turn. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(Cost.DetachFromSelf(3)) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_series={SET_PHOTON} -function s.altmatfilter(c,tp,xyzc) - return c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRank(8) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - return true -end -function s.spcheck(c,e,tp,mmz_chk) - return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.attachcheck(c,e,tp) - return c:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) -end -function s.spattachfilter(c,e,tp,mmz_chk) - return c:IsSetCard(SET_PHOTON) and c:IsMonster() and (s.spcheck(c,e,tp,mmz_chk) or s.attachcheck(c,e,tp)) -end -function s.spattachtg(e,tp,eg,ep,ev,re,r,rp,chk) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chk==0 then return Duel.IsExistingMatchingCard(s.spattachfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_chk) end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spattachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,s.spattachfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not sc then return end - local b1=s.spcheck(sc,e,tp,mmz_chk) - local b2=s.attachcheck(sc,e,tp) and c:IsRelateToEffect(e) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,4)}, --"Special Summon it in Defense Position" - {b2,aux.Stringid(id,5)}) --"Attach it to this card as material" - if op==1 then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - elseif op==2 then - Duel.Overlay(c,sc,true) - end -end -function s.xyzfilter(c,self_exc) - return c:IsXyzMonster() and c:IsReleasableByEffect() - and Duel.IsExistingMatchingCard(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,self_exc)) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,c,c) end - local g=Duel.GetMatchingGroup(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g-1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,exc,exc) - if not sc then return end - Duel.HintSelection(sc) - if Duel.Release(sc,REASON_EFFECT)>0 then - local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) - --Negate the effects of all other face-up cards currently on the field until the end of this turn - for tc in g:Iter() do - tc:NegateEffects(c,RESET_PHASE|PHASE_END) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452012.lua b/pre-release/c100452012.lua deleted file mode 100644 index 6ef4055a54..0000000000 --- a/pre-release/c100452012.lua +++ /dev/null @@ -1,93 +0,0 @@ ---GDロボ・オービタル 7 ---Galaxy Defense Robot Orbital 7 ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Tribute this card from your hand or field; take 1 "Photon" monster and 1 "Galaxy" monster from your Deck, add 1 of them to your hand, and send the other to the GY, also you cannot Special Summon for the rest of this turn, except LIGHT monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND|LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfTribute) - e1:SetTarget(s.thtgtg) - e1:SetOperation(s.thtgop) - c:RegisterEffect(e1) - --If a "Galaxy-Eyes" monster(s) is Special Summoned to your field: You can Special Summon this card from your GY, but banish it when it leaves the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_PHOTON,SET_GALAXY,SET_GALAXY_EYES} -function s.thtgfilter(c) - return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_PHOTON) and sg:IsExists(Card.IsSetCard,1,nil,SET_GALAXY) - and sg:IsExists(Card.IsAbleToHand,1,nil) and sg:IsExists(Card.IsAbleToGrave,1,nil) -end -function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then - local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) - return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.thtgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,2)) - if #sg==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg=sg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg) - Duel.SendtoGrave(sg-hg,REASON_EFFECT) - end - --You cannot Special Summon for the rest of this turn, except LIGHT monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsAttributeExcept(ATTRIBUTE_LIGHT) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spconfilter(c,tp) - return c:IsSetCard(SET_GALAXY_EYES) and c:IsControler(tp) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c100452013.lua b/pre-release/c100452013.lua deleted file mode 100644 index 8f7fb64afc..0000000000 --- a/pre-release/c100452013.lua +++ /dev/null @@ -1,76 +0,0 @@ ---四天の龍 スターヴ・ヴェノム・フュージョン・ドラゴン ---Starving Venom Fusion Dragon of the Four Heavenly Dragons ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 DARK monsters on the field - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - --atk to 0 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --fusion summon - local fusion_params={ - handler=c, - fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) end, - matfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsOnField() end, - extrafil=s.fextra, - gc=Fusion.ForcedHandler - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) -end -s.listed_series={SET_PREDAPLANT} -s.material_location=LOCATION_ONFIELD -function s.matfilter(c,fc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsOnField() -end -function s.atkfilter(c) - return c:IsFaceup() and (c:HasNonZeroAttack() or c:IsNegatableMonster() or c:IsAttributeExcept(ATTRIBUTE_DARK)) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:NegateEffects(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(ATTRIBUTE_DARK) - tc:RegisterEffect(e2) - end -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) -end \ No newline at end of file diff --git a/pre-release/c100452014.lua b/pre-release/c100452014.lua deleted file mode 100644 index 3a44abb117..0000000000 --- a/pre-release/c100452014.lua +++ /dev/null @@ -1,80 +0,0 @@ ---四天の龍 クリアウィング・シンクロ・ドラゴン ---Clear Wing Synchro Dragon of the Four Heavenly Dragons ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --If this card is Special Summoned: You can destroy 1 Effect Monster your opponent controls, and if you do, this card gains ATK equal to that monster's original ATK - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --When your opponent activates a card or effect (Quick Effect): You can Special Summon 1 Level 4 or lower WIND Tuner from your hand or GY (but negate its effects), then immediately after this effect resolves, you can Synchro Summon 1 WIND Synchro Monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SPEEDROID} -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - local c=e:GetHandler() - local atk=g:GetFirst():GetBaseAttack() - if Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsFaceup() and atk>0 then - --This card gains ATK equal to that monster's original ATK - c:UpdateAttack(atk) - end -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_TUNER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.synchrofilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable() -end -function s.spop(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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(s.synchrofilter,tp,LOCATION_EXTRA,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local synchro=Duel.SelectMatchingCard(tp,s.synchrofilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if synchro then - Duel.SynchroSummon(tp,synchro) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452016.lua b/pre-release/c100452016.lua deleted file mode 100644 index 1e6cd93973..0000000000 --- a/pre-release/c100452016.lua +++ /dev/null @@ -1,77 +0,0 @@ ---ヴァレルロード・L・ドラゴン ---Borreload Liberator Dragon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 3+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) - --You can only Special Summon "Borreload Liberator Dragon(s)" once per turn - c:SetSPSummonOnce(id) - --Place 1 monster your opponent controls in a zone this card points to and take control of it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(function() return Duel.IsBattlePhase() end) - e1:SetTarget(s.controltg) - e1:SetOperation(s.controlop) - e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_PHASE|TIMING_BATTLE_END) - c:RegisterEffect(e1) - --Destroy 1 monster you control and Special Summon itself from the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) - c:RegisterEffect(e2) -end -function s.controlfilter(c,zones) - return c:IsControlerCanBeChanged(false,zones) -end -function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk) - local zones=e:GetHandler():GetLinkedZone()&ZONES_MMZ - if chk==0 then return Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil,zones) end - Duel.SetChainLimit(function(e,ep,tp) return tp==ep end) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function s.controlop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local zones=c:GetLinkedZone()&ZONES_MMZ - if not (c:IsRelateToEffect(e) and zones~=0) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil,zones) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp,0,0,zones) - end -end -function s.desfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100452017.lua b/pre-release/c100452017.lua deleted file mode 100644 index d698a1694b..0000000000 --- a/pre-release/c100452017.lua +++ /dev/null @@ -1,94 +0,0 @@ ---ヴァレット・バラージュ ---Rokket Barrage ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --You can send 1 DARK Dragon monster from your Deck to the GY, except a Level 5 monster; Special Summon this card from your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --When a Link Monster's effect is activated that targets this card on the field (Quick Effect): You can destroy this card, then Special Summon up to 1 "Rokket" monster each from your hand, Deck, GY, and/or banishment, except "Rokket Barrage" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_ROKKET} -function s.selfspcostfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and not c:IsLevel(5) and c:IsAbleToGraveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsAttributeExcept(ATTRIBUTE_DARK) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(e:GetHandler()) and re:GetHandler():IsLinkMonster() and re:IsMonsterEffect() -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) - and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) -end -local LOCATION_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND_DECK_GRAVE_REMOVED) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ft=Duel.GetMZoneCount(tp,c) - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and ft>0 then - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,nil,e,tp) - if #g==0 then return end - ft=math.min(ft,4) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLocation),1,tp,HINTMSG_SPSUMMON) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452019.lua b/pre-release/c100452019.lua deleted file mode 100644 index ee5ce7fb95..0000000000 --- a/pre-release/c100452019.lua +++ /dev/null @@ -1,89 +0,0 @@ ---デミウルゴス EMA ---Demiurge Ema ---scripted by Naim -local s,id=GetID() -local TOKEN_HOMUNCULUS=id+100 -function s.initial_effect(c) - --You can send 4 monsters with 2400 or more ATK and 1000 DEF from your hand, Deck, and/or face-up field to the GY; Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - e1:SetCountLimit(1,{id,0}) - c:RegisterEffect(e1) - --You can target 1 Spell/Trap on each field; destroy them, then Special Summon 1 "Homunculus Token" (Fairy/LIGHT/Level 2/ATK 800/DEF 800) to both players' fields in Defense Position, and if you do, this card gains 1600 ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(s.tkntg) - e2:SetOperation(s.tknop) - e2:SetCountLimit(1,{id,1}) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_HOMUNCULUS} -function s.selfspcostfilter(c) - return c:IsAttackAbove(2400) and c:IsDefense(1000) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,e:GetHandler()) - if chk==0 then return #g>=4 and Duel.GetMZoneCount(tp,g)>0 end - local sg=aux.SelectUnselectGroup(g,e,tp,4,4,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) - Duel.SendtoGrave(sg,REASON_COST) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.cansummontokentothisplayer(sum_player,target_player) - return Duel.IsPlayerCanSpecialSummonMonster(sum_player,TOKEN_HOMUNCULUS,0,TYPES_TOKEN,800,800,2,RACE_FAIRY,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,target_player) -end -function s.rescon(sg,e,tp,mg) - return sg:GetClassCount(Card.GetControler,nil)==2 and Duel.GetMZoneCount(tp,sg)>0 and Duel.GetMZoneCount(1-tp,sg)>0 -end -function s.tkntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetTargetGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if chk==0 then return #g>=2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and s.cansummontokentothisplayer(tp,tp) - and s.cansummontokentothisplayer(tp,1-tp) - and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_DESTROY) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,2,PLAYER_ALL,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,0,2,PLAYER_ALL,0) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,1600) -end -function s.tknop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.Destroy(tg,REASON_EFFECT)>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and s.cansummontokentothisplayer(tp,tp) and s.cansummontokentothisplayer(tp,1-tp) then - Duel.BreakEffect() - local token1=Duel.CreateToken(tp,TOKEN_HOMUNCULUS) - Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - local token2=Duel.CreateToken(tp,TOKEN_HOMUNCULUS) - Duel.SpecialSummonStep(token2,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) - if Duel.SpecialSummonComplete()==0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --This card gains 1600 ATK - c:UpdateAttack(1600) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452020.lua b/pre-release/c100452020.lua deleted file mode 100644 index 7ccdd809c5..0000000000 --- a/pre-release/c100452020.lua +++ /dev/null @@ -1,141 +0,0 @@ ---闇の神-ダークゴッド ---Dark Creator ---scripted by Naim -local s,id=GetID() -local TOKEN_DARK_CREATOR=id+100 -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by Tributing 2 Fiend and/or Fairy monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Cannot be destroyed by battle - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Once per turn: You can Special Summon as many "Dark Creator Tokens" (Fiend/DARK/Level 10/ATK 3000/DEF 1000) as possible, but they cannot attack directly or be destroyed by battle, destroy them when this card is destroyed, also you cannot Special Summon for the rest of this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.tokensptg) - e3:SetOperation(s.tokenspop) - c:RegisterEffect(e3) - --If a monster(s) is destroyed by battle: Inflict 700 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetRange(LOCATION_MZONE) - e4:SetTarget(s.damtg) - e4:SetOperation(s.damop) - c:RegisterEffect(e4) -end -s.listed_names={TOKEN_DARK_CREATOR} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.CheckReleaseGroup(tp,Card.IsRace,2,false,2,true,c,tp,nil,false,nil,RACE_FIEND|RACE_FAIRY) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,2,2,false,true,true,c,tp,nil,false,nil,RACE_FIEND|RACE_FAIRY) - if g then - e:SetLabelObject(g) - return true - end - return false -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g then - Duel.Release(g,REASON_COST) - end -end -function s.tokensptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DARK_CREATOR,0,TYPES_TOKEN,3000,1000,10,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,tp,0) -end -function s.tokenspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DARK_CREATOR,0,TYPES_TOKEN,3000,1000,10,RACE_FIEND,ATTRIBUTE_DARK) then - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=Group.CreateGroup() - for i=1,ft do - local token=Duel.CreateToken(tp,TOKEN_DARK_CREATOR) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - sg:AddCard(token) - --They cannot attack directly or be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetDescription(3207) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - token:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetDescription(3000) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - token:RegisterEffect(e2,true) - end - if c:IsRelateToEffect(e) and #sg>0 then - --Destroy them when this card is destroyed - local e3a=Effect.CreateEffect(c) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3a:SetCode(EVENT_LEAVE_FIELD_P) - e3a:SetCondition(function() return c:IsReason(REASON_DESTROY) end) - e3a:SetOperation(function() - local e3b=Effect.CreateEffect(c) - e3b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3b:SetCode(EVENT_DESTROYED) - e3b:SetOperation(function(e) - local dg=sg:Filter(Card.IsOnField,nil) - if #dg>0 then - Duel.Hint(HINT_CARD,1-tp,id) - Duel.Destroy(dg,REASON_EFFECT) - end - e:Reset() - end) - c:RegisterEffect(e3b) - end) - e3a:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e3a) - end - Duel.SpecialSummonComplete() - end - --You cannot Special Summon for the rest of this turn - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,3)) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetTargetRange(1,0) - e4:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e4,tp) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(700) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,700) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c100452021.lua b/pre-release/c100452021.lua deleted file mode 100644 index 1978d534f1..0000000000 --- a/pre-release/c100452021.lua +++ /dev/null @@ -1,45 +0,0 @@ ---神鳴り ---Lightning Crash ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 Thunder monster from your Deck to your hand, but you cannot Normal Summon/Set monsters with its name until the end of the next turn after this card resolves - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - c:RegisterEffect(e1) -end -function s.thfilter(c) - return c:IsRace(RACE_THUNDER) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - local code=sc:GetCode() - --You cannot Normal Summon/Set monsters with its name until the end of the next turn after this card resolves - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsCode(code) end) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100452022.lua b/pre-release/c100452022.lua deleted file mode 100644 index 60f545803d..0000000000 --- a/pre-release/c100452022.lua +++ /dev/null @@ -1,89 +0,0 @@ ---DTカタストローグ ---Dark Tuner Catastrogue ---Scripted by the Razgriz -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand; immediately after this effect resolves, Normal Summon 1 "Dark Tuner" monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.nstg) - e1:SetOperation(s.nsop) - c:RegisterEffect(e1) - --Once per turn, if you control this Normal Summoned/Set card: You can Tribute both this face-up card and 1 face-up non-Tuner with a lower Level, and if you do, Special Summon 1 Synchro Monster from your Extra Deck with a Level equal to the difference in Levels of those monsters (this is treated as a Synchro Summon), then you can destroy 1 card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e) return e:GetHandler():IsNormalSummoned() end) - e2:SetTarget(s.darksynchtg) - e2:SetOperation(s.darksynchop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DARK_TUNER} -function s.nsfilter(c) - return c:IsSetCard(SET_DARK_TUNER) and c:IsSummonable(true,nil) -end -function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.nsop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end -end -function s.nontunerfilter(c,e,tp,lv,mc) - return not c:IsType(TYPE_TUNER) and c:IsReleasable() and c:IsFaceup() and c:HasLevel() and c:IsLevelBelow(lv-1) - and Duel.IsExistingMatchingCard(s.darksyncfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv-c:GetLevel(),Group.FromCards(c,mc)) -end -function s.darksyncfilter(c,e,tp,lv,mg) - return c:IsSynchroMonster() and c:IsLevel(lv) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.darksynchtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) - return #pg<=0 and c:IsReleasable() and Duel.IsExistingMatchingCard(s.nontunerfilter,tp,LOCATION_MZONE,0,1,c,e,tp,c:GetLevel(),c) - end - Duel.SetOperationInfo(0,CATEGORY_RELEASE,c,2,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.darksynchop(e,tp,eg,ep,ev,re,r,rp) - local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) - if #pg>0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local lv=c:GetLevel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sc=Duel.SelectMatchingCard(tp,s.nontunerfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp,lv,c):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - lv=lv-sc:GetLevel() - if Duel.Release(Group.FromCards(c,sc),REASON_EFFECT)==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sync=Duel.SelectMatchingCard(tp,s.darksyncfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst() - if sync and Duel.SpecialSummon(sync,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sync:CompleteProcedure() - if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100452023.lua b/pre-release/c100452023.lua deleted file mode 100644 index 8782ee0c8a..0000000000 --- a/pre-release/c100452023.lua +++ /dev/null @@ -1,106 +0,0 @@ ---DTナイトメア・ハンド ---Dark Tuner Nightmare Hand ---Scripted by the Razgriz -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand; immediately after this effect resolves, Normal Summon 1 "Dark Tuner" monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.nstg) - e1:SetOperation(s.nsop) - c:RegisterEffect(e1) - --If this card is Normal Summoned: You can Special Summon 1 Level 2 or lower monster from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Once per turn, if you control this Normal Summoned/Set card: You can Tribute both this face-up card and 1 face-up non-Tuner with a lower Level, and if you do, Special Summon 1 Synchro Monster from your Extra Deck with a Level equal to the difference in Levels of those monsters (this is treated as a Synchro Summon) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e) return e:GetHandler():IsNormalSummoned() end) - e3:SetTarget(s.darksynchtg) - e3:SetOperation(s.darksynchop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_TUNER} -function s.nsfilter(c) - return c:IsSetCard(SET_DARK_TUNER) and c:IsSummonable(true,nil) -end -function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.nsop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(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,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.nontunerfilter(c,e,tp,lv,mc) - return not c:IsType(TYPE_TUNER) and c:IsReleasable() and c:IsFaceup() and c:HasLevel() and c:IsLevelBelow(lv-1) - and Duel.IsExistingMatchingCard(s.darksyncfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv-c:GetLevel(),Group.FromCards(c,mc)) -end -function s.darksyncfilter(c,e,tp,lv,mg) - return c:IsSynchroMonster() and c:IsLevel(lv) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.darksynchtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) - return #pg<=0 and c:IsReleasable() and Duel.IsExistingMatchingCard(s.nontunerfilter,tp,LOCATION_MZONE,0,1,c,e,tp,c:GetLevel(),c) - end - Duel.SetOperationInfo(0,CATEGORY_RELEASE,c,2,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.darksynchop(e,tp,eg,ep,ev,re,r,rp) - local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) - if #pg>0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local lv=c:GetLevel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sc=Duel.SelectMatchingCard(tp,s.nontunerfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp,lv,c):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - lv=lv-sc:GetLevel() - if Duel.Release(Group.FromCards(c,sc),REASON_EFFECT)==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sync=Duel.SelectMatchingCard(tp,s.darksyncfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst() - if sync and Duel.SpecialSummon(sync,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sync:CompleteProcedure() - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100452024.lua b/pre-release/c100452024.lua deleted file mode 100644 index e41fcf7161..0000000000 --- a/pre-release/c100452024.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ガトリング・オーガ ---Gatling Ogre ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Inflict 800 damage to your damage for each facedow Spell/Trap Card sent to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(3,id) - e1:SetCost(s.damcost) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --When this card is targeted for an attack: Inflict 500 damage for each Attack Position monster they control, then end the Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.damendbptg) - e2:SetOperation(s.damendbpop) - c:RegisterEffect(e2) -end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,nil) - if chk==0 then return #g>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,1,#g,nil) - e:SetLabel(#g) - Duel.SendtoGrave(g,REASON_COST) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetLabel()*800 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - --Your opponent takes no damage from non-Fiend monsters' effects for the rest of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetTargetRange(0,1) - e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.damval(e,re,val,r,rp,rc) - if re and r&REASON_EFFECT>0 and re:IsMonsterEffect() and re:GetHandler():IsRaceExcept(RACE_FIEND) then - return 0 - else - return val - end -end -function s.damendbptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) - if chk==0 then return ct>0 end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) -end -function s.damendbpop(e,tp,eg,ep,ev,re,r,rp) - local dam=500*Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) - if dam>0 and Duel.Damage(1-tp,dam,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) - end -end \ No newline at end of file diff --git a/pre-release/c100452025.lua b/pre-release/c100452025.lua deleted file mode 100644 index c5bf946b79..0000000000 --- a/pre-release/c100452025.lua +++ /dev/null @@ -1,94 +0,0 @@ ---インフェルニティ・デス・ガンマン ---Infernity Doom Slinger ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --During your Main Phase: You can Special Summon 1 Fiend monster from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If you have no cards in your hand (Quick Effect): You can banish this card from your GY; your opponent chooses 1 of these effects for you to apply - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,4000) end) - e2:SetOperation(s.effop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(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,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local top_card=Duel.GetDecktopGroup(tp,1):GetFirst() - local b1=top_card - local b2=true - local op=Duel.SelectEffect(1-tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - local c=e:GetHandler() - if op==1 then - --Reveal the top card of your Deck, and if it is a monster, your opponent takes any effect damage you would have taken this turn instead. Otherwise, you take 4000 damage - Duel.ConfirmDecktop(tp,1) - if top_card:IsMonster() then - --Your opponent takes any effect damage you would have taken this turn instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(function(e,_,_,r) return (r&REASON_EFFECT)==REASON_EFFECT end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - else - Duel.Damage(tp,4000,REASON_EFFECT) - end - elseif op==2 then - --You take no effect damage this turn - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,5)) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2a:SetCode(EFFECT_CHANGE_DAMAGE) - e2a:SetTargetRange(1,0) - e2a:SetValue(s.damval) - e2a:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2a,tp) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_NO_EFFECT_DAMAGE) - Duel.RegisterEffect(e2b,tp) - end -end -function s.damval(e,re,val,r,rp,rc) - if (r&REASON_EFFECT)>0 then - return 0 - else - return val - end -end \ No newline at end of file diff --git a/pre-release/c100452026.lua b/pre-release/c100452026.lua deleted file mode 100644 index 4832057c62..0000000000 --- a/pre-release/c100452026.lua +++ /dev/null @@ -1,109 +0,0 @@ ---カオスエンド・ルーラー-開闢と終焉の支配者- ---Chaos End Ruler - Ruler of the Beginning and the End ---scripted by edo9300 -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Must be Special Summoned (from your hand) by banishing 1 LIGHT Warrior and 1 DARK Fiend monster from your GY - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_HAND) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - e0:SetValue(9300) - c:RegisterEffect(e0) - --This card's Special Summon cannot be negated - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - c:RegisterEffect(e1) - --Neither player can activate cards or effects when this card is Special Summoned - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2a:SetCode(EVENT_SPSUMMON_SUCCESS) - e2a:SetOperation(s.limop) - c:RegisterEffect(e2a) - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2b:SetCode(EVENT_CHAIN_END) - e2b:SetRange(LOCATION_MZONE) - e2b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e2b:SetOperation(function(e) e:GetHandler():ResetFlagEffect(id) Duel.SetChainLimitTillChainEnd(aux.FALSE) end) - c:RegisterEffect(e2b) - --If you control this card that was Summoned its own way: You can pay 1000 LP; banish as many cards from your opponent's field and GY as possible, then inflict 500 damage to your opponent for each card banished by this effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+9300) end) - e3:SetCost(Cost.PayLP(1000)) - e3:SetTarget(s.bandamtg) - e3:SetOperation(s.bandamop) - e3:SetCountLimit(1,id) - c:RegisterEffect(e3) -end -function s.spcostfilter(c) - return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR)) or (c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND))) - and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) -end -function s.propertyfilter(c,attribute,race) - return c:IsAttribute(attribute) and c:IsRace(race) -end -function s.rescon(sg,e,tp,mg) - return Duel.GetMZoneCount(tp,sg)>0 and sg:IsExists(s.propertyfilter,1,nil,ATTRIBUTE_LIGHT,RACE_WARRIOR) - and sg:IsExists(s.propertyfilter,1,nil,ATTRIBUTE_DARK,RACE_FIEND) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - return #g>=2 and Duel.GetMZoneCount(tp,g)>0 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) - if #sg>0 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local sg=e:GetLabelObject() - if sg then - Duel.Remove(sg,POS_FACEUP,REASON_COST) - end -end -function s.limop(e,tp,eg,ep,ev,re,r,rp) - local current_chain=Duel.GetCurrentChain() - if current_chain==0 then - Duel.SetChainLimitTillChainEnd(aux.FALSE) - elseif current_chain==1 then - e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) - end -end -function s.bandamtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,LOCATION_ONFIELD|LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) -end -function s.damfilter(c) - return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) -end -function s.bandamop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) - if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then - local damage=500*Duel.GetOperatedGroup():FilterCount(s.damfilter,nil) - if damage>0 then - Duel.Damage(1-tp,damage,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452027.lua b/pre-release/c100452027.lua deleted file mode 100644 index 2c2264f8b3..0000000000 --- a/pre-release/c100452027.lua +++ /dev/null @@ -1,85 +0,0 @@ ---HRUM-アルティメット・フォース ---Hyper-Rank-Up-Magic Ultimate Force ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Target 1 Rank 9 or lower "Utopia" or "Utopic" Xyz Monster you control whose original Attribute is LIGHT; Special Summon 1 Rank 10 or higher "Number" Xyz Monster from your Extra Deck, by using that Xyz Monster you control (this is treated as an Xyz Summon, transfer its materials), and if you do, attach this card to it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --A "Number 99" Xyz Monster that has this card as material gains this effect: ● Once per Chain, when your opponent activates a monster effect during the Battle Phase (Quick Effect): Detach all materials from this card, and if you do, destroy all monsters your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_F) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - c:RegisterEffect(e2) -end -s.listed_series={SET_UTOPIC,SET_NUMBER,SET_NUMBER_99} -function s.tgfilter(c,e,tp) - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or pg:IsContains(c)) and c:IsRankBelow(9) and c:IsSetCard(SET_UTOPIC) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,mc) - if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRankAbove(10) and c:IsSetCard(SET_NUMBER) and mc:IsCanBeXyzMaterial(c,tp) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp) end - if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and not tc:IsImmuneToEffect(e) then - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) - if not (#pg<=0 or pg:IsContains(c)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() - if not xyz then return end - xyz:SetMaterial(tc) - Duel.Overlay(xyz,tc) - if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - xyz:CompleteProcedure() - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(xyz,c) - end - end - end -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() and rp==1-tp and re:IsMonsterEffect() and e:GetHandler():IsSetCard(SET_NUMBER_99) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local og=c:GetOverlayGroup() - if c:IsRelateToEffect(e) and #og>0 and Duel.SendtoGrave(og,REASON_EFFECT)==#og then - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100452028.lua b/pre-release/c100452028.lua deleted file mode 100644 index 4b7eab9b79..0000000000 --- a/pre-release/c100452028.lua +++ /dev/null @@ -1,89 +0,0 @@ ---パーフェクトロン・ハイドライブ・ドラゴン ---Perfectron Hydradrive Dragon ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 1+ Link Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_LINK),1) - --If this card is Link Summoned, or at the end of the Damage Step if this card battled: Destroy as many monsters your opponent controls as possible, then inflict 300 damage to your opponent for each Link Monster in your GY - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1a:SetCode(EVENT_SPSUMMON_SUCCESS) - e1a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1a:SetTarget(s.destg) - e1a:SetOperation(s.desop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_DAMAGE_STEP_END) - c:RegisterEffect(e1b) - --While face-up on the field, this card is also LIGHT, WATER, FIRE, and WIND-Attribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_ADD_ATTRIBUTE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(ATTRIBUTE_LIGHT|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND) - c:RegisterEffect(e2) - --Unaffected by the activated effects of monsters that share an Attribute with this card - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(s.immval) - c:RegisterEffect(e3) - --If this card with 1000 or more ATK would be destroyed by battle or card effect, you can make its ATK become reduced by 1000 instead - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_MZONE) - e4:SetTarget(s.desreptg) - c:RegisterEffect(e4) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - local dam=300*Duel.GetMatchingGroupCount(Card.IsLinkMonster,tp,LOCATION_GRAVE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - local dam=300*Duel.GetMatchingGroupCount(Card.IsLinkMonster,tp,LOCATION_GRAVE,0,nil) - if dam>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end -function s.immval(e,te) - local trig_loc,trig_attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_ATTRIBUTE) - if not (te:IsMonsterEffect() and te:IsActivated()) then return false end - local c=e:GetHandler() - local tc=te:GetHandler() - if not Duel.IsChainSolving() or (tc:IsRelateToEffect(te) and tc:IsFaceup() and tc:IsLocation(trig_loc)) then - return c:IsAttribute(tc:GetAttribute()) - else - return c:GetAttribute()&trig_attr>0 - end -end -function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAttackAbove(1000) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end - if Duel.SelectEffectYesNo(tp,c,96) then - --Make its ATK become reduced by 1000 instead - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()-1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - return true - end - return false -end \ No newline at end of file diff --git a/pre-release/c100454001.lua b/pre-release/c100454001.lua deleted file mode 100644 index df9456a2d0..0000000000 --- a/pre-release/c100454001.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ブラック・ローズ・ドラゴン/バスター ---Black Rose Dragon/Assault Mode ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --If this card is destroyed: You can Special Summon 1 "Black Rose Dragon" from your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DESTROYED) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --You can reveal this card in your hand; shuffle it into the Deck, and if you do, change the ATK of 1 face-up monster on the field to 0 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(s.tdatktg) - e2:SetOperation(s.tdatkop) - c:RegisterEffect(e2) - --If this card is Special Summoned, or a monster(s) is Special Summoned to your opponent's field: You can destroy all cards on the field - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,2)) - e3a:SetCategory(CATEGORY_DESTROY) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_SPSUMMON_SUCCESS) - e3a:SetCountLimit(1,{id,1}) - e3a:SetTarget(s.destg) - e3a:SetOperation(s.desop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3b:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3b:SetRange(LOCATION_MZONE) - e3b:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsControler,1,nil,1-tp) end) - c:RegisterEffect(e3b) -end -s.listed_names={CARD_ASSAULT_MODE,CARD_BLACK_ROSE_DRAGON} -s.assault_mode=CARD_BLACK_ROSE_DRAGON -function s.spfilter(c,e,tp) - return c:IsCode(CARD_BLACK_ROSE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.tdatktg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.tdatkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local sc=Duel.SelectMatchingCard(tp,Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - --Change its ATK to 0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100454002.lua b/pre-release/c100454002.lua deleted file mode 100644 index 33175c3a71..0000000000 --- a/pre-release/c100454002.lua +++ /dev/null @@ -1,84 +0,0 @@ ---捕食植物デェアデビル ---Predaplant Dheadevil ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Predaplant" monster + 1 Level 1 monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PREDAPLANT),aux.FilterBoolFunction(Card.IsLevel,1)) - c:AddMustFirstBeFusionSummoned() - --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 monster on either field with a Predator Counter and 1 "Predaplant" monster you control - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_EXTRA) - e0:SetCondition(s.selfspcon) - e0:SetTarget(s.selfsptg) - e0:SetOperation(s.selfspop) - c:RegisterEffect(e0) - --During the Main Phase, if this card was Special Summoned this turn (Quick Effect): You can target Spells/Traps on the field, up to the number of monsters with a Predator Counter; destroy them - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return Duel.IsMainPhase() and e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) -end -s.listed_series={SET_PREDAPLANT} -s.counter_list={COUNTER_PREDATOR} -s.material_setcode=SET_PREDAPLANT -function s.selfspcostfilter(c,tp,fc) - return ((c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp)) or c:HasCounter(COUNTER_PREDATOR)) and c:IsReleasable() - and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) -end -function s.rescon(sg,e,tp,mg) - return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 and sg:IsExists(s.predaplantchkfilter,1,nil,tp) - and sg:IsExists(Card.HasCounter,1,nil,COUNTER_PREDATOR) -end -function s.predaplantchkfilter(c,tp) - return c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp) -end -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) - if #sg==2 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g then - Duel.Release(g,REASON_COST|REASON_MATERIAL) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - local max_count=Duel.GetMatchingGroupCount(Card.HasCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,COUNTER_PREDATOR) - if chk==0 then return max_count>0 and Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,max_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305001.lua b/pre-release/c101305001.lua deleted file mode 100644 index bbfe73b131..0000000000 --- a/pre-release/c101305001.lua +++ /dev/null @@ -1,105 +0,0 @@ ---超魔剣士ブラック・カオス ---Black Chaos the Ultimate Magical Swordsman ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Must be Special Summoned (from your hand) by shuffling 1 Spellcaster or Warrior Ritual Monster from your hand or GY into the Deck - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_HAND) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --You can discard this card; place 1 Continuous Trap that mentions "Ritual of Light and Darkness" from your Deck or GY, face-up on your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Unaffected by your opponent's activated effects while you have a Ritual Spell in your GY - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsRitualSpell,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end) - e2:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) - c:RegisterEffect(e2) - --Once per turn: You can banish 2 cards your opponent controls - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.rmtg) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.spconfilter(c) - return c:IsRace(RACE_SPELLCASTER|RACE_WARRIOR) and c:IsRitualMonster() and c:IsAbleToDeckAsCost() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,1,1,nil,1,tp,HINTMSG_TODECK,nil,nil,true) - if #sg>0 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g then - local sc=g:GetFirst() - if sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - else - Duel.HintSelection(sc) - end - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) - end -end -function s.plfilter(c,tp) - return c:IsContinuousTrap() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tp) end - Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_ONFIELD) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,2,nil) - if #g==2 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305002.lua b/pre-release/c101305002.lua deleted file mode 100644 index 920f417ac2..0000000000 --- a/pre-release/c101305002.lua +++ /dev/null @@ -1,88 +0,0 @@ ---混沌の魔王-スカル・デーモン ---Skull Archfiend of Chaos ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand or GY: You can target 3 other cards in the GYs and/or face-up banishment, including a card that mentions "Ritual of Light and Darkness"; place them on the bottom of the Deck in any order, and if you do, Special Summon this card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.tdsptg) - e1:SetOperation(s.tdspop) - c:RegisterEffect(e1) - --If this card is sent to the GY: You can send 1 Ritual Spell from your hand or Deck to the GY; add 1 Ritual Monster mentioned on that card from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.ListsCode,1,nil,CARD_RITUAL_OF_LIGHT_AND_DARKNESS) -end -function s.tdsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local c=e:GetHandler() - local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,c) - if chk==0 then return #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.tdspop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then - local tg_your,tg_opp=tg:Split(Card.IsControler,nil,tp) - local your_count=tg_your:FilterCount(Card.IsLocation,nil,LOCATION_DECK) - local opp_count=tg_opp:FilterCount(Card.IsLocation,nil,LOCATION_DECK) - if your_count>=2 then - Duel.SortDeckbottom(tp,tp,your_count) - end - if opp_count>=2 then - Duel.SortDeckbottom(tp,1-tp,opp_count) - end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.thcostfilter(c,tp) - return c:IsRitualSpell() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c) -end -function s.thfilter(c,rit_spell) - return c:IsRitualMonster() and rit_spell:ListsCode(c:GetCode())and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() - Duel.SendtoGrave(sc,REASON_COST) - e:SetLabelObject(sc) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabelObject()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101305003.lua b/pre-release/c101305003.lua deleted file mode 100644 index 72f52e8d3e..0000000000 --- a/pre-release/c101305003.lua +++ /dev/null @@ -1,95 +0,0 @@ ---エルフの聖賢者 ---Mystical Celtic Sage ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can activate this effect; you can only Special Summon from the Extra Deck once for the rest of this turn, also reveal your entire hand, and if there is a card that mentions "Ritual of Light and Darkness" in it, you can draw 3 cards, then discard 2 cards - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.drtg) - e1a:SetOperation(s.drop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --You can Tribute this card; Special Summon 1 Ritual Monster that mentions "Ritual of Light and Darkness" from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfTribute) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) - Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --You can only Special Summon from the Extra Deck once for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(s.sprestrictioncon) - e1:SetOperation(s.sprestrictionop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - if Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) then return end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - if g:IsExists(Card.ListsCode,1,nil,CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and Duel.IsPlayerCanDraw(tp,3) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) and Duel.Draw(tp,3,REASON_EFFECT)==3 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD) - end -end -function s.sprestrictionconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonLocation(LOCATION_EXTRA) -end -function s.sprestrictioncon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.sprestrictionconfilter,1,nil,tp) -end -function s.sprestrictionop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --You can only Special Summon from the Extra Deck once for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp) -end -function s.spfilter(c,e,tp) - return c:IsRitualMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(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,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305004.lua b/pre-release/c101305004.lua deleted file mode 100644 index d3db506d7e..0000000000 --- a/pre-release/c101305004.lua +++ /dev/null @@ -1,78 +0,0 @@ ---グリフォー ---Gurifoh ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --(Quick Effect): You can discard this card, then activate 1 of these effects; - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --For the Ritual Summon of exactly 1 Level 8 Ritual Monster with a card effect that requires use of monsters, this card can be used as the entire Tribute - Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsLevel,8)) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.setfilter(c) - return (c:IsQuickPlaySpell() or c:IsTrap()) and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsSSetable() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=true - local b2=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(0) - elseif op==2 then - e:SetCategory(CATEGORY_SET) - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - local c=e:GetHandler() - if op==1 then - --● The next battle or effect damage you take this turn will become 0 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - elseif op==2 then - --● Set 1 Quick-Play Spell or Trap that mentions "Ritual of Light and Darkness" from your Deck. It can be activated this turn - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SSet(tp,sc)>0 then - local eff_code=sc:IsQuickPlaySpell() and EFFECT_QP_ACT_IN_SET_TURN or EFFECT_TRAP_ACT_IN_SET_TURN - --It can be activated this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,4)) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(eff_code) - e2:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e2) - end - end -end -function s.damval(e,re,val,r,rp,rc) - if r&(REASON_BATTLE|REASON_EFFECT)>0 then - Duel.Hint(HINT_CARD,0,id) - e:Reset() - return 0 - end - return val -end \ No newline at end of file diff --git a/pre-release/c101305005.lua b/pre-release/c101305005.lua deleted file mode 100644 index 0ce96e4a78..0000000000 --- a/pre-release/c101305005.lua +++ /dev/null @@ -1,82 +0,0 @@ ---劫火の三幻魔-神炎皇ウリア ---Uria, Lord of Searing Flames - Sacred Beast of Cataclysmic Fire ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with a "Sacred Beast" card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_CONDITION) - e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) - c:RegisterEffect(e0) - --You can reveal this card in your hand; add 1 "Sacred Beast" Trap from your Deck to your hand, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Gains 1000 ATK/DEF for each Trap in the GYs - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_SINGLE) - e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2a:SetCode(EFFECT_UPDATE_ATTACK) - e2a:SetRange(LOCATION_MZONE) - e2a:SetValue(function(e,c) return 1000*Duel.GetMatchingGroupCount(Card.IsTrap,0,LOCATION_GRAVE,LOCATION_GRAVE,nil) end) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2b) - --Once per turn (Quick Effect): You can target 1 Spell/Trap on the field; destroy it. Neither player can activate cards or effects in response to this effect's activation - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) - c:RegisterEffect(e3) -end -s.listed_series={SET_SACRED_BEAST} -function s.thfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsTrap() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetChainLimit(aux.FALSE) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305006.lua b/pre-release/c101305006.lua deleted file mode 100644 index 69c9fb59e4..0000000000 --- a/pre-release/c101305006.lua +++ /dev/null @@ -1,104 +0,0 @@ ---罪禍の三幻魔-降雷皇ハモン ---Hamon, Lord of Striking Thunder - Sacred Beast of Sinful Catastrophe ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with a "Sacred Beast" card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_CONDITION) - e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) - c:RegisterEffect(e0) - --You can reveal this card in your hand; add 1 "Sacred Beast" Spell from your Deck to your hand, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Once per turn, if a monster(s) is sent to your opponent's GY: Inflict 1000 damage to your opponent - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.damcon) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) - --If this card is destroyed by battle or card effect: You can activate this effect; you take no damage this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(s.nodamcon) - e3:SetTarget(s.nodamtg) - e3:SetOperation(s.nodamop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SACRED_BEAST} -function s.thfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.damconfilter(c,opp) - return c:IsMonster() and c:IsControler(opp) -end -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.damconfilter,1,nil,1-tp) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,1,tp,1-tp,1000) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Damage(1-tp,d,REASON_EFFECT) -end -function s.nodamcon(e,tp,eg,ep,ev,re,r,rp) - return (r&(REASON_EFFECT|REASON_BATTLE))>0 -end -function s.nodamtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end -end -function s.nodamop(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --You take no damage this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - Duel.RegisterEffect(e2,tp) -end \ No newline at end of file diff --git a/pre-release/c101305007.lua b/pre-release/c101305007.lua deleted file mode 100644 index 0413793407..0000000000 --- a/pre-release/c101305007.lua +++ /dev/null @@ -1,93 +0,0 @@ ---無窮の三幻魔-幻魔皇ラビエル ---Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with a "Sacred Beast" card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_CONDITION) - e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) - c:RegisterEffect(e0) - --You can reveal this card in your hand; add 1 "Sacred Beast" monster from your Deck to your hand, except "Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity", then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Once per turn (Quick Effect): You can Tribute 2 other "Sacred Beast" monsters; destroy as many monsters your opponent controls as possible, and if you do, this card gains 1000 ATK for each card destroyed by this effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(s.descost) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_SACRED_BEAST} -function s.thfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.descostfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) -end -function s.descostchk(sg,tp,exg) - return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,sg) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,2,false,s.descostchk,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,2,2,false,s.descostchk,c) - Duel.Release(g,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),0,tp,#g*1000) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if #g==0 then return end - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct==0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --This card gains 1000 ATK for each card destroyed by this effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305008.lua b/pre-release/c101305008.lua deleted file mode 100644 index 19d1dee9ca..0000000000 --- a/pre-release/c101305008.lua +++ /dev/null @@ -1,75 +0,0 @@ ---三幻魔の操世者 ---The Orchestrator of the Sacred Beasts ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand; discard 1 card, and if you do, Special Summon 1 "Sacred Beast" monster from your hand in Defense Position, except a Level 8 monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.sptg(LOCATION_HAND)) - e1:SetOperation(s.spop(LOCATION_HAND)) - c:RegisterEffect(e1) - --You can discard 1 card; Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, except a Level 8 monster or the discarded card - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Discard(nil,false,1,1,function(e,tp,og) local oc=og:GetFirst() oc:CreateEffectRelation(e) e:SetLabelObject(oc) end)) - e2:SetTarget(s.sptg(LOCATION_HAND|LOCATION_GRAVE)) - e2:SetOperation(s.spop(LOCATION_HAND|LOCATION_GRAVE)) - c:RegisterEffect(e2) - --You can banish this card from your GY; Special Summon 1 "Sacred Beast" monster from your GY in Defense Postion, except a Level 8 monster - local e3=e2:Clone() - e3:SetDescription(aux.Stringid(id,2)) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.sptg(LOCATION_GRAVE)) - e3:SetOperation(s.spop(LOCATION_GRAVE)) - c:RegisterEffect(e3) -end -s.listed_series={SET_SACRED_BEAST} -function s.discardfilter(c,e,tp) - return c:IsDiscardable(REASON_EFFECT) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SACRED_BEAST) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) -end -function s.sptg(summon_location) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - if summon_location==LOCATION_HAND then - return Duel.IsExistingMatchingCard(s.discardfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - else - return Duel.IsExistingMatchingCard(s.spfilter,tp,summon_location,0,1,e:GetHandler(),e,tp) - end - end - if summon_location==LOCATION_HAND then - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,summon_location) - end -end -function s.spop(summon_location) - return function(e,tp,eg,ep,ev,re,r,rp) - if summon_location==LOCATION_HAND and Duel.DiscardHand(tp,s.discardfilter,1,1,REASON_EFFECT|REASON_DISCARD,nil,e,tp)<0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local exc=nil - if summon_location==LOCATION_HAND|LOCATION_GRAVE then - local cost_card=e:GetLabelObject() - exc=cost_card:IsRelateToEffect(e) and cost_card or nil - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,summon_location,0,1,1,exc,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 then - sc:CompleteProcedure() - end - end -end diff --git a/pre-release/c101305009.lua b/pre-release/c101305009.lua deleted file mode 100644 index bea0672623..0000000000 --- a/pre-release/c101305009.lua +++ /dev/null @@ -1,108 +0,0 @@ ---三幻魔の殉教者 ---Martyr of the Sacred Beasts ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can place 1 "Sacred Beast" Field Spell or "Sacred Beast" Continuous Spell/Trap from your Deck face-up on your field - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.pltg) - e1a:SetOperation(s.plop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --If you control another "Sacred Beast" monster: You can Special Summon 2 "Martyr of the Sacred Beasts" from your hand, Deck, and/or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --During your opponent's End Phase, if this card and a Level 10 "Sacred Beast" monster are in your GY: You can add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={id} -s.listed_series={SET_SACRED_BEAST} -function s.plfilter(c,tp,szone_chk) - return c:IsSetCard(SET_SACRED_BEAST) and not c:IsForbidden() and c:CheckUniqueOnField(tp) - and (c:IsFieldSpell() or (szone_chk and c:IsContinuousSpellTrap())) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp,szone_chk) - end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() - if sc then - if sc:IsFieldSpell() then - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - else - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - end -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SACRED_BEAST),tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function s.spfilter(c,e,tp) - return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,e,tp) - if #g==2 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thconfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsLevel(10) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305027.lua b/pre-release/c101305027.lua deleted file mode 100644 index 21a55560c6..0000000000 --- a/pre-release/c101305027.lua +++ /dev/null @@ -1,89 +0,0 @@ ---黒き混沌の魔術師ブラック・カオス ---Black Chaos the Dark Chaos Magician ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Unaffected by your opponent's activated effects, unless they target this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(s.immval) - c:RegisterEffect(e1) - --Spells/Traps you control cannot be destroyed, or banished, by your opponent's card effects - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2a:SetRange(LOCATION_MZONE) - e2a:SetTargetRange(LOCATION_ONFIELD,0) - e2a:SetTarget(function(e,c) return c:IsSpellTrap() end) - e2a:SetValue(aux.indoval) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2b:SetCode(EFFECT_CANNOT_REMOVE) - e2b:SetTargetRange(0,1) - e2b:SetTarget(function(e,c,tp,r) return c:IsSpellTrap() and c:IsControler(e:GetHandlerPlayer()) and c:IsOnField() and r==REASON_EFFECT end) - e2b:SetValue(1) - c:RegisterEffect(e2b) - --If this card is Special Summoned: You can add 1 Spell from your GY to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,0}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) - --You can target 1 card your opponent controls; banish it (face-down) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetTarget(s.bantg) - e4:SetOperation(s.banop) - c:RegisterEffect(e4) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.immval(e,re) - if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - return not (tg and tg:IsContains(e:GetHandler())) -end -function s.thfilter(c) - return c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil,tp,POS_FACEDOWN) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305028.lua b/pre-release/c101305028.lua deleted file mode 100644 index 3660da9d87..0000000000 --- a/pre-release/c101305028.lua +++ /dev/null @@ -1,74 +0,0 @@ ---光と闇の戦士カオス・ソルジャー ---Black Luster Soldier - Soldier of Light and Darkness ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(1) - c:RegisterEffect(e1) - --Unaffected by your opponent's activated effects, unless they target this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.immval) - c:RegisterEffect(e2) - --If this card is Special Summoned: You can target 1 card your opponent controls; banish it - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,0}) - e3:SetTarget(s.bantg) - e3:SetOperation(s.banop) - c:RegisterEffect(e3) - --When this card destroys an opponent's monster by battle: You can make this card gain 1500 ATK, and if you do, it can make a second attack in a row - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.atkcon) - e4:SetOperation(s.atkop) - c:RegisterEffect(e4) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.immval(e,re) - if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - return not (tg and tg:IsContains(e:GetHandler())) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and c:CanChainAttack() -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToBattle() and c:UpdateAttack(1500)>0 then - Duel.ChainAttack() - end -end \ No newline at end of file diff --git a/pre-release/c101305029.lua b/pre-release/c101305029.lua deleted file mode 100644 index ac33963962..0000000000 --- a/pre-release/c101305029.lua +++ /dev/null @@ -1,91 +0,0 @@ ---混沌の三幻魔 ---Phantasmal Sacred Beasts of Chaos ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Level 10 monsters that cannot be Normal Summoned/Set - Fusion.AddProcFunRep(c,s.matfilter,3,true) - --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by sending the above cards you control to the GY - c:AddMustBeFusionSummoned() - Fusion.AddContactProc(c,s.contactfil,s.contactop,false,nil,1) - --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetCondition(s.regcon) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --The first two times this card would be destroyed by card effect each turn, it is not destroyed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetValue(function(e,re,r) return (r&REASON_EFFECT)>0 end) - c:RegisterEffect(e1) - --Once per Chain and thrice per turn (Quick Effect): You can target 1 face-up monster your opponent controls; negate its effects (until the end of this turn), then you can gain LP equal to half its ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(3) - e2:SetCost(Cost.SoftOncePerChain(id)) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.matfilter(c) - return c:IsLevel(10) and not c:IsSummonableCard() -end -function s.contactfil(tp) - return Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil) -end -function s.contactop(g) - Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) -end -function s.regcon(e) - local c=e:GetHandler() - return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsNegatableMonster() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local tc=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.floor(tc:GetAttack()/2)) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - --Negate its effects (until the end of this turn) - tc:NegateEffects(e:GetHandler(),RESETS_STANDARD_PHASE_END) - Duel.AdjustInstantly(tc) - local lp=math.floor(tc:GetAttack()/2) - if lp>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.BreakEffect() - Duel.Recover(p,lp,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101305042.lua b/pre-release/c101305042.lua deleted file mode 100644 index 3ec097b153..0000000000 --- a/pre-release/c101305042.lua +++ /dev/null @@ -1,74 +0,0 @@ ---道化の一座 ドリッシュ ---Clown Crew Drish ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 Ritual, Fusion, Synchro, Xyz, and/or Pendulum Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM),2) - --Your Tribute Summoned monsters can make a second attack during each Battle Phase - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) - e1:SetValue(1) - c:RegisterEffect(e1) - --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Drish" once per turn); - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsLinkMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) and ((Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil)) - or (Duel.IsPlayerCanDraw(1-tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil))) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TOEXTRA) - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Return all Link Monsters on the field and in the GYs to the Extra Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsLinkMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) - if #g>0 then - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - elseif op==2 then - --● Each player shuffles their entire hand into the Deck, then they draw the same number of cards they shuffled - local turn_player=Duel.GetTurnPlayer() - local step=turn_player==0 and 1 or -1 - for p=turn_player,1-turn_player,step do - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(p) then - local draw_count=Duel.GetOperatedGroup():FilterCount(Card.IsPreviousControler,nil,p) - if draw_count>0 then - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,draw_count,REASON_EFFECT) - end - end - end - end -end diff --git a/pre-release/c101305044.lua b/pre-release/c101305044.lua deleted file mode 100644 index 2dc15d5147..0000000000 --- a/pre-release/c101305044.lua +++ /dev/null @@ -1,49 +0,0 @@ ---光と闇の儀式 ---Ritual of Light and Darkness ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Ritual Summon 1 "Black Chaos the Dark Chaos Magician" or "Black Luster Soldier - Soldier of Light and Darkness" from your hand, by Tributing monsters from your hand or field, and/or banishing monsters from your GY, whose total Levels equal or exceed its Level - Ritual.AddProcGreater{ - handler=c, - filter=function(c) return c:IsCode(101305027,101305028) end, - extrafil=function(e,tp) return Duel.GetMatchingGroup(aux.AND(Card.HasLevel,Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end, - extratg=s.extratg, - desc=aux.Stringid(id,0) - } - --If this card is in your GY: You can add both this card and 1 card that mentions "Ritual of Light and Darkness" from your GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={101305027,101305028,CARD_RITUAL_OF_LIGHT_AND_DARKNESS} --"Black Chaos the Dark Chaos Magician", "Black Luster Soldier - Soldier of Light and Darkness" -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) -end -function s.thfilter(c) - return c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) - if #g>0 then - g:AddCard(c) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305045.lua b/pre-release/c101305045.lua deleted file mode 100644 index 77f7a2dc73..0000000000 --- a/pre-release/c101305045.lua +++ /dev/null @@ -1,98 +0,0 @@ ---混沌のマジック・ボックス ---Mystic Box of Chaos ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a card or effect that targets another card(s) you control: Return 1 of those cards you control to the hand (if face-down, reveal it briefly to check), and if you do, destroy 1 card on the field, then you can Special Summon 1 monster that mentions "Ritual of Light and Darkness" from your hand, with a different name than the returned card, ignoring its Summoning conditions - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.thdescon) - e1:SetTarget(s.thdestg) - e1:SetOperation(s.thdesop) - c:RegisterEffect(e1) - --If this card in its owner's possession is destroyed by an opponent's card: You can Special Summon 1 Ritual Monster that mentions "Ritual of Light and Darkness" from your hand or Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.thdesconfilter(c,tp) - return c:IsControler(tp) and c:IsOnField() and c:IsAbleToHand() -end -function s.thdescon(e,tp,eg,ep,ev,re,r,rp) - if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsExists(s.thdesconfilter,1,e:GetHandler(),tp) -end -function s.thdestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.thconfilter(c,re,tp) - return c:IsRelateToEffect(re) and c:IsControler(tp) -end -function s.handspfilter(c,e,tp,code) - return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsCode(code) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.thdesop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(s.thconfilter,nil,re,tp) - if #tg==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sc=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil):GetFirst() - if not sc then return end - if sc:IsFaceup() then - Duel.HintSelection(sc) - else - Duel.ConfirmCards(1-tp,sc) - end - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(sc:GetControler()) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc) - if #g==0 then return end - Duel.HintSelection(g) - local code=sc:GetCode() - if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp,code) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end - end - end -end -function s.ritualspfilter(c,e,tp) - return c:IsRitualMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.spop(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,s.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305046.lua b/pre-release/c101305046.lua deleted file mode 100644 index e73647c470..0000000000 --- a/pre-release/c101305046.lua +++ /dev/null @@ -1,101 +0,0 @@ ---カオスシルクハット ---Chaos Hats ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect, or a Normal Spell/Trap Card: Choose 3 Spells/Traps with different names from each other from your Deck and 1 monster in your Main Monster Zone that mentions "Ritual of Light and Darkness". Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down), Set the chosen monster, and shuffle them on the field, then your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION+CATEGORY_SET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS,id} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and (re:IsMonsterEffect() or (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsNormalSpellTrap())) -end -function s.setfilter(c) - return c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanTurnSet() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,nil,TYPE_MONSTER|TYPE_NORMAL,0,0,8,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEDOWN_DEFENSE) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_MMZONE,0,1,nil) - end - --Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_SPSUMMON) - if #sg~=3 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local mc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_MMZONE,0,1,1,nil):GetFirst() - if not mc or mc:IsImmuneToEffect(e) then return end - Duel.HintSelection(mc) - for sc in sg:Iter() do - --Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down) - local e1=Effect.CreateEffect(sc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetValue(TYPE_NORMAL|TYPE_MONSTER) - e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY) - sc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetValue(RACE_SPELLCASTER) - sc:RegisterEffect(e2,true) - local e3=e1:Clone() - e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e3:SetValue(ATTRIBUTE_DARK) - sc:RegisterEffect(e3,true) - local e4=e1:Clone() - e4:SetCode(EFFECT_CHANGE_LEVEL) - e4:SetValue(8) - sc:RegisterEffect(e4,true) - local e5=e1:Clone() - e5:SetCode(EFFECT_SET_BASE_ATTACK) - e5:SetValue(0) - sc:RegisterEffect(e5,true) - local e6=e1:Clone() - e6:SetCode(EFFECT_SET_BASE_DEFENSE) - e6:SetValue(0) - sc:RegisterEffect(e6,true) - local e7=e1:Clone() - e7:SetCode(EFFECT_CHANGE_CODE) - e7:SetValue(id) - sc:RegisterEffect(e7,true) - end - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE) - Duel.ConfirmCards(1-tp,sg) - if mc:IsHasEffect(EFFECT_LIGHT_OF_INTERVENTION) then - Duel.ChangePosition(mc,POS_FACEUP_DEFENSE) - else - Duel.ChangePosition(mc,POS_FACEDOWN_DEFENSE) - mc:ClearEffectRelation() - end - sg:AddCard(mc) - Duel.ShuffleSetCard(sg) - --Your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" - Duel.BreakEffect() - local tg=Group.CreateGroup() - Duel.ChangeTargetCard(ev,tg) - Duel.ChangeChainOperation(ev,s.repop) -end -function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305047.lua b/pre-release/c101305047.lua deleted file mode 100644 index 04e230e8c2..0000000000 --- a/pre-release/c101305047.lua +++ /dev/null @@ -1,66 +0,0 @@ ---三幻魔解放 ---Unleashing the Sacred Beasts ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Add 3 "Sacred Beast" monsters with different names from your Deck to your hand, then discard 2 cards - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.th3tg) - e1:SetOperation(s.th3op) - c:RegisterEffect(e1) - --If this card is in your GY, except the turn it was sent there: You can banish it; add 1 Level 10 Pyro, Thunder, or Fiend monster that cannot be Normal Summoned/Set from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.th1tg) - e2:SetOperation(s.th1op) - c:RegisterEffect(e2) -end -s.listed_series={SET_SACRED_BEAST} -function s.th3filter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() and c:IsAbleToHand() -end -function s.th3tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) -end -function s.th3op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) - if #g<3 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_ATOHAND) - if #sg==3 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.th1filter(c) - return c:IsLevel(10) and c:IsRace(RACE_PYRO|RACE_THUNDER|RACE_FIEND) and not c:IsSummonableCard() - and c:IsAbleToHand() -end -function s.th1tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.th1filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.th1op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.th1filter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101305048.lua b/pre-release/c101305048.lua deleted file mode 100644 index 8bc0dce129..0000000000 --- a/pre-release/c101305048.lua +++ /dev/null @@ -1,95 +0,0 @@ ---三幻魔の失楽園 ---Fallen Paradise of the Sacred Beasts ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Thrice per turn: You can send 3 other cards of the same type (Monster, Spell, or Trap) from your hand and/or face-up field to the GY, then you can Special Summon 1 "Sacred Beast" monster from your hand, Deck, GY, or banishment, and if you do, it is unaffected by your opponent's activated Spell/Trap effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(3) - e1:SetTarget(s.gytg) - e1:SetOperation(s.gyop) - c:RegisterEffect(e1) - --If you control a "Sacred Beast" monster whose original Level is 10: You can draw 2 cards - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.drcon) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SACRED_BEAST} -function s.gyfilter(c) - return c:IsAbleToGrave() and (c:IsFaceup() or not c:IsOnField()) -end -function s.rescon(sg,e,tp,mg) - return sg:GetClassCount(Card.GetMainCardType)==1 -end -local LOCATIONS_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED -function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,e:GetHandler()) - return aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_HAND|LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SACRED_BEAST) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function s.gyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) - if #g<3 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TOGRAVE) - if #sg==3 and Duel.SendtoGrave(sg,REASON_EFFECT)==3 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - Duel.BreakEffect() - if Duel.SpecialSummonStep(sc,0,tp,tp,false,true,POS_FACEUP) then - --It is unaffected by your opponent's activated Spell/Trap effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() and te:IsSpellTrapEffect() end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() - end -end -function s.drconfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() -end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.drconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c101305049.lua b/pre-release/c101305049.lua deleted file mode 100644 index ad41f083d0..0000000000 --- a/pre-release/c101305049.lua +++ /dev/null @@ -1,83 +0,0 @@ ---三幻魔の霹靂 ---Skyfire of the Sacred Beast ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --During your Main Phase: You can place 2 "Skyfire of the Sacred Beast" from your hand, Deck, and/or GY face-up on your field, then you can reveal 1 Level 10 "Sacred Beast" monster in your hand, then place 1 "Fallen Paradise of the Sacred Beasts" from your Deck face-up in your Field Zone - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --During your opponent's End Phase, if this card is in your GY: You can add it to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={id,101305048} --"Fallen Paradise of the Sacred Beasts" -s.listed_series={SET_SACRED_BEAST} -function s.selfplfilter(c,tp) - return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 - and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end -end -function s.revealfilter(c) - return c:IsLevel(10) and c:IsSetCard(SET_SACRED_BEAST) and not c:IsPublic() -end -function s.fieldplfilter(c,tp) - return c:IsCode(101305048) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) - if #g==2 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - if Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(s.fieldplfilter,tp,LOCATION_DECK,0,1,nil,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rg=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil) - if #rg==0 then return end - Duel.BreakEffect() - Duel.ConfirmCards(1-tp,rg) - Duel.ShuffleHand(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.fieldplfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.BreakEffect() - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - end - end - end -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305065.lua b/pre-release/c101305065.lua deleted file mode 100644 index 1996311f4b..0000000000 --- a/pre-release/c101305065.lua +++ /dev/null @@ -1,84 +0,0 @@ ---二つの心 ---Mind Shuffle ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --During either player's turn: You can add 1 monster that mentions "Ritual of Light and Darkness" from your Deck to your hand, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.AND(Cost.HardOncePerChain(id),Cost.HintSelectedEffect)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --When your opponent activates a card or effect: You can return 1 Level 7 or higher monster you control to the hand; Special Summon 1 monster with a different name from your hand that mentions "Ritual of Light and Darkness", ignoring its Summoning conditions - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(Cost.AND(s.spcost,Cost.HardOncePerChain(id),Cost.HintSelectedEffect)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.thfilter(c) - return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) - end -end -function s.spcostfilter(c,e,tp) - return c:IsLevelAbove(7) and c:IsFaceup() and c:IsAbleToHandAsCost() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) -end -function s.spfilter(c,e,tp,code) - return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsCode(code) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() - Duel.HintSelection(sc) - Duel.SendtoHand(sc,nil,REASON_COST) - e:SetLabel(sc:GetCode()) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305066.lua b/pre-release/c101305066.lua deleted file mode 100644 index fcd27423ce..0000000000 --- a/pre-release/c101305066.lua +++ /dev/null @@ -1,69 +0,0 @@ ---三幻魔合殺 ---Destruction Chant of the Sacred Beast ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, then if you control 2 or more "Sacred Beast" monsters whose original Levels are 10, you can negate the effects of 1 face-up card your opponent controls, and if you do, destroy it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --You can banish this card from your GY; Fusion Summon 1 "Phantasm" Fusion Monster from your Extra Deck, using monsters from your hand or field - local fusion_params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_PHANTASM)} - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_SACRED_BEAST,SET_PHANTASM} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - local dg=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,dg,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) -end -function s.sacredbeastfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() -end -function s.spop(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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 - and Duel.IsExistingMatchingCard(s.sacredbeastfilter,tp,LOCATION_MZONE,0,2,nil) - and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if sc:IsCanBeDisabledByEffect(e) then - Duel.BreakEffect() - --Negate the effects of 1 face-up card your opponent controls, and if you do, destroy it - sc:NegateEffects(e:GetHandler(),RESET_EVENT|RESETS_STANDARD,true) - Duel.AdjustInstantly(sc) - if sc:IsDisabled() then - Duel.Destroy(sc,REASON_EFFECT) - end - end - end -end diff --git a/pre-release/c101305067.lua b/pre-release/c101305067.lua deleted file mode 100644 index 21768ed66a..0000000000 --- a/pre-release/c101305067.lua +++ /dev/null @@ -1,101 +0,0 @@ ---三幻魔の神淵 ---Divine Abyss of the Sacred Beast ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --You can send 3 face-up "Divine Abyss of the Sacred Beast" you control to the GY, including this card, then target 1 face-up monster your opponent controls; change it to face-down Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetCost(s.poscost) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --During the Main Phase: You can place 2 "Divine Abyss of the Sacred Beast" from your hand, Deck, and/or GY face-up on your field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.pltg) - e2:SetOperation(s.plop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) - --During your opponent's End Phase, if this card is in your GY: You can place it on the bottom of the Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.IsEndPhase(1-tp) end) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - e3:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.poscostfilter(c) - return c:IsCode(id) and c:IsAbleToGraveAsCost() and c:IsFaceup() -end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) - and Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_ONFIELD,0,2,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_ONFIELD,0,2,2,c) - Duel.SendtoGrave(g+c,REASON_COST) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsMonster() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - end -end -function s.selfplfilter(c,tp) - return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 - and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) - if #g==2 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305076.lua b/pre-release/c101305076.lua deleted file mode 100644 index bab2fa209f..0000000000 --- a/pre-release/c101305076.lua +++ /dev/null @@ -1,96 +0,0 @@ ---道化の一座『終演』 ---Clown Crew "Finale" ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If you control a Tribute Summoned monster: Discard any number of cards, then target that many face-up cards on the field; destroy them - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) end) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetCountLimit(1,{id,0}) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --You can banish this card from your GY and Tribute 1 Ritual, Fusion, Synchro, Xyz, Pendulum, or Link Monster from your hand or field; add 1 "Clown Crew" monster from your Deck or GY to your hand with a different original Level/Rank/Link Rating than the Tributed monster's - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(Cost.AND(Cost.SelfBanish,s.thcost)) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-1) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local max_target_count=Duel.GetTargetCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - local discard_count=Duel.DiscardHand(tp,nil,1,max_target_count,REASON_COST|REASON_DISCARD,nil) - e:SetLabel(discard_count) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=c end - if chk==0 then - local cost_chk=e:GetLabel()==-1 - e:SetLabel(0) - return cost_chk and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - end - local target_count=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,target_count,target_count,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end -function s.rating(c) - if c:IsLinkMonster() then return c:GetLink() - elseif c:IsXyzMonster() then return c:GetOriginalRank() - else return c:GetOriginalLevel() end -end -function s.thcostfilter(c,tp) - return c:IsType(TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM|TYPE_LINK) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,s.rating(c)) -end -function s.thfilter(c,lv) - return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsAbleToHand() and s.rating(c)~=lv -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-1) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp) end - local sc=Duel.SelectReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp):GetFirst() - Duel.Release(sc,REASON_COST) - e:SetLabel(s.rating(sc)) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local cost_chk=e:GetLabel()==-1 - e:SetLabel(0) - return cost_chk - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e:GetLabel()):GetFirst() - if sc then - if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end - Duel.SendtoHand(sc,nil,REASON_EFFECT) - if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end - end -end \ No newline at end of file diff --git a/pre-release/c101305127.lua b/pre-release/c101305127.lua deleted file mode 100644 index e8cd3d508a..0000000000 --- a/pre-release/c101305127.lua +++ /dev/null @@ -1,3 +0,0 @@ ---黒き混沌の魔術師ブラック・カオス ---Black Chaos the Dark Chaos Magician -Duel.LoadCardScriptAlias(101305027) \ No newline at end of file diff --git a/pre-release/c101305128.lua b/pre-release/c101305128.lua deleted file mode 100644 index da3294bfb0..0000000000 --- a/pre-release/c101305128.lua +++ /dev/null @@ -1,3 +0,0 @@ ---光と闇の戦士カオス・ソルジャー ---Black Luster Soldier - Soldier of Light and Darkness -Duel.LoadCardScriptAlias(101305028) \ No newline at end of file diff --git a/pre-release/c101305129.lua b/pre-release/c101305129.lua deleted file mode 100644 index ad7d79c3f4..0000000000 --- a/pre-release/c101305129.lua +++ /dev/null @@ -1,3 +0,0 @@ ---混沌の三幻魔 ---Phantasmal Sacred Beasts of Chaos -Duel.LoadCardScriptAlias(101305029) \ No newline at end of file From de5f71c4f3cc939cfc3f301b7a4c14b3809582e6 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:21:48 +0200 Subject: [PATCH 2/2] Add files via upload --- official/c1186447.lua | 121 ++++++++++++++++++++++++++++ official/c12908094.lua | 71 +++++++++++++++++ official/c13021682.lua | 84 ++++++++++++++++++++ official/c13243124.lua | 72 +++++++++++++++++ official/c14965712.lua | 97 +++++++++++++++++++++++ official/c31114334.lua | 55 +++++++++++++ official/c32236916.lua | 47 +++++++++++ official/c37458564.lua | 93 ++++++++++++++++++++++ official/c40237839.lua | 80 +++++++++++++++++++ official/c41350417.lua | 67 ++++++++++++++++ official/c48171151.lua | 158 +++++++++++++++++++++++++++++++++++++ official/c48393693.lua | 110 ++++++++++++++++++++++++++ official/c49415281.lua | 93 ++++++++++++++++++++++ official/c4993187.lua | 153 +++++++++++++++++++++++++++++++++++ official/c5125629.lua | 87 ++++++++++++++++++++ official/c64865.lua | 119 ++++++++++++++++++++++++++++ official/c68508433.lua | 112 ++++++++++++++++++++++++++ official/c68721020.lua | 117 +++++++++++++++++++++++++++ official/c73443672.lua | 90 +++++++++++++++++++++ official/c74665150.lua | 74 +++++++++++++++++ official/c75787708.lua | 130 ++++++++++++++++++++++++++++++ official/c76504386.lua | 104 ++++++++++++++++++++++++ official/c76636978.lua | 89 +++++++++++++++++++++ official/c847217.lua | 69 ++++++++++++++++ official/c87758525.lua | 74 +++++++++++++++++ official/c88570003.lua | 73 +++++++++++++++++ pre-release/c100200288.lua | 122 ++++++++++++++++++++++++++++ pre-release/c100295121.lua | 111 ++++++++++++++++++++++++++ pre-release/c100452001.lua | 94 ++++++++++++++++++++++ pre-release/c100452002.lua | 111 ++++++++++++++++++++++++++ pre-release/c100452004.lua | 69 ++++++++++++++++ pre-release/c100452006.lua | 87 ++++++++++++++++++++ pre-release/c100452007.lua | 94 ++++++++++++++++++++++ pre-release/c100452009.lua | 100 +++++++++++++++++++++++ pre-release/c100452010.lua | 97 +++++++++++++++++++++++ pre-release/c100452012.lua | 93 ++++++++++++++++++++++ pre-release/c100452013.lua | 76 ++++++++++++++++++ pre-release/c100452014.lua | 80 +++++++++++++++++++ pre-release/c100452016.lua | 77 ++++++++++++++++++ pre-release/c100452017.lua | 94 ++++++++++++++++++++++ pre-release/c100452019.lua | 89 +++++++++++++++++++++ pre-release/c100452020.lua | 141 +++++++++++++++++++++++++++++++++ pre-release/c100452021.lua | 45 +++++++++++ pre-release/c100452022.lua | 89 +++++++++++++++++++++ pre-release/c100452023.lua | 106 +++++++++++++++++++++++++ pre-release/c100452024.lua | 76 ++++++++++++++++++ pre-release/c100452025.lua | 94 ++++++++++++++++++++++ pre-release/c100452026.lua | 109 +++++++++++++++++++++++++ pre-release/c100452027.lua | 85 ++++++++++++++++++++ pre-release/c100452028.lua | 89 +++++++++++++++++++++ pre-release/c100454001.lua | 97 +++++++++++++++++++++++ pre-release/c100454002.lua | 84 ++++++++++++++++++++ pre-release/c101305001.lua | 105 ++++++++++++++++++++++++ pre-release/c101305002.lua | 88 +++++++++++++++++++++ pre-release/c101305003.lua | 95 ++++++++++++++++++++++ pre-release/c101305004.lua | 78 ++++++++++++++++++ pre-release/c101305005.lua | 82 +++++++++++++++++++ pre-release/c101305006.lua | 104 ++++++++++++++++++++++++ pre-release/c101305007.lua | 93 ++++++++++++++++++++++ pre-release/c101305008.lua | 75 ++++++++++++++++++ pre-release/c101305009.lua | 108 +++++++++++++++++++++++++ pre-release/c101305027.lua | 89 +++++++++++++++++++++ pre-release/c101305028.lua | 74 +++++++++++++++++ pre-release/c101305029.lua | 91 +++++++++++++++++++++ pre-release/c101305042.lua | 74 +++++++++++++++++ pre-release/c101305044.lua | 49 ++++++++++++ pre-release/c101305045.lua | 98 +++++++++++++++++++++++ pre-release/c101305046.lua | 101 ++++++++++++++++++++++++ pre-release/c101305047.lua | 66 ++++++++++++++++ pre-release/c101305048.lua | 95 ++++++++++++++++++++++ pre-release/c101305049.lua | 83 +++++++++++++++++++ pre-release/c101305065.lua | 84 ++++++++++++++++++++ pre-release/c101305066.lua | 69 ++++++++++++++++ pre-release/c101305067.lua | 101 ++++++++++++++++++++++++ pre-release/c101305076.lua | 96 ++++++++++++++++++++++ pre-release/c101305127.lua | 3 + pre-release/c101305128.lua | 3 + pre-release/c101305129.lua | 3 + 78 files changed, 6855 insertions(+) create mode 100644 official/c1186447.lua create mode 100644 official/c12908094.lua create mode 100644 official/c13021682.lua create mode 100644 official/c13243124.lua create mode 100644 official/c14965712.lua create mode 100644 official/c31114334.lua create mode 100644 official/c32236916.lua create mode 100644 official/c37458564.lua create mode 100644 official/c40237839.lua create mode 100644 official/c41350417.lua create mode 100644 official/c48171151.lua create mode 100644 official/c48393693.lua create mode 100644 official/c49415281.lua create mode 100644 official/c4993187.lua create mode 100644 official/c5125629.lua create mode 100644 official/c64865.lua create mode 100644 official/c68508433.lua create mode 100644 official/c68721020.lua create mode 100644 official/c73443672.lua create mode 100644 official/c74665150.lua create mode 100644 official/c75787708.lua create mode 100644 official/c76504386.lua create mode 100644 official/c76636978.lua create mode 100644 official/c847217.lua create mode 100644 official/c87758525.lua create mode 100644 official/c88570003.lua create mode 100644 pre-release/c100200288.lua create mode 100644 pre-release/c100295121.lua create mode 100644 pre-release/c100452001.lua create mode 100644 pre-release/c100452002.lua create mode 100644 pre-release/c100452004.lua create mode 100644 pre-release/c100452006.lua create mode 100644 pre-release/c100452007.lua create mode 100644 pre-release/c100452009.lua create mode 100644 pre-release/c100452010.lua create mode 100644 pre-release/c100452012.lua create mode 100644 pre-release/c100452013.lua create mode 100644 pre-release/c100452014.lua create mode 100644 pre-release/c100452016.lua create mode 100644 pre-release/c100452017.lua create mode 100644 pre-release/c100452019.lua create mode 100644 pre-release/c100452020.lua create mode 100644 pre-release/c100452021.lua create mode 100644 pre-release/c100452022.lua create mode 100644 pre-release/c100452023.lua create mode 100644 pre-release/c100452024.lua create mode 100644 pre-release/c100452025.lua create mode 100644 pre-release/c100452026.lua create mode 100644 pre-release/c100452027.lua create mode 100644 pre-release/c100452028.lua create mode 100644 pre-release/c100454001.lua create mode 100644 pre-release/c100454002.lua create mode 100644 pre-release/c101305001.lua create mode 100644 pre-release/c101305002.lua create mode 100644 pre-release/c101305003.lua create mode 100644 pre-release/c101305004.lua create mode 100644 pre-release/c101305005.lua create mode 100644 pre-release/c101305006.lua create mode 100644 pre-release/c101305007.lua create mode 100644 pre-release/c101305008.lua create mode 100644 pre-release/c101305009.lua create mode 100644 pre-release/c101305027.lua create mode 100644 pre-release/c101305028.lua create mode 100644 pre-release/c101305029.lua create mode 100644 pre-release/c101305042.lua create mode 100644 pre-release/c101305044.lua create mode 100644 pre-release/c101305045.lua create mode 100644 pre-release/c101305046.lua create mode 100644 pre-release/c101305047.lua create mode 100644 pre-release/c101305048.lua create mode 100644 pre-release/c101305049.lua create mode 100644 pre-release/c101305065.lua create mode 100644 pre-release/c101305066.lua create mode 100644 pre-release/c101305067.lua create mode 100644 pre-release/c101305076.lua create mode 100644 pre-release/c101305127.lua create mode 100644 pre-release/c101305128.lua create mode 100644 pre-release/c101305129.lua diff --git a/official/c1186447.lua b/official/c1186447.lua new file mode 100644 index 0000000000..3b6209cf6f --- /dev/null +++ b/official/c1186447.lua @@ -0,0 +1,121 @@ +--星読みの魔術師-ホロスコープ・マジシャン +--Horoscope Sorcerer, the Stargazer Magician +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --When a Spell Card or effect activated by your opponent resolves, if you control a "Magician" Pendulum Monster or "Odd-Eyes" monster, you can negate that effect, then destroy this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.discon) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --You can discard 1 other "Magician" Pendulum Monster, "Performapal" monster, or "Odd-Eyes" monster; Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.Discard(s.spcostfilter,true)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --If this card is Special Summoned: You can add 1 Pendulum Monster with 2500 ATK from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.deckthtg) + e3:SetOperation(s.deckthop) + c:RegisterEffect(e3) + --You can target 1 Pendulum Monster Card you control; destroy it, then you can add 1 face-up Pendulum Monster from your Extra Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,2}) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_series={SET_MAGICIAN,SET_ODD_EYES,SET_PERFORMAPAL} +function s.disconfilter(c) + return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard(SET_ODD_EYES)) and c:IsFaceup() +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,3)) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.Hint(HINT_CARD,0,id) + if Duel.NegateEffect(ev) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.spcostfilter(c) + return ((c:IsSetCard(SET_MAGICIAN) and c:IsPendulumMonster()) or c:IsSetCard({SET_ODD_EYES,SET_PERFORMAPAL})) and c:IsMonster() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.deckthfilter(c) + return c:IsPendulumMonster() and c:IsAttack(2500) and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsType(TYPE_PENDULUM) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) +end +function s.extrathfilter(c) + return c:IsPendulumMonster() and c:IsFaceup() and c:IsAbleToHand() +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(s.extrathfilter,tp,LOCATION_EXTRA,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.extrathfilter,tp,LOCATION_EXTRA,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end \ No newline at end of file diff --git a/official/c12908094.lua b/official/c12908094.lua new file mode 100644 index 0000000000..06d2747b3e --- /dev/null +++ b/official/c12908094.lua @@ -0,0 +1,71 @@ +--ガガガマジシャン-ガガガマジック +--Gagaga Magician - Gagaga Magic +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can Special Summon both it and 1 other "Zubaba", "Gagaga", "Gogogo", or "Dododo" monster from your hand or GY, except "Gagaga Magician - Gagaga Magic", and if you do, immediately after this effect resolves, Xyz Summon 1 "Zubaba", "Gagaga", "Gogogo", "Dododo", "Djinn", "Heroic Champion", "Number", "ZW -", or "ZS -" Xyz Monster using only those 2 monsters. When you do, treat the Level of 1 of the monsters the same as the other monster's + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS} +s.listed_names={id} +local function samexyzlevel(handler,mc,lv) + --When you do, treat the Level of 1 of the monsters the same as the other monster's + local e1=Effect.CreateEffect(handler) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_XYZ_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + mc:RegisterEffect(e1,true) + return e1 +end +function s.handgyspfilter(c,e,tp,mc) + if c:IsCode(id) then return false end + if not (c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + local e1=samexyzlevel(c,c,mc:GetLevel()) + local e2=samexyzlevel(c,mc,c:GetLevel()) + local res=Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(mc,c)) + if e1 then e1:Reset() end + if e2 then e2:Reset() end + return res +end +function s.extraspfilter(c,e,tp,mg) + return c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_DJINN,SET_HEROIC_CHAMPION,SET_NUMBER,SET_ZW,SET_ZS}) + and c:IsXyzMonster() and c:IsXyzSummonable(nil,mg,2,2) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetMZoneCount(tp)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.handgyspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,c,e,tp,c) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>=2) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.handgyspfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,c):GetFirst() + if not sc then return end + local g=Group.FromCards(c,sc) + if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then + local e1=samexyzlevel(c,c,sc:GetLevel()) + local e2=samexyzlevel(c,sc,c:GetLevel()) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xyz=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g):GetFirst() + if xyz then + Duel.XyzSummon(tp,xyz,g,nil,2,2) + else + if e1 then e1:Reset() end + if e2 then e2:Reset() end + end + end +end \ No newline at end of file diff --git a/official/c13021682.lua b/official/c13021682.lua new file mode 100644 index 0000000000..a32e949b6a --- /dev/null +++ b/official/c13021682.lua @@ -0,0 +1,84 @@ +--スタージャンク・シンクロン +--Starjunk Synchron +local s,id=GetID() +function s.initial_effect(c) + --For a Synchro Summon, you can substitute this card for any 1 "Synchron" Tuner ("Quickdraw Synchron") + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(20932152) + c:RegisterEffect(e0) + --If this card is in your hand: You can target 1 Level 2 or lower monster in your GY; Special Summon this card, and if you do, Special Summon that monster, but negate its effects, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --You can banish this card from your GY; "Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SYNCHRON} +s.listed_names={CARD_JUNK_WARRIOR} +function s.spfilter(c,e,tp) + return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local c=e:GetHandler() + if chk==0 then return Duel.GetMZoneCount(tp)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g:AddCard(c),2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(c) + end + Duel.SpecialSummonComplete() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --"Junk Warrior" you control cannot be destroyed by your opponent's card effects this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetTargetRange(LOCATION_ONFIELD,0) + e1:SetTarget(function(e,c) return c:IsCode(CARD_JUNK_WARRIOR) and c:IsFaceup() end) + e1:SetValue(aux.indoval) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c13243124.lua b/official/c13243124.lua new file mode 100644 index 0000000000..00dac8af39 --- /dev/null +++ b/official/c13243124.lua @@ -0,0 +1,72 @@ +--F・HERO フレイム・ウィングマン +--Favorite HERO Flame Wingman +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 monsters with the same Type but different Attributes + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + --When an attack is declared involving this card and a monster with 2200 or more ATK: You can make this card gain 1000 ATK, then you can Special Summon 1 Level 4 or lower monster from your hand in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_ATTACK_ANNOUNCE) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(s.atkspcon) + e1:SetTarget(s.atksptg) + e1:SetOperation(s.atkspop) + e1:SetCountLimit(1,{id,0}) + c:RegisterEffect(e1) + --If a monster(s) was destroyed by battle this turn (Quick Effect): You can Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters from your hand or field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function() return Duel.HasFlagEffect(0,id) end) + e2:SetTarget(Fusion.SummonEffTG()) + e2:SetOperation(Fusion.SummonEffOP()) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) + --Keep track of a monster being destroyed by battle + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_BATTLE_DESTROYED) + ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.matfilter(c,fc,sumtype,sp,sub,mg,sg) + return not sg or sg:FilterCount(aux.TRUE,c)==0 or (sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp) and not sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(),fc,sumtype,sp)) +end +function s.atkspcon(e,tp,eg,ep,ev,re,r,rp) + local bc0,bc1=Duel.GetBattleMonster(tp) + return bc0 and bc1 and bc0==e:GetHandler() and bc1:IsAttackAbove(2200) and bc1:IsFaceup() +end +function s.atksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,1000) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.atkspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:UpdateAttack(1000)>0 + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end \ No newline at end of file diff --git a/official/c14965712.lua b/official/c14965712.lua new file mode 100644 index 0000000000..266435ccd2 --- /dev/null +++ b/official/c14965712.lua @@ -0,0 +1,97 @@ +--増殖するクリボー! +--Multiplying Kuriboh! +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect, or an opponent's monster declares an attack (Quick Effect): You can Special Summon this card from your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1a:SetType(EFFECT_TYPE_QUICK_O) + e1a:SetCode(EVENT_CHAINING) + e1a:SetRange(LOCATION_HAND) + e1a:SetCountLimit(1,id) + e1a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() end) + e1a:SetTarget(s.selfsptg) + e1a:SetOperation(s.selfspop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_ATTACK_ANNOUNCE) + e1b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + c:RegisterEffect(e1b) + --Once per turn, when your opponent activates a monster effect on the field, or during damage calculation, when an opponent's monster attacks (Quick Effect): You can add to your hand, or Special Summon, 1 "Dark Magician" or 1 monster with 300 ATK/200 DEF from your Deck or GY, then you can change that opponent's monster's ATK to 0 + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e2a:SetType(EFFECT_TYPE_QUICK_O) + e2a:SetCode(EVENT_CHAINING) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) + e2a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_MZONE>0 end) + e2a:SetTarget(s.thsptg) + e2a:SetOperation(s.thspop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e2b:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + c:RegisterEffect(e2b) +end +s.listed_names={CARD_DARK_MAGICIAN} +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thspfilter(c,e,tp,mmz_chk) + return (c:IsCode(CARD_DARK_MAGICIAN) or (c:IsAttack(300) and c:IsDefense(200))) and (c:IsAbleToHand() + or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,mmz_chk) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not sc then return end + local res=aux.ToHandOrElse(sc,tp, + function() return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function() return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,3) + ) + if res==0 then return end + if sc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end + local opp_card=nil + local relation_chk=false + if not Duel.IsDamageStep() then + opp_card=re:GetHandler() + relation_chk=opp_card:IsRelateToEffect(re) + else + opp_card=Duel.GetAttacker() + relation_chk=opp_card:IsRelateToBattle() + end + if relation_chk and opp_card:IsFaceup() and opp_card:IsControler(1-tp) and not opp_card:IsAttack(0) + and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.BreakEffect() + --Change that opponent's monster's ATK to 0 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + opp_card:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c31114334.lua b/official/c31114334.lua new file mode 100644 index 0000000000..d451e7b495 --- /dev/null +++ b/official/c31114334.lua @@ -0,0 +1,55 @@ +--A BF-叢雲のクサナギ +--Assault Blackwing - Kusanagi the Gathering Storm +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuners + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Material check + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():IsExists(Card.IsSetCard,1,nil,SET_BLACKWING) and 1 or 0) end) + c:RegisterEffect(e0) + --If this card is Synchro Summoned using a "Blackwing" monster as material, it is treated as a Tuner while face-up on the field. After this card is Synchro Summoned, for the rest of this turn, it gains ATK equal to the total original ATK of the Synchro Monsters used as its material + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetLabelObject(e0) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Can attack all your opponent's monsters, once each + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_ATTACK_ALL) + e2:SetValue(1) + c:RegisterEffect(e2) + --If this card attacks a Defense Position monster, nflict piercing battle damage to your opponent + local e3=e2:Clone() + e3:SetCode(EFFECT_PIERCE) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLACKWING} +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local mg=c:GetMaterial() + if #mg==0 then return end + if e:GetLabelObject():GetLabel()==1 then + --If this card is Synchro Summoned using a "Blackwing" monster as material, it is treated as a Tuner while face-up on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_ADD_TYPE) + e1:SetValue(TYPE_TUNER) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end + if c:IsDisabled() then return end + local atk=mg:Match(Card.IsSynchroMonster,nil):GetSum(Card.GetBaseAttack,nil) + if atk==0 then return end + --After this card is Synchro Summoned, for the rest of this turn, it gains ATK equal to the total original ATK of the Synchro Monsters used as its material + c:UpdateAttack(atk,RESETS_STANDARD_DISABLE_PHASE_END) +end diff --git a/official/c32236916.lua b/official/c32236916.lua new file mode 100644 index 0000000000..ee08aaa1e9 --- /dev/null +++ b/official/c32236916.lua @@ -0,0 +1,47 @@ +--虹の橋 ビフレスト +--Rainbow Bridge Bifrost +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish 3 Level 10 or higher monsters from your Extra Deck, including a LIGHT Synchro Monster; add 1 Field Spell from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.costfilter(c) + return c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost() +end +function s.includingfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSynchroMonster() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(s.includingfilter,1,nil) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_EXTRA,0,nil) + if chk==0 then return #g>=3 and g:IsExists(s.includingfilter,1,nil) end + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE) + Duel.Remove(sg,POS_FACEUP,REASON_COST) +end +function s.thfilter(c) + return c:IsFieldSpell() and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c37458564.lua b/official/c37458564.lua new file mode 100644 index 0000000000..dcdc090684 --- /dev/null +++ b/official/c37458564.lua @@ -0,0 +1,93 @@ +--サイバース・コントラクト・ウィッチ +--Cyberse Contract Witch +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters with the same Type + Link.AddProcedure(c,nil,2,nil,s.matcheck) + --If this card is Link Summoned, or a monster(s) is Special Summoned to a zone(s) this card points to: You can send 1 Spell from your hand or face-up field to the GY; add 1 Ritual Monster from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SPSUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1a:SetCost(s.thcost) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1b:SetRange(LOCATION_MZONE) + e1b:SetCondition(aux.zptcon(nil)) + c:RegisterEffect(e1b) + --You can target 1 Ritual, Fusion, Synchro, or Xyz Monster this card points to; Special Summon 1 monster from your GY with the same Type but a different card type (Ritual, Fusion, Synchro, or Xyz) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +local TYPES_RITUAL_FUSION_SYNCHRO_XYZ=TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ +function s.matcheck(g,lc,sumtype,tp) + return g:CheckSameProperty(Card.GetRace,lc,sumtype,tp) +end +function s.thcostfilter(c) + return c:IsSpell() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.thfilter(c) + return c:IsRitualMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.tgfilter(c,e,tp,lg) + return c:IsType(TYPES_RITUAL_FUSION_SYNCHRO_XYZ) and lg:IsContains(c) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetRace(),c:GetType()&TYPES_RITUAL_FUSION_SYNCHRO_XYZ) +end +function s.spfilter(c,e,tp,race,card_type) + return c:IsType(TYPES_RITUAL_FUSION_SYNCHRO_XYZ) and c:IsRace(race) and not c:IsType(card_type) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local lg=e:GetHandler():GetLinkedGroup() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp,lg) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,lg) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,lg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetRace(),tc:GetType()&TYPES_RITUAL_FUSION_SYNCHRO_XYZ) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c40237839.lua b/official/c40237839.lua new file mode 100644 index 0000000000..cd0c62ba51 --- /dev/null +++ b/official/c40237839.lua @@ -0,0 +1,80 @@ +--ハネクリボー・サバティエル LV10 +--Winged Kuriboh Sabatiel LV10 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand and pay half your LP; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck to your hand, and if you do, shuffle this card into the Deck, also you cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.AND(Cost.SelfReveal,Cost.PayLP(1/2))) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --During your opponent's turn, if your LP are 1000 or less (Quick Effect): You can Special Summon this card from your hand, then you can inflict damage to your opponent equal to the highest ATK among the monsters they control (your choice, if tied) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.GetLP(tp)<=1000 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.LVnum=10 +s.LVset=SET_WINGED_KURIBOH +s.listed_series={SET_FUSION,SET_HERO} +function s.thfilter(c) + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + if c:IsRelateToEffect(e) then + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except "HERO" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local _,dam=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) + if dam and dam>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.Damage(1-tp,dam,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c41350417.lua b/official/c41350417.lua new file mode 100644 index 0000000000..936305ee6a --- /dev/null +++ b/official/c41350417.lua @@ -0,0 +1,67 @@ +--黒魔導のカーテン +--Dark Magical Curtain +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Each player can Special Summon 1 DARK Spellcaster monster from their hand or Deck (but neither player can activate their effects this turn), then if you Special Summoned a monster whose original name is "Dark Magician" or "Dark Magician Girl", you can add 1 Spell/Trap that mentions "Dark Magician" from your Deck to your hand, except "Dark Magical Curtain" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL,id} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_EITHER,LOCATION_HAND|LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.spfilter(c,e,sp) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEUP,sp) +end +function s.spresolution(e,sp) + local name_chk=false + if Duel.GetLocationCount(sp,LOCATION_MZONE,sp)>0 + and Duel.IsExistingMatchingCard(s.spfilter,sp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,sp) + and Duel.SelectYesNo(sp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,sp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(sp,s.spfilter,sp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,sp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,sp,sp,false,false,POS_FACEUP) then + name_chk=sc:IsOriginalCodeRule(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) + --Neither player can activate their effects this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3302) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + end + return name_chk +end +function s.thfilter(c) + return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local turn_player=Duel.GetTurnPlayer() + local non_turn_player=1-turn_player + local turn_player_name_chk=s.spresolution(e,turn_player) + local non_turn_player_name_chk=s.spresolution(e,non_turn_player) + if Duel.SpecialSummonComplete()==0 then return end + if not ((turn_player_name_chk and tp==turn_player) or (non_turn_player_name_chk and tp==non_turn_player)) then return end + if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end \ No newline at end of file diff --git a/official/c48171151.lua b/official/c48171151.lua new file mode 100644 index 0000000000..4cc14559e8 --- /dev/null +++ b/official/c48171151.lua @@ -0,0 +1,158 @@ +--星霜の魔術師-アストログラフ・マジシャン +--Astrograph Sorcerer, the Star Magician +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --During your Main Phase: You can destroy this card, and if you do, place 1 Pendulum Monster whose Pendulum Scale is 1 from your hand or Deck in your Pendulum Zone, except "Astrograph Sorcerer, the Star Magician", but it cannot activate its Pendulum Effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --If a face-up Monster Card(s) you control is destroyed by battle or card effect: You can Special Summon this card from your hand, then you can Special Summon 1 of those destroyed monsters from your GY or face-up Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Keep track of the destroyed monsters + aux.GlobalCheck(s,function() + s.desgroup=Group.CreateGroup() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_DESTROYED) + ge1:SetOperation(s.desgroupregop) + Duel.RegisterEffect(ge1,0) + end) + --During the Main Phase (Quick Effect): You can Tribute this card, then you can Fusion Summon 1 Dragon Fusion Monster from your Extra Deck, by shuffling its materials from your field and/or face-up Extra Deck into the Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_RELEASE+CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function() return Duel.IsMainPhase() end) + e3:SetTarget(s.tribtg) + e3:SetOperation(s.tribop) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.plfilter(c) + return c:IsPendulumMonster() and c:IsScale(1) and not c:IsCode(id) and not c:IsForbidden() +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.CheckPendulumZones(tp) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then + --It cannot activate its Pendulum Effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3302) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + end +end +function s.spconfilter(c) + return c:IsMonsterCard() and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.desgroupregop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.spconfilter,nil) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + if Duel.GetCurrentChain()==0 then s.desgroup:Clear() end + s.desgroup:Merge(tg) + s.desgroup:Remove(function(c) return not c:HasFlagEffect(id) end,nil) + if tg:IsExists(Card.IsPreviousControler,1,nil,0) then + local g=s.desgroup:Filter(Card.IsPreviousControler,nil,0) + Duel.RaiseEvent(g,EVENT_CUSTOM+id,re,r,rp,0,ev) + end + if tg:IsExists(Card.IsPreviousControler,1,nil,1) then + local g=s.desgroup:Filter(Card.IsPreviousControler,nil,1) + Duel.RaiseEvent(g,EVENT_CUSTOM+id,re,r,rp,1,ev) + end + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return ep==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + local g=s.desgroup:Filter(s.spconfilter,nil) + e:SetLabelObject(g) + for ec in g:Iter() do + ec:CreateEffectRelation(e) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spfilter(c,e,tp,mmz_chk) + if not (c:IsControler(tp) and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_GRAVE) then + return mmz_chk + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local g=e:GetLabelObject():Filter(aux.NecroValleyFilter(s.spfilter),nil,e,tp,mmz_chk) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.tribtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsReleasableByEffect() end + Duel.SetOperationInfo(0,CATEGORY_RELEASE,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD|LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.tribop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Release(c,REASON_EFFECT)>0 then + local fusion_params={ + fusfilter=function(c) return c:IsRace(RACE_DRAGON) end, + extraop=Fusion.ShuffleMaterial, + matfilter=Fusion.OnFieldMat, + extrafil=function(e,tp,mg) + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToDeck),tp,LOCATION_EXTRA,0,nil) + end + } + if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.BreakEffect() + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + end + end +end \ No newline at end of file diff --git a/official/c48393693.lua b/official/c48393693.lua new file mode 100644 index 0000000000..9377b89b91 --- /dev/null +++ b/official/c48393693.lua @@ -0,0 +1,110 @@ +--ガガガガール-ゼロゼロコール +--Gagaga Girl - Cell Phone Subtraction +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If your opponent Special Summons a monster(s) from the Extra Deck: You can target 1 face-up monster you control; Special Summon this card from your hand, then immediately after this effect resolves, Xyz Summon using only this card and the targeted monster. When you do, treat this card's Level as the same as the targeted monster's + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is detached from an Xyz Monster to activate that monster's effect: You can change the ATK of 1 face-up monster your opponent controls to 0 + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_ATKCHANGE) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_TO_GRAVE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(s.atkcon) + e2a:SetTarget(s.atktg) + e2a:SetOperation(s.atkop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_REMOVE) + c:RegisterEffect(e2b) +end +function s.spconfilter(c,opp) + return c:IsSummonPlayer(opp) and c:IsSummonLocation(LOCATION_EXTRA) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,1-tp) +end +function s.tgfilter(c,tp,hc) + if not (c:IsFaceup() and c:HasLevel()) then return false end + --When you do, treat this card's Level as the same as the targeted monster's + local e1=Effect.CreateEffect(hc) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_XYZ_LEVEL) + e1:SetValue(c:GetLevel()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + hc:RegisterEffect(e1,true) + local res=Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,Group.FromCards(c,hc),2,2) + if e1 then e1:Reset() end + return res +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp,c) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsPlayerCanSpecialSummonCount(tp,2) + and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then + local mg=Group.FromCards(c,tc) + --When you do, treat this card's Level as the same as the targeted monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_XYZ_LEVEL) + e1:SetValue(tc:GetLevel()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1,true) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xyz=Duel.SelectMatchingCard(tp,Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,2,2):GetFirst() + if xyz then + Duel.XyzSummon(tp,xyz,mg,nil,2,2) + else + if e1 then e1:Reset() end + end + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,1-tp,0) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local sc=Duel.SelectMatchingCard(tp,Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --Its ATK becomes 0 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c49415281.lua b/official/c49415281.lua new file mode 100644 index 0000000000..d01aff381c --- /dev/null +++ b/official/c49415281.lua @@ -0,0 +1,93 @@ +--シンクロ・エマージェンシー +--Synchro Emergency +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If only your opponent controls a monster, you can activate this card from your hand + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) + e0:SetCondition(function(e) local tp=e:GetHandlerPlayer() return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) + c:RegisterEffect(e0) + --Special Summon 1 monster from your hand (but negate its effects), then if your opponent controls a monster Special Summoned from the Extra Deck, you can Special Summon 1 "Synchron" monster from your Deck. Until the end of the next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) + c:RegisterEffect(e1) + --You can banish this card from your GY; immediately after this effect resolves, Synchro Summon 1 Synchro Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.synctg) + e2:SetOperation(s.syncop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) + c:RegisterEffect(e2) +end +s.listed_series={SET_SYNCHRON} +function s.handspfilter(c,e,tp) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.deckspfilter(c,e,tp) + return c:IsSetCard(SET_SYNCHRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(c) + if Duel.SpecialSummonComplete()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --Until the end of the next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) +end +function s.synctg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.syncop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local synchro=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if synchro then + Duel.SynchroSummon(tp,synchro,nil) + end +end \ No newline at end of file diff --git a/official/c4993187.lua b/official/c4993187.lua new file mode 100644 index 0000000000..012c754cab --- /dev/null +++ b/official/c4993187.lua @@ -0,0 +1,153 @@ +--W:Pファンシーボール +--W:P Fancy Ball +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) + --When your opponent activates a monster effect on the field or GY (Quick Effect): You can banish this card that was Special Summoned this turn until the End Phase; negate that effect, and if you do, banish it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.discon) + e1:SetCost(s.discost) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --During your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Link Summon 1 Link Monster, and if this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) + e2:SetTarget(s.linktg) + e2:SetOperation(s.linkop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +function s.discon(e,tp,eg,ep,ev,re,r,rp,chk) + if not e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) then return false end + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc&(LOCATION_MZONE|LOCATION_GRAVE)>0 and Duel.IsChainDisablable(ev) +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() end + --Banish this card until the End Phase + aux.RemoveUntil(c,nil,REASON_COST,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local rc=re:GetHandler() + local relation=rc:IsRelateToEffect(re) + if chk==0 then return rc:IsAbleToRemove(tp) + or (not relation and Duel.IsPlayerCanRemove(tp)) end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + if relation then + Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,rc:GetPreviousLocation()) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) + end +end +function s.linktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EXTRA_MATERIAL) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(1,0) + e1:SetOperation(s.extracon) + e1:SetValue(s.extraval) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + local res=Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil) + e1:Reset() + return res + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetChainLimit(function(re,rp,tp) return not (re:IsMonsterEffect() and re:GetHandler():IsLinkMonster()) end) +end +function s.linkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local e1=nil + if c:IsRelateToEffect(e) then + --If this card you control would be used as material for that Link Summon, you can also use 1 Link-2 or lower monster your opponent controls + e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EXTRA_MATERIAL) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(1,0) + e1:SetOperation(s.extracon) + e1:SetValue(s.extraval) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc then + Duel.LinkSummon(tp,sc) + if e1 then + local eff_code=Duel.GetCurrentChain()==1 and EVENT_SPSUMMON or EVENT_SPSUMMON_SUCCESS + --Reset e1 + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(eff_code) + e2:SetOperation(function(e) e1:Reset() e:Reset() end) + Duel.RegisterEffect(e2,tp) + end + elseif e1 then + e1:Reset() + end +end +function s.extracon(c,e,tp,sg,mg,lc,og,chk) + if not sg:IsContains(e:GetHandler()) then return false end + local g=Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) + if #g==0 then return true end + local max_count=1 + local must_include=Group.CreateGroup() + local effs={Duel.GetPlayerEffect(tp,EFFECT_EXTRA_MATERIAL)} + for _,eff in ipairs(effs) do + if not eff:GetOwner():IsCode(id) then + if #(eff:GetValue()(0,SUMMON_TYPE_LINK,eff,tp,lc))>0 then + local handler=eff:GetHandler() + must_include:Merge(handler) + if #(sg&must_include)>0 or lc==handler then + max_count=max_count+1 + end + end + end + end + return #(sg&g)>0 and #(sg&g)<=max_count +end +function s.extraval(chk,summon_type,e,...) + local c=e:GetHandler() + if chk==0 then + local tp,sc=... + if summon_type~=SUMMON_TYPE_LINK then + return Group.CreateGroup() + else + return Duel.GetMatchingGroup(Card.IsLinkBelow,tp,0,LOCATION_MZONE,nil,2) + end + elseif chk==1 then + local sg,sc,tp=... + if summon_type&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK and #sg>0 then + Duel.Hint(HINT_CARD,tp,id) + end + end +end \ No newline at end of file diff --git a/official/c5125629.lua b/official/c5125629.lua new file mode 100644 index 0000000000..387431f37d --- /dev/null +++ b/official/c5125629.lua @@ -0,0 +1,87 @@ +--Sin Paradigm Shift +--Malefic Paradigm Shift +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can activate this card from your hand by paying half your LP + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) + e0:SetValue(function(e,c) e:SetLabel(1) end) + c:RegisterEffect(e0) + --Add to your hand, or place face-up in your Field Zone, 1 "Malefic World" from your Deck or GY, then Special Summon 1 "Malefic" monster from your Deck or Extra Deck in Defense Position, ignoring its Summoning conditions, then if your opponent controls a monster with 2500 or more ATK, all face-up monsters they currently control lose 2500 ATK until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetLabelObject(e0) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_names={27564031} --"Malefic World" +s.listed_series={SET_MALEFIC} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local label_obj=e:GetLabelObject() + if chk==0 then label_obj:SetLabel(0) return true end + if label_obj:GetLabel()==1 then + label_obj:SetLabel(0) + Duel.PayLPCost(tp,Duel.GetLP(tp)//2) + end +end +function s.maleficworldfilter(c) + return c:IsCode(27564031) and (c:IsAbleToHand() or not c:IsForbidden()) +end +function s.spfilter(c,e,tp) + if not (c:IsSetCard(SET_MALEFIC) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE)) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.maleficworldfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,Duel.GetFieldGroup(tp,0,LOCATION_MZONE),1,tp,-2500) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.maleficworldfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tohand_or_place_chk=aux.ToHandOrElse(sc,tp, + function() + return not sc:IsForbidden() + end, + function() + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + return Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + end, + aux.Stringid(id,3) + ) + if not tohand_or_place_chk then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #sg==0 then return end + Duel.BreakEffect() + if Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP_DEFENSE)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackAbove,2500),tp,0,LOCATION_MZONE,1,nil) then + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) + local c=e:GetHandler() + Duel.BreakEffect() + for tc in g:Iter() do + --All face-up monsters they currently control lose 2500 ATK until the end of this turn + tc:UpdateAttack(-2500,RESETS_STANDARD_PHASE_END,c) + end + end +end \ No newline at end of file diff --git a/official/c64865.lua b/official/c64865.lua new file mode 100644 index 0000000000..60c06594ae --- /dev/null +++ b/official/c64865.lua @@ -0,0 +1,119 @@ +--サイバース・コード・マジシャン +--Cyberse Code Magician +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --If a Link Monster you control would be used as Link Material for a Cyberse monster, this card in your hand can also be used as material + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_EXTRA_MATERIAL) + e1:SetRange(LOCATION_HAND) + e1:SetTargetRange(1,0) + e1:SetOperation(s.extracon) + e1:SetValue(s.extraval) + c:RegisterEffect(e1) + if s.flagmap1==nil then + s.flagmap1={} + end + if s.flagmap1[c]==nil then + s.flagmap1[c] = {} + end + --If this card is sent from the hand or field to the GY: You can send 1 Cyberse monster from your Deck to the GY, or if this Ritual Summoned card was sent to the GY, you can Special Summon that monster instead, also in either case, you cannot Special Summon for the rest of this turn, except Cyberse monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end) + e2:SetTarget(s.tgsptg) + e2:SetOperation(s.tgspop) + c:RegisterEffect(e2) +end +s.listed_names={34767865} --"Cynet Ritual" +function s.extrafilter(c,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) +end +function s.extracon(c,e,tp,sg,mg,lc,og,chk) + return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsLinkMonster,1,og) and + sg:FilterCount(Card.HasFlagEffect,nil,id)<2 +end +function s.extraval(chk,summon_type,e,...) + local c=e:GetHandler() + if chk==0 then + local tp,sc=... + if summon_type~=SUMMON_TYPE_LINK or not sc:IsRace(RACE_CYBERSE) or Duel.GetFlagEffect(tp,id)>0 then + return Group.CreateGroup() + else + table.insert(s.flagmap1[c],c:RegisterFlagEffect(id,0,0,1)) + return Group.FromCards(c) + end + elseif chk==1 then + local sg,sc,tp=... + if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then + Duel.Hint(HINT_CARD,tp,id) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + end + elseif chk==2 then + for _,eff in ipairs(s.flagmap1[c]) do + eff:Reset() + end + s.flagmap1[c]={} + end +end +function s.tgspfilter(c,e,tp,mmz_ritsum_chk) + return c:IsRace(RACE_CYBERSE) and (c:IsAbleToGrave() or (mmz_ritsum_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ritual_summoned_chk=e:GetHandler():IsRitualSummoned() + if chk==0 then + local mmz_ritsum_chk=ritual_summoned_chk and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.tgspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_ritsum_chk) + end + if not ritual_summoned_chk then + e:SetLabel(0) + e:SetCategory(CATEGORY_TOGRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + else + e:SetLabel(1) + e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + end +end +function s.tgspop(e,tp,eg,ep,ev,re,r,rp) + local mmz_ritsum_chk=e:GetLabel()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local hint=mmz_ritsum_chk and aux.Stringid(id,1) or HINTMSG_TOGRAVE + Duel.Hint(HINT_SELECTMSG,tp,hint) + local sc=Duel.SelectMatchingCard(tp,s.tgspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_ritsum_chk):GetFirst() + if sc then + local op=nil + if not mmz_ritsum_chk then + op=1 + else + local b1=sc:IsAbleToGrave() + local b2=sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + end + if op==1 then + Duel.SendtoGrave(sc,REASON_EFFECT) + elseif op==2 then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except Cyberse monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_CYBERSE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c68508433.lua b/official/c68508433.lua new file mode 100644 index 0000000000..66b9443318 --- /dev/null +++ b/official/c68508433.lua @@ -0,0 +1,112 @@ +--大精霊機巧軍-ペンデュラム・ルーラー +--Master Spirit Tech Force - Pendulum Ruler +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c,false) + --Fusion Materials: 1 Level 7 or higher Pendulum Monster + 1 Pendulum Monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) + --During your Main Phase: You can return this card to the Extra Deck, then you can add 1 Level 7 Pendulum Monster from your Deck or face-up Extra Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.textg) + e1:SetOperation(s.texop) + c:RegisterEffect(e1) + --Cannot be destroyed by card effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(1) + c:RegisterEffect(e2) + --Your opponent's monsters cannot attack, except Pendulum Monsters without a Level + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_CANNOT_ATTACK) + e3:SetRange(LOCATION_MZONE) + e3:SetTarget(function(e,c) return not (c:IsPendulumMonster() and not c:HasLevel()) end) + e3:SetTargetRange(0,LOCATION_MZONE) + c:RegisterEffect(e3) + --You can Tribute 1 monster, then target 1 card your opponent controls; destroy it, and if you do, inflict 1600 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(2,{id,1}) + e4:SetCost(s.descost) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) + --Once per turn: You can place this card in your Pendulum Zone + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,2)) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e5:SetOperation(s.plop) + c:RegisterEffect(e5) +end +function s.matfilter(c,fc,sumtype,tp) + return c:IsLevelAbove(7) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) +end +function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToExtra() end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.thfilter(c) + return c:IsLevel(7) and c:IsPendulumMonster() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToHand() +end +function s.texop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.descostfilter(c,tp) + local exg=c:GetEquipGroup()+c + return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,exg) +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,1,false,nil,nil,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,1,1,false,nil,nil,tp) + Duel.Release(g,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,1600,REASON_EFFECT) + end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/official/c68721020.lua b/official/c68721020.lua new file mode 100644 index 0000000000..8f6333fa51 --- /dev/null +++ b/official/c68721020.lua @@ -0,0 +1,117 @@ +--Sin Force +--Malefic Force +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Target 1 face-up monster on the field; equip this card to it as an Equip Card with these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(aux.RemainFieldCost) + e1:SetTarget(s.eqtg) + e1:SetOperation(s.eqop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If a card is in the Field Zone: You can banish this card and 1 other "Malefic" card from your GY; destroy all monsters on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsExistingMatchingCard(nil,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) end) + e2:SetCost(s.descost) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_MALEFIC} +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then + --Equip limit + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(1) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e0) + --● The equipped monster is unaffected by Spell effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetValue(function(e,te) return te:IsSpellEffect() end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + --● Once per turn: You can destroy this card, and if you do, add 1 "Malefic" card from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.desthtg) + e2:SetOperation(s.desthop) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_MALEFIC) and c:IsAbleToHand() +end +function s.desthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.desthop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.descostfilter(c) + return c:IsSetCard(SET_MALEFIC) and c:IsAbleToRemoveAsCost() +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_GRAVE,0,1,1,c) + Duel.Remove(g+c,POS_FACEUP,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c73443672.lua b/official/c73443672.lua new file mode 100644 index 0000000000..d3ccd4dfdb --- /dev/null +++ b/official/c73443672.lua @@ -0,0 +1,90 @@ +--黄泉天輪 +--Underworld Circle +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Allow each player to Special Summon 1 monster from their GY during the Standby Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,5,nil) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_GRAVE,5,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spnormalfilter(c,e,tp) + return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local rg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToRemove,Card.IsMonster),tp,LOCATION_DECK,LOCATION_DECK,nil) + if #rg==0 then return end + Duel.BreakEffect() + if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spnormalfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.ignoresumconsp(e,p) + if Duel.GetLocationCount(p,LOCATION_MZONE)==0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,p,LOCATION_GRAVE,0,nil,e,p) + if #g==0 or not Duel.SelectYesNo(p,aux.Stringid(id,3)) then return end + Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) + local tc=g:Select(p,1,1,nil):GetFirst() + if tc and Duel.SpecialSummonStep(tc,0,p,p,true,false,POS_FACEUP) then + --Banish it if it leaves the field + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + tc:RegisterEffect(e1,true) + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local turn_p=Duel.GetTurnPlayer() + s.ignoresumconsp(e,turn_p) + s.ignoresumconsp(e,1-turn_p) + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c74665150.lua b/official/c74665150.lua new file mode 100644 index 0000000000..ceef53244d --- /dev/null +++ b/official/c74665150.lua @@ -0,0 +1,74 @@ +--デコード・トーカー・インテグレーション +--Decode Talker Integration +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2) + --atk up + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_EMZONE) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --cannot be target + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetRange(LOCATION_EMZONE) + e2:SetValue(aux.tgoval) + c:RegisterEffect(e2) + --to grave + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCost(s.cost) + e3:SetTarget(s.target) + e3:SetOperation(s.operation) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +function s.atkval(e,c) + return Duel.GetMatchingGroupCount(Card.IsLinkMonster,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,e:GetHandler())*500 +end +function s.cfilter(c,g) + return g:IsContains(c) +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local lg=e:GetHandler():GetLinkedGroup() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,lg) end + local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,lg) + Duel.Release(g,REASON_COST) +end +function s.filter(c) + return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil) + if #g==0 then return end + Duel.SendtoGrave(g,REASON_EFFECT) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c75787708.lua b/official/c75787708.lua new file mode 100644 index 0000000000..5aa26c910d --- /dev/null +++ b/official/c75787708.lua @@ -0,0 +1,130 @@ +--四天の龍 オッドアイズ・ペンデュラム・ドラゴン +--Odd-Eyes Pendulum Dragon of the Four Heavenly Dragons +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --search and destroy + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY|CATEGORY_TOHAND|CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --atk up + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e2:SetValue(s.atkval) + c:RegisterEffect(e2) + --double damage + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e3:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) + c:RegisterEffect(e3) + --to hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.thcon2) + e4:SetTarget(s.thtg2) + e4:SetOperation(s.thop2) + c:RegisterEffect(e4) +end +function s.thfilter(c) + return c:IsPendulumMonster() and c:IsAttackBelow(1500) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.actlimit) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetLabelObject(e1) + e0:SetOperation(s.checkop) + e0:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e0,tp) +end +function s.actlimit(e,re) + local rc=re:GetHandler() + return rc and rc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() +end +function s.psfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local ef=e:GetLabelObject() + if ef and eg and eg:IsExists(s.psfilter,1,nil,tp) then + ef:Reset() + e:Reset() + end +end +function s.atkval(e,c) + local pg=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_PZONE,0) + if #pg~=2 then return 0 end + local pc1,pc2=pg:GetFirst(),pg:GetNext() + return math.abs(pc1:GetScale()-pc2:GetScale())*300 +end +function s.thcon2(e,tp,eg,ep,ev,re,r,rp) + return r&(REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) +end +function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + if rp==1-tp then + e:SetLabel(1) + else + e:SetLabel(0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) + if e:GetLabel()==1 then + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) + end +end +function s.thop2(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 + and e:GetLabel()==1 and c:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(tp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c76504386.lua b/official/c76504386.lua new file mode 100644 index 0000000000..7df68f2449 --- /dev/null +++ b/official/c76504386.lua @@ -0,0 +1,104 @@ +--No.39 光の使者 希望皇ホープ +--Number 39: Utopia the Envoy of Light +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Cannot be destroyed by battle, except with a "Number" monster + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) + c:RegisterEffect(e1) + --(Quick Effect): You can detach 1 material from this card, then target 1 monster you control; the first time it would be destroyed by battle or card effect this turn, it is not destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.DetachFromSelf(1)) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) + --When the second attack of this turn is declared: You can make this card gain 2500 ATK, and if you do, it gains this effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function() return Duel.GetFlagEffect(0,id)==1 end) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) + --Keep track of attacks being declared + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_ATTACK_ANNOUNCE) + ge1:SetOperation(function() Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_NUMBER} +s.xyz_number=39 +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + --The first time it would be destroyed by battle or card effect this turn, it is not destroyed + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3001) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetCountLimit(1) + e1:SetValue(s.indesval) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.indesval(e,re,r,rp) + if r&(REASON_BATTLE|REASON_EFFECT)>0 then + e:Reset() + return true + end + return false +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 2500 ATK + c:UpdateAttack(2500) + --When this card destroys a monster by battle and sends it to the GY: You can Special Summon it to your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(aux.bdgcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetTargetCard(bc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c76636978.lua b/official/c76636978.lua new file mode 100644 index 0000000000..e8b4b413dc --- /dev/null +++ b/official/c76636978.lua @@ -0,0 +1,89 @@ +--スターダスト・ドラゴン-ヴィクテム・サンクチュアリ +--Stardust Dragon - Victim Sanctuary +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --When your opponent activates a card or effect in response to your card or effect activation (Quick Effect): You can Tribute this card; negate that opponent's effect, and if you do, destroy that card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.discon) + e1:SetCost(Cost.AND(aux.StardustCost,Cost.HardOncePerChain(id))) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --If a monster(s) in your possession was Tributed this turn (Quick Effect): You can banish this card from your GY; Special Summon 1 "Stardust" Synchro Monster from your Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id+1) end) + e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.HardOncePerChain(id))) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) + --Keep track of monsters being Tributed + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_RELEASE) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_STARDUST} +function s.checkfilter(c) + return c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local g=eg:Filter(s.checkfilter,nil) + if g:IsExists(Card.IsPreviousControler,1,nil,0) then + Duel.RegisterFlagEffect(0,id+1,RESET_PHASE|PHASE_END,0,1) + end + if g:IsExists(Card.IsPreviousControler,1,nil,1) then + Duel.RegisterFlagEffect(1,id+1,RESET_PHASE|PHASE_END,0,1) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local ch=Duel.GetCurrentChain()-1 + return ch>0 and ep==1-tp and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER)==tp and Duel.IsChainDisablable(ev) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_STARDUST) and c:IsSynchroMonster() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c847217.lua b/official/c847217.lua new file mode 100644 index 0000000000..bb6f080c18 --- /dev/null +++ b/official/c847217.lua @@ -0,0 +1,69 @@ +--オレイカルコスの魔封剣 +--Orichalcos Sword of Sealing +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + aux.AddEquipProcedure(c) + --The equipped monster's effects are negated + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_DISABLE) + c:RegisterEffect(e1) + --If you have a card in your Field Zone: You can target 1 Effect Monster you control; that Effect Monster gains this effect until the end of your opponent's turn. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)>0 end) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsEffectMonster() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsEffectMonster),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsEffectMonster() and tc:IsFaceup() then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,1)) + --● Once per turn (Quick Effect): You can send 1 card from your hand to the GY, then target 1 face-up card on the field; destroy that target + local e1=Effect.CreateEffect(tc) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(s.descost) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + tc:RegisterEffect(e1) + end +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c87758525.lua b/official/c87758525.lua new file mode 100644 index 0000000000..94070de536 --- /dev/null +++ b/official/c87758525.lua @@ -0,0 +1,74 @@ +--F・HERO シャイニング・フレア・ウィングマン +--Favorite HERO Shining Flare Wingman +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Fusion Monster + 1 face-up monster on the field + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),s.matfilter) + --to deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW|CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) + --Inflict damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCondition(aux.bdcon) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.matfilter(c) + return c:IsFaceup() and c:IsOnField() +end +function s.tdfilter(c) + return c:IsMonster() and c:IsAbleToDeck() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,5,nil) + and Duel.IsPlayerCanDraw(tp,2) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(2) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,5,5,nil) + if #g~=5 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==5 then + if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + Duel.BreakEffect() + if Duel.Draw(p,d,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then + c:UpdateAttack(1000) + end + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() + if dam<0 then dam=0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c88570003.lua b/official/c88570003.lua new file mode 100644 index 0000000000..1aa75dcfbc --- /dev/null +++ b/official/c88570003.lua @@ -0,0 +1,73 @@ +--王のしもべ-ブラック・マジシャン +--Dark Magician, the Pharaoh's Servant +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Change name + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e1:SetValue(CARD_DARK_MAGICIAN) + c:RegisterEffect(e1) + --special summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.Reveal(function(c) return c:IsSpell() end)) + e2:SetTarget(s.hsptg) + e2:SetOperation(s.hspop) + c:RegisterEffect(e2) + --destroy + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCost(Cost.Discard(function(c) return c:IsSpell() end)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) + c:RegisterEffect(e3) +end +s.listed_names={CARD_DARK_MAGICIAN} +function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.setfilter(c) + return c:IsSpellTrap() and c:ListsCode(CARD_DARK_MAGICIAN) and c:IsSSetable() +end +function s.hspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SSet(tp,sg) + end + end + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100200288.lua b/pre-release/c100200288.lua new file mode 100644 index 0000000000..f25b505b7c --- /dev/null +++ b/pre-release/c100200288.lua @@ -0,0 +1,122 @@ +--月輪鏡 +--Full Moon Mirror +local s,id=GetID() +local COUNTER_FULL_MOON=0x219 +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_FULL_MOON) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Each time a monster(s) is destroyed by battle or card effect, place 1 Full Moon Counter on this card for each + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_DESTROYED) + e1:SetRange(LOCATION_SZONE) + e1:SetOperation(s.ctop) + c:RegisterEffect(e1) + --You can remove Full Moon Counters from this card, then activate 1 of these effects; + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.counter_place_list={COUNTER_FULL_MOON} +function s.ctfilter(c) + return ((c:IsMonster() and not c:IsPreviousLocation(LOCATION_ONFIELD)) or c:IsPreviousLocation(LOCATION_MZONE)) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.ctop(e,tp,eg,ep,ev,re,r,rp) + local des_count=eg:FilterCount(s.ctfilter,nil) + if des_count==0 then return end + local c=e:GetHandler() + if not Duel.IsChainSolving() then + c:AddCounter(COUNTER_FULL_MOON,des_count) + else + --Place 1 Full Moon Counter on this card at the end of the Chain Link + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVED) + e1:SetRange(LOCATION_SZONE) + e1:SetOperation(function() c:AddCounter(COUNTER_FULL_MOON,des_count) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) + c:RegisterEffect(e1) + --Reset "e1" at the end of the Chain Link + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVED) + e2:SetOperation(function() e1:Reset() end) + e2:SetReset(RESET_CHAIN) + Duel.RegisterEffect(e2,tp) + end +end +function s.lv6spfilter(c,e,tp) + return c:IsLevelBelow(6) and c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.thfilter(c) + return c:IsLevel(10) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() +end +function s.lv10spfilter(c,e,tp) + return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + --● 1: Special Summon 1 Level 6 or lower monster (Fiend or Fairy) from your hand or GY + local b1=c:IsCanRemoveCounter(tp,COUNTER_FULL_MOON,1,REASON_COST) and mmz_chk + and Duel.IsExistingMatchingCard(s.lv6spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) + --● 3: Add 1 Level 10 DARK monster from your Deck to your hand + local b2=c:IsCanRemoveCounter(tp,COUNTER_FULL_MOON,3,REASON_COST) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + --● 5: Special Summon 1 Level 10 monster from your hand or GY + local b3=c:IsCanRemoveCounter(tp,COUNTER_FULL_MOON,5,REASON_COST) and mmz_chk + and Duel.IsExistingMatchingCard(s.lv10spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + c:RemoveCounter(tp,COUNTER_FULL_MOON,2*op-1,REASON_COST) + if (op==1 or op==3) then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + elseif op==2 then + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if op==1 then + --● 1: Special Summon 1 Level 6 or lower monster (Fiend or Fairy) from your hand or GY + if not mmz_chk then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lv6spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --● 3: Add 1 Level 10 DARK monster from your Deck to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + elseif op==3 then + --● 5: Special Summon 1 Level 10 monster from your hand or GY + if not mmz_chk then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lv10spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100295121.lua b/pre-release/c100295121.lua new file mode 100644 index 0000000000..435eae5dbc --- /dev/null +++ b/pre-release/c100295121.lua @@ -0,0 +1,111 @@ +--道化の一座 ハット +--Clown Crew Hat +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --During your Main Phase: You can send 1 "Clown Crew" card from your Deck to your GY, except a Pendulum Monster, and if you do, Special Summon this card, also you cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetTarget(s.gytg) + e1:SetOperation(s.gyop) + e1:SetCountLimit(1,{id,0}) + c:RegisterEffect(e1) + --Monsters your opponent controls lose 1500 DEF while you control a Tribute Summoned monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_DEFENSE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,LOCATION_MZONE) + e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) + e2:SetValue(-1500) + c:RegisterEffect(e2) + --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Hat" once per turn); + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_RELEASE) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) + c:RegisterEffect(e3) +end +s.listed_series={SET_CLOWN_CREW} +function s.gyfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and not c:IsPendulumMonster() and c:IsAbleToGrave() +end +function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.gyop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.actval) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) +end +function s.actval(e,re,tp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsLocation(LOCATION_MZONE) and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) +end +function s.spfilter(c,e,tp) + if c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end + if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return false end + return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and not c:IsPendulumMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+100) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TODECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_EXTRA) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Shuffle all Pendulum Monsters on the field and face-up Extra Decks into the Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,nil) + if #g>0 then + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + elseif op==2 then + --● Special Summon 1 non-Pendulum "Clown Crew" monster from your Deck or Extra Deck, ignoring its Summoning conditions + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452001.lua b/pre-release/c100452001.lua new file mode 100644 index 0000000000..20708329b8 --- /dev/null +++ b/pre-release/c100452001.lua @@ -0,0 +1,94 @@ +--白き幻獣-青眼の白龍 +--Blue-Eyes White Dragon, the White Phantom Beast +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When a card or effect is activated that targets this card on the field (Quick Effect): You can discard 1 card; negate that effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(s.discon) + e1:SetCost(Cost.Discard()) + e1:SetTarget(s.distg) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) + c:RegisterEffect(e1) + --When this card is added from the Deck to your hand, or your monster is destroyed by battle: You can reveal this card in your hand; Special Summon it + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_TO_HAND) + e2a:SetCountLimit(1,{id,0}) + e2a:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_DECK) end) + e2a:SetCost(Cost.SelfReveal) + e2a:SetTarget(s.sptg) + e2a:SetOperation(s.spop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2b:SetCode(EVENT_BATTLE_DESTROYED) + e2b:SetRange(LOCATION_HAND) + e2b:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsPreviousControler,1,nil,tp) end) + c:RegisterEffect(e2b) + --If this card is Special Summoned from the hand or Deck: You can destroy all monsters your opponent controls, also you cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_HAND|LOCATION_DECK) end) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLUE_EYES} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsContains(c) and Duel.IsChainDisablable(ev) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) + --You cannot attack directly for the rest of this turn, except with "Blue-Eyes" monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_BLUE_EYES) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100452002.lua b/pre-release/c100452002.lua new file mode 100644 index 0000000000..63b89f84d8 --- /dev/null +++ b/pre-release/c100452002.lua @@ -0,0 +1,111 @@ +--蒼の深淵 ディープアイズ・ホワイト・ドラゴン +--Deep-Eyes White Dragon, the Blue Abyss +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can discard this card; add 1 Level 1 LIGHT Tuner from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If a "Blue-Eyes" Ritual Monster(s) and/or "Blue-Eyes White Dragon" is sent to your GY: You can target 1 of them; Special Summon this card from your GY (if it was there when the monster was sent) or hand (even if not), and if you do, its ATK becomes that monster's, also banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetRange(LOCATION_GRAVE|LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Keep track of "Blue-Eyes" Ritual Monsters and "Blue-Eyes White Dragon" sent to the GY + aux.GlobalCheck(s,function() + s.gygroup=Group.CreateGroup() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_TO_GRAVE) + ge1:SetOperation(s.regop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_BLUE_EYES} +s.listed_names={CARD_BLUEEYES_W_DRAGON} +function s.thfilter(c) + return c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.tgfilter(c,e) + return ((c:IsSetCard(SET_BLUE_EYES) and c:IsRitualMonster()) or c:IsCode(CARD_BLUEEYES_W_DRAGON)) + and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.tgfilter,nil,e) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + if Duel.GetCurrentChain()==0 then s.gygroup:Clear() end + s.gygroup:Merge(tg) + s.gygroup:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + Duel.RaiseEvent(s.gygroup,EVENT_CUSTOM+id,e,0,rp,ep,ev) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=s.gygroup:Filter(s.tgfilter,nil,e):Match(Card.IsControler,nil,tp) + if chkc then return g:IsContains(chkc) and chkc:IsControler(tp) and s.tgfilter(chkc,e) end + local c=e:GetHandler() + if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + --Its ATK becomes that monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(tc:GetAttack()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + --Banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(3300) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e2:SetValue(LOCATION_REMOVED) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e2,true) + end +end \ No newline at end of file diff --git a/pre-release/c100452004.lua b/pre-release/c100452004.lua new file mode 100644 index 0000000000..d61e3dab89 --- /dev/null +++ b/pre-release/c100452004.lua @@ -0,0 +1,69 @@ +--終撃竜-サイバー・エンド・ドラゴン +--Cyber End Dragon the Decisive Strike Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Machine monsters with 2100 or more ATK + Fusion.AddProcMixN(c,true,true,s.matfilter,3) + c:AddMustBeFusionSummoned() + --material check + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --search + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e0:GetLabel()==1 end) + e1:SetCost(Cost.PayLP(4000)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --pierce + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_PIERCE) + c:RegisterEffect(e2) + --extra att + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_EXTRA_ATTACK) + e3:SetCondition(s.atcon) + e3:SetValue(2) + c:RegisterEffect(e3) +end +s.listed_names={23171610} +function s.matfilter(c,sc,st,tp) + return c:IsRace(RACE_MACHINE,sc,st,tp) and c:IsAttackAbove(2100) +end +function s.valcheck(e,c) + local mg=c:GetMaterial() + e:SetLabel(mg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)==#mg and 1 or 0) +end +function s.thfilter(c) + return c:IsCode(23171610) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.atcon(e) + local c=e:GetHandler() + return c:GetAttack()>c:GetBaseAttack() +end \ No newline at end of file diff --git a/pre-release/c100452006.lua b/pre-release/c100452006.lua new file mode 100644 index 0000000000..17bf1b8ee3 --- /dev/null +++ b/pre-release/c100452006.lua @@ -0,0 +1,87 @@ +--未来融合-フューチャー・フュージョン・ノヴァ +--Future Fusion Nova +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: Fusion Summon 1 LIGHT Machine Fusion Monster from your Extra Deck, using monsters from your Deck, including "Cyber Dragon", also for the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters, also you cannot declare attacks, except with the Summoned monster + local fusion_params={ + handler=c, + fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) end, + matfilter=aux.FALSE, + extrafil=s.fextra, + extratg=s.extratg, + stage2=s.stage2 + } + local e1=Fusion.CreateSummonEff(fusion_params) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + c:RegisterEffect(e1) + --When this card leaves the field, destroy that monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EVENT_LEAVE_FIELD_P) + e2:SetOperation(function(e) e:SetLabel(e:GetHandler():IsDisabled() and 1 or 0) end) + c:RegisterEffect(e2) + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_LEAVE_FIELD) + e3:SetOperation(s.mondesop) + e3:SetLabelObject(e2) + c:RegisterEffect(e3) + --When that monster is destroyed, destroy this card + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e4:SetCode(EVENT_LEAVE_FIELD) + e4:SetRange(LOCATION_SZONE) + e4:SetCondition(s.selfdescon) + e4:SetOperation(function(e) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end) + c:RegisterEffect(e4) +end +s.listed_names={CARD_CYBER_DRAGON} +function s.fcheck(tp,sg,fc) + return sg:IsExists(Card.IsCode,1,nil,CARD_CYBER_DRAGON) +end +function s.fextra(e,tp,mg1) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil),s.fcheck +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.stage2(e,fc,tp,sg,chk) + if chk==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then + local c=e:GetHandler() + c:SetCardTarget(fc) + --For the rest of this turn after this card resolves, you cannot Special Summon, except Machine monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_MACHINE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local fid=fc:GetFieldID() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --Also you cannot declare attacks, except with the Summoned monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return c:GetFieldID()~=fid end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + end +end +function s.mondesop(e,tp,eg,ep,ev,re,r,rp) + if e:GetLabelObject():GetLabel()~=0 then return end + local tc=e:GetHandler():GetFirstCardTarget() + if tc and tc:IsLocation(LOCATION_MZONE) then + Duel.Destroy(tc,REASON_EFFECT) + end +end +function s.selfdescon(e,tp,eg,ep,ev,re,r,rp) + local tc=e:GetHandler():GetFirstCardTarget() + return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) +end \ No newline at end of file diff --git a/pre-release/c100452007.lua b/pre-release/c100452007.lua new file mode 100644 index 0000000000..75211ae5e5 --- /dev/null +++ b/pre-release/c100452007.lua @@ -0,0 +1,94 @@ +--赤き竜-ケッツァーコアトル +--Crimson Dragon Quetzacoatl +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --special summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --atk up + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(s.atkval) + c:RegisterEffect(e2) + --negate + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOEXTRA|CATEGORY_NEGATE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.negcon) + e3:SetTarget(s.negtg) + e3:SetOperation(s.negop) + c:RegisterEffect(e3) +end +function s.spfilter(c,e,tp) + return c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end + if ft>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,ft,ft,nil) + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.atkval(e,c) + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSynchroMonster),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()):GetSum(Card.GetBaseAttack) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsChainNegatable(ev) and rp==1-tp and re:IsMonsterEffect() +end +function s.negfilter(c) + return c:IsFaceup() and c:IsSynchroMonster() and c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.negfilter,tp,LOCATION_MZONE,0,1,1,exc) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + Duel.NegateActivation(ev) + end +end \ No newline at end of file diff --git a/pre-release/c100452009.lua b/pre-release/c100452009.lua new file mode 100644 index 0000000000..48f550cecd --- /dev/null +++ b/pre-release/c100452009.lua @@ -0,0 +1,100 @@ +--レッド・デーモンズ・チェーン +--Red Dragon Archfiend's Chain +--scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --You can activate this card the turn it was Set, by revealing 1 "Red Dragon Archfiend" in your Extra Deck + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e0:SetValue(function(e) e:SetLabel(1) end) + e0:SetCondition(function(e) return Duel.IsExistingMatchingCard(s.extracostfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,1,nil) end) + c:RegisterEffect(e0) + --Activate this card by revealing any number of monsters in your hand, then target Effect Monsters your opponent controls equal to the number of Tuners revealed +1; they lose 100 ATK for each card revealed, also their effects are negated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetLabelObject(e0) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --They lose 100 ATK for each card revealed + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetTarget(aux.PersistentTargetFilter) + e2:SetValue(function() return e1:GetLabel()*-100 end) + c:RegisterEffect(e2) + --Also their effects are negated + local e3=e2:Clone() + e3:SetCode(EFFECT_DISABLE) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.handcostfilter(c) + return c:IsMonster() and not c:IsPublic() +end +function s.rescon(max_target_count) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1<=max_target_count + end +end +function s.extracostfilter(c) + return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and not c:IsPublic() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + local label_obj=e:GetLabelObject() + local hg=Duel.GetMatchingGroup(s.handcostfilter,tp,LOCATION_HAND,0,nil) + local max_target_count=Duel.GetTargetCount(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) + local rescon=s.rescon(max_target_count) + if chk==0 then label_obj:SetLabel(0) return #hg>0 and max_target_count>0 + and aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,0) end + if label_obj:GetLabel()>0 then + label_obj:SetLabel(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.extracostfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleExtra(tp) + end + local sg=aux.SelectUnselectGroup(hg,e,tp,1,#hg,rescon,1,tp,HINTMSG_CONFIRM,rescon) + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + e:SetLabel(sg:FilterCount(Card.IsType,nil,TYPE_TUNER)+1,#sg) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsEffectMonster() and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end + local target_count,reveal_count=e:GetLabel() + e:SetLabel(reveal_count) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,target_count,target_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) + if #tg>0 then + local c=e:GetHandler() + for tc in tg:Iter() do + c:SetCardTarget(tc) + end + --If the last of those monsters is not on the field, destroy this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_SELF_DESTROY) + e1:SetRange(LOCATION_SZONE) + e1:SetCondition(function(e) return #(e:GetHandler():GetCardTarget())==0 end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c100452010.lua b/pre-release/c100452010.lua new file mode 100644 index 0000000000..b39ef063a8 --- /dev/null +++ b/pre-release/c100452010.lua @@ -0,0 +1,97 @@ +--超銀河眼の光子龍-フォトン・ハウリング +--Neo Galaxy-Eyes Photon Dragon - Photon Howling +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 8 monsters OR 1 Rank 8 Xyz Monster + Xyz.AddProcedure(c,nil,8,3,s.altmatfilter,aux.Stringid(id,0),3,s.xyzop) + --Take 1 "Photon" monster from your Deck, and either Special Summon it in Defense Position or attach it to this card as material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(s.spattachtg) + e1:SetOperation(s.spattachop) + c:RegisterEffect(e1) + --Tribute 1 other Xyz Monster, and if you do, negate the effects of all other face-up cards currently on the field until the end of this turn. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCost(Cost.DetachFromSelf(3)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_series={SET_PHOTON} +function s.altmatfilter(c,tp,xyzc) + return c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRank(8) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) + return true +end +function s.spcheck(c,e,tp,mmz_chk) + return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.attachcheck(c,e,tp) + return c:IsCanBeXyzMaterial(e:GetHandler(),tp,REASON_EFFECT) +end +function s.spattachfilter(c,e,tp,mmz_chk) + return c:IsSetCard(SET_PHOTON) and c:IsMonster() and (s.spcheck(c,e,tp,mmz_chk) or s.attachcheck(c,e,tp)) +end +function s.spattachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if chk==0 then return Duel.IsExistingMatchingCard(s.spattachfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mmz_chk) end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spattachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,s.spattachfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not sc then return end + local b1=s.spcheck(sc,e,tp,mmz_chk) + local b2=s.attachcheck(sc,e,tp) and c:IsRelateToEffect(e) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,4)}, --"Special Summon it in Defense Position" + {b2,aux.Stringid(id,5)}) --"Attach it to this card as material" + if op==1 then + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + elseif op==2 then + Duel.Overlay(c,sc,true) + end +end +function s.xyzfilter(c,self_exc) + return c:IsXyzMonster() and c:IsReleasableByEffect() + and Duel.IsExistingMatchingCard(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,self_exc)) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,c,c) end + local g=Duel.GetMatchingGroup(Card.IsNegatable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,c) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g-1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,exc,exc) + if not sc then return end + Duel.HintSelection(sc) + if Duel.Release(sc,REASON_EFFECT)>0 then + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) + --Negate the effects of all other face-up cards currently on the field until the end of this turn + for tc in g:Iter() do + tc:NegateEffects(c,RESET_PHASE|PHASE_END) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452012.lua b/pre-release/c100452012.lua new file mode 100644 index 0000000000..6ef4055a54 --- /dev/null +++ b/pre-release/c100452012.lua @@ -0,0 +1,93 @@ +--GDロボ・オービタル 7 +--Galaxy Defense Robot Orbital 7 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Tribute this card from your hand or field; take 1 "Photon" monster and 1 "Galaxy" monster from your Deck, add 1 of them to your hand, and send the other to the GY, also you cannot Special Summon for the rest of this turn, except LIGHT monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfTribute) + e1:SetTarget(s.thtgtg) + e1:SetOperation(s.thtgop) + c:RegisterEffect(e1) + --If a "Galaxy-Eyes" monster(s) is Special Summoned to your field: You can Special Summon this card from your GY, but banish it when it leaves the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_PHOTON,SET_GALAXY,SET_GALAXY_EYES} +function s.thtgfilter(c) + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_PHOTON) and sg:IsExists(Card.IsSetCard,1,nil,SET_GALAXY) + and sg:IsExists(Card.IsAbleToHand,1,nil) and sg:IsExists(Card.IsAbleToGrave,1,nil) +end +function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then + local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) + return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.thtgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thtgfilter,tp,LOCATION_DECK,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,2)) + if #sg==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hg=sg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) + Duel.SendtoHand(hg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,hg) + Duel.SendtoGrave(sg-hg,REASON_EFFECT) + end + --You cannot Special Summon for the rest of this turn, except LIGHT monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsAttributeExcept(ATTRIBUTE_LIGHT) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spconfilter(c,tp) + return c:IsSetCard(SET_GALAXY_EYES) and c:IsControler(tp) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c100452013.lua b/pre-release/c100452013.lua new file mode 100644 index 0000000000..8f7fb64afc --- /dev/null +++ b/pre-release/c100452013.lua @@ -0,0 +1,76 @@ +--四天の龍 スターヴ・ヴェノム・フュージョン・ドラゴン +--Starving Venom Fusion Dragon of the Four Heavenly Dragons +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 DARK monsters on the field + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + --atk to 0 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --fusion summon + local fusion_params={ + handler=c, + fusfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) end, + matfilter=function(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsOnField() end, + extrafil=s.fextra, + gc=Fusion.ForcedHandler + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_PREDAPLANT} +s.material_location=LOCATION_ONFIELD +function s.matfilter(c,fc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsOnField() +end +function s.atkfilter(c) + return c:IsFaceup() and (c:HasNonZeroAttack() or c:IsNegatableMonster() or c:IsAttributeExcept(ATTRIBUTE_DARK)) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + tc:NegateEffects(c) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(ATTRIBUTE_DARK) + tc:RegisterEffect(e2) + end +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) +end \ No newline at end of file diff --git a/pre-release/c100452014.lua b/pre-release/c100452014.lua new file mode 100644 index 0000000000..3a44abb117 --- /dev/null +++ b/pre-release/c100452014.lua @@ -0,0 +1,80 @@ +--四天の龍 クリアウィング・シンクロ・ドラゴン +--Clear Wing Synchro Dragon of the Four Heavenly Dragons +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --If this card is Special Summoned: You can destroy 1 Effect Monster your opponent controls, and if you do, this card gains ATK equal to that monster's original ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --When your opponent activates a card or effect (Quick Effect): You can Special Summon 1 Level 4 or lower WIND Tuner from your hand or GY (but negate its effects), then immediately after this effect resolves, you can Synchro Summon 1 WIND Synchro Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SPEEDROID} +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,nil) end + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsEffectMonster),tp,0,LOCATION_MZONE,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + local c=e:GetHandler() + local atk=g:GetFirst():GetBaseAttack() + if Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsFaceup() and atk>0 then + --This card gains ATK equal to that monster's original ATK + c:UpdateAttack(atk) + end +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_TUNER) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.synchrofilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable() +end +function s.spop(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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(s.synchrofilter,tp,LOCATION_EXTRA,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local synchro=Duel.SelectMatchingCard(tp,s.synchrofilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if synchro then + Duel.SynchroSummon(tp,synchro) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452016.lua b/pre-release/c100452016.lua new file mode 100644 index 0000000000..1e6cd93973 --- /dev/null +++ b/pre-release/c100452016.lua @@ -0,0 +1,77 @@ +--ヴァレルロード・L・ドラゴン +--Borreload Liberator Dragon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 3+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) + --You can only Special Summon "Borreload Liberator Dragon(s)" once per turn + c:SetSPSummonOnce(id) + --Place 1 monster your opponent controls in a zone this card points to and take control of it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(s.controltg) + e1:SetOperation(s.controlop) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_PHASE|TIMING_BATTLE_END) + c:RegisterEffect(e1) + --Destroy 1 monster you control and Special Summon itself from the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_CHAIN_END) + c:RegisterEffect(e2) +end +function s.controlfilter(c,zones) + return c:IsControlerCanBeChanged(false,zones) +end +function s.controltg(e,tp,eg,ep,ev,re,r,rp,chk) + local zones=e:GetHandler():GetLinkedZone()&ZONES_MMZ + if chk==0 then return Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil,zones) end + Duel.SetChainLimit(function(e,ep,tp) return tp==ep end) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) +end +function s.controlop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local zones=c:GetLinkedZone()&ZONES_MMZ + if not (c:IsRelateToEffect(e) and zones~=0) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil,zones) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp,0,0,zones) + end +end +function s.desfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100452017.lua b/pre-release/c100452017.lua new file mode 100644 index 0000000000..d698a1694b --- /dev/null +++ b/pre-release/c100452017.lua @@ -0,0 +1,94 @@ +--ヴァレット・バラージュ +--Rokket Barrage +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --You can send 1 DARK Dragon monster from your Deck to the GY, except a Level 5 monster; Special Summon this card from your hand, also you cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --When a Link Monster's effect is activated that targets this card on the field (Quick Effect): You can destroy this card, then Special Summon up to 1 "Rokket" monster each from your hand, Deck, GY, and/or banishment, except "Rokket Barrage" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_ROKKET} +function s.selfspcostfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and not c:IsLevel(5) and c:IsAbleToGraveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsAttributeExcept(ATTRIBUTE_DARK) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsContains(e:GetHandler()) and re:GetHandler():IsLinkMonster() and re:IsMonsterEffect() +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) +end +local LOCATION_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND_DECK_GRAVE_REMOVED) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ft=Duel.GetMZoneCount(tp,c) + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and ft>0 then + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND_DECK_GRAVE_REMOVED,0,nil,e,tp) + if #g==0 then return end + ft=math.min(ft,4) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLocation),1,tp,HINTMSG_SPSUMMON) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452019.lua b/pre-release/c100452019.lua new file mode 100644 index 0000000000..ee5ce7fb95 --- /dev/null +++ b/pre-release/c100452019.lua @@ -0,0 +1,89 @@ +--デミウルゴス EMA +--Demiurge Ema +--scripted by Naim +local s,id=GetID() +local TOKEN_HOMUNCULUS=id+100 +function s.initial_effect(c) + --You can send 4 monsters with 2400 or more ATK and 1000 DEF from your hand, Deck, and/or face-up field to the GY; Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + e1:SetCountLimit(1,{id,0}) + c:RegisterEffect(e1) + --You can target 1 Spell/Trap on each field; destroy them, then Special Summon 1 "Homunculus Token" (Fairy/LIGHT/Level 2/ATK 800/DEF 800) to both players' fields in Defense Position, and if you do, this card gains 1600 ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetTarget(s.tkntg) + e2:SetOperation(s.tknop) + e2:SetCountLimit(1,{id,1}) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_HOMUNCULUS} +function s.selfspcostfilter(c) + return c:IsAttackAbove(2400) and c:IsDefense(1000) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,e:GetHandler()) + if chk==0 then return #g>=4 and Duel.GetMZoneCount(tp,g)>0 end + local sg=aux.SelectUnselectGroup(g,e,tp,4,4,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) + Duel.SendtoGrave(sg,REASON_COST) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.cansummontokentothisplayer(sum_player,target_player) + return Duel.IsPlayerCanSpecialSummonMonster(sum_player,TOKEN_HOMUNCULUS,0,TYPES_TOKEN,800,800,2,RACE_FAIRY,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,target_player) +end +function s.rescon(sg,e,tp,mg) + return sg:GetClassCount(Card.GetControler,nil)==2 and Duel.GetMZoneCount(tp,sg)>0 and Duel.GetMZoneCount(1-tp,sg)>0 +end +function s.tkntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetTargetGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if chk==0 then return #g>=2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and s.cansummontokentothisplayer(tp,tp) + and s.cansummontokentothisplayer(tp,1-tp) + and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_DESTROY) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,2,PLAYER_ALL,0) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,0,2,PLAYER_ALL,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,1600) +end +function s.tknop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.Destroy(tg,REASON_EFFECT)>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 + and s.cansummontokentothisplayer(tp,tp) and s.cansummontokentothisplayer(tp,1-tp) then + Duel.BreakEffect() + local token1=Duel.CreateToken(tp,TOKEN_HOMUNCULUS) + Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + local token2=Duel.CreateToken(tp,TOKEN_HOMUNCULUS) + Duel.SpecialSummonStep(token2,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) + if Duel.SpecialSummonComplete()==0 then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 1600 ATK + c:UpdateAttack(1600) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452020.lua b/pre-release/c100452020.lua new file mode 100644 index 0000000000..7ccdd809c5 --- /dev/null +++ b/pre-release/c100452020.lua @@ -0,0 +1,141 @@ +--闇の神-ダークゴッド +--Dark Creator +--scripted by Naim +local s,id=GetID() +local TOKEN_DARK_CREATOR=id+100 +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by Tributing 2 Fiend and/or Fairy monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Cannot be destroyed by battle + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + c:RegisterEffect(e2) + --Once per turn: You can Special Summon as many "Dark Creator Tokens" (Fiend/DARK/Level 10/ATK 3000/DEF 1000) as possible, but they cannot attack directly or be destroyed by battle, destroy them when this card is destroyed, also you cannot Special Summon for the rest of this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.tokensptg) + e3:SetOperation(s.tokenspop) + c:RegisterEffect(e3) + --If a monster(s) is destroyed by battle: Inflict 700 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e4:SetCode(EVENT_BATTLE_DESTROYED) + e4:SetRange(LOCATION_MZONE) + e4:SetTarget(s.damtg) + e4:SetOperation(s.damop) + c:RegisterEffect(e4) +end +s.listed_names={TOKEN_DARK_CREATOR} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,Card.IsRace,2,false,2,true,c,tp,nil,false,nil,RACE_FIEND|RACE_FAIRY) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,Card.IsRace,2,2,false,true,true,c,tp,nil,false,nil,RACE_FIEND|RACE_FAIRY) + if g then + e:SetLabelObject(g) + return true + end + return false +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g then + Duel.Release(g,REASON_COST) + end +end +function s.tokensptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DARK_CREATOR,0,TYPES_TOKEN,3000,1000,10,RACE_FIEND,ATTRIBUTE_DARK) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,tp,0) +end +function s.tokenspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DARK_CREATOR,0,TYPES_TOKEN,3000,1000,10,RACE_FIEND,ATTRIBUTE_DARK) then + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=Group.CreateGroup() + for i=1,ft do + local token=Duel.CreateToken(tp,TOKEN_DARK_CREATOR) + Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) + sg:AddCard(token) + --They cannot attack directly or be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetDescription(3207) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e1,true) + local e2=e1:Clone() + e2:SetDescription(3000) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + token:RegisterEffect(e2,true) + end + if c:IsRelateToEffect(e) and #sg>0 then + --Destroy them when this card is destroyed + local e3a=Effect.CreateEffect(c) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3a:SetCode(EVENT_LEAVE_FIELD_P) + e3a:SetCondition(function() return c:IsReason(REASON_DESTROY) end) + e3a:SetOperation(function() + local e3b=Effect.CreateEffect(c) + e3b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3b:SetCode(EVENT_DESTROYED) + e3b:SetOperation(function(e) + local dg=sg:Filter(Card.IsOnField,nil) + if #dg>0 then + Duel.Hint(HINT_CARD,1-tp,id) + Duel.Destroy(dg,REASON_EFFECT) + end + e:Reset() + end) + c:RegisterEffect(e3b) + end) + e3a:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e3a) + end + Duel.SpecialSummonComplete() + end + --You cannot Special Summon for the rest of this turn + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,3)) + e4:SetType(EFFECT_TYPE_FIELD) + e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e4:SetTargetRange(1,0) + e4:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e4,tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(700) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,700) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c100452021.lua b/pre-release/c100452021.lua new file mode 100644 index 0000000000..1978d534f1 --- /dev/null +++ b/pre-release/c100452021.lua @@ -0,0 +1,45 @@ +--神鳴り +--Lightning Crash +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 Thunder monster from your Deck to your hand, but you cannot Normal Summon/Set monsters with its name until the end of the next turn after this card resolves + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + c:RegisterEffect(e1) +end +function s.thfilter(c) + return c:IsRace(RACE_THUNDER) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + local code=sc:GetCode() + --You cannot Normal Summon/Set monsters with its name until the end of the next turn after this card resolves + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsCode(code) end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_CANNOT_MSET) + Duel.RegisterEffect(e2,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100452022.lua b/pre-release/c100452022.lua new file mode 100644 index 0000000000..60f545803d --- /dev/null +++ b/pre-release/c100452022.lua @@ -0,0 +1,89 @@ +--DTカタストローグ +--Dark Tuner Catastrogue +--Scripted by the Razgriz +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand; immediately after this effect resolves, Normal Summon 1 "Dark Tuner" monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.nstg) + e1:SetOperation(s.nsop) + c:RegisterEffect(e1) + --Once per turn, if you control this Normal Summoned/Set card: You can Tribute both this face-up card and 1 face-up non-Tuner with a lower Level, and if you do, Special Summon 1 Synchro Monster from your Extra Deck with a Level equal to the difference in Levels of those monsters (this is treated as a Synchro Summon), then you can destroy 1 card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return e:GetHandler():IsNormalSummoned() end) + e2:SetTarget(s.darksynchtg) + e2:SetOperation(s.darksynchop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DARK_TUNER} +function s.nsfilter(c) + return c:IsSetCard(SET_DARK_TUNER) and c:IsSummonable(true,nil) +end +function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.nsop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end +end +function s.nontunerfilter(c,e,tp,lv,mc) + return not c:IsType(TYPE_TUNER) and c:IsReleasable() and c:IsFaceup() and c:HasLevel() and c:IsLevelBelow(lv-1) + and Duel.IsExistingMatchingCard(s.darksyncfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv-c:GetLevel(),Group.FromCards(c,mc)) +end +function s.darksyncfilter(c,e,tp,lv,mg) + return c:IsSynchroMonster() and c:IsLevel(lv) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.darksynchtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then + local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) + return #pg<=0 and c:IsReleasable() and Duel.IsExistingMatchingCard(s.nontunerfilter,tp,LOCATION_MZONE,0,1,c,e,tp,c:GetLevel(),c) + end + Duel.SetOperationInfo(0,CATEGORY_RELEASE,c,2,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.darksynchop(e,tp,eg,ep,ev,re,r,rp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) + if #pg>0 then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + local lv=c:GetLevel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local sc=Duel.SelectMatchingCard(tp,s.nontunerfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp,lv,c):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + lv=lv-sc:GetLevel() + if Duel.Release(Group.FromCards(c,sc),REASON_EFFECT)==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sync=Duel.SelectMatchingCard(tp,s.darksyncfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst() + if sync and Duel.SpecialSummon(sync,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sync:CompleteProcedure() + if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end + end + end + end +end \ No newline at end of file diff --git a/pre-release/c100452023.lua b/pre-release/c100452023.lua new file mode 100644 index 0000000000..8782ee0c8a --- /dev/null +++ b/pre-release/c100452023.lua @@ -0,0 +1,106 @@ +--DTナイトメア・ハンド +--Dark Tuner Nightmare Hand +--Scripted by the Razgriz +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand; immediately after this effect resolves, Normal Summon 1 "Dark Tuner" monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.nstg) + e1:SetOperation(s.nsop) + c:RegisterEffect(e1) + --If this card is Normal Summoned: You can Special Summon 1 Level 2 or lower monster from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Once per turn, if you control this Normal Summoned/Set card: You can Tribute both this face-up card and 1 face-up non-Tuner with a lower Level, and if you do, Special Summon 1 Synchro Monster from your Extra Deck with a Level equal to the difference in Levels of those monsters (this is treated as a Synchro Summon) + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e) return e:GetHandler():IsNormalSummoned() end) + e3:SetTarget(s.darksynchtg) + e3:SetOperation(s.darksynchop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_TUNER} +function s.nsfilter(c) + return c:IsSetCard(SET_DARK_TUNER) and c:IsSummonable(true,nil) +end +function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.nsop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(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,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.nontunerfilter(c,e,tp,lv,mc) + return not c:IsType(TYPE_TUNER) and c:IsReleasable() and c:IsFaceup() and c:HasLevel() and c:IsLevelBelow(lv-1) + and Duel.IsExistingMatchingCard(s.darksyncfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv-c:GetLevel(),Group.FromCards(c,mc)) +end +function s.darksyncfilter(c,e,tp,lv,mg) + return c:IsSynchroMonster() and c:IsLevel(lv) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.darksynchtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then + local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) + return #pg<=0 and c:IsReleasable() and Duel.IsExistingMatchingCard(s.nontunerfilter,tp,LOCATION_MZONE,0,1,c,e,tp,c:GetLevel(),c) + end + Duel.SetOperationInfo(0,CATEGORY_RELEASE,c,2,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.darksynchop(e,tp,eg,ep,ev,re,r,rp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) + if #pg>0 then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + local lv=c:GetLevel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local sc=Duel.SelectMatchingCard(tp,s.nontunerfilter,tp,LOCATION_MZONE,0,1,1,c,e,tp,lv,c):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + lv=lv-sc:GetLevel() + if Duel.Release(Group.FromCards(c,sc),REASON_EFFECT)==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sync=Duel.SelectMatchingCard(tp,s.darksyncfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst() + if sync and Duel.SpecialSummon(sync,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sync:CompleteProcedure() + end + end + end +end \ No newline at end of file diff --git a/pre-release/c100452024.lua b/pre-release/c100452024.lua new file mode 100644 index 0000000000..e41fcf7161 --- /dev/null +++ b/pre-release/c100452024.lua @@ -0,0 +1,76 @@ +--ガトリング・オーガ +--Gatling Ogre +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Inflict 800 damage to your damage for each facedow Spell/Trap Card sent to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(3,id) + e1:SetCost(s.damcost) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --When this card is targeted for an attack: Inflict 500 damage for each Attack Position monster they control, then end the Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.damendbptg) + e2:SetOperation(s.damendbpop) + c:RegisterEffect(e2) +end +function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,nil) + if chk==0 then return #g>0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGraveAsCost),tp,LOCATION_STZONE,0,1,#g,nil) + e:SetLabel(#g) + Duel.SendtoGrave(g,REASON_COST) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetLabel()*800 + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) + --Your opponent takes no damage from non-Fiend monsters' effects for the rest of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CHANGE_DAMAGE) + e1:SetTargetRange(0,1) + e1:SetValue(s.damval) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damval(e,re,val,r,rp,rc) + if re and r&REASON_EFFECT>0 and re:IsMonsterEffect() and re:GetHandler():IsRaceExcept(RACE_FIEND) then + return 0 + else + return val + end +end +function s.damendbptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) + if chk==0 then return ct>0 end + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) +end +function s.damendbpop(e,tp,eg,ep,ev,re,r,rp) + local dam=500*Duel.GetMatchingGroupCount(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) + if dam>0 and Duel.Damage(1-tp,dam,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + end +end \ No newline at end of file diff --git a/pre-release/c100452025.lua b/pre-release/c100452025.lua new file mode 100644 index 0000000000..c5bf946b79 --- /dev/null +++ b/pre-release/c100452025.lua @@ -0,0 +1,94 @@ +--インフェルニティ・デス・ガンマン +--Infernity Doom Slinger +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --During your Main Phase: You can Special Summon 1 Fiend monster from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If you have no cards in your hand (Quick Effect): You can banish this card from your GY; your opponent chooses 1 of these effects for you to apply + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,4000) end) + e2:SetOperation(s.effop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(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,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local top_card=Duel.GetDecktopGroup(tp,1):GetFirst() + local b1=top_card + local b2=true + local op=Duel.SelectEffect(1-tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + local c=e:GetHandler() + if op==1 then + --Reveal the top card of your Deck, and if it is a monster, your opponent takes any effect damage you would have taken this turn instead. Otherwise, you take 4000 damage + Duel.ConfirmDecktop(tp,1) + if top_card:IsMonster() then + --Your opponent takes any effect damage you would have taken this turn instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_REFLECT_DAMAGE) + e1:SetTargetRange(1,0) + e1:SetValue(function(e,_,_,r) return (r&REASON_EFFECT)==REASON_EFFECT end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + else + Duel.Damage(tp,4000,REASON_EFFECT) + end + elseif op==2 then + --You take no effect damage this turn + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,5)) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e2a:SetCode(EFFECT_CHANGE_DAMAGE) + e2a:SetTargetRange(1,0) + e2a:SetValue(s.damval) + e2a:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2a,tp) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_NO_EFFECT_DAMAGE) + Duel.RegisterEffect(e2b,tp) + end +end +function s.damval(e,re,val,r,rp,rc) + if (r&REASON_EFFECT)>0 then + return 0 + else + return val + end +end \ No newline at end of file diff --git a/pre-release/c100452026.lua b/pre-release/c100452026.lua new file mode 100644 index 0000000000..4832057c62 --- /dev/null +++ b/pre-release/c100452026.lua @@ -0,0 +1,109 @@ +--カオスエンド・ルーラー-開闢と終焉の支配者- +--Chaos End Ruler - Ruler of the Beginning and the End +--scripted by edo9300 +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your hand) by banishing 1 LIGHT Warrior and 1 DARK Fiend monster from your GY + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + e0:SetValue(9300) + c:RegisterEffect(e0) + --This card's Special Summon cannot be negated + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) + c:RegisterEffect(e1) + --Neither player can activate cards or effects when this card is Special Summoned + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2a:SetCode(EVENT_SPSUMMON_SUCCESS) + e2a:SetOperation(s.limop) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2b:SetCode(EVENT_CHAIN_END) + e2b:SetRange(LOCATION_MZONE) + e2b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e2b:SetOperation(function(e) e:GetHandler():ResetFlagEffect(id) Duel.SetChainLimitTillChainEnd(aux.FALSE) end) + c:RegisterEffect(e2b) + --If you control this card that was Summoned its own way: You can pay 1000 LP; banish as many cards from your opponent's field and GY as possible, then inflict 500 damage to your opponent for each card banished by this effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+9300) end) + e3:SetCost(Cost.PayLP(1000)) + e3:SetTarget(s.bandamtg) + e3:SetOperation(s.bandamop) + e3:SetCountLimit(1,id) + c:RegisterEffect(e3) +end +function s.spcostfilter(c) + return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR)) or (c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND))) + and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +end +function s.propertyfilter(c,attribute,race) + return c:IsAttribute(attribute) and c:IsRace(race) +end +function s.rescon(sg,e,tp,mg) + return Duel.GetMZoneCount(tp,sg)>0 and sg:IsExists(s.propertyfilter,1,nil,ATTRIBUTE_LIGHT,RACE_WARRIOR) + and sg:IsExists(s.propertyfilter,1,nil,ATTRIBUTE_DARK,RACE_FIEND) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + return #g>=2 and Duel.GetMZoneCount(tp,g)>0 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) + if #sg>0 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local sg=e:GetLabelObject() + if sg then + Duel.Remove(sg,POS_FACEUP,REASON_COST) + end +end +function s.limop(e,tp,eg,ep,ev,re,r,rp) + local current_chain=Duel.GetCurrentChain() + if current_chain==0 then + Duel.SetChainLimitTillChainEnd(aux.FALSE) + elseif current_chain==1 then + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + end +end +function s.bandamtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,LOCATION_ONFIELD|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) +end +function s.damfilter(c) + return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) +end +function s.bandamop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then + local damage=500*Duel.GetOperatedGroup():FilterCount(s.damfilter,nil) + if damage>0 then + Duel.Damage(1-tp,damage,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452027.lua b/pre-release/c100452027.lua new file mode 100644 index 0000000000..2c2264f8b3 --- /dev/null +++ b/pre-release/c100452027.lua @@ -0,0 +1,85 @@ +--HRUM-アルティメット・フォース +--Hyper-Rank-Up-Magic Ultimate Force +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Target 1 Rank 9 or lower "Utopia" or "Utopic" Xyz Monster you control whose original Attribute is LIGHT; Special Summon 1 Rank 10 or higher "Number" Xyz Monster from your Extra Deck, by using that Xyz Monster you control (this is treated as an Xyz Summon, transfer its materials), and if you do, attach this card to it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --A "Number 99" Xyz Monster that has this card as material gains this effect: ● Once per Chain, when your opponent activates a monster effect during the Battle Phase (Quick Effect): Detach all materials from this card, and if you do, destroy all monsters your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_F) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + c:RegisterEffect(e2) +end +s.listed_series={SET_UTOPIC,SET_NUMBER,SET_NUMBER_99} +function s.tgfilter(c,e,tp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or pg:IsContains(c)) and c:IsRankBelow(9) and c:IsSetCard(SET_UTOPIC) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,mc) + if c.rum_limit and not c.rum_limit(mc,e) then return false end + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRankAbove(10) and c:IsSetCard(SET_NUMBER) and mc:IsCanBeXyzMaterial(c,tp) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp) end + if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and not tc:IsImmuneToEffect(e) then + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(tc),tp,nil,nil,REASON_XYZ) + if not (#pg<=0 or pg:IsContains(c)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xyz=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() + if not xyz then return end + xyz:SetMaterial(tc) + Duel.Overlay(xyz,tc) + if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + xyz:CompleteProcedure() + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + c:CancelToGrave() + Duel.Overlay(xyz,c) + end + end + end +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsBattlePhase() and rp==1-tp and re:IsMonsterEffect() and e:GetHandler():IsSetCard(SET_NUMBER_99) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local og=c:GetOverlayGroup() + if c:IsRelateToEffect(e) and #og>0 and Duel.SendtoGrave(og,REASON_EFFECT)==#og then + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c100452028.lua b/pre-release/c100452028.lua new file mode 100644 index 0000000000..4b7eab9b79 --- /dev/null +++ b/pre-release/c100452028.lua @@ -0,0 +1,89 @@ +--パーフェクトロン・ハイドライブ・ドラゴン +--Perfectron Hydradrive Dragon +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 1+ Link Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_LINK),1) + --If this card is Link Summoned, or at the end of the Damage Step if this card battled: Destroy as many monsters your opponent controls as possible, then inflict 300 damage to your opponent for each Link Monster in your GY + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1a:SetCode(EVENT_SPSUMMON_SUCCESS) + e1a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1a:SetTarget(s.destg) + e1a:SetOperation(s.desop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_DAMAGE_STEP_END) + c:RegisterEffect(e1b) + --While face-up on the field, this card is also LIGHT, WATER, FIRE, and WIND-Attribute + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_ADD_ATTRIBUTE) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(ATTRIBUTE_LIGHT|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND) + c:RegisterEffect(e2) + --Unaffected by the activated effects of monsters that share an Attribute with this card + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_IMMUNE_EFFECT) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(s.immval) + c:RegisterEffect(e3) + --If this card with 1000 or more ATK would be destroyed by battle or card effect, you can make its ATK become reduced by 1000 instead + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetCode(EFFECT_DESTROY_REPLACE) + e4:SetRange(LOCATION_MZONE) + e4:SetTarget(s.desreptg) + c:RegisterEffect(e4) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + local dam=300*Duel.GetMatchingGroupCount(Card.IsLinkMonster,tp,LOCATION_GRAVE,0,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local dam=300*Duel.GetMatchingGroupCount(Card.IsLinkMonster,tp,LOCATION_GRAVE,0,nil) + if dam>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,dam,REASON_EFFECT) + end + end +end +function s.immval(e,te) + local trig_loc,trig_attr=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_ATTRIBUTE) + if not (te:IsMonsterEffect() and te:IsActivated()) then return false end + local c=e:GetHandler() + local tc=te:GetHandler() + if not Duel.IsChainSolving() or (tc:IsRelateToEffect(te) and tc:IsFaceup() and tc:IsLocation(trig_loc)) then + return c:IsAttribute(tc:GetAttribute()) + else + return c:GetAttribute()&trig_attr>0 + end +end +function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAttackAbove(1000) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end + if Duel.SelectEffectYesNo(tp,c,96) then + --Make its ATK become reduced by 1000 instead + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(c:GetAttack()-1000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + return true + end + return false +end \ No newline at end of file diff --git a/pre-release/c100454001.lua b/pre-release/c100454001.lua new file mode 100644 index 0000000000..df9456a2d0 --- /dev/null +++ b/pre-release/c100454001.lua @@ -0,0 +1,97 @@ +--ブラック・ローズ・ドラゴン/バスター +--Black Rose Dragon/Assault Mode +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --If this card is destroyed: You can Special Summon 1 "Black Rose Dragon" from your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --You can reveal this card in your hand; shuffle it into the Deck, and if you do, change the ATK of 1 face-up monster on the field to 0 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.tdatktg) + e2:SetOperation(s.tdatkop) + c:RegisterEffect(e2) + --If this card is Special Summoned, or a monster(s) is Special Summoned to your opponent's field: You can destroy all cards on the field + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,2)) + e3a:SetCategory(CATEGORY_DESTROY) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SPSUMMON_SUCCESS) + e3a:SetCountLimit(1,{id,1}) + e3a:SetTarget(s.destg) + e3a:SetOperation(s.desop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3b:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3b:SetRange(LOCATION_MZONE) + e3b:SetCondition(function(e,tp,eg) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsControler,1,nil,1-tp) end) + c:RegisterEffect(e3b) +end +s.listed_names={CARD_ASSAULT_MODE,CARD_BLACK_ROSE_DRAGON} +s.assault_mode=CARD_BLACK_ROSE_DRAGON +function s.spfilter(c,e,tp) + return c:IsCode(CARD_BLACK_ROSE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tdatktg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.tdatkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local sc=Duel.SelectMatchingCard(tp,Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + --Change its ATK to 0 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100454002.lua b/pre-release/c100454002.lua new file mode 100644 index 0000000000..33175c3a71 --- /dev/null +++ b/pre-release/c100454002.lua @@ -0,0 +1,84 @@ +--捕食植物デェアデビル +--Predaplant Dheadevil +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Predaplant" monster + 1 Level 1 monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PREDAPLANT),aux.FilterBoolFunction(Card.IsLevel,1)) + c:AddMustFirstBeFusionSummoned() + --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 monster on either field with a Predator Counter and 1 "Predaplant" monster you control + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_EXTRA) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --During the Main Phase, if this card was Special Summoned this turn (Quick Effect): You can target Spells/Traps on the field, up to the number of monsters with a Predator Counter; destroy them + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return Duel.IsMainPhase() and e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) +end +s.listed_series={SET_PREDAPLANT} +s.counter_list={COUNTER_PREDATOR} +s.material_setcode=SET_PREDAPLANT +function s.selfspcostfilter(c,tp,fc) + return ((c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp)) or c:HasCounter(COUNTER_PREDATOR)) and c:IsReleasable() + and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) +end +function s.rescon(sg,e,tp,mg) + return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 and sg:IsExists(s.predaplantchkfilter,1,nil,tp) + and sg:IsExists(Card.HasCounter,1,nil,COUNTER_PREDATOR) +end +function s.predaplantchkfilter(c,tp) + return c:IsSetCard(SET_PREDAPLANT) and c:IsControler(tp) +end +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c) + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) + if #sg==2 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g then + Duel.Release(g,REASON_COST|REASON_MATERIAL) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end + local max_count=Duel.GetMatchingGroupCount(Card.HasCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,COUNTER_PREDATOR) + if chk==0 then return max_count>0 and Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,max_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305001.lua b/pre-release/c101305001.lua new file mode 100644 index 0000000000..bbfe73b131 --- /dev/null +++ b/pre-release/c101305001.lua @@ -0,0 +1,105 @@ +--超魔剣士ブラック・カオス +--Black Chaos the Ultimate Magical Swordsman +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your hand) by shuffling 1 Spellcaster or Warrior Ritual Monster from your hand or GY into the Deck + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --You can discard this card; place 1 Continuous Trap that mentions "Ritual of Light and Darkness" from your Deck or GY, face-up on your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Unaffected by your opponent's activated effects while you have a Ritual Spell in your GY + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsRitualSpell,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end) + e2:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) + c:RegisterEffect(e2) + --Once per turn: You can banish 2 cards your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.rmtg) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.spconfilter(c) + return c:IsRace(RACE_SPELLCASTER|RACE_WARRIOR) and c:IsRitualMonster() and c:IsAbleToDeckAsCost() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,1,1,nil,1,tp,HINTMSG_TODECK,nil,nil,true) + if #sg>0 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g then + local sc=g:GetFirst() + if sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + else + Duel.HintSelection(sc) + end + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) + end +end +function s.plfilter(c,tp) + return c:IsContinuousTrap() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tp) end + Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_ONFIELD) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,2,nil) + if #g==2 then + Duel.HintSelection(g) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305002.lua b/pre-release/c101305002.lua new file mode 100644 index 0000000000..920f417ac2 --- /dev/null +++ b/pre-release/c101305002.lua @@ -0,0 +1,88 @@ +--混沌の魔王-スカル・デーモン +--Skull Archfiend of Chaos +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand or GY: You can target 3 other cards in the GYs and/or face-up banishment, including a card that mentions "Ritual of Light and Darkness"; place them on the bottom of the Deck in any order, and if you do, Special Summon this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.tdsptg) + e1:SetOperation(s.tdspop) + c:RegisterEffect(e1) + --If this card is sent to the GY: You can send 1 Ritual Spell from your hand or Deck to the GY; add 1 Ritual Monster mentioned on that card from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.ListsCode,1,nil,CARD_RITUAL_OF_LIGHT_AND_DARKNESS) +end +function s.tdsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local c=e:GetHandler() + local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,c) + if chk==0 then return #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.tdspop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then + local tg_your,tg_opp=tg:Split(Card.IsControler,nil,tp) + local your_count=tg_your:FilterCount(Card.IsLocation,nil,LOCATION_DECK) + local opp_count=tg_opp:FilterCount(Card.IsLocation,nil,LOCATION_DECK) + if your_count>=2 then + Duel.SortDeckbottom(tp,tp,your_count) + end + if opp_count>=2 then + Duel.SortDeckbottom(tp,1-tp,opp_count) + end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.thcostfilter(c,tp) + return c:IsRitualSpell() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c) +end +function s.thfilter(c,rit_spell) + return c:IsRitualMonster() and rit_spell:ListsCode(c:GetCode())and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() + Duel.SendtoGrave(sc,REASON_COST) + e:SetLabelObject(sc) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabelObject()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101305003.lua b/pre-release/c101305003.lua new file mode 100644 index 0000000000..72f52e8d3e --- /dev/null +++ b/pre-release/c101305003.lua @@ -0,0 +1,95 @@ +--エルフの聖賢者 +--Mystical Celtic Sage +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can activate this effect; you can only Special Summon from the Extra Deck once for the rest of this turn, also reveal your entire hand, and if there is a card that mentions "Ritual of Light and Darkness" in it, you can draw 3 cards, then discard 2 cards + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.drtg) + e1a:SetOperation(s.drop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --You can Tribute this card; Special Summon 1 Ritual Monster that mentions "Ritual of Light and Darkness" from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfTribute) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) + Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --You can only Special Summon from the Extra Deck once for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(s.sprestrictioncon) + e1:SetOperation(s.sprestrictionop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + if Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) then return end + local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + if g:IsExists(Card.ListsCode,1,nil,CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and Duel.IsPlayerCanDraw(tp,3) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) and Duel.Draw(tp,3,REASON_EFFECT)==3 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD) + end +end +function s.sprestrictionconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsSummonLocation(LOCATION_EXTRA) +end +function s.sprestrictioncon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.sprestrictionconfilter,1,nil,tp) +end +function s.sprestrictionop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --You can only Special Summon from the Extra Deck once for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp) +end +function s.spfilter(c,e,tp) + return c:IsRitualMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(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,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101305004.lua b/pre-release/c101305004.lua new file mode 100644 index 0000000000..d3db506d7e --- /dev/null +++ b/pre-release/c101305004.lua @@ -0,0 +1,78 @@ +--グリフォー +--Gurifoh +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --(Quick Effect): You can discard this card, then activate 1 of these effects; + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --For the Ritual Summon of exactly 1 Level 8 Ritual Monster with a card effect that requires use of monsters, this card can be used as the entire Tribute + Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsLevel,8)) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.setfilter(c) + return (c:IsQuickPlaySpell() or c:IsTrap()) and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsSSetable() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=true + local b2=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(0) + elseif op==2 then + e:SetCategory(CATEGORY_SET) + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local c=e:GetHandler() + if op==1 then + --● The next battle or effect damage you take this turn will become 0 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CHANGE_DAMAGE) + e1:SetTargetRange(1,0) + e1:SetValue(s.damval) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + elseif op==2 then + --● Set 1 Quick-Play Spell or Trap that mentions "Ritual of Light and Darkness" from your Deck. It can be activated this turn + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SSet(tp,sc)>0 then + local eff_code=sc:IsQuickPlaySpell() and EFFECT_QP_ACT_IN_SET_TURN or EFFECT_TRAP_ACT_IN_SET_TURN + --It can be activated this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,4)) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(eff_code) + e2:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e2) + end + end +end +function s.damval(e,re,val,r,rp,rc) + if r&(REASON_BATTLE|REASON_EFFECT)>0 then + Duel.Hint(HINT_CARD,0,id) + e:Reset() + return 0 + end + return val +end \ No newline at end of file diff --git a/pre-release/c101305005.lua b/pre-release/c101305005.lua new file mode 100644 index 0000000000..0ce96e4a78 --- /dev/null +++ b/pre-release/c101305005.lua @@ -0,0 +1,82 @@ +--劫火の三幻魔-神炎皇ウリア +--Uria, Lord of Searing Flames - Sacred Beast of Cataclysmic Fire +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with a "Sacred Beast" card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_CONDITION) + e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) + c:RegisterEffect(e0) + --You can reveal this card in your hand; add 1 "Sacred Beast" Trap from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Gains 1000 ATK/DEF for each Trap in the GYs + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_SINGLE) + e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2a:SetCode(EFFECT_UPDATE_ATTACK) + e2a:SetRange(LOCATION_MZONE) + e2a:SetValue(function(e,c) return 1000*Duel.GetMatchingGroupCount(Card.IsTrap,0,LOCATION_GRAVE,LOCATION_GRAVE,nil) end) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2b) + --Once per turn (Quick Effect): You can target 1 Spell/Trap on the field; destroy it. Neither player can activate cards or effects in response to this effect's activation + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET) + c:RegisterEffect(e3) +end +s.listed_series={SET_SACRED_BEAST} +function s.thfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsTrap() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetChainLimit(aux.FALSE) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305006.lua b/pre-release/c101305006.lua new file mode 100644 index 0000000000..69c9fb59e4 --- /dev/null +++ b/pre-release/c101305006.lua @@ -0,0 +1,104 @@ +--罪禍の三幻魔-降雷皇ハモン +--Hamon, Lord of Striking Thunder - Sacred Beast of Sinful Catastrophe +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with a "Sacred Beast" card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_CONDITION) + e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) + c:RegisterEffect(e0) + --You can reveal this card in your hand; add 1 "Sacred Beast" Spell from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Once per turn, if a monster(s) is sent to your opponent's GY: Inflict 1000 damage to your opponent + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.damcon) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) + --If this card is destroyed by battle or card effect: You can activate this effect; you take no damage this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCondition(s.nodamcon) + e3:SetTarget(s.nodamtg) + e3:SetOperation(s.nodamop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SACRED_BEAST} +function s.thfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.damconfilter(c,opp) + return c:IsMonster() and c:IsControler(opp) +end +function s.damcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.damconfilter,1,nil,1-tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,1,tp,1-tp,1000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + Duel.Damage(1-tp,d,REASON_EFFECT) +end +function s.nodamcon(e,tp,eg,ep,ev,re,r,rp) + return (r&(REASON_EFFECT|REASON_BATTLE))>0 +end +function s.nodamtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.nodamop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --You take no damage this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CHANGE_DAMAGE) + e1:SetTargetRange(1,0) + e1:SetValue(0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/pre-release/c101305007.lua b/pre-release/c101305007.lua new file mode 100644 index 0000000000..0413793407 --- /dev/null +++ b/pre-release/c101305007.lua @@ -0,0 +1,93 @@ +--無窮の三幻魔-幻魔皇ラビエル +--Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with a "Sacred Beast" card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_CONDITION) + e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) + c:RegisterEffect(e0) + --You can reveal this card in your hand; add 1 "Sacred Beast" monster from your Deck to your hand, except "Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity", then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Once per turn (Quick Effect): You can Tribute 2 other "Sacred Beast" monsters; destroy as many monsters your opponent controls as possible, and if you do, this card gains 1000 ATK for each card destroyed by this effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(s.descost) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_SACRED_BEAST} +function s.thfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.descostfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) +end +function s.descostchk(sg,tp,exg) + return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,sg) +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,2,false,s.descostchk,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,2,2,false,s.descostchk,c) + Duel.Release(g,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),0,tp,#g*1000) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if #g==0 then return end + local ct=Duel.Destroy(g,REASON_EFFECT) + if ct==0 then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 1000 ATK for each card destroyed by this effect + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(ct*1000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101305008.lua b/pre-release/c101305008.lua new file mode 100644 index 0000000000..9de3edcbcb --- /dev/null +++ b/pre-release/c101305008.lua @@ -0,0 +1,75 @@ +--三幻魔の操世者 +--The Orchestrator of the Sacred Beasts +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand; discard 1 card, and if you do, Special Summon 1 "Sacred Beast" monster from your hand in Defense Position, except a Level 8 monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.sptg(LOCATION_HAND)) + e1:SetOperation(s.spop(LOCATION_HAND)) + c:RegisterEffect(e1) + --You can discard 1 card; Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, except a Level 8 monster or the discarded card + local e2=e1:Clone() + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.Discard(nil,false,1,1,function(e,tp,og) local oc=og:GetFirst() oc:CreateEffectRelation(e) e:SetLabelObject(oc) end)) + e2:SetTarget(s.sptg(LOCATION_HAND|LOCATION_GRAVE)) + e2:SetOperation(s.spop(LOCATION_HAND|LOCATION_GRAVE)) + c:RegisterEffect(e2) + --You can banish this card from your GY; Special Summon 1 "Sacred Beast" monster from your GY in Defense Postion, except a Level 8 monster + local e3=e2:Clone() + e3:SetDescription(aux.Stringid(id,2)) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.sptg(LOCATION_GRAVE)) + e3:SetOperation(s.spop(LOCATION_GRAVE)) + c:RegisterEffect(e3) +end +s.listed_series={SET_SACRED_BEAST} +function s.discardfilter(c,e,tp) + return c:IsDiscardable(REASON_EFFECT) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SACRED_BEAST) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) +end +function s.sptg(summon_location) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end + if summon_location==LOCATION_HAND then + return Duel.IsExistingMatchingCard(s.discardfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + else + return Duel.IsExistingMatchingCard(s.spfilter,tp,summon_location,0,1,e:GetHandler(),e,tp) + end + end + if summon_location==LOCATION_HAND then + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,summon_location) + end +end +function s.spop(summon_location) + return function(e,tp,eg,ep,ev,re,r,rp) + if summon_location==LOCATION_HAND and Duel.DiscardHand(tp,s.discardfilter,1,1,REASON_EFFECT|REASON_DISCARD,nil,e,tp)<0 then return end + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local exc=nil + if summon_location==LOCATION_HAND|LOCATION_GRAVE then + local cost_card=e:GetLabelObject() + exc=cost_card:IsRelateToEffect(e) and cost_card or nil + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,summon_location,0,1,1,exc,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 then + sc:CompleteProcedure() + end + end +end \ No newline at end of file diff --git a/pre-release/c101305009.lua b/pre-release/c101305009.lua new file mode 100644 index 0000000000..bea0672623 --- /dev/null +++ b/pre-release/c101305009.lua @@ -0,0 +1,108 @@ +--三幻魔の殉教者 +--Martyr of the Sacred Beasts +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can place 1 "Sacred Beast" Field Spell or "Sacred Beast" Continuous Spell/Trap from your Deck face-up on your field + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.pltg) + e1a:SetOperation(s.plop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --If you control another "Sacred Beast" monster: You can Special Summon 2 "Martyr of the Sacred Beasts" from your hand, Deck, and/or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --During your opponent's End Phase, if this card and a Level 10 "Sacred Beast" monster are in your GY: You can add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={id} +s.listed_series={SET_SACRED_BEAST} +function s.plfilter(c,tp,szone_chk) + return c:IsSetCard(SET_SACRED_BEAST) and not c:IsForbidden() and c:CheckUniqueOnField(tp) + and (c:IsFieldSpell() or (szone_chk and c:IsContinuousSpellTrap())) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp,szone_chk) + end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() + if sc then + if sc:IsFieldSpell() then + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + else + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SACRED_BEAST),tp,LOCATION_MZONE,0,1,e:GetHandler()) +end +function s.spfilter(c,e,tp) + return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,e,tp) + if #g==2 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thconfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsLevel(10) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305027.lua b/pre-release/c101305027.lua new file mode 100644 index 0000000000..21a55560c6 --- /dev/null +++ b/pre-release/c101305027.lua @@ -0,0 +1,89 @@ +--黒き混沌の魔術師ブラック・カオス +--Black Chaos the Dark Chaos Magician +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Unaffected by your opponent's activated effects, unless they target this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(s.immval) + c:RegisterEffect(e1) + --Spells/Traps you control cannot be destroyed, or banished, by your opponent's card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTargetRange(LOCATION_ONFIELD,0) + e2a:SetTarget(function(e,c) return c:IsSpellTrap() end) + e2a:SetValue(aux.indoval) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2b:SetCode(EFFECT_CANNOT_REMOVE) + e2b:SetTargetRange(0,1) + e2b:SetTarget(function(e,c,tp,r) return c:IsSpellTrap() and c:IsControler(e:GetHandlerPlayer()) and c:IsOnField() and r==REASON_EFFECT end) + e2b:SetValue(1) + c:RegisterEffect(e2b) + --If this card is Special Summoned: You can add 1 Spell from your GY to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,0}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) + --You can target 1 card your opponent controls; banish it (face-down) + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_REMOVE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetTarget(s.bantg) + e4:SetOperation(s.banop) + c:RegisterEffect(e4) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.immval(e,re) + if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end + local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + return not (tg and tg:IsContains(e:GetHandler())) +end +function s.thfilter(c) + return c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil,tp,POS_FACEDOWN) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305028.lua b/pre-release/c101305028.lua new file mode 100644 index 0000000000..3660da9d87 --- /dev/null +++ b/pre-release/c101305028.lua @@ -0,0 +1,74 @@ +--光と闇の戦士カオス・ソルジャー +--Black Luster Soldier - Soldier of Light and Darkness +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(1) + c:RegisterEffect(e1) + --Unaffected by your opponent's activated effects, unless they target this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(s.immval) + c:RegisterEffect(e2) + --If this card is Special Summoned: You can target 1 card your opponent controls; banish it + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,0}) + e3:SetTarget(s.bantg) + e3:SetOperation(s.banop) + c:RegisterEffect(e3) + --When this card destroys an opponent's monster by battle: You can make this card gain 1500 ATK, and if you do, it can make a second attack in a row + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_ATKCHANGE) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_BATTLE_DESTROYING) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.atkcon) + e4:SetOperation(s.atkop) + c:RegisterEffect(e4) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.immval(e,re) + if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end + local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + return not (tg and tg:IsContains(e:GetHandler())) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and c:CanChainAttack() +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToBattle() and c:UpdateAttack(1500)>0 then + Duel.ChainAttack() + end +end \ No newline at end of file diff --git a/pre-release/c101305029.lua b/pre-release/c101305029.lua new file mode 100644 index 0000000000..ac33963962 --- /dev/null +++ b/pre-release/c101305029.lua @@ -0,0 +1,91 @@ +--混沌の三幻魔 +--Phantasmal Sacred Beasts of Chaos +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Level 10 monsters that cannot be Normal Summoned/Set + Fusion.AddProcFunRep(c,s.matfilter,3,true) + --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by sending the above cards you control to the GY + c:AddMustBeFusionSummoned() + Fusion.AddContactProc(c,s.contactfil,s.contactop,false,nil,1) + --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --The first two times this card would be destroyed by card effect each turn, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(2) + e1:SetValue(function(e,re,r) return (r&REASON_EFFECT)>0 end) + c:RegisterEffect(e1) + --Once per Chain and thrice per turn (Quick Effect): You can target 1 face-up monster your opponent controls; negate its effects (until the end of this turn), then you can gain LP equal to half its ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_RECOVER) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(3) + e2:SetCost(Cost.SoftOncePerChain(id)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.matfilter(c) + return c:IsLevel(10) and not c:IsSummonableCard() +end +function s.contactfil(tp) + return Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil) +end +function s.contactop(g) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsNegatableMonster() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local tc=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + Duel.SetTargetPlayer(tp) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.floor(tc:GetAttack()/2)) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then + --Negate its effects (until the end of this turn) + tc:NegateEffects(e:GetHandler(),RESETS_STANDARD_PHASE_END) + Duel.AdjustInstantly(tc) + local lp=math.floor(tc:GetAttack()/2) + if lp>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + Duel.BreakEffect() + Duel.Recover(p,lp,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101305042.lua b/pre-release/c101305042.lua new file mode 100644 index 0000000000..3ec097b153 --- /dev/null +++ b/pre-release/c101305042.lua @@ -0,0 +1,74 @@ +--道化の一座 ドリッシュ +--Clown Crew Drish +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 Ritual, Fusion, Synchro, Xyz, and/or Pendulum Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM),2) + --Your Tribute Summoned monsters can make a second attack during each Battle Phase + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) + e1:SetValue(1) + c:RegisterEffect(e1) + --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Drish" once per turn); + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_RELEASE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsLinkMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+100) and ((Duel.IsPlayerCanDraw(tp) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil)) + or (Duel.IsPlayerCanDraw(1-tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil))) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TOEXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TODECK|CATEGORY_DRAW) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Return all Link Monsters on the field and in the GYs to the Extra Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsLinkMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) + if #g>0 then + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + elseif op==2 then + --● Each player shuffles their entire hand into the Deck, then they draw the same number of cards they shuffled + local turn_player=Duel.GetTurnPlayer() + local step=turn_player==0 and 1 or -1 + for p=turn_player,1-turn_player,step do + local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) + if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(p) then + local draw_count=Duel.GetOperatedGroup():FilterCount(Card.IsPreviousControler,nil,p) + if draw_count>0 then + Duel.ShuffleDeck(p) + Duel.BreakEffect() + Duel.Draw(p,draw_count,REASON_EFFECT) + end + end + end + end +end diff --git a/pre-release/c101305044.lua b/pre-release/c101305044.lua new file mode 100644 index 0000000000..2dc15d5147 --- /dev/null +++ b/pre-release/c101305044.lua @@ -0,0 +1,49 @@ +--光と闇の儀式 +--Ritual of Light and Darkness +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon 1 "Black Chaos the Dark Chaos Magician" or "Black Luster Soldier - Soldier of Light and Darkness" from your hand, by Tributing monsters from your hand or field, and/or banishing monsters from your GY, whose total Levels equal or exceed its Level + Ritual.AddProcGreater{ + handler=c, + filter=function(c) return c:IsCode(101305027,101305028) end, + extrafil=function(e,tp) return Duel.GetMatchingGroup(aux.AND(Card.HasLevel,Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end, + extratg=s.extratg, + desc=aux.Stringid(id,0) + } + --If this card is in your GY: You can add both this card and 1 card that mentions "Ritual of Light and Darkness" from your GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={101305027,101305028,CARD_RITUAL_OF_LIGHT_AND_DARKNESS} --"Black Chaos the Dark Chaos Magician", "Black Luster Soldier - Soldier of Light and Darkness" +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) + if #g>0 then + g:AddCard(c) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305045.lua b/pre-release/c101305045.lua new file mode 100644 index 0000000000..77f7a2dc73 --- /dev/null +++ b/pre-release/c101305045.lua @@ -0,0 +1,98 @@ +--混沌のマジック・ボックス +--Mystic Box of Chaos +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a card or effect that targets another card(s) you control: Return 1 of those cards you control to the hand (if face-down, reveal it briefly to check), and if you do, destroy 1 card on the field, then you can Special Summon 1 monster that mentions "Ritual of Light and Darkness" from your hand, with a different name than the returned card, ignoring its Summoning conditions + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(s.thdescon) + e1:SetTarget(s.thdestg) + e1:SetOperation(s.thdesop) + c:RegisterEffect(e1) + --If this card in its owner's possession is destroyed by an opponent's card: You can Special Summon 1 Ritual Monster that mentions "Ritual of Light and Darkness" from your hand or Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.thdesconfilter(c,tp) + return c:IsControler(tp) and c:IsOnField() and c:IsAbleToHand() +end +function s.thdescon(e,tp,eg,ep,ev,re,r,rp) + if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsExists(s.thdesconfilter,1,e:GetHandler(),tp) +end +function s.thdestg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.thconfilter(c,re,tp) + return c:IsRelateToEffect(re) and c:IsControler(tp) +end +function s.handspfilter(c,e,tp,code) + return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsCode(code) + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.thdesop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(s.thconfilter,nil,re,tp) + if #tg==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local sc=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil):GetFirst() + if not sc then return end + if sc:IsFaceup() then + Duel.HintSelection(sc) + else + Duel.ConfirmCards(1-tp,sc) + end + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(sc:GetControler()) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc) + if #g==0 then return end + Duel.HintSelection(g) + local code=sc:GetCode() + if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp,code) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) + end + end + end +end +function s.ritualspfilter(c,e,tp) + return c:IsRitualMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(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,s.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101305046.lua b/pre-release/c101305046.lua new file mode 100644 index 0000000000..e73647c470 --- /dev/null +++ b/pre-release/c101305046.lua @@ -0,0 +1,101 @@ +--カオスシルクハット +--Chaos Hats +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect, or a Normal Spell/Trap Card: Choose 3 Spells/Traps with different names from each other from your Deck and 1 monster in your Main Monster Zone that mentions "Ritual of Light and Darkness". Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down), Set the chosen monster, and shuffle them on the field, then your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION+CATEGORY_SET) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS,id} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and (re:IsMonsterEffect() or (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsNormalSpellTrap())) +end +function s.setfilter(c) + return c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanTurnSet() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,nil,TYPE_MONSTER|TYPE_NORMAL,0,0,8,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEDOWN_DEFENSE) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_MMZONE,0,1,nil) + end + --Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_SPSUMMON) + if #sg~=3 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local mc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_MMZONE,0,1,1,nil):GetFirst() + if not mc or mc:IsImmuneToEffect(e) then return end + Duel.HintSelection(mc) + for sc in sg:Iter() do + --Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down) + local e1=Effect.CreateEffect(sc) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetValue(TYPE_NORMAL|TYPE_MONSTER) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY) + sc:RegisterEffect(e1,true) + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_RACE) + e2:SetValue(RACE_SPELLCASTER) + sc:RegisterEffect(e2,true) + local e3=e1:Clone() + e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e3:SetValue(ATTRIBUTE_DARK) + sc:RegisterEffect(e3,true) + local e4=e1:Clone() + e4:SetCode(EFFECT_CHANGE_LEVEL) + e4:SetValue(8) + sc:RegisterEffect(e4,true) + local e5=e1:Clone() + e5:SetCode(EFFECT_SET_BASE_ATTACK) + e5:SetValue(0) + sc:RegisterEffect(e5,true) + local e6=e1:Clone() + e6:SetCode(EFFECT_SET_BASE_DEFENSE) + e6:SetValue(0) + sc:RegisterEffect(e6,true) + local e7=e1:Clone() + e7:SetCode(EFFECT_CHANGE_CODE) + e7:SetValue(id) + sc:RegisterEffect(e7,true) + end + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE) + Duel.ConfirmCards(1-tp,sg) + if mc:IsHasEffect(EFFECT_LIGHT_OF_INTERVENTION) then + Duel.ChangePosition(mc,POS_FACEUP_DEFENSE) + else + Duel.ChangePosition(mc,POS_FACEDOWN_DEFENSE) + mc:ClearEffectRelation() + end + sg:AddCard(mc) + Duel.ShuffleSetCard(sg) + --Your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" + Duel.BreakEffect() + local tg=Group.CreateGroup() + Duel.ChangeTargetCard(ev,tg) + Duel.ChangeChainOperation(ev,s.repop) +end +function s.repop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305047.lua b/pre-release/c101305047.lua new file mode 100644 index 0000000000..04e230e8c2 --- /dev/null +++ b/pre-release/c101305047.lua @@ -0,0 +1,66 @@ +--三幻魔解放 +--Unleashing the Sacred Beasts +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Add 3 "Sacred Beast" monsters with different names from your Deck to your hand, then discard 2 cards + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.th3tg) + e1:SetOperation(s.th3op) + c:RegisterEffect(e1) + --If this card is in your GY, except the turn it was sent there: You can banish it; add 1 Level 10 Pyro, Thunder, or Fiend monster that cannot be Normal Summoned/Set from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.th1tg) + e2:SetOperation(s.th1op) + c:RegisterEffect(e2) +end +s.listed_series={SET_SACRED_BEAST} +function s.th3filter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() and c:IsAbleToHand() +end +function s.th3tg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) +end +function s.th3op(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) + if #g<3 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_ATOHAND) + if #sg==3 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.th1filter(c) + return c:IsLevel(10) and c:IsRace(RACE_PYRO|RACE_THUNDER|RACE_FIEND) and not c:IsSummonableCard() + and c:IsAbleToHand() +end +function s.th1tg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.th1filter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.th1op(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.th1filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101305048.lua b/pre-release/c101305048.lua new file mode 100644 index 0000000000..8bc0dce129 --- /dev/null +++ b/pre-release/c101305048.lua @@ -0,0 +1,95 @@ +--三幻魔の失楽園 +--Fallen Paradise of the Sacred Beasts +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Thrice per turn: You can send 3 other cards of the same type (Monster, Spell, or Trap) from your hand and/or face-up field to the GY, then you can Special Summon 1 "Sacred Beast" monster from your hand, Deck, GY, or banishment, and if you do, it is unaffected by your opponent's activated Spell/Trap effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(3) + e1:SetTarget(s.gytg) + e1:SetOperation(s.gyop) + c:RegisterEffect(e1) + --If you control a "Sacred Beast" monster whose original Level is 10: You can draw 2 cards + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.drcon) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SACRED_BEAST} +function s.gyfilter(c) + return c:IsAbleToGrave() and (c:IsFaceup() or not c:IsOnField()) +end +function s.rescon(sg,e,tp,mg) + return sg:GetClassCount(Card.GetMainCardType)==1 +end +local LOCATIONS_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED +function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,e:GetHandler()) + return aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_HAND|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SACRED_BEAST) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) + and c:IsCanBeSpecialSummoned(e,0,tp,false,true) +end +function s.gyop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) + if #g<3 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TOGRAVE) + if #sg==3 and Duel.SendtoGrave(sg,REASON_EFFECT)==3 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + Duel.BreakEffect() + if Duel.SpecialSummonStep(sc,0,tp,tp,false,true,POS_FACEUP) then + --It is unaffected by your opponent's activated Spell/Trap effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() and te:IsSpellTrapEffect() end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() + end +end +function s.drconfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() +end +function s.drcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.drconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(2) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c101305049.lua b/pre-release/c101305049.lua new file mode 100644 index 0000000000..ad41f083d0 --- /dev/null +++ b/pre-release/c101305049.lua @@ -0,0 +1,83 @@ +--三幻魔の霹靂 +--Skyfire of the Sacred Beast +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --During your Main Phase: You can place 2 "Skyfire of the Sacred Beast" from your hand, Deck, and/or GY face-up on your field, then you can reveal 1 Level 10 "Sacred Beast" monster in your hand, then place 1 "Fallen Paradise of the Sacred Beasts" from your Deck face-up in your Field Zone + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --During your opponent's End Phase, if this card is in your GY: You can add it to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={id,101305048} --"Fallen Paradise of the Sacred Beasts" +s.listed_series={SET_SACRED_BEAST} +function s.selfplfilter(c,tp) + return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 + and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end +end +function s.revealfilter(c) + return c:IsLevel(10) and c:IsSetCard(SET_SACRED_BEAST) and not c:IsPublic() +end +function s.fieldplfilter(c,tp) + return c:IsCode(101305048) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) + if #g==2 then + Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + if Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil) + and Duel.IsExistingMatchingCard(s.fieldplfilter,tp,LOCATION_DECK,0,1,nil,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rg=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil) + if #rg==0 then return end + Duel.BreakEffect() + Duel.ConfirmCards(1-tp,rg) + Duel.ShuffleHand(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.fieldplfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.BreakEffect() + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + end + end + end +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305065.lua b/pre-release/c101305065.lua new file mode 100644 index 0000000000..1996311f4b --- /dev/null +++ b/pre-release/c101305065.lua @@ -0,0 +1,84 @@ +--二つの心 +--Mind Shuffle +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --During either player's turn: You can add 1 monster that mentions "Ritual of Light and Darkness" from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.AND(Cost.HardOncePerChain(id),Cost.HintSelectedEffect)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --When your opponent activates a card or effect: You can return 1 Level 7 or higher monster you control to the hand; Special Summon 1 monster with a different name from your hand that mentions "Ritual of Light and Darkness", ignoring its Summoning conditions + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_SZONE) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(Cost.AND(s.spcost,Cost.HardOncePerChain(id),Cost.HintSelectedEffect)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} +function s.thfilter(c) + return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end +end +function s.spcostfilter(c,e,tp) + return c:IsLevelAbove(7) and c:IsFaceup() and c:IsAbleToHandAsCost() and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) +end +function s.spfilter(c,e,tp,code) + return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsCode(code) + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() + Duel.HintSelection(sc) + Duel.SendtoHand(sc,nil,REASON_COST) + e:SetLabel(sc:GetCode()) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetParam(e:GetLabel()) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101305066.lua b/pre-release/c101305066.lua new file mode 100644 index 0000000000..fcd27423ce --- /dev/null +++ b/pre-release/c101305066.lua @@ -0,0 +1,69 @@ +--三幻魔合殺 +--Destruction Chant of the Sacred Beast +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, then if you control 2 or more "Sacred Beast" monsters whose original Levels are 10, you can negate the effects of 1 face-up card your opponent controls, and if you do, destroy it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --You can banish this card from your GY; Fusion Summon 1 "Phantasm" Fusion Monster from your Extra Deck, using monsters from your hand or field + local fusion_params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_PHANTASM)} + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_SACRED_BEAST,SET_PHANTASM} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + local dg=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,dg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) +end +function s.sacredbeastfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() +end +function s.spop(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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 + and Duel.IsExistingMatchingCard(s.sacredbeastfilter,tp,LOCATION_MZONE,0,2,nil) + and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if sc:IsCanBeDisabledByEffect(e) then + Duel.BreakEffect() + --Negate the effects of 1 face-up card your opponent controls, and if you do, destroy it + sc:NegateEffects(e:GetHandler(),RESET_EVENT|RESETS_STANDARD,true) + Duel.AdjustInstantly(sc) + if sc:IsDisabled() then + Duel.Destroy(sc,REASON_EFFECT) + end + end + end +end diff --git a/pre-release/c101305067.lua b/pre-release/c101305067.lua new file mode 100644 index 0000000000..21768ed66a --- /dev/null +++ b/pre-release/c101305067.lua @@ -0,0 +1,101 @@ +--三幻魔の神淵 +--Divine Abyss of the Sacred Beast +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --You can send 3 face-up "Divine Abyss of the Sacred Beast" you control to the GY, including this card, then target 1 face-up monster your opponent controls; change it to face-down Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetCost(s.poscost) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --During the Main Phase: You can place 2 "Divine Abyss of the Sacred Beast" from your hand, Deck, and/or GY face-up on your field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.pltg) + e2:SetOperation(s.plop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) + --During your opponent's End Phase, if this card is in your GY: You can place it on the bottom of the Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.IsEndPhase(1-tp) end) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + e3:SetHintTiming(0,TIMING_END_PHASE) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.poscostfilter(c) + return c:IsCode(id) and c:IsAbleToGraveAsCost() and c:IsFaceup() +end +function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) + and Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_ONFIELD,0,2,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_ONFIELD,0,2,2,c) + Duel.SendtoGrave(g+c,REASON_COST) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsMonster() then + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end +end +function s.selfplfilter(c,tp) + return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 + and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) + if #g==2 then + Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305076.lua b/pre-release/c101305076.lua new file mode 100644 index 0000000000..bab2fa209f --- /dev/null +++ b/pre-release/c101305076.lua @@ -0,0 +1,96 @@ +--道化の一座『終演』 +--Clown Crew "Finale" +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --If you control a Tribute Summoned monster: Discard any number of cards, then target that many face-up cards on the field; destroy them + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) end) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetCountLimit(1,{id,0}) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --You can banish this card from your GY and Tribute 1 Ritual, Fusion, Synchro, Xyz, Pendulum, or Link Monster from your hand or field; add 1 "Clown Crew" monster from your Deck or GY to your hand with a different original Level/Rank/Link Rating than the Tributed monster's + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCost(Cost.AND(Cost.SelfBanish,s.thcost)) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-1) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end + local max_target_count=Duel.GetTargetCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) + local discard_count=Duel.DiscardHand(tp,nil,1,max_target_count,REASON_COST|REASON_DISCARD,nil) + e:SetLabel(discard_count) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=c end + if chk==0 then + local cost_chk=e:GetLabel()==-1 + e:SetLabel(0) + return cost_chk and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) + end + local target_count=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,target_count,target_count,c) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end +function s.rating(c) + if c:IsLinkMonster() then return c:GetLink() + elseif c:IsXyzMonster() then return c:GetOriginalRank() + else return c:GetOriginalLevel() end +end +function s.thcostfilter(c,tp) + return c:IsType(TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM|TYPE_LINK) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,s.rating(c)) +end +function s.thfilter(c,lv) + return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsAbleToHand() and s.rating(c)~=lv +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-1) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp) end + local sc=Duel.SelectReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp):GetFirst() + Duel.Release(sc,REASON_COST) + e:SetLabel(s.rating(sc)) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local cost_chk=e:GetLabel()==-1 + e:SetLabel(0) + return cost_chk + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e:GetLabel()):GetFirst() + if sc then + if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end + Duel.SendtoHand(sc,nil,REASON_EFFECT) + if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end + end +end \ No newline at end of file diff --git a/pre-release/c101305127.lua b/pre-release/c101305127.lua new file mode 100644 index 0000000000..e8cd3d508a --- /dev/null +++ b/pre-release/c101305127.lua @@ -0,0 +1,3 @@ +--黒き混沌の魔術師ブラック・カオス +--Black Chaos the Dark Chaos Magician +Duel.LoadCardScriptAlias(101305027) \ No newline at end of file diff --git a/pre-release/c101305128.lua b/pre-release/c101305128.lua new file mode 100644 index 0000000000..da3294bfb0 --- /dev/null +++ b/pre-release/c101305128.lua @@ -0,0 +1,3 @@ +--光と闇の戦士カオス・ソルジャー +--Black Luster Soldier - Soldier of Light and Darkness +Duel.LoadCardScriptAlias(101305028) \ No newline at end of file diff --git a/pre-release/c101305129.lua b/pre-release/c101305129.lua new file mode 100644 index 0000000000..ad7d79c3f4 --- /dev/null +++ b/pre-release/c101305129.lua @@ -0,0 +1,3 @@ +--混沌の三幻魔 +--Phantasmal Sacred Beasts of Chaos +Duel.LoadCardScriptAlias(101305029) \ No newline at end of file