From a63244ed0e0ddb04afb54f16c19477f5d99c8773 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:02:25 +0200 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c100295121.lua | 111 ----------------------------- pre-release/c100452001.lua | 94 ------------------------- pre-release/c100452002.lua | 111 ----------------------------- pre-release/c100452003.lua | 80 --------------------- pre-release/c100452004.lua | 69 ------------------ pre-release/c100452005.lua | 58 --------------- pre-release/c100452006.lua | 87 ----------------------- pre-release/c100452007.lua | 94 ------------------------- pre-release/c100452008.lua | 111 ----------------------------- pre-release/c100452009.lua | 100 -------------------------- pre-release/c100452010.lua | 97 ------------------------- pre-release/c100452011.lua | 89 ----------------------- pre-release/c100452012.lua | 93 ------------------------ pre-release/c100452013.lua | 76 -------------------- pre-release/c100452014.lua | 80 --------------------- pre-release/c100452015.lua | 87 ----------------------- pre-release/c100452016.lua | 77 -------------------- pre-release/c100452017.lua | 94 ------------------------- pre-release/c100452018.lua | 103 --------------------------- 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/c100455001.lua | 84 ---------------------- pre-release/c100455002.lua | 58 --------------- pre-release/c100455003.lua | 85 ---------------------- pre-release/c100455005.lua | 89 ----------------------- pre-release/c100455006.lua | 96 ------------------------- 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/c101305010.lua | 120 ------------------------------- pre-release/c101305011.lua | 83 ---------------------- pre-release/c101305012.lua | 80 --------------------- pre-release/c101305013.lua | 83 ---------------------- pre-release/c101305014.lua | 83 ---------------------- pre-release/c101305018.lua | 93 ------------------------ pre-release/c101305019.lua | 89 ----------------------- pre-release/c101305023.lua | 109 ---------------------------- pre-release/c101305027.lua | 89 ----------------------- pre-release/c101305028.lua | 74 ------------------- pre-release/c101305029.lua | 91 ------------------------ pre-release/c101305037.lua | 96 ------------------------- pre-release/c101305042.lua | 74 ------------------- pre-release/c101305043.lua | 107 ---------------------------- 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/c101305050.lua | 89 ----------------------- pre-release/c101305051.lua | 123 -------------------------------- pre-release/c101305052.lua | 101 -------------------------- pre-release/c101305057.lua | 66 ----------------- pre-release/c101305060.lua | 89 ----------------------- pre-release/c101305065.lua | 84 ---------------------- pre-release/c101305066.lua | 69 ------------------ pre-release/c101305067.lua | 101 -------------------------- pre-release/c101305068.lua | 90 ----------------------- pre-release/c101305069.lua | 97 ------------------------- pre-release/c101305073.lua | 81 --------------------- pre-release/c101305076.lua | 96 ------------------------- pre-release/c101305127.lua | 3 - pre-release/c101305128.lua | 3 - pre-release/c101305129.lua | 3 - 78 files changed, 6732 deletions(-) delete mode 100644 pre-release/c100295121.lua delete mode 100644 pre-release/c100452001.lua delete mode 100644 pre-release/c100452002.lua delete mode 100644 pre-release/c100452003.lua delete mode 100644 pre-release/c100452004.lua delete mode 100644 pre-release/c100452005.lua delete mode 100644 pre-release/c100452006.lua delete mode 100644 pre-release/c100452007.lua delete mode 100644 pre-release/c100452008.lua delete mode 100644 pre-release/c100452009.lua delete mode 100644 pre-release/c100452010.lua delete mode 100644 pre-release/c100452011.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/c100452015.lua delete mode 100644 pre-release/c100452016.lua delete mode 100644 pre-release/c100452017.lua delete mode 100644 pre-release/c100452018.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/c100455001.lua delete mode 100644 pre-release/c100455002.lua delete mode 100644 pre-release/c100455003.lua delete mode 100644 pre-release/c100455005.lua delete mode 100644 pre-release/c100455006.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/c101305010.lua delete mode 100644 pre-release/c101305011.lua delete mode 100644 pre-release/c101305012.lua delete mode 100644 pre-release/c101305013.lua delete mode 100644 pre-release/c101305014.lua delete mode 100644 pre-release/c101305018.lua delete mode 100644 pre-release/c101305019.lua delete mode 100644 pre-release/c101305023.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/c101305037.lua delete mode 100644 pre-release/c101305042.lua delete mode 100644 pre-release/c101305043.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/c101305050.lua delete mode 100644 pre-release/c101305051.lua delete mode 100644 pre-release/c101305052.lua delete mode 100644 pre-release/c101305057.lua delete mode 100644 pre-release/c101305060.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/c101305068.lua delete mode 100644 pre-release/c101305069.lua delete mode 100644 pre-release/c101305073.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/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/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/c100452003.lua b/pre-release/c100452003.lua deleted file mode 100644 index 4c48558026..0000000000 --- a/pre-release/c100452003.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ドラゴン・導きの呼笛 ---The Flute of Guiding Dragon ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If a Spellcaster monster is on the field: Special Summon 1 Level 5 or higher Dragon monster from your Deck, then if your opponent controls 2 or more monsters, you can Special Summon 1 monster from your Deck with the same name as the Summoned monster, also you cannot Special Summon for the rest of this turn, except Dragon or Spellcaster monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During your Main Phase 2, if this card is in your GY because it was sent there this turn: You can banish it; draw 1 card - 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_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) local c=e:GetHandler() return Duel.IsMainPhase2() and c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelAbove(5) 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_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.samenamespfilter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2 then - local code=sc:GetCode() - if Duel.IsExistingMatchingCard(s.samenamespfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.samenamespfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end - end - --You cannot Special Summon for the rest of this turn, except Dragon or Spellcaster 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:IsRaceExcept(RACE_DRAGON|RACE_SPELLCASTER) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -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/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/c100452005.lua b/pre-release/c100452005.lua deleted file mode 100644 index 2b104596de..0000000000 --- a/pre-release/c100452005.lua +++ /dev/null @@ -1,58 +0,0 @@ ---機光竜-サイバー・ドラゴン ---Revolution Cyber Dragon -local s,id=GetID() -function s.initial_effect(c) - --If you control no monsters, you can Special Summon this card (from your hand) - 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.spcon) - c:RegisterEffect(e1) - --If this card is Special Summoned: You can target 1 face-up monster your opponent controls; negate its effects until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,0}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --During your Main Phase: You can Fusion Summon 1 Machine Fusion Monster from your Extra Deck, using this card you control and monsters from your hand or field - local fusion_params={ - fusfilter=function(c) return c:IsRace(RACE_MACHINE) end, - gc=Fusion.ForcedHandler - } - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(Fusion.SummonEffTG(fusion_params)) - e3:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e3) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -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 g=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --Negate its effects until the end of this turn - tc:NegateEffects(e:GetHandler(),RESETS_STANDARD_PHASE_END) - end -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/c100452008.lua b/pre-release/c100452008.lua deleted file mode 100644 index 72dab7d0d5..0000000000 --- a/pre-release/c100452008.lua +++ /dev/null @@ -1,111 +0,0 @@ ---スカーレッド・ノヴァ・ドラゴン-バーニング・ソウル ---Red Nova Dragon - Burning Soul ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedue: 2 Tuners + 1 non-Tuner - Synchro.AddProcedure(c,nil,2,2,Synchro.NonTuner(nil),1,1) - --Must be either Synchro Summoned, or Special Summoned (from your Extra Deck) by banishing 2 Tuners and 1 "Red Dragon Archfiend" from your GY - c:AddMustBeSynchroSummoned() - 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.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --If this card is Special Summoned: You can add 1 card from your GY to your hand, and if you do, this card gains 2000 ATK. You can only use this effect of "Red Nova Dragon - Burning Soul" once per Duel, and only during a Duel you Synchro Summoned "Red Dragon Archfiend" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_TOHAND+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,EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Track Synchro Summons of "Red Dragon Archfiend" - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(s.regop) - Duel.RegisterEffect(ge1,0) - end) - --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) - --Multiple Tuners - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_MULTIPLE_TUNERS) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.spcostfilter(c) - return (c:IsType(TYPE_TUNER) or c:IsCode(CARD_RED_DRAGON_ARCHFIEND)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) -end -function s.rescon(sg,e,tp,mg) - return Duel.GetMZoneCount(tp,sg)>0 and sg:IsExists(Card.IsType,2,nil,TYPE_TUNER) and sg:IsExists(Card.IsCode,1,nil,CARD_RED_DRAGON_ARCHFIEND) -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,3,3,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,3,3,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.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,2000) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - local c=e:GetHandler() - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) - and c:IsRelateToEffect(e) and c:IsFaceup() then - --This card gains 2000 ATK - c:UpdateAttack(2000) - end -end -function s.regopfilter(c,sp) - return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and c:IsSummonPlayer(sp) and c:IsSynchroSummoned() and c:IsFaceup() -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(0,id) and Duel.HasFlagEffect(1,id) then return end - for sp=0,1 do - if eg:IsExists(s.regopfilter,1,nil,sp) then - Duel.RegisterFlagEffect(sp,id,0,0,1) - end - 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/c100452011.lua b/pre-release/c100452011.lua deleted file mode 100644 index 6b4850c9b2..0000000000 --- a/pre-release/c100452011.lua +++ /dev/null @@ -1,89 +0,0 @@ ---銀河眼の輝光子竜 ---Galaxy-Eyes Photon Change Dragon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by Tributing 2 face-up monsters on either field with 2000 or more ATK, including a monster you control. You can only Special Summon "Galaxy-Eyes Photon Change Dragon" once per turn this way - 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:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --During the Main Phase (Quick Effect): You can banish this card you control; Special Summon 1 "Galaxy-Eyes Photon Dragon" from your Deck or GY, then you can banish 1 monster your opponent controls that was Special Summoned from the Extra Deck until the End Phase. You can only use this effect of "Galaxy-Eyes Photon Change Dragon" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.gepdsptg) - e2:SetOperation(s.gepdspop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_names={CARD_GALAXYEYES_P_DRAGON} -function s.selfspcostfilter(c) - return c:IsAttackAbove(2000) and c:IsFaceup() and c:IsReleasable() -end -function s.rescon(sg,e,tp,mg) - return Duel.GetMZoneCount(tp,sg)>0 and sg:IsExists(Card.IsControler,1,nil,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) - return #g>0 and 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) - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) - if #sg>0 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) - end -end -function s.gepdspfilter(c,e,tp) - return c:IsCode(CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gepdsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.gepdspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE) -end -function s.rmvfilter(c) - return c:IsSummonLocation(LOCATION_EXTRA) and c:IsAbleToRemove() -end -function s.gepdspop(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.gepdspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.IsExistingMatchingCard(s.rmvfilter,tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.rmvfilter,tp,0,LOCATION_MZONE,1,1,nil) - if #rg>0 then - Duel.HintSelection(rg) - Duel.BreakEffect() - --Banish 1 monster your opponent controls that was Special Summoned from the Extra Deck until the End Phase - aux.RemoveUntil(rg,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) - 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/c100452015.lua b/pre-release/c100452015.lua deleted file mode 100644 index 6db162a095..0000000000 --- a/pre-release/c100452015.lua +++ /dev/null @@ -1,87 +0,0 @@ ---四天の龍 ダーク・リベリオン・エクシーズ・ドラゴン ---Dark Rebellion Xyz Dragon of the Four Heavenly Dragons ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 DARK monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),4,2) - --If this card is Special Summoned: You can target an equal number of cards on each field; destroy them - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - 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.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --When your opponent activates a card or effect (Quick Effect): You can detach 1 material from this card; Special Summon 1 Rank 4 DARK Xyz Monster from your Extra Deck, using this card you control (this is treated as an Xyz Summon, transfer this card's materials) - 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_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(Cost.DetachFromSelf(1)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS} -function s.desrescon(maxc) - return function(sg,e,tp,mg) - local ct1=sg:FilterCount(Card.IsControler,nil,tp) - local ct2=#sg-ct1 - return ct1==ct2,ct1>maxc or ct2>maxc - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetTargetGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local ct=g:FilterCount(Card.IsControler,nil,tp) - local rescon=s.desrescon(math.min(ct,#g-ct)) - local tg=aux.SelectUnselectGroup(g,e,tp,2,#g,rescon,1,tp,HINTMSG_DESTROY,rescon) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,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 -function s.spfilter(c,e,tp,mc) - return c:IsRank(4) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzMonster() and mc:IsCanBeXyzMaterial(c,tp) - and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e) then - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - if not ((#pg<=0 or (#pg==1 and 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,c):GetFirst() - if xyz then - xyz:SetMaterial(c) - Duel.Overlay(xyz,c) - if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - xyz:CompleteProcedure() - end - 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/c100452018.lua b/pre-release/c100452018.lua deleted file mode 100644 index 4ca3b09c07..0000000000 --- a/pre-release/c100452018.lua +++ /dev/null @@ -1,103 +0,0 @@ ---トリプル・ヴァレル・リボルブ ---Triple Borrel Launch ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects (but you can only use each effect of "Triple Borrel Launch" once per turn); - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_ROKKET} -function s.tdfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil) - --● Shuffle 1 Dragon monster from your GY into the Deck, then you can Special Summon 1 "Rokket" monster with a different name from your Deck - local b1=not Duel.HasFlagEffect(tp,id) and #dg>=1 - --● Shuffle 2 Dragon monsters from your GY into the Deck, then add 1 Field Spell from your GY to your hand - local b2=not Duel.HasFlagEffect(tp,id+100) and #dg>=2 - and Duel.IsExistingMatchingCard(aux.AND(Card.IsFieldSpell,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,nil) - --● Shuffle 3 Dragon monsters from your GY into the Deck, then shuffle up to 3 monsters from your opponent's GY into the Deck - local b3=not Duel.HasFlagEffect(tp,id+200) and #dg>=3 - and Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,nil) - 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) - if op==1 then - e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - elseif op==3 then - e:SetCategory(CATEGORY_TODECK) - Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,4,PLAYER_ALL,LOCATION_GRAVE) - end -end -function s.spfilter(c,e,tp,code) - return c:IsSetCard(SET_ROKKET) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil) - if op==1 then - --● Shuffle 1 Dragon monster from your GY into the Deck, then you can Special Summon 1 "Rokket" monster with a different name from your Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local gc=dg:Select(tp,1,1,nil):GetFirst() - if not gc then return end - Duel.HintSelection(gc) - if Duel.SendtoDeck(gc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp,gc:GetCode()) - if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=sg:Select(tp,1,1,nil) - if sc then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end - elseif op==2 then - --● Shuffle 2 Dragon monsters from your GY into the Deck, then add 1 Field Spell from your GY to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=dg:Select(tp,2,2,nil) - if #g~=2 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFieldSpell,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,1,nil) - if #hg>0 then - Duel.HintSelection(hg) - Duel.BreakEffect() - Duel.SendtoHand(hg,nil,REASON_EFFECT) - end - elseif op==3 then - --● Shuffle 3 Dragon monsters from your GY into the Deck, then shuffle up to 3 monsters from your opponent's GY into the Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=dg:Select(tp,3,3,nil) - if #g~=3 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,3,nil) - if #sg>0 then - Duel.HintSelection(sg) - Duel.BreakEffect() - Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - 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/c100455001.lua b/pre-release/c100455001.lua deleted file mode 100644 index 235f841c24..0000000000 --- a/pre-release/c100455001.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ファニー・ダーク・ラビット ---Funny Dark Rabbit ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetOperation(s.regop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --This card is treated as a Toon monster while "Toon World" is on the field - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) - e2:SetValue(TYPE_TOON) - c:RegisterEffect(e2) - --Once per turn: You can add to your hand or place face-up on your field, 1 "Toon" Field or Continuous Spell from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.thpltg) - e3:SetOperation(s.thplop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_TOON_WORLD} -s.listed_series={SET_TOON} -function s.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:ListsCode(CARD_TOON_WORLD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thplfilter(c,tp,szone_chk) - return c:IsSetCard(SET_TOON) and (c:IsContinuousSpell() or c:IsFieldSpell()) and (c:IsAbleToHand() - or (c:CheckUniqueOnField(tp) and not c:IsForbidden() and (c:IsFieldSpell() or szone_chk))) -end -function s.thpltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thplfilter,tp,LOCATION_DECK,0,1,nil,tp,Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thplop(e,tp,eg,ep,ev,re,r,rp) - local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,s.thplfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() - if sc then - aux.ToHandOrElse(sc,tp, - function(sc) - return szone_chk or sc:IsFieldSpell() - end, - function(sc) - 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, - aux.Stringid(id,4) - ) - end -end \ No newline at end of file diff --git a/pre-release/c100455002.lua b/pre-release/c100455002.lua deleted file mode 100644 index 0ed2f4fc9e..0000000000 --- a/pre-release/c100455002.lua +++ /dev/null @@ -1,58 +0,0 @@ ---コミックキャット ---Comic Cat ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --This card is treated as a Toon monster while "Toon World" is on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) - e1:SetValue(TYPE_TOON) - c:RegisterEffect(e1) - --During the Main Phase (Quick Effect): You can Tribute 1 monster (if you control "Toon World", you can Tribute 1 monster your opponent controls, even though you do not control it), and if you do, Special Summon 1 monster that mentions "Toon World" from your hand or Deck, ignoring its Summoning conditions - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_names={CARD_TOON_WORLD} -function s.tribfilter(c,tp) - return c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:ListsCode(CARD_TOON_WORLD) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 - return Duel.IsExistingMatchingCard(s.tribfilter,tp,LOCATION_MZONE,opp_location,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,PLAYER_EITHER,LOCATION_MZONE) - 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) - local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectMatchingCard(tp,s.tribfilter,tp,LOCATION_MZONE,opp_location,1,1,nil,tp) - if #rg==0 then return end - Duel.HintSelection(rg) - if Duel.Release(rg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100455003.lua b/pre-release/c100455003.lua deleted file mode 100644 index d9cd4a633c..0000000000 --- a/pre-release/c100455003.lua +++ /dev/null @@ -1,85 +0,0 @@ ---エビル・ボックス ---Evil Box ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you control "Toon World": You can Special Summon this card from your hand, then you can add to your hand or Set 1 "Toon" Trap from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --This card is treated as a Toon monster while "Toon World" is on the field - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) - e2:SetValue(TYPE_TOON) - c:RegisterEffect(e2) - --Once per turn (Quick Effect): You can target 1 card in either GY; place it on the bottom of the Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TODECK) - 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.tdtg) - e3:SetOperation(s.tdop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_names={CARD_TOON_WORLD} -s.listed_series={SET_TOON} -function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) -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) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -end -function s.thsetfilter(c) - return c:IsSetCard(SET_TOON) and c:IsTrap() and (c:IsAbleToHand() or c:IsSSetable()) -end -function s.selfspop(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 - and Duel.IsExistingMatchingCard(s.thsetfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,s.thsetfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if not sc then return end - aux.ToHandOrElse(sc,tp, - Card.IsSSetable, - function(c) - Duel.SSet(tp,sc) - end, - aux.Stringid(id,4) - ) - end -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100455005.lua b/pre-release/c100455005.lua deleted file mode 100644 index 583c2fe9f3..0000000000 --- a/pre-release/c100455005.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ブルーアイズ・トゥーン・アルティメットドラゴン ---Blue-Eyes Toon Ultimate Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Blue-Eyes Toon Dragon" + 2 Toon monsters - Fusion.AddProcMixN(c,true,true,53183600,1,s.toonmatfilter,2) - --Must be Special Summoned (from your Extra Deck) by shuffling the above cards from your hand, field, and/or GY into the Deck/Extra Deck - Fusion.AddContactProc(c,s.contactfil,s.contactop,true) - --Your Toon monsters can attack directly - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsType(TYPE_TOON) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, 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_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --During damage calculation, if your Toon monster is attacked: You can banish it until the end of the Damage Step - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(s.rmcon) - e3:SetTarget(s.rmtg) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) -end -s.listed_names={53183600} --"Blue-Eyes Toon Dragon" -s.listed_series={SET_TOON} -function s.toonmatfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_TOON,fc,sumtype,tp) and c:IsMonster() -end -function s.contactfil(tp) - return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) -end -function s.contactop(g,tp) - local fu,fd=g:Split(Card.IsFaceup,nil) - if #fu>0 then Duel.HintSelection(fu) end - if #fd>0 then Duel.ConfirmCards(1-tp,fd) end - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) -end -function s.thfilter(c) - return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) 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.rmcon(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - return bc and bc:IsControler(tp) and bc:IsType(TYPE_TOON) and bc:IsAbleToRemove() -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,Duel.GetAttackTarget(),1,tp,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - if bc and bc:IsRelateToBattle() then - --Banish it until the end of the Damage Step - local temp_banish_eff=aux.RemoveUntil(bc,nil,REASON_EFFECT,PHASE_DAMAGE,id,e,tp,aux.DefaultFieldReturnOp) - local e1=temp_banish_eff:Clone() - e1:SetCode(EVENT_DAMAGE_STEP_END) - Duel.RegisterEffect(e1,tp) - temp_banish_eff:Reset() - end -end \ No newline at end of file diff --git a/pre-release/c100455006.lua b/pre-release/c100455006.lua deleted file mode 100644 index 478b7543ea..0000000000 --- a/pre-release/c100455006.lua +++ /dev/null @@ -1,96 +0,0 @@ ---完全なる世界 トゥーン・ワールド ---Toon World the Perfect World ---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) - --This card's name becomes "Toon World" while in the Field Zone - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_FZONE) - e1:SetValue(CARD_TOON_WORLD) - c:RegisterEffect(e1) - --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, from your Deck to your hand. You can only use this effect of "Toon World the Perfect World" thrice per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(3,id) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Before resolving another activated card or effect, you can banish 1 Toon monster you control until immediately after that card/effect resolves, also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_FZONE) - e3:SetCondition(s.rmcon) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) - --Keep track of already banished cards - aux.GlobalCheck(s,function() - s.name_list={} - s.name_list[0]={} - s.name_list[1]={} - aux.AddValuesReset(function() - s.name_list[0]={} - s.name_list[1]={} - end) - end) -end -s.listed_names={CARD_TOON_WORLD} -s.listed_series={SET_TOON} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:HasFlagEffect(id) end - c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) -end -function s.thfilter(c) - return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) 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.rmfilter(c,tp) - return c:IsType(TYPE_TOON) and c:IsFaceup() and c:IsAbleToRemove() and not s.name_list[tp][c:GetOriginalCodeRule()] -end -function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActivated() and re:GetHandler()~=e:GetHandler() - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE,0,1,nil,tp) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,0,nil,tp) - if #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then - Duel.Hint(HINT_CARD,0,id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sc=g:Select(tp,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --Banish 1 Toon monster you control until immediately after that card/effect resolves - local temp_banish_eff=aux.RemoveUntil(sc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp,nil,RESET_CHAIN) - local e1=temp_banish_eff:Clone() - e1:SetCode(EVENT_CHAIN_SOLVED) - Duel.RegisterEffect(e1,tp) - temp_banish_eff:Reset() - --Also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn - s.name_list[tp][sc:GetOriginalCodeRule()]=true - end - 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 9de3edcbcb..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 \ No newline at end of file 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/c101305010.lua b/pre-release/c101305010.lua deleted file mode 100644 index d01a2dca14..0000000000 --- a/pre-release/c101305010.lua +++ /dev/null @@ -1,120 +0,0 @@ ---ウィスカ・ブリッツクリーク ---Wisca Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If a card(s) was destroyed by your "Blitzclique" card's effect this turn (Quick Effect): You can reveal this card in your hand; Special Summon up to 3 Thunder monsters from your hand, then you can destroy up to that many cards on the field, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Track destroyed cards - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(s.descheckop) - Duel.RegisterEffect(ge1,0) - end) - --When a monster effect is activated, except in the hand (Quick Effect): You can return 1 other Thunder monster you control to the hand; negate the activation, and if you do, destroy the activating monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.descheckop(e,tp,eg,ep,ev,re,r,rp) - if not re then return end - local rc=re:GetHandler() - if rc and rc:IsSetCard(SET_BLITZCLIQUE) then - Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) - end -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>0 then - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,math.min(ft,3),nil,e,tp) - if #g>0 then - local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if ct>0 then - local fg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if #fg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=fg:Select(tp,1,ct,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end - end - end - end - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)~=LOCATION_HAND -end -function s.negcostfilter(c) - return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_MZONE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_MZONE,0,1,1,c) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_NEGATE,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.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305011.lua b/pre-release/c101305011.lua deleted file mode 100644 index e6c1787a5d..0000000000 --- a/pre-release/c101305011.lua +++ /dev/null @@ -1,83 +0,0 @@ ---サージ・ブリッツクリーク ---Surge Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand, then target 1 monster on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" monster from your Deck to your hand, except "Surge Blitzclique" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_BLITZCLIQUE} -function s.desfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -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.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and not c:IsCode(id) 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 \ No newline at end of file diff --git a/pre-release/c101305012.lua b/pre-release/c101305012.lua deleted file mode 100644 index ad598c3a0a..0000000000 --- a/pre-release/c101305012.lua +++ /dev/null @@ -1,80 +0,0 @@ ---クラック・ブリッツクリーク ---Crack Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect on the field during their turn (Quick Effect): You can reveal this card in your hand; destroy that monster, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.descon) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can send 1 "Blitzclique" Spell/Trap from your Deck to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and rp==1-tp and re:IsMonsterEffect() and re:GetHandler():IsRelateToEffect(re) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(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_DESTROY,re:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and Duel.Destroy(rc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.tgfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpellTrap() and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305013.lua b/pre-release/c101305013.lua deleted file mode 100644 index 60965c86a4..0000000000 --- a/pre-release/c101305013.lua +++ /dev/null @@ -1,83 +0,0 @@ ---グレイン・ブリッツクリーク ---Grain Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand, then target 1 Spell/Trap on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={101305050} --Kowloon, Citadel of the Sky -s.listed_series={SET_BLITZCLIQUE} -function s.desfilter(c,tp) - return c:IsSpellTrap() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -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.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(101305050)) 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 \ No newline at end of file diff --git a/pre-release/c101305014.lua b/pre-release/c101305014.lua deleted file mode 100644 index ae1e3f1487..0000000000 --- a/pre-release/c101305014.lua +++ /dev/null @@ -1,83 +0,0 @@ ---エミ・ブリッツクリーク ---Emi Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If this card is added to your hand, except by drawing it: You can reveal it, then target 1 card on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return not e:GetHandler():IsReason(REASON_DRAW) end) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Trap from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.desfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -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.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) 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) -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 \ No newline at end of file diff --git a/pre-release/c101305018.lua b/pre-release/c101305018.lua deleted file mode 100644 index 45c791b1ba..0000000000 --- a/pre-release/c101305018.lua +++ /dev/null @@ -1,93 +0,0 @@ ---幻影騎士団ディケイクローク ---The Phantom Knights of Decayed Cloak ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --You can reveal 1 other "The Phantom Knights" card in your hand; 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:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.Reveal(function(c) return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsPublic() end,true)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can add 1 "The Phantom Knights" monster from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --You can banish this card from your GY, then target 1 Xyz Monster you control; this turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.xyztg) - e3:SetOperation(s.xyzop) - c:RegisterEffect(e3) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS} -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.thfilter(c) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() 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) - end -end -function s.xyzfilter(c) - return c:IsXyzMonster() and c:IsFaceup() and not c:HasFlagEffect(id) -end -function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.xyzfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.xyzop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) - --This turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(function(e,c,rc) return c:GetRank() end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305019.lua b/pre-release/c101305019.lua deleted file mode 100644 index 920dc62e37..0000000000 --- a/pre-release/c101305019.lua +++ /dev/null @@ -1,89 +0,0 @@ ---幻影騎士団ドゥームソルレット ---The Phantom Knights of Doomed Solleret ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If you control no monsters, you can Special Summon this card (from your hand). You can only Special Summon "The Phantom Knights of Doomed Solleret" once per turn this way - 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:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can Set 1 "The Phantom Knights" Spell/Trap from your Deck - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_SET) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.settg) - e2a:SetOperation(s.setop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --You can banish this card from your GY, then target up to 2 Level/Rank 3 DARK monsters you control; increase their Levels/Ranks by 1 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function s.setfilter(c) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end -function s.lvfilter(c) - return (c:IsLevel(3) or c:IsRank(3)) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,2,nil) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) - if #tg==0 then return end - local c=e:GetHandler() - for tc in tg:Iter() do - --Increase their Levels/Ranks by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - if tc:HasLevel() then - e1:SetCode(EFFECT_UPDATE_LEVEL) - else - e1:SetCode(EFFECT_UPDATE_RANK) - end - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305023.lua b/pre-release/c101305023.lua deleted file mode 100644 index 9e4a313117..0000000000 --- a/pre-release/c101305023.lua +++ /dev/null @@ -1,109 +0,0 @@ ---繋星の雷后 ---Astrolasma Urania ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by returning up to 2 monsters you control to the hand. You can only Special Summon "Astrolasma Urania" once per turn this way - 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:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Special Summoned: You can reveal any number of monsters with different Levels in your hand, then target that many face-up cards your opponent controls; negate their effects - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.discost) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --If this card on the field is destroyed by card effect and sent to the 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) - return #g>0 and Duel.GetMZoneCount(tp,g)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.ChkfMMZ(1),1,tp,HINTMSG_RTOHAND,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 - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.discostfilter(c) - return c:IsMonster() and c:HasLevel() and not c:IsPublic() -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.discostfilter,tp,LOCATION_HAND,0,nil) - local max_target_count=Duel.GetTargetCount(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 and max_target_count>0 end - local max_reveal_count=math.min(max_target_count,g:GetClassCount(Card.GetLevel)) - local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_CONFIRM) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - e:SetLabel(#sg) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end - if chk==0 then return true end - local target_count=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,target_count,target_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,target_count,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - local c=e:GetHandler() - for tc in tg:Iter() do - --Negate their effects - tc:NegateEffects(c,nil,true) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) -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/c101305037.lua b/pre-release/c101305037.lua deleted file mode 100644 index d69cd09fd5..0000000000 --- a/pre-release/c101305037.lua +++ /dev/null @@ -1,96 +0,0 @@ ---幻影騎士団マレヴォレンスサイス ---The Phantom Knights of Malevolent Scythe ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 3 DARK monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,2) - --You can detach 1 material from this card; Special Summon 1 "The Phantom Knights" monster from your Deck - 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:SetCost(Cost.DetachFromSelf(1)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If you Xyz Summon an "Xyz Dragon" monster while this card is in the Monster Zone: You can add 1 "Rank-Up-Magic" Spell 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_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.deckthcon) - e2:SetTarget(s.deckthtg) - e2:SetOperation(s.deckthop) - c:RegisterEffect(e2) - --If this card is destroyed: You can add 1 of your banished "The Phantom Knights" cards to your hand, except an Xyz Monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.banthtg) - e3:SetOperation(s.banthop) - c:RegisterEffect(e3) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON,SET_RANK_UP_MAGIC} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) 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_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,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.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.deckthconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsXyzSummoned() and c:IsSetCard(SET_XYZ_DRAGON) and c:IsFaceup() -end -function s.deckthcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.deckthconfilter,1,nil,tp) -end -function s.deckthfilter(c) - return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - end -end -function s.banthfilter(c) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsXyzMonster() and c:IsFaceup() and c:IsAbleToHand() -end -function s.banthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.banthfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) -end -function s.banthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.banthfilter,tp,LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - 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/c101305043.lua b/pre-release/c101305043.lua deleted file mode 100644 index 66ded9a6fc..0000000000 --- a/pre-release/c101305043.lua +++ /dev/null @@ -1,107 +0,0 @@ ---ぜんなのついなぎひめ ---Zenna-no-Tsuinagihime ---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) - --You can also use 1 monster in your hand as material to Link Summon this card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EXTRA_MATERIAL) - e0:SetRange(LOCATION_EXTRA) - e0:SetTargetRange(1,0) - e0:SetOperation(function(c,e,tp,sg,mg,lc,og,chk) return sg:FilterCount(Card.HasFlagEffect,nil,id)<=1 end) - e0:SetValue(s.extraval) - c:RegisterEffect(e0) - --If this card is Link Summoned: You can send 1 monster from your Deck to the GY, or if this card was Link Summoned using only monsters you control, you can send 1 monster from your Extra Deck to the GY instead - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOGRAVE) - 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:SetTarget(s.tgtg) - e1a:SetOperation(s.tgop) - c:RegisterEffect(e1a) - local e1b=Effect.CreateEffect(c) - e1b:SetType(EFFECT_TYPE_SINGLE) - e1b:SetCode(EFFECT_MATERIAL_CHECK) - e1b:SetValue(s.matcheck) - e1b:SetLabelObject(e1a) - c:RegisterEffect(e1b) - --During your next Standby Phase after this card was sent from the field to the GY: You can add 1 monster from your GY to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2a:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2a:SetRange(LOCATION_GRAVE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(function(e,tp) local c=e:GetHandler() return Duel.IsTurnPlayer(tp) and c:HasFlagEffect(id) and (c:GetFlagEffectLabel(id)==1 or c:GetTurnID()~=Duel.GetTurnCount()) end) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2b:SetCode(EVENT_TO_GRAVE) - e2b:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2b:SetOperation(function(e,tp) local ct=(Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY)) and 2 or 1 e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,ct,ct) end) - c:RegisterEffect(e2b) -end -function s.extraval(chk,summon_type,e,...) - if chk==0 then - local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or sc~=e:GetHandler() then - return Group.CreateGroup() - else - local g=Duel.GetMatchingGroup(aux.NOT(Card.HasFlagEffect),tp,LOCATION_HAND,0,nil,id) - for mc in g:Iter() do - mc:RegisterFlagEffect(id,0,0,1) - end - return g - end - elseif chk==2 then - local g=Duel.GetMatchingGroup(Card.HasFlagEffect,e:GetHandlerPlayer(),LOCATION_HAND,0,nil,id) - for mc in g:Iter() do - mc:ResetFlagEffect(id) - end - end -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,locations) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.matcheckfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function s.matcheck(e,c) - local mg=c:GetMaterial() - e:GetLabelObject():SetLabel(mg:FilterCount(s.matcheckfilter,nil,e:GetHandlerPlayer())==#mg and 1 or 0) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToHand),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,aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end \ No newline at end of file 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/c101305050.lua b/pre-release/c101305050.lua deleted file mode 100644 index f3876dae39..0000000000 --- a/pre-release/c101305050.lua +++ /dev/null @@ -1,89 +0,0 @@ ---天空城塞クーロン ---Kowloon, Citadel of the Sky ---scripted by pyrQ -local s,id=GetID() -local TOKEN_MECHBEAST=id+100 -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Monsters you control that were Normal or Special Summoned from the hand gain 500 ATK/DEF - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD) - e1a:SetCode(EFFECT_UPDATE_ATTACK) - e1a:SetRange(LOCATION_FZONE) - e1a:SetTargetRange(LOCATION_MZONE,0) - e1a:SetTarget(function(e,c) return (c:IsNormalSummoned() or c:IsSpecialSummoned()) and c:IsSummonLocation(LOCATION_HAND) end) - e1a:SetValue(500) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e1b) - --During your Main Phase: You can Special Summon 1 "Mechbeast Token" (Machine/EARTH/Level 6/ATK 2000/DEF 2000) to your opponent's field, and if you do, add 1 "Blitzclique" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetTarget(s.tokentg) - e2:SetOperation(s.tokenop) - c:RegisterEffect(e2) - --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is in your GY: You can add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.selfthcon) - e3:SetTarget(s.selfthtg) - e3:SetOperation(s.selfthop) - c:RegisterEffect(e3) -end -s.listed_names={TOKEN_MECHBEAST} -s.listed_series={SET_BLITZCLIQUE} -function s.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and c:IsAbleToHand() -end -function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHBEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.tokenop(e,tp,eg,ep,ev,re,r,rp) - local opp=1-tp - if Duel.GetLocationCount(opp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHBEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,opp) then return end - local token=Duel.CreateToken(tp,TOKEN_MECHBEAST) - if Duel.SpecialSummon(token,0,tp,opp,false,false,POS_FACEUP)>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(opp,g) - end - end -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) - and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.selfthtg(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.selfthop(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/c101305051.lua b/pre-release/c101305051.lua deleted file mode 100644 index 0f671b49d4..0000000000 --- a/pre-release/c101305051.lua +++ /dev/null @@ -1,123 +0,0 @@ ---雷盟-ブレイクアウェイ ---Blitzclique - Breakaway ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects; - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is in your GY: You can add this card 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:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.selfthcon) - e2:SetTarget(s.selfthtg) - e2:SetOperation(s.selfthop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.plfilter(c,tp) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsContinuousTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.descostfilter(c,hc) - return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() - and Duel.IsExistingTarget(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c:GetEquipGroup()+c+hc) -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if c:IsLocation(LOCATION_HAND) then ft=ft-1 end - --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field - local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) - --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it - local b2=Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_MZONE,0,1,nil,c) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_MZONE,0,1,1,nil,c) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)==2 and chkc:IsOnField() and chkc~=c end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if c:IsLocation(LOCATION_HAND) then ft=ft-1 end - --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field - local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) - --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it - local b2=Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - if chk==0 then return b1 or b2 end - local op=nil - local label=e:GetLabel() - if label~=0 then - op=label - else - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - end - e:SetLabel(0) - Duel.SetTargetParam(op) - if op==1 then - e:SetCategory(0) - e:SetProperty(0) - elseif op==2 then - e:SetCategory(CATEGORY_DESTROY) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if op==1 then - --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - elseif op==2 then - --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) - and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.selfthtg(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.selfthop(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/c101305052.lua b/pre-release/c101305052.lua deleted file mode 100644 index 545cd6a18a..0000000000 --- a/pre-release/c101305052.lua +++ /dev/null @@ -1,101 +0,0 @@ ---雷盟-ステップリーダ ---Blitzclique - Stepped Leader ---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) - --If a card(s) is destroyed by your "Blitzclique" card's effect: You can target 1 Thunder monster in your GY; add it to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.thcon) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --During your Main Phase: You can Special Summon 1 Thunder monster from your hand, then destroy this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is 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:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.selfthcon) - e3:SetTarget(s.selfthtg) - e3:SetOperation(s.selfthop) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLITZCLIQUE} -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.thfilter(c) - return c:IsRace(RACE_THUNDER) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) 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) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) - and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.selfthtg(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.selfthop(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/c101305057.lua b/pre-release/c101305057.lua deleted file mode 100644 index b191c23e26..0000000000 --- a/pre-release/c101305057.lua +++ /dev/null @@ -1,66 +0,0 @@ ---RUM-幻影騎士団レクイエム ---The Phantom Knights' Rank-Up-Magic Requiem ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Target 1 "The Phantom Knights" or "Xyz Dragon" monster in your GY or banishment; Special Summon it (but negate its effects), then Special Summon from your Extra Deck, 1 "The Phantom Knights" or "Xyz Dragon" Xyz Monster that is 1 Rank higher than a DARK Xyz Monster you control, by using that monster as material (this is treated as an Xyz Summon, transfer its materials) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON} -function s.fieldxyzfilter(c,e,tp) - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - if not (#pg==0 or (#pg==1 and pg:IsContains(c))) then return false end - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzMonster() and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1) -end -function s.xyzspfilter(c,e,tp,mc,rank) - if c.rum_limit and not c.rum_limit(mc,e) then return false end - return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsXyzMonster() and c:IsRank(rank) and mc:IsCanBeXyzMaterial(c,tp) - and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.gybanspfilter(c,e,tp,field_xyz_chk) - return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (field_xyz_chk or s.fieldxyzfilter(c,e,tp)) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local field_xyz_chk=Duel.IsExistingMatchingCard(s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.gybanspfilter(chkc,e,tp,field_xyz_chk) end - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,field_xyz_chk) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,field_xyz_chk) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(e:GetHandler()) - if Duel.SpecialSummonComplete()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local mc=Duel.SelectMatchingCard(tp,s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() - if not mc then return end - Duel.HintSelection(mc) - if mc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mc,mc:GetRank()+1):GetFirst() - if xyz then - xyz:SetMaterial(mc) - Duel.Overlay(xyz,mc) - Duel.BreakEffect() - if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - xyz:CompleteProcedure() - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101305060.lua b/pre-release/c101305060.lua deleted file mode 100644 index 9a096282d1..0000000000 --- a/pre-release/c101305060.lua +++ /dev/null @@ -1,89 +0,0 @@ ---霊力回復薬 ---Spiritual Power Recovery Potion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Banish any number of Spellcaster monsters and/or Spells from your GY; all monsters you currently control gain 200 ATK for each card banished this way, and if they do, you gain 400 LP for each card banished this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCost(s.atkcost) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) - c:RegisterEffect(e1) - --During your Main Phase: You can banish this card from your GY; Special Summon any number of Spellcaster monsters with different Attributes 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_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_POSSESSED} -function s.atkcostfilter(c) - return (c:IsRace(RACE_SPELLCASTER) or c:IsSpell()) and c:IsAbleToRemoveAsCost() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - local max_count=Duel.GetMatchingGroupCount(s.atkcostfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_GRAVE,0,1,max_count,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(#g) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - local banish_count=e:GetLabel() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,200*banish_count) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,400*banish_count) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - if #g==0 then return end - local prev_atk=0 - local c=e:GetHandler() - local banish_count=e:GetLabel() - local atk=200*banish_count - local atk_change_chk=false - for atkc in g:Iter() do - prev_atk=atkc:GetAttack() - --All monsters you currently control gain 200 ATK for each card banished this way - atkc:UpdateAttack(atk,RESET_EVENT|RESETS_STANDARD,c) - if not atk_change_chk and atkc:GetAttack()>prev_atk then - atk_change_chk=true - end - end - if not atk_change_chk then return end - Duel.Recover(tp,400*banish_count,REASON_EFFECT) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) 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) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #g==0 then return end - local max_attribute_count=g:GetClassCount(Card.GetAttribute) - ft=math.min(ft,max_attribute_count) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=aux.SelectUnselectGroup(g,e,tp,1,max_attribute_count,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - 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/c101305068.lua b/pre-release/c101305068.lua deleted file mode 100644 index 228105f71b..0000000000 --- a/pre-release/c101305068.lua +++ /dev/null @@ -1,90 +0,0 @@ ---雷盟-リターンストローク ---Blitzclique - Return Stroke ---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) - --"Blitzclique" monsters you control cannot be destroyed by your opponent's card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_BLITZCLIQUE) end) - e1:SetValue(aux.indoval) - c:RegisterEffect(e1) - --When your opponent activates a Spell Card or effect: You can return 1 "Blitzclique" monster you control to the hand; negate that effect, and if you do, destroy that card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(s.discon) - e2:SetCost(s.discost) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --You can banish this card from your GY, then target 1 "Blitzclique" monster in your field or GY; return it to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLITZCLIQUE} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) -end -function s.discostfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsFaceup() and c:IsAbleToHandAsCost() -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_COST) -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.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305069.lua b/pre-release/c101305069.lua deleted file mode 100644 index d923307b42..0000000000 --- a/pre-release/c101305069.lua +++ /dev/null @@ -1,97 +0,0 @@ ---雷盟-オルタネータ ---Blitzclique - Alternator ---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) - --Monsters your opponent controls lose 300 ATK/DEF for each Thunder monster you control - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD) - e1a:SetCode(EFFECT_UPDATE_ATTACK) - e1a:SetRange(LOCATION_SZONE) - e1a:SetTargetRange(0,LOCATION_MZONE) - e1a:SetValue(function(e,c) return -300*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_THUNDER),e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) end) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e1b) - --You can shuffle 1 other "Blitzclique" card from your hand or face-up field into the Deck; add 1 Thunder monster with a different name from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(s.thunderthcost) - e2:SetTarget(s.thunderthtg) - e2:SetOperation(s.thunderthop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) - --You can banish this card from your GY; add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" 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_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.blitzthtg) - e3:SetOperation(s.blitzthop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_names={101305050} --"Kowloon, Citadel of the Sky" -s.listed_series={SET_BLITZCLIQUE} -function s.thunderthcostfilter(c,tp) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) - and Duel.IsExistingMatchingCard(s.thunderthfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) -end -function s.thunderthfilter(c,code) - return c:IsRace(RACE_THUNDER) and not c:IsCode(code) and c:IsAbleToHand() -end -function s.thunderthcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sc=Duel.SelectMatchingCard(tp,s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp):GetFirst() - if sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - else - Duel.HintSelection(sc) - end - Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_COST) - e:SetLabel(sc:GetCode()) -end -function s.thunderthtg(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.thunderthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thunderthfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.blitzthfilter(c) - return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(101305050)) and c:IsAbleToHand() -end -function s.blitzthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.blitzthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.blitzthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.blitzthfilter,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/c101305073.lua b/pre-release/c101305073.lua deleted file mode 100644 index d84e9f633e..0000000000 --- a/pre-release/c101305073.lua +++ /dev/null @@ -1,81 +0,0 @@ ---幻影騎士団アンブレイジベイル ---The Phantom Knights of Umbrage Veil ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If you have a "The Phantom Knights" monster in your field or GY, you can activate this card the turn it was Set - 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:SetCondition(s.actcon) - c:RegisterEffect(e0) - --Special Summon this card in Defense Position as a Normal Monster (Warrior/DARK/Level 3/ATK 0/DEF 300) (this card is NOT treated as a Trap), then you can change 1 Attack Position monster your opponent controls to Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --You can banish this card from your GY; immediately after this effect resolves, Xyz Summon 1 DARK Xyz 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:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.xyztg) - e2:SetOperation(s.xyzop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS} -function s.actconfilter(c) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() and c:IsFaceup() -end -function s.actcon(e) - return Duel.IsExistingMatchingCard(s.actconfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) -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 e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then - c:AddMonsterAttribute(TYPE_NORMAL) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) - c:AddMonsterAttributeComplete() - if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local posg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,1,nil) - if #posg==0 then return end - Duel.HintSelection(posg) - Duel.BreakEffect() - Duel.ChangePosition(posg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE) - end - end -end -function s.xyzfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzSummonable() -end -function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.xyzop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc then - Duel.XyzSummon(tp,sc) - 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 320f0b089907299c9963f7c477c4bdf14df49142 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:06:18 +0200 Subject: [PATCH 2/2] Add files via upload --- archetype_setcode_constants.lua | 2 +- official/c13203964.lua | 89 ++++++++++++++++++++ official/c14425515.lua | 94 +++++++++++++++++++++ official/c15141103.lua | 89 ++++++++++++++++++++ official/c26364381.lua | 89 ++++++++++++++++++++ official/c27096833.lua | 77 +++++++++++++++++ official/c27118421.lua | 76 +++++++++++++++++ official/c28331069.lua | 97 ++++++++++++++++++++++ official/c29053656.lua | 94 +++++++++++++++++++++ official/c30275298.lua | 69 ++++++++++++++++ official/c30397786.lua | 94 +++++++++++++++++++++ official/c41424250.lua | 109 ++++++++++++++++++++++++ official/c51546708.lua | 106 ++++++++++++++++++++++++ official/c52768390.lua | 141 ++++++++++++++++++++++++++++++++ official/c53481938.lua | 94 +++++++++++++++++++++ official/c54603525.lua | 80 ++++++++++++++++++ official/c54725177.lua | 89 ++++++++++++++++++++ official/c65541655.lua | 111 +++++++++++++++++++++++++ official/c66664203.lua | 58 +++++++++++++ official/c67886895.lua | 111 +++++++++++++++++++++++++ official/c87818869.lua | 85 +++++++++++++++++++ official/c88931417.lua | 76 +++++++++++++++++ official/c89753095.lua | 45 ++++++++++ official/c89875646.lua | 103 +++++++++++++++++++++++ official/c90091224.lua | 87 ++++++++++++++++++++ official/c91714772.lua | 93 +++++++++++++++++++++ official/c92058902.lua | 87 ++++++++++++++++++++ official/c92936364.lua | 100 ++++++++++++++++++++++ official/c93871599.lua | 80 ++++++++++++++++++ pre-release/c100295121.lua | 111 +++++++++++++++++++++++++ pre-release/c100455001.lua | 84 +++++++++++++++++++ pre-release/c100455002.lua | 58 +++++++++++++ pre-release/c100455003.lua | 85 +++++++++++++++++++ pre-release/c100455005.lua | 89 ++++++++++++++++++++ pre-release/c100455006.lua | 96 ++++++++++++++++++++++ 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/c101305010.lua | 120 +++++++++++++++++++++++++++ pre-release/c101305011.lua | 83 +++++++++++++++++++ pre-release/c101305012.lua | 80 ++++++++++++++++++ pre-release/c101305013.lua | 83 +++++++++++++++++++ pre-release/c101305014.lua | 83 +++++++++++++++++++ pre-release/c101305018.lua | 93 +++++++++++++++++++++ pre-release/c101305019.lua | 89 ++++++++++++++++++++ pre-release/c101305023.lua | 109 ++++++++++++++++++++++++ pre-release/c101305027.lua | 89 ++++++++++++++++++++ pre-release/c101305028.lua | 74 +++++++++++++++++ pre-release/c101305029.lua | 91 +++++++++++++++++++++ pre-release/c101305037.lua | 96 ++++++++++++++++++++++ pre-release/c101305042.lua | 74 +++++++++++++++++ pre-release/c101305043.lua | 107 ++++++++++++++++++++++++ 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/c101305050.lua | 89 ++++++++++++++++++++ pre-release/c101305051.lua | 123 ++++++++++++++++++++++++++++ pre-release/c101305052.lua | 101 +++++++++++++++++++++++ pre-release/c101305057.lua | 66 +++++++++++++++ pre-release/c101305060.lua | 89 ++++++++++++++++++++ pre-release/c101305065.lua | 84 +++++++++++++++++++ pre-release/c101305066.lua | 69 ++++++++++++++++ pre-release/c101305067.lua | 101 +++++++++++++++++++++++ pre-release/c101305068.lua | 90 ++++++++++++++++++++ pre-release/c101305069.lua | 97 ++++++++++++++++++++++ pre-release/c101305073.lua | 81 ++++++++++++++++++ pre-release/c101305076.lua | 96 ++++++++++++++++++++++ pre-release/c101305127.lua | 3 + pre-release/c101305128.lua | 3 + pre-release/c101305129.lua | 3 + 79 files changed, 6733 insertions(+), 1 deletion(-) create mode 100644 official/c13203964.lua create mode 100644 official/c14425515.lua create mode 100644 official/c15141103.lua create mode 100644 official/c26364381.lua create mode 100644 official/c27096833.lua create mode 100644 official/c27118421.lua create mode 100644 official/c28331069.lua create mode 100644 official/c29053656.lua create mode 100644 official/c30275298.lua create mode 100644 official/c30397786.lua create mode 100644 official/c41424250.lua create mode 100644 official/c51546708.lua create mode 100644 official/c52768390.lua create mode 100644 official/c53481938.lua create mode 100644 official/c54603525.lua create mode 100644 official/c54725177.lua create mode 100644 official/c65541655.lua create mode 100644 official/c66664203.lua create mode 100644 official/c67886895.lua create mode 100644 official/c87818869.lua create mode 100644 official/c88931417.lua create mode 100644 official/c89753095.lua create mode 100644 official/c89875646.lua create mode 100644 official/c90091224.lua create mode 100644 official/c91714772.lua create mode 100644 official/c92058902.lua create mode 100644 official/c92936364.lua create mode 100644 official/c93871599.lua create mode 100644 pre-release/c100295121.lua create mode 100644 pre-release/c100455001.lua create mode 100644 pre-release/c100455002.lua create mode 100644 pre-release/c100455003.lua create mode 100644 pre-release/c100455005.lua create mode 100644 pre-release/c100455006.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/c101305010.lua create mode 100644 pre-release/c101305011.lua create mode 100644 pre-release/c101305012.lua create mode 100644 pre-release/c101305013.lua create mode 100644 pre-release/c101305014.lua create mode 100644 pre-release/c101305018.lua create mode 100644 pre-release/c101305019.lua create mode 100644 pre-release/c101305023.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/c101305037.lua create mode 100644 pre-release/c101305042.lua create mode 100644 pre-release/c101305043.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/c101305050.lua create mode 100644 pre-release/c101305051.lua create mode 100644 pre-release/c101305052.lua create mode 100644 pre-release/c101305057.lua create mode 100644 pre-release/c101305060.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/c101305068.lua create mode 100644 pre-release/c101305069.lua create mode 100644 pre-release/c101305073.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/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index b97def174d..2103c6fad5 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -606,6 +606,6 @@ SET_ELFNOTE = 0x1d0 SET_GMX = 0x1d4 --Released but the official English name is unconfirmed SET_CLOWN_CREW = 0x1d3 ---Pre-release archetypes SET_DARK_TUNER = 0x1d5 +--Pre-release archetypes SET_BLITZCLIQUE = 0x1d6 diff --git a/official/c13203964.lua b/official/c13203964.lua new file mode 100644 index 0000000000..4b7eab9b79 --- /dev/null +++ b/official/c13203964.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/official/c14425515.lua b/official/c14425515.lua new file mode 100644 index 0000000000..c5bf946b79 --- /dev/null +++ b/official/c14425515.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/official/c15141103.lua b/official/c15141103.lua new file mode 100644 index 0000000000..60f545803d --- /dev/null +++ b/official/c15141103.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/official/c26364381.lua b/official/c26364381.lua new file mode 100644 index 0000000000..97c6da341f --- /dev/null +++ b/official/c26364381.lua @@ -0,0 +1,89 @@ +--デミウルゴス EMA +--Demiurge Ema +--scripted by Naim +local s,id=GetID() +local TOKEN_HOMUNCULUS=id+1 +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/official/c27096833.lua b/official/c27096833.lua new file mode 100644 index 0000000000..1e6cd93973 --- /dev/null +++ b/official/c27096833.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/official/c27118421.lua b/official/c27118421.lua new file mode 100644 index 0000000000..8f7fb64afc --- /dev/null +++ b/official/c27118421.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/official/c28331069.lua b/official/c28331069.lua new file mode 100644 index 0000000000..b39ef063a8 --- /dev/null +++ b/official/c28331069.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/official/c29053656.lua b/official/c29053656.lua new file mode 100644 index 0000000000..75211ae5e5 --- /dev/null +++ b/official/c29053656.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/official/c30275298.lua b/official/c30275298.lua new file mode 100644 index 0000000000..d61e3dab89 --- /dev/null +++ b/official/c30275298.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/official/c30397786.lua b/official/c30397786.lua new file mode 100644 index 0000000000..20708329b8 --- /dev/null +++ b/official/c30397786.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/official/c41424250.lua b/official/c41424250.lua new file mode 100644 index 0000000000..4832057c62 --- /dev/null +++ b/official/c41424250.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/official/c51546708.lua b/official/c51546708.lua new file mode 100644 index 0000000000..8782ee0c8a --- /dev/null +++ b/official/c51546708.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/official/c52768390.lua b/official/c52768390.lua new file mode 100644 index 0000000000..d7163d2f5b --- /dev/null +++ b/official/c52768390.lua @@ -0,0 +1,141 @@ +--闇の神-ダークゴッド +--Dark Creator +--scripted by Naim +local s,id=GetID() +local TOKEN_DARK_CREATOR=id+1 +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/official/c53481938.lua b/official/c53481938.lua new file mode 100644 index 0000000000..d698a1694b --- /dev/null +++ b/official/c53481938.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/official/c54603525.lua b/official/c54603525.lua new file mode 100644 index 0000000000..3a44abb117 --- /dev/null +++ b/official/c54603525.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/official/c54725177.lua b/official/c54725177.lua new file mode 100644 index 0000000000..6b4850c9b2 --- /dev/null +++ b/official/c54725177.lua @@ -0,0 +1,89 @@ +--銀河眼の輝光子竜 +--Galaxy-Eyes Photon Change Dragon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by Tributing 2 face-up monsters on either field with 2000 or more ATK, including a monster you control. You can only Special Summon "Galaxy-Eyes Photon Change Dragon" once per turn this way + 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:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --During the Main Phase (Quick Effect): You can banish this card you control; Special Summon 1 "Galaxy-Eyes Photon Dragon" from your Deck or GY, then you can banish 1 monster your opponent controls that was Special Summoned from the Extra Deck until the End Phase. You can only use this effect of "Galaxy-Eyes Photon Change Dragon" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.gepdsptg) + e2:SetOperation(s.gepdspop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_names={CARD_GALAXYEYES_P_DRAGON} +function s.selfspcostfilter(c) + return c:IsAttackAbove(2000) and c:IsFaceup() and c:IsReleasable() +end +function s.rescon(sg,e,tp,mg) + return Duel.GetMZoneCount(tp,sg)>0 and sg:IsExists(Card.IsControler,1,nil,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) + return #g>0 and 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) + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) + if #sg>0 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) + end +end +function s.gepdspfilter(c,e,tp) + return c:IsCode(CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gepdsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.gepdspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE) +end +function s.rmvfilter(c) + return c:IsSummonLocation(LOCATION_EXTRA) and c:IsAbleToRemove() +end +function s.gepdspop(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.gepdspfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.IsExistingMatchingCard(s.rmvfilter,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rg=Duel.SelectMatchingCard(tp,s.rmvfilter,tp,0,LOCATION_MZONE,1,1,nil) + if #rg>0 then + Duel.HintSelection(rg) + Duel.BreakEffect() + --Banish 1 monster your opponent controls that was Special Summoned from the Extra Deck until the End Phase + aux.RemoveUntil(rg,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) + end + end +end \ No newline at end of file diff --git a/official/c65541655.lua b/official/c65541655.lua new file mode 100644 index 0000000000..72dab7d0d5 --- /dev/null +++ b/official/c65541655.lua @@ -0,0 +1,111 @@ +--スカーレッド・ノヴァ・ドラゴン-バーニング・ソウル +--Red Nova Dragon - Burning Soul +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedue: 2 Tuners + 1 non-Tuner + Synchro.AddProcedure(c,nil,2,2,Synchro.NonTuner(nil),1,1) + --Must be either Synchro Summoned, or Special Summoned (from your Extra Deck) by banishing 2 Tuners and 1 "Red Dragon Archfiend" from your GY + c:AddMustBeSynchroSummoned() + 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.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --If this card is Special Summoned: You can add 1 card from your GY to your hand, and if you do, this card gains 2000 ATK. You can only use this effect of "Red Nova Dragon - Burning Soul" once per Duel, and only during a Duel you Synchro Summoned "Red Dragon Archfiend" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_TOHAND+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,EFFECT_COUNT_CODE_DUEL) + e1:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Track Synchro Summons of "Red Dragon Archfiend" + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_SPSUMMON_SUCCESS) + ge1:SetOperation(s.regop) + Duel.RegisterEffect(ge1,0) + end) + --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) + --Multiple Tuners + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e3:SetCode(EFFECT_MULTIPLE_TUNERS) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.spcostfilter(c) + return (c:IsType(TYPE_TUNER) or c:IsCode(CARD_RED_DRAGON_ARCHFIEND)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +end +function s.rescon(sg,e,tp,mg) + return Duel.GetMZoneCount(tp,sg)>0 and sg:IsExists(Card.IsType,2,nil,TYPE_TUNER) and sg:IsExists(Card.IsCode,1,nil,CARD_RED_DRAGON_ARCHFIEND) +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,3,3,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,3,3,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.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,2000) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + local c=e:GetHandler() + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) + and c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 2000 ATK + c:UpdateAttack(2000) + end +end +function s.regopfilter(c,sp) + return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and c:IsSummonPlayer(sp) and c:IsSynchroSummoned() and c:IsFaceup() +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(0,id) and Duel.HasFlagEffect(1,id) then return end + for sp=0,1 do + if eg:IsExists(s.regopfilter,1,nil,sp) then + Duel.RegisterFlagEffect(sp,id,0,0,1) + end + end +end \ No newline at end of file diff --git a/official/c66664203.lua b/official/c66664203.lua new file mode 100644 index 0000000000..2b104596de --- /dev/null +++ b/official/c66664203.lua @@ -0,0 +1,58 @@ +--機光竜-サイバー・ドラゴン +--Revolution Cyber Dragon +local s,id=GetID() +function s.initial_effect(c) + --If you control no monsters, you can Special Summon this card (from your hand) + 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.spcon) + c:RegisterEffect(e1) + --If this card is Special Summoned: You can target 1 face-up monster your opponent controls; negate its effects until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,0}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --During your Main Phase: You can Fusion Summon 1 Machine Fusion Monster from your Extra Deck, using this card you control and monsters from your hand or field + local fusion_params={ + fusfilter=function(c) return c:IsRace(RACE_MACHINE) end, + gc=Fusion.ForcedHandler + } + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(Fusion.SummonEffTG(fusion_params)) + e3:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e3) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 +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 g=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Negate its effects until the end of this turn + tc:NegateEffects(e:GetHandler(),RESETS_STANDARD_PHASE_END) + end +end \ No newline at end of file diff --git a/official/c67886895.lua b/official/c67886895.lua new file mode 100644 index 0000000000..63b89f84d8 --- /dev/null +++ b/official/c67886895.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/official/c87818869.lua b/official/c87818869.lua new file mode 100644 index 0000000000..2c2264f8b3 --- /dev/null +++ b/official/c87818869.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/official/c88931417.lua b/official/c88931417.lua new file mode 100644 index 0000000000..e41fcf7161 --- /dev/null +++ b/official/c88931417.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/official/c89753095.lua b/official/c89753095.lua new file mode 100644 index 0000000000..1978d534f1 --- /dev/null +++ b/official/c89753095.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/official/c89875646.lua b/official/c89875646.lua new file mode 100644 index 0000000000..3cf7674171 --- /dev/null +++ b/official/c89875646.lua @@ -0,0 +1,103 @@ +--トリプル・ヴァレル・リボルブ +--Triple Borrel Launch +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects (but you can only use each effect of "Triple Borrel Launch" once per turn); + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_ROKKET} +function s.tdfilter(c) + return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil) + --● Shuffle 1 Dragon monster from your GY into the Deck, then you can Special Summon 1 "Rokket" monster with a different name from your Deck + local b1=not Duel.HasFlagEffect(tp,id) and #dg>=1 + --● Shuffle 2 Dragon monsters from your GY into the Deck, then add 1 Field Spell from your GY to your hand + local b2=not Duel.HasFlagEffect(tp,id+1) and #dg>=2 + and Duel.IsExistingMatchingCard(aux.AND(Card.IsFieldSpell,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,nil) + --● Shuffle 3 Dragon monsters from your GY into the Deck, then shuffle up to 3 monsters from your opponent's GY into the Deck + local b3=not Duel.HasFlagEffect(tp,id+2) and #dg>=3 + and Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,nil) + 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) + if op==1 then + e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + elseif op==3 then + e:SetCategory(CATEGORY_TODECK) + Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,4,PLAYER_ALL,LOCATION_GRAVE) + end +end +function s.spfilter(c,e,tp,code) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil) + if op==1 then + --● Shuffle 1 Dragon monster from your GY into the Deck, then you can Special Summon 1 "Rokket" monster with a different name from your Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local gc=dg:Select(tp,1,1,nil):GetFirst() + if not gc then return end + Duel.HintSelection(gc) + if Duel.SendtoDeck(gc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp,gc:GetCode()) + if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=sg:Select(tp,1,1,nil) + if sc then + Duel.BreakEffect() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + end + elseif op==2 then + --● Shuffle 2 Dragon monsters from your GY into the Deck, then add 1 Field Spell from your GY to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=dg:Select(tp,2,2,nil) + if #g~=2 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFieldSpell,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,1,nil) + if #hg>0 then + Duel.HintSelection(hg) + Duel.BreakEffect() + Duel.SendtoHand(hg,nil,REASON_EFFECT) + end + elseif op==3 then + --● Shuffle 3 Dragon monsters from your GY into the Deck, then shuffle up to 3 monsters from your opponent's GY into the Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=dg:Select(tp,3,3,nil) + if #g~=3 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local sg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,3,nil) + if #sg>0 then + Duel.HintSelection(sg) + Duel.BreakEffect() + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c90091224.lua b/official/c90091224.lua new file mode 100644 index 0000000000..6db162a095 --- /dev/null +++ b/official/c90091224.lua @@ -0,0 +1,87 @@ +--四天の龍 ダーク・リベリオン・エクシーズ・ドラゴン +--Dark Rebellion Xyz Dragon of the Four Heavenly Dragons +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 DARK monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),4,2) + --If this card is Special Summoned: You can target an equal number of cards on each field; destroy them + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + 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.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --When your opponent activates a card or effect (Quick Effect): You can detach 1 material from this card; Special Summon 1 Rank 4 DARK Xyz Monster from your Extra Deck, using this card you control (this is treated as an Xyz Summon, transfer this card's materials) + 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_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(Cost.DetachFromSelf(1)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} +function s.desrescon(maxc) + return function(sg,e,tp,mg) + local ct1=sg:FilterCount(Card.IsControler,nil,tp) + local ct2=#sg-ct1 + return ct1==ct2,ct1>maxc or ct2>maxc + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetTargetGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + local ct=g:FilterCount(Card.IsControler,nil,tp) + local rescon=s.desrescon(math.min(ct,#g-ct)) + local tg=aux.SelectUnselectGroup(g,e,tp,2,#g,rescon,1,tp,HINTMSG_DESTROY,rescon) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,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 +function s.spfilter(c,e,tp,mc) + return c:IsRank(4) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzMonster() and mc:IsCanBeXyzMaterial(c,tp) + and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e) then + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if not ((#pg<=0 or (#pg==1 and 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,c):GetFirst() + if xyz then + xyz:SetMaterial(c) + Duel.Overlay(xyz,c) + if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + xyz:CompleteProcedure() + end + end + end +end \ No newline at end of file diff --git a/official/c91714772.lua b/official/c91714772.lua new file mode 100644 index 0000000000..6ef4055a54 --- /dev/null +++ b/official/c91714772.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/official/c92058902.lua b/official/c92058902.lua new file mode 100644 index 0000000000..17bf1b8ee3 --- /dev/null +++ b/official/c92058902.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/official/c92936364.lua b/official/c92936364.lua new file mode 100644 index 0000000000..48f550cecd --- /dev/null +++ b/official/c92936364.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/official/c93871599.lua b/official/c93871599.lua new file mode 100644 index 0000000000..4c48558026 --- /dev/null +++ b/official/c93871599.lua @@ -0,0 +1,80 @@ +--ドラゴン・導きの呼笛 +--The Flute of Guiding Dragon +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If a Spellcaster monster is on the field: Special Summon 1 Level 5 or higher Dragon monster from your Deck, then if your opponent controls 2 or more monsters, you can Special Summon 1 monster from your Deck with the same name as the Summoned monster, also you cannot Special Summon for the rest of this turn, except Dragon or Spellcaster monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During your Main Phase 2, if this card is in your GY because it was sent there this turn: You can banish it; draw 1 card + 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_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) local c=e:GetHandler() return Duel.IsMainPhase2() and c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelAbove(5) 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_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.samenamespfilter(c,e,tp,code) + return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2 then + local code=sc:GetCode() + if Duel.IsExistingMatchingCard(s.samenamespfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.samenamespfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + end + end + --You cannot Special Summon for the rest of this turn, except Dragon or Spellcaster 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:IsRaceExcept(RACE_DRAGON|RACE_SPELLCASTER) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +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/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/c100455001.lua b/pre-release/c100455001.lua new file mode 100644 index 0000000000..235f841c24 --- /dev/null +++ b/pre-release/c100455001.lua @@ -0,0 +1,84 @@ +--ファニー・ダーク・ラビット +--Funny Dark Rabbit +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetOperation(s.regop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --This card is treated as a Toon monster while "Toon World" is on the field + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_ADD_TYPE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) + e2:SetValue(TYPE_TOON) + c:RegisterEffect(e2) + --Once per turn: You can add to your hand or place face-up on your field, 1 "Toon" Field or Continuous Spell from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.thpltg) + e3:SetOperation(s.thplop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_TOON_WORLD} +s.listed_series={SET_TOON} +function s.regop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:ListsCode(CARD_TOON_WORLD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thplfilter(c,tp,szone_chk) + return c:IsSetCard(SET_TOON) and (c:IsContinuousSpell() or c:IsFieldSpell()) and (c:IsAbleToHand() + or (c:CheckUniqueOnField(tp) and not c:IsForbidden() and (c:IsFieldSpell() or szone_chk))) +end +function s.thpltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thplfilter,tp,LOCATION_DECK,0,1,nil,tp,Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thplop(e,tp,eg,ep,ev,re,r,rp) + local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,s.thplfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() + if sc then + aux.ToHandOrElse(sc,tp, + function(sc) + return szone_chk or sc:IsFieldSpell() + end, + function(sc) + 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, + aux.Stringid(id,4) + ) + end +end \ No newline at end of file diff --git a/pre-release/c100455002.lua b/pre-release/c100455002.lua new file mode 100644 index 0000000000..0ed2f4fc9e --- /dev/null +++ b/pre-release/c100455002.lua @@ -0,0 +1,58 @@ +--コミックキャット +--Comic Cat +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --This card is treated as a Toon monster while "Toon World" is on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_ADD_TYPE) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) + e1:SetValue(TYPE_TOON) + c:RegisterEffect(e1) + --During the Main Phase (Quick Effect): You can Tribute 1 monster (if you control "Toon World", you can Tribute 1 monster your opponent controls, even though you do not control it), and if you do, Special Summon 1 monster that mentions "Toon World" from your hand or Deck, ignoring its Summoning conditions + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_names={CARD_TOON_WORLD} +function s.tribfilter(c,tp) + return c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:ListsCode(CARD_TOON_WORLD) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 + return Duel.IsExistingMatchingCard(s.tribfilter,tp,LOCATION_MZONE,opp_location,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,PLAYER_EITHER,LOCATION_MZONE) + 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) + local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local rg=Duel.SelectMatchingCard(tp,s.tribfilter,tp,LOCATION_MZONE,opp_location,1,1,nil,tp) + if #rg==0 then return end + Duel.HintSelection(rg) + if Duel.Release(rg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100455003.lua b/pre-release/c100455003.lua new file mode 100644 index 0000000000..d9cd4a633c --- /dev/null +++ b/pre-release/c100455003.lua @@ -0,0 +1,85 @@ +--エビル・ボックス +--Evil Box +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you control "Toon World": You can Special Summon this card from your hand, then you can add to your hand or Set 1 "Toon" Trap from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SET) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --This card is treated as a Toon monster while "Toon World" is on the field + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_ADD_TYPE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) + e2:SetValue(TYPE_TOON) + c:RegisterEffect(e2) + --Once per turn (Quick Effect): You can target 1 card in either GY; place it on the bottom of the Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TODECK) + 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.tdtg) + e3:SetOperation(s.tdop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_names={CARD_TOON_WORLD} +s.listed_series={SET_TOON} +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) +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) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +end +function s.thsetfilter(c) + return c:IsSetCard(SET_TOON) and c:IsTrap() and (c:IsAbleToHand() or c:IsSSetable()) +end +function s.selfspop(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 + and Duel.IsExistingMatchingCard(s.thsetfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,s.thsetfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if not sc then return end + aux.ToHandOrElse(sc,tp, + Card.IsSSetable, + function(c) + Duel.SSet(tp,sc) + end, + aux.Stringid(id,4) + ) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100455005.lua b/pre-release/c100455005.lua new file mode 100644 index 0000000000..583c2fe9f3 --- /dev/null +++ b/pre-release/c100455005.lua @@ -0,0 +1,89 @@ +--ブルーアイズ・トゥーン・アルティメットドラゴン +--Blue-Eyes Toon Ultimate Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Blue-Eyes Toon Dragon" + 2 Toon monsters + Fusion.AddProcMixN(c,true,true,53183600,1,s.toonmatfilter,2) + --Must be Special Summoned (from your Extra Deck) by shuffling the above cards from your hand, field, and/or GY into the Deck/Extra Deck + Fusion.AddContactProc(c,s.contactfil,s.contactop,true) + --Your Toon monsters can attack directly + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_DIRECT_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsType(TYPE_TOON) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, 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_MZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --During damage calculation, if your Toon monster is attacked: You can banish it until the end of the Damage Step + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(s.rmcon) + e3:SetTarget(s.rmtg) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) +end +s.listed_names={53183600} --"Blue-Eyes Toon Dragon" +s.listed_series={SET_TOON} +function s.toonmatfilter(c,fc,sumtype,tp) + return c:IsType(TYPE_TOON,fc,sumtype,tp) and c:IsMonster() +end +function s.contactfil(tp) + return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) +end +function s.contactop(g,tp) + local fu,fd=g:Split(Card.IsFaceup,nil) + if #fu>0 then Duel.HintSelection(fu) end + if #fd>0 then Duel.ConfirmCards(1-tp,fd) end + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) +end +function s.thfilter(c) + return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) 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.rmcon(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetAttackTarget() + return bc and bc:IsControler(tp) and bc:IsType(TYPE_TOON) and bc:IsAbleToRemove() +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,Duel.GetAttackTarget(),1,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetAttackTarget() + if bc and bc:IsRelateToBattle() then + --Banish it until the end of the Damage Step + local temp_banish_eff=aux.RemoveUntil(bc,nil,REASON_EFFECT,PHASE_DAMAGE,id,e,tp,aux.DefaultFieldReturnOp) + local e1=temp_banish_eff:Clone() + e1:SetCode(EVENT_DAMAGE_STEP_END) + Duel.RegisterEffect(e1,tp) + temp_banish_eff:Reset() + end +end \ No newline at end of file diff --git a/pre-release/c100455006.lua b/pre-release/c100455006.lua new file mode 100644 index 0000000000..478b7543ea --- /dev/null +++ b/pre-release/c100455006.lua @@ -0,0 +1,96 @@ +--完全なる世界 トゥーン・ワールド +--Toon World the Perfect World +--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) + --This card's name becomes "Toon World" while in the Field Zone + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_FZONE) + e1:SetValue(CARD_TOON_WORLD) + c:RegisterEffect(e1) + --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, from your Deck to your hand. You can only use this effect of "Toon World the Perfect World" thrice per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(3,id) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Before resolving another activated card or effect, you can banish 1 Toon monster you control until immediately after that card/effect resolves, also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetRange(LOCATION_FZONE) + e3:SetCondition(s.rmcon) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) + --Keep track of already banished cards + aux.GlobalCheck(s,function() + s.name_list={} + s.name_list[0]={} + s.name_list[1]={} + aux.AddValuesReset(function() + s.name_list[0]={} + s.name_list[1]={} + end) + end) +end +s.listed_names={CARD_TOON_WORLD} +s.listed_series={SET_TOON} +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:HasFlagEffect(id) end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) +end +function s.thfilter(c) + return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) 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.rmfilter(c,tp) + return c:IsType(TYPE_TOON) and c:IsFaceup() and c:IsAbleToRemove() and not s.name_list[tp][c:GetOriginalCodeRule()] +end +function s.rmcon(e,tp,eg,ep,ev,re,r,rp) + return re:IsActivated() and re:GetHandler()~=e:GetHandler() + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE,0,1,nil,tp) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,0,nil,tp) + if #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then + Duel.Hint(HINT_CARD,0,id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local sc=g:Select(tp,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --Banish 1 Toon monster you control until immediately after that card/effect resolves + local temp_banish_eff=aux.RemoveUntil(sc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp,nil,RESET_CHAIN) + local e1=temp_banish_eff:Clone() + e1:SetCode(EVENT_CHAIN_SOLVED) + Duel.RegisterEffect(e1,tp) + temp_banish_eff:Reset() + --Also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn + s.name_list[tp][sc:GetOriginalCodeRule()]=true + end + 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/c101305010.lua b/pre-release/c101305010.lua new file mode 100644 index 0000000000..d01a2dca14 --- /dev/null +++ b/pre-release/c101305010.lua @@ -0,0 +1,120 @@ +--ウィスカ・ブリッツクリーク +--Wisca Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If a card(s) was destroyed by your "Blitzclique" card's effect this turn (Quick Effect): You can reveal this card in your hand; Special Summon up to 3 Thunder monsters from your hand, then you can destroy up to that many cards on the field, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Track destroyed cards + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_DESTROYED) + ge1:SetOperation(s.descheckop) + Duel.RegisterEffect(ge1,0) + end) + --When a monster effect is activated, except in the hand (Quick Effect): You can return 1 other Thunder monster you control to the hand; negate the activation, and if you do, destroy the activating monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.descheckop(e,tp,eg,ep,ev,re,r,rp) + if not re then return end + local rc=re:GetHandler() + if rc and rc:IsSetCard(SET_BLITZCLIQUE) then + Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) + end +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft>0 then + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,math.min(ft,3),nil,e,tp) + if #g>0 then + local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + if ct>0 then + local fg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if #fg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=fg:Select(tp,1,ct,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end + end + end + end + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)~=LOCATION_HAND +end +function s.negcostfilter(c) + return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_MZONE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_MZONE,0,1,1,c) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_NEGATE,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.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305011.lua b/pre-release/c101305011.lua new file mode 100644 index 0000000000..e6c1787a5d --- /dev/null +++ b/pre-release/c101305011.lua @@ -0,0 +1,83 @@ +--サージ・ブリッツクリーク +--Surge Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand, then target 1 monster on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" monster from your Deck to your hand, except "Surge Blitzclique" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_BLITZCLIQUE} +function s.desfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +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.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and not c:IsCode(id) 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 \ No newline at end of file diff --git a/pre-release/c101305012.lua b/pre-release/c101305012.lua new file mode 100644 index 0000000000..ad598c3a0a --- /dev/null +++ b/pre-release/c101305012.lua @@ -0,0 +1,80 @@ +--クラック・ブリッツクリーク +--Crack Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect on the field during their turn (Quick Effect): You can reveal this card in your hand; destroy that monster, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.descon) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can send 1 "Blitzclique" Spell/Trap from your Deck to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsTurnPlayer(1-tp) and rp==1-tp and re:IsMonsterEffect() and re:GetHandler():IsRelateToEffect(re) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(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_DESTROY,re:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and Duel.Destroy(rc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.tgfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpellTrap() and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305013.lua b/pre-release/c101305013.lua new file mode 100644 index 0000000000..60965c86a4 --- /dev/null +++ b/pre-release/c101305013.lua @@ -0,0 +1,83 @@ +--グレイン・ブリッツクリーク +--Grain Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand, then target 1 Spell/Trap on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={101305050} --Kowloon, Citadel of the Sky +s.listed_series={SET_BLITZCLIQUE} +function s.desfilter(c,tp) + return c:IsSpellTrap() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +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.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(101305050)) 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 \ No newline at end of file diff --git a/pre-release/c101305014.lua b/pre-release/c101305014.lua new file mode 100644 index 0000000000..ae1e3f1487 --- /dev/null +++ b/pre-release/c101305014.lua @@ -0,0 +1,83 @@ +--エミ・ブリッツクリーク +--Emi Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If this card is added to your hand, except by drawing it: You can reveal it, then target 1 card on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_TO_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return not e:GetHandler():IsReason(REASON_DRAW) end) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Trap from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.desfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +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.GetLocationCount(tp,LOCATION_MZONE)>0 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.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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:SetTarget(function(e,c) return (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) 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) +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 \ No newline at end of file diff --git a/pre-release/c101305018.lua b/pre-release/c101305018.lua new file mode 100644 index 0000000000..45c791b1ba --- /dev/null +++ b/pre-release/c101305018.lua @@ -0,0 +1,93 @@ +--幻影騎士団ディケイクローク +--The Phantom Knights of Decayed Cloak +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --You can reveal 1 other "The Phantom Knights" card in your hand; 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:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.Reveal(function(c) return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsPublic() end,true)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can add 1 "The Phantom Knights" monster from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --You can banish this card from your GY, then target 1 Xyz Monster you control; this turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.xyztg) + e3:SetOperation(s.xyzop) + c:RegisterEffect(e3) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} +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.thfilter(c) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() 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) + end +end +function s.xyzfilter(c) + return c:IsXyzMonster() and c:IsFaceup() and not c:HasFlagEffect(id) +end +function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.xyzfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + --This turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_XYZ_LEVEL) + e1:SetValue(function(e,c,rc) return c:GetRank() end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101305019.lua b/pre-release/c101305019.lua new file mode 100644 index 0000000000..920dc62e37 --- /dev/null +++ b/pre-release/c101305019.lua @@ -0,0 +1,89 @@ +--幻影騎士団ドゥームソルレット +--The Phantom Knights of Doomed Solleret +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --If you control no monsters, you can Special Summon this card (from your hand). You can only Special Summon "The Phantom Knights of Doomed Solleret" once per turn this way + 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:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can Set 1 "The Phantom Knights" Spell/Trap from your Deck + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SET) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.settg) + e2a:SetOperation(s.setop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --You can banish this card from your GY, then target up to 2 Level/Rank 3 DARK monsters you control; increase their Levels/Ranks by 1 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 +end +function s.setfilter(c) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end +function s.lvfilter(c) + return (c:IsLevel(3) or c:IsRank(3)) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,2,nil) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil) + if #tg==0 then return end + local c=e:GetHandler() + for tc in tg:Iter() do + --Increase their Levels/Ranks by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + if tc:HasLevel() then + e1:SetCode(EFFECT_UPDATE_LEVEL) + else + e1:SetCode(EFFECT_UPDATE_RANK) + end + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101305023.lua b/pre-release/c101305023.lua new file mode 100644 index 0000000000..9e4a313117 --- /dev/null +++ b/pre-release/c101305023.lua @@ -0,0 +1,109 @@ +--繋星の雷后 +--Astrolasma Urania +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by returning up to 2 monsters you control to the hand. You can only Special Summon "Astrolasma Urania" once per turn this way + 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:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Special Summoned: You can reveal any number of monsters with different Levels in your hand, then target that many face-up cards your opponent controls; negate their effects + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.discost) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --If this card on the field is destroyed by card effect and sent to the 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) + return #g>0 and Duel.GetMZoneCount(tp,g)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.ChkfMMZ(1),1,tp,HINTMSG_RTOHAND,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 + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.discostfilter(c) + return c:IsMonster() and c:HasLevel() and not c:IsPublic() +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.discostfilter,tp,LOCATION_HAND,0,nil) + local max_target_count=Duel.GetTargetCount(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 and max_target_count>0 end + local max_reveal_count=math.min(max_target_count,g:GetClassCount(Card.GetLevel)) + local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + e:SetLabel(#sg) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end + if chk==0 then return true end + local target_count=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,target_count,target_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,target_count,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + local c=e:GetHandler() + for tc in tg:Iter() do + --Negate their effects + tc:NegateEffects(c,nil,true) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) +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/c101305037.lua b/pre-release/c101305037.lua new file mode 100644 index 0000000000..d69cd09fd5 --- /dev/null +++ b/pre-release/c101305037.lua @@ -0,0 +1,96 @@ +--幻影騎士団マレヴォレンスサイス +--The Phantom Knights of Malevolent Scythe +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 DARK monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,2) + --You can detach 1 material from this card; Special Summon 1 "The Phantom Knights" monster from your Deck + 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:SetCost(Cost.DetachFromSelf(1)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If you Xyz Summon an "Xyz Dragon" monster while this card is in the Monster Zone: You can add 1 "Rank-Up-Magic" Spell 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_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.deckthcon) + e2:SetTarget(s.deckthtg) + e2:SetOperation(s.deckthop) + c:RegisterEffect(e2) + --If this card is destroyed: You can add 1 of your banished "The Phantom Knights" cards to your hand, except an Xyz Monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.banthtg) + e3:SetOperation(s.banthop) + c:RegisterEffect(e3) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON,SET_RANK_UP_MAGIC} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) 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_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,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.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.deckthconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsXyzSummoned() and c:IsSetCard(SET_XYZ_DRAGON) and c:IsFaceup() +end +function s.deckthcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.deckthconfilter,1,nil,tp) +end +function s.deckthfilter(c) + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + end +end +function s.banthfilter(c) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsXyzMonster() and c:IsFaceup() and c:IsAbleToHand() +end +function s.banthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.banthfilter,tp,LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) +end +function s.banthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.banthfilter,tp,LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + 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/c101305043.lua b/pre-release/c101305043.lua new file mode 100644 index 0000000000..66ded9a6fc --- /dev/null +++ b/pre-release/c101305043.lua @@ -0,0 +1,107 @@ +--ぜんなのついなぎひめ +--Zenna-no-Tsuinagihime +--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) + --You can also use 1 monster in your hand as material to Link Summon this card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EXTRA_MATERIAL) + e0:SetRange(LOCATION_EXTRA) + e0:SetTargetRange(1,0) + e0:SetOperation(function(c,e,tp,sg,mg,lc,og,chk) return sg:FilterCount(Card.HasFlagEffect,nil,id)<=1 end) + e0:SetValue(s.extraval) + c:RegisterEffect(e0) + --If this card is Link Summoned: You can send 1 monster from your Deck to the GY, or if this card was Link Summoned using only monsters you control, you can send 1 monster from your Extra Deck to the GY instead + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOGRAVE) + 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:SetTarget(s.tgtg) + e1a:SetOperation(s.tgop) + c:RegisterEffect(e1a) + local e1b=Effect.CreateEffect(c) + e1b:SetType(EFFECT_TYPE_SINGLE) + e1b:SetCode(EFFECT_MATERIAL_CHECK) + e1b:SetValue(s.matcheck) + e1b:SetLabelObject(e1a) + c:RegisterEffect(e1b) + --During your next Standby Phase after this card was sent from the field to the GY: You can add 1 monster from your GY to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2a:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2a:SetRange(LOCATION_GRAVE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(function(e,tp) local c=e:GetHandler() return Duel.IsTurnPlayer(tp) and c:HasFlagEffect(id) and (c:GetFlagEffectLabel(id)==1 or c:GetTurnID()~=Duel.GetTurnCount()) end) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2b:SetCode(EVENT_TO_GRAVE) + e2b:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2b:SetOperation(function(e,tp) local ct=(Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY)) and 2 or 1 e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,ct,ct) end) + c:RegisterEffect(e2b) +end +function s.extraval(chk,summon_type,e,...) + if chk==0 then + local tp,sc=... + if summon_type~=SUMMON_TYPE_LINK or sc~=e:GetHandler() then + return Group.CreateGroup() + else + local g=Duel.GetMatchingGroup(aux.NOT(Card.HasFlagEffect),tp,LOCATION_HAND,0,nil,id) + for mc in g:Iter() do + mc:RegisterFlagEffect(id,0,0,1) + end + return g + end + elseif chk==2 then + local g=Duel.GetMatchingGroup(Card.HasFlagEffect,e:GetHandlerPlayer(),LOCATION_HAND,0,nil,id) + for mc in g:Iter() do + mc:ResetFlagEffect(id) + end + end +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,locations) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.matcheckfilter(c,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) +end +function s.matcheck(e,c) + local mg=c:GetMaterial() + e:GetLabelObject():SetLabel(mg:FilterCount(s.matcheckfilter,nil,e:GetHandlerPlayer())==#mg and 1 or 0) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToHand),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,aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file 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/c101305050.lua b/pre-release/c101305050.lua new file mode 100644 index 0000000000..f3876dae39 --- /dev/null +++ b/pre-release/c101305050.lua @@ -0,0 +1,89 @@ +--天空城塞クーロン +--Kowloon, Citadel of the Sky +--scripted by pyrQ +local s,id=GetID() +local TOKEN_MECHBEAST=id+100 +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Monsters you control that were Normal or Special Summoned from the hand gain 500 ATK/DEF + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_FZONE) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(function(e,c) return (c:IsNormalSummoned() or c:IsSpecialSummoned()) and c:IsSummonLocation(LOCATION_HAND) end) + e1a:SetValue(500) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --During your Main Phase: You can Special Summon 1 "Mechbeast Token" (Machine/EARTH/Level 6/ATK 2000/DEF 2000) to your opponent's field, and if you do, add 1 "Blitzclique" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetTarget(s.tokentg) + e2:SetOperation(s.tokenop) + c:RegisterEffect(e2) + --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is in your GY: You can add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.selfthcon) + e3:SetTarget(s.selfthtg) + e3:SetOperation(s.selfthop) + c:RegisterEffect(e3) +end +s.listed_names={TOKEN_MECHBEAST} +s.listed_series={SET_BLITZCLIQUE} +function s.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and c:IsAbleToHand() +end +function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHBEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.tokenop(e,tp,eg,ep,ev,re,r,rp) + local opp=1-tp + if Duel.GetLocationCount(opp,LOCATION_MZONE)<=0 + or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHBEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,opp) then return end + local token=Duel.CreateToken(tp,TOKEN_MECHBEAST) + if Duel.SpecialSummon(token,0,tp,opp,false,false,POS_FACEUP)>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(opp,g) + end + end +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) + and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.selfthtg(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.selfthop(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/c101305051.lua b/pre-release/c101305051.lua new file mode 100644 index 0000000000..0f671b49d4 --- /dev/null +++ b/pre-release/c101305051.lua @@ -0,0 +1,123 @@ +--雷盟-ブレイクアウェイ +--Blitzclique - Breakaway +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects; + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is in your GY: You can add this card 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:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.selfthcon) + e2:SetTarget(s.selfthtg) + e2:SetOperation(s.selfthop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.plfilter(c,tp) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsContinuousTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.descostfilter(c,hc) + return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() + and Duel.IsExistingTarget(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c:GetEquipGroup()+c+hc) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if c:IsLocation(LOCATION_HAND) then ft=ft-1 end + --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field + local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) + --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it + local b2=Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_MZONE,0,1,nil,c) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_MZONE,0,1,1,nil,c) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)==2 and chkc:IsOnField() and chkc~=c end + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if c:IsLocation(LOCATION_HAND) then ft=ft-1 end + --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field + local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) + --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it + local b2=Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) + if chk==0 then return b1 or b2 end + local op=nil + local label=e:GetLabel() + if label~=0 then + op=label + else + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + end + e:SetLabel(0) + Duel.SetTargetParam(op) + if op==1 then + e:SetCategory(0) + e:SetProperty(0) + elseif op==2 then + e:SetCategory(CATEGORY_DESTROY) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if op==1 then + --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end + elseif op==2 then + --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + end +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) + and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.selfthtg(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.selfthop(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/c101305052.lua b/pre-release/c101305052.lua new file mode 100644 index 0000000000..545cd6a18a --- /dev/null +++ b/pre-release/c101305052.lua @@ -0,0 +1,101 @@ +--雷盟-ステップリーダ +--Blitzclique - Stepped Leader +--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) + --If a card(s) is destroyed by your "Blitzclique" card's effect: You can target 1 Thunder monster in your GY; add it to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_DESTROYED) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.thcon) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --During your Main Phase: You can Special Summon 1 Thunder monster from your hand, then destroy this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is 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:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.selfthcon) + e3:SetTarget(s.selfthtg) + e3:SetOperation(s.selfthop) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLITZCLIQUE} +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.thfilter(c) + return c:IsRace(RACE_THUNDER) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) 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) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local c=e:GetHandler() + 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) + and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.selfthtg(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.selfthop(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/c101305057.lua b/pre-release/c101305057.lua new file mode 100644 index 0000000000..b191c23e26 --- /dev/null +++ b/pre-release/c101305057.lua @@ -0,0 +1,66 @@ +--RUM-幻影騎士団レクイエム +--The Phantom Knights' Rank-Up-Magic Requiem +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Target 1 "The Phantom Knights" or "Xyz Dragon" monster in your GY or banishment; Special Summon it (but negate its effects), then Special Summon from your Extra Deck, 1 "The Phantom Knights" or "Xyz Dragon" Xyz Monster that is 1 Rank higher than a DARK Xyz Monster you control, by using that monster as material (this is treated as an Xyz Summon, transfer its materials) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON} +function s.fieldxyzfilter(c,e,tp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if not (#pg==0 or (#pg==1 and pg:IsContains(c))) then return false end + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzMonster() and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1) +end +function s.xyzspfilter(c,e,tp,mc,rank) + if c.rum_limit and not c.rum_limit(mc,e) then return false end + return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsXyzMonster() and c:IsRank(rank) and mc:IsCanBeXyzMaterial(c,tp) + and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.gybanspfilter(c,e,tp,field_xyz_chk) + return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and (field_xyz_chk or s.fieldxyzfilter(c,e,tp)) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local field_xyz_chk=Duel.IsExistingMatchingCard(s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.gybanspfilter(chkc,e,tp,field_xyz_chk) end + if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,field_xyz_chk) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,field_xyz_chk) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(e:GetHandler()) + if Duel.SpecialSummonComplete()==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) + local mc=Duel.SelectMatchingCard(tp,s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() + if not mc then return end + Duel.HintSelection(mc) + if mc:IsImmuneToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xyz=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mc,mc:GetRank()+1):GetFirst() + if xyz then + xyz:SetMaterial(mc) + Duel.Overlay(xyz,mc) + Duel.BreakEffect() + if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + xyz:CompleteProcedure() + end + end + end +end \ No newline at end of file diff --git a/pre-release/c101305060.lua b/pre-release/c101305060.lua new file mode 100644 index 0000000000..9a096282d1 --- /dev/null +++ b/pre-release/c101305060.lua @@ -0,0 +1,89 @@ +--霊力回復薬 +--Spiritual Power Recovery Potion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Banish any number of Spellcaster monsters and/or Spells from your GY; all monsters you currently control gain 200 ATK for each card banished this way, and if they do, you gain 400 LP for each card banished this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCost(s.atkcost) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) + c:RegisterEffect(e1) + --During your Main Phase: You can banish this card from your GY; Special Summon any number of Spellcaster monsters with different Attributes 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_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_POSSESSED} +function s.atkcostfilter(c) + return (c:IsRace(RACE_SPELLCASTER) or c:IsSpell()) and c:IsAbleToRemoveAsCost() +end +function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + local max_count=Duel.GetMatchingGroupCount(s.atkcostfilter,tp,LOCATION_GRAVE,0,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_GRAVE,0,1,max_count,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + e:SetLabel(#g) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + local banish_count=e:GetLabel() + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,200*banish_count) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,400*banish_count) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) + if #g==0 then return end + local prev_atk=0 + local c=e:GetHandler() + local banish_count=e:GetLabel() + local atk=200*banish_count + local atk_change_chk=false + for atkc in g:Iter() do + prev_atk=atkc:GetAttack() + --All monsters you currently control gain 200 ATK for each card banished this way + atkc:UpdateAttack(atk,RESET_EVENT|RESETS_STANDARD,c) + if not atk_change_chk and atkc:GetAttack()>prev_atk then + atk_change_chk=true + end + end + if not atk_change_chk then return end + Duel.Recover(tp,400*banish_count,REASON_EFFECT) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_SPELLCASTER) 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) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g==0 then return end + local max_attribute_count=g:GetClassCount(Card.GetAttribute) + ft=math.min(ft,max_attribute_count) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,max_attribute_count,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + 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/c101305068.lua b/pre-release/c101305068.lua new file mode 100644 index 0000000000..228105f71b --- /dev/null +++ b/pre-release/c101305068.lua @@ -0,0 +1,90 @@ +--雷盟-リターンストローク +--Blitzclique - Return Stroke +--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) + --"Blitzclique" monsters you control cannot be destroyed by your opponent's card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_BLITZCLIQUE) end) + e1:SetValue(aux.indoval) + c:RegisterEffect(e1) + --When your opponent activates a Spell Card or effect: You can return 1 "Blitzclique" monster you control to the hand; negate that effect, and if you do, destroy that card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(s.discon) + e2:SetCost(s.discost) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --You can banish this card from your GY, then target 1 "Blitzclique" monster in your field or GY; return it to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLITZCLIQUE} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) +end +function s.discostfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsFaceup() and c:IsAbleToHandAsCost() +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_COST) +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.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101305069.lua b/pre-release/c101305069.lua new file mode 100644 index 0000000000..d923307b42 --- /dev/null +++ b/pre-release/c101305069.lua @@ -0,0 +1,97 @@ +--雷盟-オルタネータ +--Blitzclique - Alternator +--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) + --Monsters your opponent controls lose 300 ATK/DEF for each Thunder monster you control + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_SZONE) + e1a:SetTargetRange(0,LOCATION_MZONE) + e1a:SetValue(function(e,c) return -300*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_THUNDER),e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) end) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --You can shuffle 1 other "Blitzclique" card from your hand or face-up field into the Deck; add 1 Thunder monster with a different name from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(s.thunderthcost) + e2:SetTarget(s.thunderthtg) + e2:SetOperation(s.thunderthop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) + --You can banish this card from your GY; add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" 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_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.blitzthtg) + e3:SetOperation(s.blitzthop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_names={101305050} --"Kowloon, Citadel of the Sky" +s.listed_series={SET_BLITZCLIQUE} +function s.thunderthcostfilter(c,tp) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + and Duel.IsExistingMatchingCard(s.thunderthfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) +end +function s.thunderthfilter(c,code) + return c:IsRace(RACE_THUNDER) and not c:IsCode(code) and c:IsAbleToHand() +end +function s.thunderthcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local sc=Duel.SelectMatchingCard(tp,s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp):GetFirst() + if sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + else + Duel.HintSelection(sc) + end + Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_COST) + e:SetLabel(sc:GetCode()) +end +function s.thunderthtg(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.thunderthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thunderthfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.blitzthfilter(c) + return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(101305050)) and c:IsAbleToHand() +end +function s.blitzthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.blitzthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.blitzthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.blitzthfilter,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/c101305073.lua b/pre-release/c101305073.lua new file mode 100644 index 0000000000..d84e9f633e --- /dev/null +++ b/pre-release/c101305073.lua @@ -0,0 +1,81 @@ +--幻影騎士団アンブレイジベイル +--The Phantom Knights of Umbrage Veil +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --If you have a "The Phantom Knights" monster in your field or GY, you can activate this card the turn it was Set + 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:SetCondition(s.actcon) + c:RegisterEffect(e0) + --Special Summon this card in Defense Position as a Normal Monster (Warrior/DARK/Level 3/ATK 0/DEF 300) (this card is NOT treated as a Trap), then you can change 1 Attack Position monster your opponent controls to Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --You can banish this card from your GY; immediately after this effect resolves, Xyz Summon 1 DARK Xyz 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:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.xyztg) + e2:SetOperation(s.xyzop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} +function s.actconfilter(c) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() and c:IsFaceup() +end +function s.actcon(e) + return Duel.IsExistingMatchingCard(s.actconfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) +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 e:IsHasType(EFFECT_TYPE_ACTIVATE) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then + c:AddMonsterAttribute(TYPE_NORMAL) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) + c:AddMonsterAttributeComplete() + if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local posg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,1,nil) + if #posg==0 then return end + Duel.HintSelection(posg) + Duel.BreakEffect() + Duel.ChangePosition(posg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE) + end + end +end +function s.xyzfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzSummonable() +end +function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc then + Duel.XyzSummon(tp,sc) + 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