From ec6af800824a175780e702f04c1021f70488c268 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 25 May 2025 19:07:03 +0300 Subject: [PATCH 1/3] Delete pre-release directory --- pre-release/c100200272.lua | 41 ------- pre-release/c100201001.lua | 42 ------- pre-release/c100201002.lua | 31 ----- pre-release/c100201003.lua | 56 --------- pre-release/c100295101.lua | 87 -------------- pre-release/c100443001.lua | 79 ------------ pre-release/c100443003.lua | 80 ------------- pre-release/c100443005.lua | 39 ------ pre-release/c100443007.lua | 91 -------------- pre-release/c100443010.lua | 67 ----------- pre-release/c100443101.lua | 101 ---------------- pre-release/c100443102.lua | 63 ---------- pre-release/c100443103.lua | 66 ---------- pre-release/c100443104.lua | 76 ------------ pre-release/c100443105.lua | 37 ------ pre-release/c100444001.lua | 86 ------------- pre-release/c100444002.lua | 78 ------------ pre-release/c100444003.lua | 54 --------- pre-release/c100445001.lua | 107 ----------------- pre-release/c100445002.lua | 86 ------------- pre-release/c100445003.lua | 60 ---------- pre-release/c100445024.lua | 69 ----------- pre-release/c100445025.lua | 91 -------------- pre-release/c100445026.lua | 76 ------------ pre-release/c101208081.lua | 93 -------------- pre-release/c101208082.lua | 73 ----------- pre-release/c101208083.lua | 70 ----------- pre-release/c101208084.lua | 63 ---------- pre-release/c101208085.lua | 59 --------- pre-release/c101208086.lua | 73 ----------- pre-release/c101208087.lua | 95 --------------- pre-release/c101208088.lua | 84 ------------- pre-release/c101208089.lua | 97 --------------- pre-release/c101208090.lua | 59 --------- pre-release/c101208091.lua | 83 ------------- pre-release/c101208092.lua | 82 ------------- pre-release/c101208093.lua | 44 ------- pre-release/c101208094.lua | 63 ---------- pre-release/c101208095.lua | 63 ---------- pre-release/c101208096.lua | 44 ------- pre-release/c101301001.lua | 108 ----------------- pre-release/c101301002.lua | 103 ---------------- pre-release/c101301003.lua | 84 ------------- pre-release/c101301004.lua | 96 --------------- pre-release/c101301005.lua | 101 ---------------- pre-release/c101301006.lua | 80 ------------- pre-release/c101301007.lua | 82 ------------- pre-release/c101301008.lua | 87 -------------- pre-release/c101301009.lua | 75 ------------ pre-release/c101301010.lua | 83 ------------- pre-release/c101301011.lua | 82 ------------- pre-release/c101301012.lua | 63 ---------- pre-release/c101301013.lua | 90 -------------- pre-release/c101301014.lua | 64 ---------- pre-release/c101301015.lua | 70 ----------- pre-release/c101301016.lua | 75 ------------ pre-release/c101301017.lua | 101 ---------------- pre-release/c101301018.lua | 98 --------------- pre-release/c101301019.lua | 84 ------------- pre-release/c101301020.lua | 82 ------------- pre-release/c101301021.lua | 90 -------------- pre-release/c101301022.lua | 120 ------------------- pre-release/c101301023.lua | 179 --------------------------- pre-release/c101301024.lua | 90 -------------- pre-release/c101301025.lua | 107 ----------------- pre-release/c101301026.lua | 96 --------------- pre-release/c101301027.lua | 92 -------------- pre-release/c101301028.lua | 99 --------------- pre-release/c101301029.lua | 88 -------------- pre-release/c101301030.lua | 59 --------- pre-release/c101301031.lua | 101 ---------------- pre-release/c101301032.lua | 99 --------------- pre-release/c101301033.lua | 91 -------------- pre-release/c101301034.lua | 74 ------------ pre-release/c101301035.lua | 64 ---------- pre-release/c101301036.lua | 51 -------- pre-release/c101301037.lua | 73 ----------- pre-release/c101301038.lua | 67 ----------- pre-release/c101301039.lua | 83 ------------- pre-release/c101301040.lua | 80 ------------- pre-release/c101301041.lua | 81 ------------- pre-release/c101301042.lua | 86 ------------- pre-release/c101301043.lua | 64 ---------- pre-release/c101301044.lua | 119 ------------------ pre-release/c101301045.lua | 77 ------------ pre-release/c101301046.lua | 80 ------------- pre-release/c101301047.lua | 60 ---------- pre-release/c101301048.lua | 61 ---------- pre-release/c101301049.lua | 90 -------------- pre-release/c101301050.lua | 59 --------- pre-release/c101301051.lua | 93 -------------- pre-release/c101301052.lua | 119 ------------------ pre-release/c101301053.lua | 96 --------------- pre-release/c101301054.lua | 93 -------------- pre-release/c101301055.lua | 83 ------------- pre-release/c101301056.lua | 66 ---------- pre-release/c101301057.lua | 79 ------------ pre-release/c101301058.lua | 85 ------------- pre-release/c101301059.lua | 67 ----------- pre-release/c101301060.lua | 67 ----------- pre-release/c101301061.lua | 78 ------------ pre-release/c101301062.lua | 78 ------------ pre-release/c101301063.lua | 67 ----------- pre-release/c101301064.lua | 69 ----------- pre-release/c101301065.lua | 50 -------- pre-release/c101301066.lua | 109 ----------------- pre-release/c101301067.lua | 125 ------------------- pre-release/c101301068.lua | 103 ---------------- pre-release/c101301069.lua | 95 --------------- pre-release/c101301070.lua | 99 --------------- pre-release/c101301071.lua | 31 ----- pre-release/c101301072.lua | 101 ---------------- pre-release/c101301073.lua | 104 ---------------- pre-release/c101301074.lua | 86 ------------- pre-release/c101301075.lua | 136 --------------------- pre-release/c101301076.lua | 151 ----------------------- pre-release/c101301077.lua | 60 ---------- pre-release/c101301078.lua | 55 --------- pre-release/c101301079.lua | 56 --------- pre-release/c101301080.lua | 120 ------------------- pre-release/c101302101.lua | 78 ------------ pre-release/c101302102.lua | 102 ---------------- pre-release/c101302103.lua | 104 ---------------- pre-release/c101302104.lua | 171 -------------------------- pre-release/c101302105.lua | 64 ---------- pre-release/c101302106.lua | 85 ------------- pre-release/c101302107.lua | 240 ------------------------------------- pre-release/c101302108.lua | 81 ------------- pre-release/c101302109.lua | 95 --------------- 129 files changed, 10737 deletions(-) delete mode 100644 pre-release/c100200272.lua delete mode 100644 pre-release/c100201001.lua delete mode 100644 pre-release/c100201002.lua delete mode 100644 pre-release/c100201003.lua delete mode 100644 pre-release/c100295101.lua delete mode 100644 pre-release/c100443001.lua delete mode 100644 pre-release/c100443003.lua delete mode 100644 pre-release/c100443005.lua delete mode 100644 pre-release/c100443007.lua delete mode 100644 pre-release/c100443010.lua delete mode 100644 pre-release/c100443101.lua delete mode 100644 pre-release/c100443102.lua delete mode 100644 pre-release/c100443103.lua delete mode 100644 pre-release/c100443104.lua delete mode 100644 pre-release/c100443105.lua delete mode 100644 pre-release/c100444001.lua delete mode 100644 pre-release/c100444002.lua delete mode 100644 pre-release/c100444003.lua delete mode 100644 pre-release/c100445001.lua delete mode 100644 pre-release/c100445002.lua delete mode 100644 pre-release/c100445003.lua delete mode 100644 pre-release/c100445024.lua delete mode 100644 pre-release/c100445025.lua delete mode 100644 pre-release/c100445026.lua delete mode 100644 pre-release/c101208081.lua delete mode 100644 pre-release/c101208082.lua delete mode 100644 pre-release/c101208083.lua delete mode 100644 pre-release/c101208084.lua delete mode 100644 pre-release/c101208085.lua delete mode 100644 pre-release/c101208086.lua delete mode 100644 pre-release/c101208087.lua delete mode 100644 pre-release/c101208088.lua delete mode 100644 pre-release/c101208089.lua delete mode 100644 pre-release/c101208090.lua delete mode 100644 pre-release/c101208091.lua delete mode 100644 pre-release/c101208092.lua delete mode 100644 pre-release/c101208093.lua delete mode 100644 pre-release/c101208094.lua delete mode 100644 pre-release/c101208095.lua delete mode 100644 pre-release/c101208096.lua delete mode 100644 pre-release/c101301001.lua delete mode 100644 pre-release/c101301002.lua delete mode 100644 pre-release/c101301003.lua delete mode 100644 pre-release/c101301004.lua delete mode 100644 pre-release/c101301005.lua delete mode 100644 pre-release/c101301006.lua delete mode 100644 pre-release/c101301007.lua delete mode 100644 pre-release/c101301008.lua delete mode 100644 pre-release/c101301009.lua delete mode 100644 pre-release/c101301010.lua delete mode 100644 pre-release/c101301011.lua delete mode 100644 pre-release/c101301012.lua delete mode 100644 pre-release/c101301013.lua delete mode 100644 pre-release/c101301014.lua delete mode 100644 pre-release/c101301015.lua delete mode 100644 pre-release/c101301016.lua delete mode 100644 pre-release/c101301017.lua delete mode 100644 pre-release/c101301018.lua delete mode 100644 pre-release/c101301019.lua delete mode 100644 pre-release/c101301020.lua delete mode 100644 pre-release/c101301021.lua delete mode 100644 pre-release/c101301022.lua delete mode 100644 pre-release/c101301023.lua delete mode 100644 pre-release/c101301024.lua delete mode 100644 pre-release/c101301025.lua delete mode 100644 pre-release/c101301026.lua delete mode 100644 pre-release/c101301027.lua delete mode 100644 pre-release/c101301028.lua delete mode 100644 pre-release/c101301029.lua delete mode 100644 pre-release/c101301030.lua delete mode 100644 pre-release/c101301031.lua delete mode 100644 pre-release/c101301032.lua delete mode 100644 pre-release/c101301033.lua delete mode 100644 pre-release/c101301034.lua delete mode 100644 pre-release/c101301035.lua delete mode 100644 pre-release/c101301036.lua delete mode 100644 pre-release/c101301037.lua delete mode 100644 pre-release/c101301038.lua delete mode 100644 pre-release/c101301039.lua delete mode 100644 pre-release/c101301040.lua delete mode 100644 pre-release/c101301041.lua delete mode 100644 pre-release/c101301042.lua delete mode 100644 pre-release/c101301043.lua delete mode 100644 pre-release/c101301044.lua delete mode 100644 pre-release/c101301045.lua delete mode 100644 pre-release/c101301046.lua delete mode 100644 pre-release/c101301047.lua delete mode 100644 pre-release/c101301048.lua delete mode 100644 pre-release/c101301049.lua delete mode 100644 pre-release/c101301050.lua delete mode 100644 pre-release/c101301051.lua delete mode 100644 pre-release/c101301052.lua delete mode 100644 pre-release/c101301053.lua delete mode 100644 pre-release/c101301054.lua delete mode 100644 pre-release/c101301055.lua delete mode 100644 pre-release/c101301056.lua delete mode 100644 pre-release/c101301057.lua delete mode 100644 pre-release/c101301058.lua delete mode 100644 pre-release/c101301059.lua delete mode 100644 pre-release/c101301060.lua delete mode 100644 pre-release/c101301061.lua delete mode 100644 pre-release/c101301062.lua delete mode 100644 pre-release/c101301063.lua delete mode 100644 pre-release/c101301064.lua delete mode 100644 pre-release/c101301065.lua delete mode 100644 pre-release/c101301066.lua delete mode 100644 pre-release/c101301067.lua delete mode 100644 pre-release/c101301068.lua delete mode 100644 pre-release/c101301069.lua delete mode 100644 pre-release/c101301070.lua delete mode 100644 pre-release/c101301071.lua delete mode 100644 pre-release/c101301072.lua delete mode 100644 pre-release/c101301073.lua delete mode 100644 pre-release/c101301074.lua delete mode 100644 pre-release/c101301075.lua delete mode 100644 pre-release/c101301076.lua delete mode 100644 pre-release/c101301077.lua delete mode 100644 pre-release/c101301078.lua delete mode 100644 pre-release/c101301079.lua delete mode 100644 pre-release/c101301080.lua delete mode 100644 pre-release/c101302101.lua delete mode 100644 pre-release/c101302102.lua delete mode 100644 pre-release/c101302103.lua delete mode 100644 pre-release/c101302104.lua delete mode 100644 pre-release/c101302105.lua delete mode 100644 pre-release/c101302106.lua delete mode 100644 pre-release/c101302107.lua delete mode 100644 pre-release/c101302108.lua delete mode 100644 pre-release/c101302109.lua diff --git a/pre-release/c100200272.lua b/pre-release/c100200272.lua deleted file mode 100644 index 1a8e65ff88..0000000000 --- a/pre-release/c100200272.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ドローパン ---Drawbread ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Draw 1 card and show it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,1,nil) end) - e1:SetCost(Cost.PayLP(200)) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.target(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) - Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==0 then return end - local dc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,dc) - Duel.ShuffleHand(tp) - if not dc:IsMonster() then return end - Duel.BreakEffect() - if not Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,dc:GetAttribute()) then - --Draw 1 card - Duel.Draw(tp,1,REASON_EFFECT) - else - --Discard 1 card - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) - end -end \ No newline at end of file diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua deleted file mode 100644 index 8ee5fa9d59..0000000000 --- a/pre-release/c100201001.lua +++ /dev/null @@ -1,42 +0,0 @@ ---契約を結びし竜の戦士 ---Dragonic Warrior -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated - 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) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.spcostfilter(c,e,tp) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,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_HAND,0,1,nil,e,tp) end - Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 - and Duel.IsExistingMatchingCard(s.spfilter,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)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,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 - Duel.SpecialSummonComplete() -end diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua deleted file mode 100644 index 9b0c446078..0000000000 --- a/pre-release/c100201002.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アイン・ロイド ---Einroid -local s,id=GetID() -function s.initial_effect(c) - --Send 2 Level 4 or lower Machine monsters from your Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DESTROYED) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) -end -function s.tgfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) 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,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,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,2,2,nil) - if #g==2 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua deleted file mode 100644 index 35f72f4627..0000000000 --- a/pre-release/c100201003.lua +++ /dev/null @@ -1,56 +0,0 @@ ---妖魔ヌリカベ ---Nurikabe -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCondition(aux.exccon) - e1:SetCost(Cost.PayLP(1000)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - for sc in Group.FromCards(c,tc):Iter() do - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(c) - --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) - sc:RegisterEffect(e1,true) - end - end - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100295101.lua b/pre-release/c100295101.lua deleted file mode 100644 index 9e08da14cd..0000000000 --- a/pre-release/c100295101.lua +++ /dev/null @@ -1,87 +0,0 @@ ---戦刀匠サイバ ---Saiba the Fighting Swordsmith ---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) - --Special Summon 1 Level 6 or lower Warrior monster from your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a Warrior 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_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) - e2:SetTarget(s.synchtg) - e2:SetOperation(s.synchop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,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.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(c) - end - Duel.SpecialSummonComplete() - if c:IsRelateToEffect(e) then - --This card cannot be used as Synchro Material for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3310) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end -end -function s.synchrocheck(tp,sg,sc) - return sg:IsExists(Card.IsRace,1,nil,RACE_WARRIOR) -end -function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - Synchro.CheckAdditional=s.synchrocheck - local res=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) - Synchro.CheckAdditional=nil - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.synchop(e,tp,eg,ep,ev,re,r,rp) - Synchro.CheckAdditional=s.synchrocheck - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil) - if #g>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=g:Select(tp,1,1,nil):GetFirst() - Duel.SynchroSummon(tp,sc) - else - Synchro.CheckAdditional=nil - end -end \ No newline at end of file diff --git a/pre-release/c100443001.lua b/pre-release/c100443001.lua deleted file mode 100644 index 8104029c84..0000000000 --- a/pre-release/c100443001.lua +++ /dev/null @@ -1,79 +0,0 @@ ---恋する乙女 ---Maiden in Love ---scripted by Naim -local s,id=GetID() -local COUNTER_MAIDEN=0x1090 -function s.initial_effect(c) - --Monsters your opponent controls that can attack must attack this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetRange(LOCATION_MZONE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) - e2:SetValue(function(e,c) return c==e:GetHandler() end) - c:RegisterEffect(e2) - --Cannot be destroyed by battle - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(1) - c:RegisterEffect(e3) - --Activate 1 of these effects at the end of the Damage Step, if this card battled an opponent's monster - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(s.effcon) - e4:SetTarget(s.efftg) - e4:SetOperation(s.effop) - c:RegisterEffect(e4) -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function s.controlfilter(c) - return c:HasCounter(COUNTER_MAIDEN) and c:IsControlerCanBeChanged() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_MAIDEN,1) - local b2=Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil) - local c=e:GetHandler() - if chk==0 then return c:IsLocation(LOCATION_MZONE) and c:IsRelateToBattle() and (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(CATEGORY_COUNTER) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_MAIDEN) - elseif op==2 then - e:SetCategory(CATEGORY_CONTROL) - local g=Duel.GetMatchingGroup(s.controlfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Place 1 Maiden Counter on 1 face-up monster your opponent controls. - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) - local sc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_MAIDEN,1):GetFirst() - if sc then - sc:AddCounter(COUNTER_MAIDEN,1) - end - elseif op==2 then - --Take control of 1 opponent's monster with a Maiden Counter. - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local sc=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.GetControl(sc,tp) - end - - end -end \ No newline at end of file diff --git a/pre-release/c100443003.lua b/pre-release/c100443003.lua deleted file mode 100644 index b1dacd544f..0000000000 --- a/pre-release/c100443003.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ユーカリ・モール ---Eucalyptus Mole ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Beast monster from your Deck in face-down Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.fdsptg) - e1:SetOperation(s.fdspop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Special Summon 1 "Koala" monster from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.koalasptg) - e3:SetOperation(s.koalaspop) - c:RegisterEffect(e3) -end -s.listed_series={SET_KOALA} -function s.fdspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) -end -function s.fdsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.fdspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,tp,POS_FACEUP_DEFENSE) -end -function s.fdspop(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.fdspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then - Duel.ConfirmCards(1-tp,g) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsAttackPos() then - Duel.BreakEffect() - Duel.ChangePosition(c,POS_FACEUP_DEFENSE) - end - end -end -function s.koalaspfilter(c,e,tp) - return c:IsSetCard(SET_KOALA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.koalasptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.koalaspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.koalaspop(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.koalaspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) - --Non-Effect Beast monsters you control gain ATK equal to their own original DEF - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsNonEffectMonster() and c:IsRace(RACE_BEAST) end) - e1:SetValue(function(e,c) return c:GetBaseDefense() end) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100443005.lua b/pre-release/c100443005.lua deleted file mode 100644 index 8a657b806a..0000000000 --- a/pre-release/c100443005.lua +++ /dev/null @@ -1,39 +0,0 @@ ---幻魔の扉 ---Illusion Gate -local s,id=GetID() -function s.initial_effect(c) - --Destroy as many monsters your opponent controls as possible, then you can Special Summon 1 monster from your opponent's GY to your field, ignoring its Summoning conditions - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(Cost.PayLP(1/2)) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if chk==0 then return not Duel.HasFlagEffect(tp,id) and #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,0,0,1) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100443007.lua b/pre-release/c100443007.lua deleted file mode 100644 index 0ffd8ecc80..0000000000 --- a/pre-release/c100443007.lua +++ /dev/null @@ -1,91 +0,0 @@ ---プリマの光 ---Prima Light ---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) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Add 1 Warrior or Fairy "Cyber" monster 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) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CYBER} -function s.tribfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.nsfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.CheckReleaseGroup(tp,s.tribfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) - local b2=Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,nil) - 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==1 then - e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Tribute 1 EARTH Warrior monster, and if you do, Special Summon 1 LIGHT Warrior monster from your hand or Deck - local rg=Duel.SelectReleaseGroup(tp,s.tribfilter,1,1,nil,tp) - if #rg>0 and Duel.Release(rg,REASON_EFFECT)>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,false,false,POS_FACEUP) - end - end - elseif op==2 then - --Immediately after this effect resolves, Normal Summon 1 Warrior monster from your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end - end -end -function s.thfilter(c) - return c:IsRace(RACE_WARRIOR|RACE_FAIRY) and c:IsSetCard(SET_CYBER) 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/c100443010.lua b/pre-release/c100443010.lua deleted file mode 100644 index c5890ee4ea..0000000000 --- a/pre-release/c100443010.lua +++ /dev/null @@ -1,67 +0,0 @@ ---魂の結束-ソウル・ユニオン ---Soul Union ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.atkfilter(c) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:HasNonZeroAttack() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - e:SetLabelObject(tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.fusconfilter(c) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsFaceup() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg~=2 then return end - local fc=e:GetLabelObject() - local gc=(tg-fc):GetFirst() - if fc:IsFaceup() and not fc:IsImmuneToEffect(e) then - --That monster on the field gains ATK equal to the ATK of that other monster in the GY until the end of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(gc:GetAttack()) - e1:SetReset(RESETS_STANDARD_PHASE_END) - fc:RegisterEffect(e1) - if not Duel.IsExistingMatchingCard(s.fusconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) then return end - local params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),matfilter=function(c) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() end,extrafil=s.fextra,extraop=Fusion.BanishMaterial} - if Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - Fusion.SummonEffOP(params)(e,tp,eg,ep,ev,re,r,rp) - end - end -end -function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil -end \ No newline at end of file diff --git a/pre-release/c100443101.lua b/pre-release/c100443101.lua deleted file mode 100644 index b4a1065c52..0000000000 --- a/pre-release/c100443101.lua +++ /dev/null @@ -1,101 +0,0 @@ ---超電導戦士 リニア・マグナム± ---Conduction Warrior Linear Magnum ± ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must first be Special Summoned (from your hand) by sending 2 "Magnet Warrior" monsters whose original Level is 4 or lower from your hand, Deck, and/or face-up field to the GY - 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) - --Gains ATK equal to half of the ATK 1 other EARTH monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,1}) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --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_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,2}) - e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_DESTROY) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MAGNET_WARRIOR} -function s.spconfilter(c) - return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsMonster() and c:GetOriginalLevel()<=4 - and c:IsAbleToGraveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,aux.ChkfMMZ(1),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) - if #g>0 then - g:KeepAlive() - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if not g then return end - Duel.SendtoGrave(g,REASON_COST) - g:DeleteGroup() -end -function s.atkfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:HasNonZeroAttack() -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 tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,tc:GetAttack()//2) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - --Gains ATK equal to half of that monster's ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()//2) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end -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,e:GetHandler(),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/c100443102.lua b/pre-release/c100443102.lua deleted file mode 100644 index 8341e1eb8a..0000000000 --- a/pre-release/c100443102.lua +++ /dev/null @@ -1,63 +0,0 @@ ---錬金釜-カオス・ディスティル ---Chaos Distill ---scripted by Naim -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) - --Any card sent to your GY is banished instead - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_ALL,0) - e1:SetValue(LOCATION_REMOVED) - e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) - c:RegisterEffect(e1) - --Activate 1 of these effects - 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_SZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -local CARD_MACRO_COSMOS=30241314 -s.listed_names={CARD_MACRO_COSMOS,id} -function s.macrofilter(c) - return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.monsterfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) - local c=e:GetHandler() - local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,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==2 then - Duel.Remove(c,POS_FACEUP,REASON_COST) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,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 diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua deleted file mode 100644 index dfaf24888f..0000000000 --- a/pre-release/c100443103.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ヒーローズルール1 ファイブ・フリーダムス ---Hero's Rule 1: Five Freedoms ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish up to 5 cards from the GYs - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.rmvtg) - e1:SetOperation(s.rmvop) - c:RegisterEffect(e1) - --Special Summon 1 of your banished "Elemental HERO" monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.rmvfilter(c) - return c:IsAbleToRemove() and aux.SpElimFilter(c) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua deleted file mode 100644 index 6e4745de52..0000000000 --- a/pre-release/c100443104.lua +++ /dev/null @@ -1,76 +0,0 @@ ---デーモンズ・マタドール ---Archfiend Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" - 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():IsRitualSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Cannot be destroyed by battle, also you take no battle damage from battles involving this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - c:RegisterEffect(e3) - --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_names={100443105,id} --"Ritual of the Matador" -s.listed_series={SET_ARCHFIEND} -function s.thfilter(c) - return c:IsSetCard(SET_ARCHFIEND) 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,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,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,2,2,nil) - if #g==2 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - --This card cannot attack for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3206) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua deleted file mode 100644 index 61c24806c2..0000000000 --- a/pre-release/c100443105.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マタドール降臨の儀式 ダーク・パセオ ---Ritual of the Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Ritual Summon "Archfiend Matador" - Ritual.AddProcGreaterCode(c,6,nil,100443104) - --Special Summon 1 non-Ritual "Archfiend" monster from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfBanish) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={100443104} --"Archfiend Matador" -s.listed_series={SET_ARCHFIEND} -function s.spfilter(c,e,tp) - return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) 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 \ No newline at end of file diff --git a/pre-release/c100444001.lua b/pre-release/c100444001.lua deleted file mode 100644 index aa8e637ee6..0000000000 --- a/pre-release/c100444001.lua +++ /dev/null @@ -1,86 +0,0 @@ ---E・HERO サンダー・ジャイアント-ボルティック・サンダー ---Elemental HERO Thunder Giant - Voltic Thunder ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 "Elemental HERO" monsters with different Attributes - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - c:AddMustBeFusionSummoned() - --Destroy all other cards on the field - 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) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Special Summon 1 "Elemental HERO" monster from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) local c=e:GetHandler() return c:IsFusionSummoned() and c:HasFlagEffect(id) end) - e2:SetCost(Cost.SelfTribute) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Check if a Normal Monster was used as material for the above effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_MATERIAL_CHECK) - e3:SetValue(s.valcheck) - c:RegisterEffect(e3) -end -s.material_setcode={SET_ELEMENTAL_HERO} -s.listed_series={SET_ELEMENTAL_HERO} -function s.matfilter(c,fc,sumtype,tp,sub,mg,sg) - local attr=c:GetAttribute(fc,sumtype,tp) - return c:IsSetCard(SET_ELEMENTAL_HERO,fc,sumtype,tp) and attr>0 - and (not sg or not sg:IsExists(s.diffattfilter,1,c,attr,fc,sumtype,tp)) -end -function s.diffattfilter(c,attr,fc,sumtype,tp) - return c:IsAttribute(attr,fc,sumtype,tp) and not c:IsHasEffect(511002961) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if chk==0 then return #g>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end - 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 exc=c:IsRelateToEffect(e) and c or nil - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.valcheck(e,c) - local mg=c:GetMaterial() - if mg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_LEAVE),0,1) - end -end \ No newline at end of file diff --git a/pre-release/c100444002.lua b/pre-release/c100444002.lua deleted file mode 100644 index 98682443a1..0000000000 --- a/pre-release/c100444002.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ドリル・アームド・ドラゴン ---Drill Armed Dragon ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Apply a "for the rest of this turn, all WIND Dragon monsters you control will gain 300 ATK" effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.atkcost) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --Add 1 Dragon monster from your Deck to your hand with a Level equal to the number of banished monsters - 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_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.atkcostfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToGraveAsCost() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g+c,REASON_COST) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - --For the rest of this turn, all WIND Dragon monsters you control will gain 300 ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON) end) - e1:SetValue(300) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thcostfilter(c) - return c:IsRace(RACE_DRAGON) and (c:IsLevelAbove(7) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) -end -function s.rescon(sg,e,tp,mg) - return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,#sg) -end -function s.thfilter(c,lv) - return c:IsRace(RACE_DRAGON) and c:IsLevel(lv) and not c:IsCode(id) -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local rg=Duel.GetMatchingGroup(s.thcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - if chk==0 then return aux.SelectUnselectGroup(rg,e,tp,1,#rg,s.rescon,0) end - local g=aux.SelectUnselectGroup(rg,e,tp,1,#rg,s.rescon,1,tp,HINTMSG_REMOVE) - e:SetLabel(#g) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then local res=e:GetLabel()==-100 e:SetLabel(0) return res 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:GetLabel()) - 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/c100444003.lua b/pre-release/c100444003.lua deleted file mode 100644 index a00ac365ad..0000000000 --- a/pre-release/c100444003.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ライトウォーター・ドラゴン ---Light Water Dragon ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 3 Level 5 or lower Dinosaur monsters (WATER and/or WIND) from your Deck in Defense Position, but their effects are negated - 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) - e1:SetCost(Cost.SelfBanish) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={85066822} --"Water Dragon" -function s.spfilter(c,e,tp) - return c:IsLevelBelow(5) and c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_WATER|ATTRIBUTE_WIND) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>=3 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,3,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,3,3,nil,e,tp) - if #g==3 then - for sc in g:Iter() do - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --Negate its effects - sc:NegateEffects(c) - end - end - Duel.SpecialSummonComplete() - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Dinosaur and Sea Serpent 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:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_DINOSAUR|RACE_SEASERPENT) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100445001.lua b/pre-release/c100445001.lua deleted file mode 100644 index b011e672b6..0000000000 --- a/pre-release/c100445001.lua +++ /dev/null @@ -1,107 +0,0 @@ ---滅びの黒魔術師 ---Dark Magician of Destruction ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Dark Magician" + 1 LIGHT or DARK monster - Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_DARK)) - c:AddMustBeFusionSummoned() - --You can only Fusion Summon or Special Summon by its alternate procedure "Dark Magician of Destruction" once per turn - 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) - --You can Special Summon this card by banishing 1 Level 6 or higher DARK Spellcaster monster you control during the turn a Spell Card or effect was activated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - e1:SetValue(1) - c:RegisterEffect(e1) - --Add 1 "Dark Magician" or 1 card that mentions it 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_SPSUMMON_SUCCESS) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --This card's name becomes "Dark Magician" while on the field or in the GY - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e3:SetValue(CARD_DARK_MAGICIAN) - c:RegisterEffect(e3) - --Keep track of a turn a Spell Card or effect was activated - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) -end -s.listed_names={CARD_DARK_MAGICIAN} -s.material_setcode=SET_DARK_MAGICIAN -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) - --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn - 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.selfspcostfilter(c,tp,sc) - return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) - and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 -end -function s.selfspcon(e,c) - if not c then return true end - local tp=c:GetControler() - return (Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) - and Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_MZONE,0,1,1,true,nil,tp,c) - if g and #g>0 then - g:KeepAlive() - 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 not g then return end - Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) - g:DeleteGroup() -end -function s.thfilter(c) - return (c:IsCode(CARD_DARK_MAGICIAN) or c:ListsCode(CARD_DARK_MAGICIAN)) 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 diff --git a/pre-release/c100445002.lua b/pre-release/c100445002.lua deleted file mode 100644 index 840c21495d..0000000000 --- a/pre-release/c100445002.lua +++ /dev/null @@ -1,86 +0,0 @@ ---合体魔竜ティマイオス ---Timaeus the United Magidragon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Dark Magician" or "Dark Magician Girl" + 1 Dragon or Spellcaster monster - Fusion.AddProcMix(c,true,true,{CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL},aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)) - --After this card is Special Summoned, until the end of your next turn, it is unaffected by other cards' effects - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --Make this card gain 100 ATK for each Spell in the GYs and banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --Destroy 1 Spell/Trap on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.material_setcode={SET_DARK_MAGICIAN,SET_MAGICIAN_GIRL,SET_DARK_MAGICIAN_GIRL} -s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL} -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.IsTurnPlayer(tp) and 3 or 2 - --Unaffected by other cards' effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(3100) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(function(e,re) return e:GetHandler()~=re:GetOwner() end) - e1:SetReset(RESETS_STANDARD_PHASE_END,ct) - c:RegisterEffect(e1) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) - if chk==0 then return ct>0 end - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,100*ct) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) - if ct==0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --Gains 100 ATK for each Spell in the GYs and banishment - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(100*ct) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - 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) -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/c100445003.lua b/pre-release/c100445003.lua deleted file mode 100644 index 24e15e5fd4..0000000000 --- a/pre-release/c100445003.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ティマイオスの眼光 ---The Gaze of Timaeus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Fusion Monster from your Extra Deck that mentions a targeted "Dark Magician" or "Dark Magician Girl" as material, by shuffling that target into the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL,1784686} --"The Eye of Timaeus" -function s.tdfilter(c,e,tp) - return c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) and c:IsFaceup() - and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,mc) - if Duel.GetLocationCountFromEx(tp,tp,mc,c)<=0 then return false end - local mustg=aux.GetMustBeMaterialGroup(tp,nil,tp,c,nil,REASON_FUSION) - return c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(mc:GetCode()) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) - and (#mustg==0 or (#mustg==1 and mustg:IsContains(mc))) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc==0 then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() - if sc then - sc:SetMaterial(Group.FromCards(tc)) - Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT|REASON_MATERIAL|REASON_FUSION) - Duel.BreakEffect() - if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - --Banish it during the End Phase of the next turn - local turn_summoned=Duel.GetTurnCount() - aux.DelayedOperation(sc,PHASE_END,id,e,tp, - function(sc) Duel.Remove(sc,POS_FACEUP,REASON_EFFECT) end, - function() return Duel.GetTurnCount()==turn_summoned+1 end, - nil,2,aux.Stringid(id,1) - ) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100445024.lua b/pre-release/c100445024.lua deleted file mode 100644 index 8695f4d3c8..0000000000 --- a/pre-release/c100445024.lua +++ /dev/null @@ -1,69 +0,0 @@ ---M・HERO ダスク・クロウ ---Masked HERO Dusk Crow ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --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) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Masked HERO" monster from your Deck or GY to your hand, except "Masked HERO Dusk Crow" - 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) -end -s.listed_series={SET_HERO,SET_MASKED_HERO} -s.listed_names={id} -function s.spcostfilter(c) - return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) -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|LOCATION_GRAVE,0,1,nil) end - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_MASKED_HERO) 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|LOCATION_GRAVE,0,1,nil) 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):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/c100445025.lua b/pre-release/c100445025.lua deleted file mode 100644 index 66342fd025..0000000000 --- a/pre-release/c100445025.lua +++ /dev/null @@ -1,91 +0,0 @@ ---M・HERO ファーネス ---Masked HERO Furnace ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Mask Change" or "Polymerization" 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.AND(Cost.SelfReveal,s.thcost)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon this card if you Special Summon a non-FIRE "HERO" Fusion Monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Checks to see if non-"HERO" monsters were Summoned from the Extra Deck - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_HERO) end) -end -s.listed_series={SET_HERO} -s.listed_names={21143940,CARD_POLYMERIZATION} --"Mask Change" -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon from the Extra Deck the turn you activate this effect, except "HERO" monsters - 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_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return c:IsCode(21143940,CARD_POLYMERIZATION) 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,1,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.spconfilter(c,tp) - return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_HERO) and c:IsType(TYPE_FUSION) and c:IsSummonPlayer(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/c100445026.lua b/pre-release/c100445026.lua deleted file mode 100644 index 1cdd0fc079..0000000000 --- a/pre-release/c100445026.lua +++ /dev/null @@ -1,76 +0,0 @@ ---M・HERO アトミック ---Masked HERO Atomic ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with "Mask Change" - c:AddMustBeSpecialSummoned() - --The first time this card would be destroyed by battle or 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(1) - e1:SetValue(function(e,re,r,rp) return (r&(REASON_BATTLE|REASON_EFFECT))>0 end) - c:RegisterEffect(e1) - --Special Summon 1 non-FIRE "Masked HERO" monster from your GY or banishment in Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - 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) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Set 1 "Change" Quick-Play Spell from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_LEAVE_GRAVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_MASKED_HERO,SET_CHANGE} -function s.spfilter(c,e,tp) - return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_MASKED_HERO) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE) - end -end -function s.setfilter(c) - return c:IsSetCard(SET_CHANGE) and c:IsQuickPlaySpell() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SSet(tp,tc) - end -end \ No newline at end of file diff --git a/pre-release/c101208081.lua b/pre-release/c101208081.lua deleted file mode 100644 index 5120eecf1d..0000000000 --- a/pre-release/c101208081.lua +++ /dev/null @@ -1,93 +0,0 @@ ---暁天使カムビン ---Dawn Angel Kambi ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --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) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Special Summon 1 Fairy monster from your Deck whose Level equals the total Levels the Tributed monsters had on the field - 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(s.deckspcost) - e2:SetTarget(s.decksptg) - e2:SetOperation(s.deckspop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_FAIRY) end) -end -function s.selfspconfilter(c) - return c:IsFacedown() or not c:IsRace(RACE_FAIRY) -end -function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,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) -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.deckspcostfilter(c) - return c:IsRace(RACE_FAIRY) and c:HasLevel() -end -function s.rescon(sg,tp,exg,e,handler) - return sg:IsContains(handler) and Duel.GetMZoneCount(tp,sg)>0 - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sg:GetSum(Card.GetLevel)),not sg:IsContains(handler) -end -function s.deckspfilter(c,e,tp,lv) - return c:IsRace(RACE_FAIRY) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.deckspcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() and c:HasLevel() and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 - and Duel.CheckReleaseGroupCost(tp,s.deckspcostfilter,1,false,s.rescon,nil,e,c) end - local g=Duel.SelectReleaseGroupCost(tp,s.deckspcostfilter,1,99,false,s.rescon,nil,e,c) - g:AddCard(c) - e:SetLabel(g:GetSum(Card.GetLevel)) - Duel.Release(g,REASON_COST) - --You cannot Special Summon the turn you activate this effect, except Fairy 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_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_FAIRY) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local res=e:GetLabel()==-100 - e:SetLabel(0) - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.deckspop(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.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101208082.lua b/pre-release/c101208082.lua deleted file mode 100644 index 6a936f2622..0000000000 --- a/pre-release/c101208082.lua +++ /dev/null @@ -1,73 +0,0 @@ ---久遠の神徒フリムニル ---Hrimnir the Divine Follower ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Set 1 Continuous Spell from your Deck, but send it to the GY during your opponent's End Phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(s.setcost) - e1:SetTarget(s.settg) - e1:SetOperation(s.setop) - c:RegisterEffect(e1) - --Special Summon this card, 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,3,true,nil,nil,RACE_FAIRY) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsRace,3,3,true,nil,nil,RACE_FAIRY) - Duel.Release(g,REASON_COST) -end -function s.setfilter(c) - return c:IsContinuousSpell() 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.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_STZONE) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - 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 - --Send it to the GY during your opponent's End Phase - aux.DelayedOperation(sc,PHASE_END,id,e,tp, - function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, - function() return Duel.IsTurnPlayer(1-tp) end, - 0,1,aux.Stringid(id,2) - ) - end -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/c101208083.lua b/pre-release/c101208083.lua deleted file mode 100644 index cf1ec544db..0000000000 --- a/pre-release/c101208083.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ヴィンゴルヴの祝福 ---Vingolf's Blessing ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can send 1 LIGHT Fairy monster from your Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Fairy monsters you control gain 100 ATK for each Fairy monster in your field and GY - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(function(e,c) return c:IsRace(RACE_FAIRY) end) - e2:SetValue(function(e,c) return 100*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_FAIRY),c:GetControler(),LOCATION_MZONE|LOCATION_GRAVE,0,nil) end) - c:RegisterEffect(e2) - --Special Summon 1 Level 4 or lower Fairy monster from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.tgfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToGrave() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - 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 -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101208084.lua b/pre-release/c101208084.lua deleted file mode 100644 index 8b6fe72c8c..0000000000 --- a/pre-release/c101208084.lua +++ /dev/null @@ -1,63 +0,0 @@ ---アスピスクール ---Aspischool ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 6 or lower Fish monster from your hand in Defense Position, but banish it when it leaves the field - 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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.handsptg) - e1:SetOperation(s.handspop) - c:RegisterEffect(e1) - --Special Summon this card in Defense Position - 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_REMOVE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) -end -function s.handspfilter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.handspop(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,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - sc:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -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,POS_FACEUP_DEFENSE) 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_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101208085.lua b/pre-release/c101208085.lua deleted file mode 100644 index 708321db3d..0000000000 --- a/pre-release/c101208085.lua +++ /dev/null @@ -1,59 +0,0 @@ ---トックス・ボックス ---Toxic Boxfish ---Scripted by Hatter -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) - --Banish 1 card in either GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - 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) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.rmtg) - e1:SetOperation(s.rmop) - c:RegisterEffect(e1) - --Negate the effects of 1 face-up card your opponent controls 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_REMOVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmop(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.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c:IsControler(1-tp) and chkc:IsNegatable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - 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(),RESET_PHASE|PHASE_END,true) - end -end \ No newline at end of file diff --git a/pre-release/c101208086.lua b/pre-release/c101208086.lua deleted file mode 100644 index c200019702..0000000000 --- a/pre-release/c101208086.lua +++ /dev/null @@ -1,73 +0,0 @@ ---フィッシュアンドビッズ ---Fish and Bids ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Take 2 Fish monsters from your Deck and either banish both or send both to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(function() return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end) - e1:SetCost(s.rmtgcost) - e1:SetTarget(s.rmtgtg) - e1:SetOperation(s.rmtgop) - c:RegisterEffect(e1) -end -function s.rmtgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.rmtgfilter(c) - return c:IsRace(RACE_FISH) and (c:IsAbleToRemove() or c:IsAbleToGrave()) -end -function s.rescon(sg) - return sg:FilterCount(Card.IsAbleToRemove,nil)==2 or sg:FilterCount(Card.IsAbleToGrave,nil)==2 -end -function s.rmtgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.rmtgfilter,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function s.rmtgop(e,tp,eg,ep,ev,re,r,rp) - local oppo=1-tp - local hg=Duel.GetMatchingGroup(Card.IsAbleToRemove,oppo,LOCATION_HAND,0,nil,oppo) - --Your opponent can banish 2 cards from their hand - if #hg>=2 and Duel.SelectYesNo(oppo,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,oppo,HINTMSG_REMOVE) - local hsg=hg:Select(oppo,2,2,nil) - return #hsg==2 and Duel.Remove(hsg,POS_FACEUP,REASON_EFFECT,PLAYER_NONE,oppo)==2 - end - --If they do not, take 2 Fish monsters from your Deck and either banish both or send both to the GY - local g=Duel.GetMatchingGroup(s.rmtgfilter,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 - local b1=sg:FilterCount(Card.IsAbleToRemove,nil)==2 - local b2=sg:FilterCount(Card.IsAbleToGrave,nil)==2 - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - if op==1 then - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - elseif op==2 then - Duel.SendtoGrave(sg,REASON_EFFECT) - end - end - --You cannot Special Summon for the rest of this turn, except Fish monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,5)) - 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 not c:IsRace(RACE_FISH) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101208087.lua b/pre-release/c101208087.lua deleted file mode 100644 index 1008a43716..0000000000 --- a/pre-release/c101208087.lua +++ /dev/null @@ -1,95 +0,0 @@ ---レプリカルド・ラッド ---Replicard LAD ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --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) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Special Summon 1 monster from your Deck with a different name that has 2 or more of the same Level, ATK, and/or DEF as the targeted monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.decksptg) - e2:SetOperation(s.deckspop) - c:RegisterEffect(e2) -end -function s.selfspcostfilter(c,tp) - return c:IsLevelAbove(7) and c:IsAbleToRemoveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.Remove(g,POS_FACEUP,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 -end -function s.tgfilter(c,e,tp) - if c:IsFacedown() then return false end - local code=c:GetCode() - local lv=c:HasLevel() and c:GetLevel() or -1 - local atk=c:GetAttack() - local def=c:HasDefense() and c:GetDefense() or -1 - return Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code,lv,atk,def) -end -function s.deckspfilter(c,e,tp,code,lv,atk,def) - if c:IsCode(code) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end - local ct=0 - if c:IsLevel(lv) then ct=ct+1 end - if c:IsAttack(atk) then ct=ct+1 end - if c:IsDefense(def) then ct=ct+1 end - return ct>=2 -end -function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.deckspop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end - local code=tc:GetCode() - local lv=tc:HasLevel() and tc:GetLevel() or -1 - local atk=tc:GetAttack() - local def=tc:HasDefense() and tc:GetDefense() or -1 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code,lv,atk,def):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --It cannot activate its effects this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3302) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c101208088.lua b/pre-release/c101208088.lua deleted file mode 100644 index e61a0f783a..0000000000 --- a/pre-release/c101208088.lua +++ /dev/null @@ -1,84 +0,0 @@ ---雷霆ノ魔軍神 ---Sakra Vendirage ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters - Xyz.AddProcedure(c,nil,4,2) - --Special Summon 1 Level/Rank 4 Psychic monster from your GY, except "Sakra Vendirage" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --Change the name of 1 other face-up monster on the field to "Sakra Vendirage" until the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) end) - e2:SetTarget(s.nametg) - e2:SetOperation(s.nameop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.spfilter(c,e,tp) - return (c:IsLevel(4) or c:IsRank(4)) and c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.nametg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and not chkc:IsCode(id) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(aux.NOT(Card.IsCode),id),tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,aux.FaceupFilter(aux.NOT(Card.IsCode),id),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) -end -function s.nameop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local c=e:GetHandler() - --That monster's name becomes "Sakra Vendirage" until the End Phase - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(id) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - --Reset the name change effect manually in the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetOperation(function(e) e1:Reset() Duel.HintSelection(Group.FromCards(tc)) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/pre-release/c101208089.lua b/pre-release/c101208089.lua deleted file mode 100644 index 3875b71721..0000000000 --- a/pre-release/c101208089.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ピース・オブ・スタチュー ---Tiki Peace ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card as an Effect Monster - 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and s.selfsptg(e,tp,eg,ep,ev,re,r,rp,0) then - c:AddMonsterAttribute(TYPE_EFFECT|TYPE_TRAP) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) - --Special Summon 1 Continuous Trap, except "Tiki Peace", from your GY or banishment as a Normal Monster and its name becomes "Tiki Peace" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(Cost.PayLP(800)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1,true) - c:AddMonsterAttributeComplete() - end - Duel.SpecialSummonComplete() -end -function s.spfilter(c,tp) - return c:IsContinuousTrap() and c:IsFaceup() and not c:IsCode(id) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,nil,TYPE_MONSTER|TYPE_NORMAL,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) -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|LOCATION_REMOVED,0,1,nil,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) -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_GRAVE|LOCATION_REMOVED,0,1,1,nil,tp):GetFirst() - if not sc then return end - sc:AssumeProperty(ASSUME_CODE,id) - if Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP) then - --Special Summon it as Normal Monster (Rock/EARTH/Level 4/ATK 1000/DEF 1000) and its name becomes "Tiki Peace" (even while face-down) - local e1=Effect.CreateEffect(e:GetHandler()) - 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|RESETS_STANDARD&~RESET_TURN_SET) - sc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetValue(RACE_ROCK) - sc:RegisterEffect(e2,true) - local e3=e1:Clone() - e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e3:SetValue(ATTRIBUTE_EARTH) - sc:RegisterEffect(e3,true) - local e4=e1:Clone() - e4:SetCode(EFFECT_CHANGE_LEVEL) - e4:SetValue(4) - sc:RegisterEffect(e4,true) - local e5=e1:Clone() - e5:SetCode(EFFECT_SET_BASE_ATTACK) - e5:SetValue(1000) - sc:RegisterEffect(e5,true) - local e6=e1:Clone() - e6:SetCode(EFFECT_SET_BASE_DEFENSE) - e6:SetValue(1000) - sc:RegisterEffect(e6,true) - local e7=e1:Clone() - e7:SetCode(EFFECT_CHANGE_CODE) - e7:SetValue(id) - sc:RegisterEffect(e7,true) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c101208090.lua b/pre-release/c101208090.lua deleted file mode 100644 index 1fdd55337a..0000000000 --- a/pre-release/c101208090.lua +++ /dev/null @@ -1,59 +0,0 @@ ---巳剣之尊 麁正 ---Mitsurugi no Mikoto, Aramasa -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Mitsurugi" monster from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_RELEASE) - c:RegisterEffect(e3) - --If another Reptile monster(s) you control would be destroyed by battle or card effect, you can Tribute this card instead - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetTarget(s.reptg) - e4:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) - e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Release(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end) - c:RegisterEffect(e4) -end -s.listed_series={SET_MITSURUGI} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_MITSURUGI) 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 -function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_REPTILE) - and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return eg:IsExists(s.repfilter,1,c,tp) - and c:IsReleasableByEffect(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end - return Duel.SelectEffectYesNo(tp,c,96) -end \ No newline at end of file diff --git a/pre-release/c101208091.lua b/pre-release/c101208091.lua deleted file mode 100644 index fa60308884..0000000000 --- a/pre-release/c101208091.lua +++ /dev/null @@ -1,83 +0,0 @@ ---巳剣之皇子 小碓 ---Mitsurugi no Miko, Wousu ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by Tributing 1 other Reptile mosnter from your hand and 1 monster your opponent controls - 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,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Discard 1 card, and if you do, add this card to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -function s.spconfilter(c,tp) - return (c:IsRace(RACE_REPTILE) or c:IsControler(1-tp)) and c:IsReleasable() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND,LOCATION_MZONE,c,tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND,LOCATION_MZONE,c,tp) - local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_RELEASE,nil,nil,true) - if #g>0 then - g:KeepAlive() - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if not g then return end - Duel.Release(g,REASON_COST) - g:DeleteGroup() - --You cannot Special Summon nor activate monster effects for the rest of this turn, except Reptile 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_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_REPTILE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetTarget(aux.TRUE) - e2:SetValue(function(e,re) return re:IsMonsterEffect() and not re:GetHandler():IsRace(RACE_REPTILE) end) - Duel.RegisterEffect(e2,tp) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) - and c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - 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 Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD)>0 and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end \ No newline at end of file diff --git a/pre-release/c101208092.lua b/pre-release/c101208092.lua deleted file mode 100644 index cfe7f7ad7f..0000000000 --- a/pre-release/c101208092.lua +++ /dev/null @@ -1,82 +0,0 @@ ---天羽々斬之巳剣 ---Ame no Habakiri no Mitsurugi ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Monsters your opponent controls lose 800 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(-800) - c:RegisterEffect(e1) - --Special Summon 1 "Mitsurugi" monster from your Deck, then Tribute 1 monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Mitsurugi" card from your Deck to your hand then you can Special Summon this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_RELEASE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_MITSURUGI} -s.listed_names={id,81560239} --"Mitsurugi Ritual" -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_MITSURUGI) 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.IsPlayerCanRelease(tp) - 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) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) -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 sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,0,1,1,nil) - if #rg>0 then - Duel.HintSelection(rg) - Duel.BreakEffect() - Duel.Release(rg,REASON_EFFECT) - end - end -end -function s.thfilter(c) - return c:IsSetCard(SET_MITSURUGI) 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.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) -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 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end - Duel.ConfirmCards(1-tp,g) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101208093.lua b/pre-release/c101208093.lua deleted file mode 100644 index 560d150f15..0000000000 --- a/pre-release/c101208093.lua +++ /dev/null @@ -1,44 +0,0 @@ ---巳剣之神鏡 ---Mitsurugi Mirror ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Ritual Summon any Reptile Ritual Monster from your hand or GY - local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=function(c) return c:IsRace(RACE_REPTILE) end,matfilter=function(c) return c:IsRace(RACE_REPTILE) end,location=LOCATION_HAND|LOCATION_GRAVE}) - e1:SetCountLimit(1,id) - c:RegisterEffect(e1) - --Shuffle this card into the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_RELEASE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.tdcon) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_names={19899073,55397172,101208092} ---"Ame no Murakumo no Mitsurugi", "Futsu no Mitama no Mitsurugi", "Ame no Habakiri no Mitsurugi" -function s.tdconfilter(c,tp) - return c:IsPreviousCodeOnField(19899073,55397172,101208092) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) - and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.tdconfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) -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.HintSelection(c) - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208094.lua b/pre-release/c101208094.lua deleted file mode 100644 index 2d2bd43457..0000000000 --- a/pre-release/c101208094.lua +++ /dev/null @@ -1,63 +0,0 @@ ---巳剣之勾玉 ---Mitsurugi Magatama ---Scripted by Hatter -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,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_MITSURUGI} -s.ritparams={ - lvtype=RITPROC_GREATER, - filter=aux.FilterBoolFunction(Card.IsSetCard,SET_MITSURUGI), - matfilter=aux.FilterBoolFunction(Card.IsLocation,LOCATION_MZONE) -} -function s.rescon(sg,tp) - return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,sg) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end - local b1=Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,s.rescon,nil,RACE_REPTILE) - local b2=Ritual.Target(s.ritparams)(e,tp,eg,ep,ev,re,r,rp,0) - 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(CATEGORY_DESTROY) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - local rg=Duel.SelectReleaseGroupCost(tp,Card.IsRace,1,1,false,s.rescon,nil,RACE_REPTILE) - Duel.Release(rg,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Destroy 1 card your opponent controls - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - elseif op==2 then - --Ritual Summon1 "Mitsurugi" Ritual Monster from your hand, by Tributing monsters you control - Ritual.Operation(s.ritparams)(e,tp,eg,ep,ev,re,r,rp) - end -end \ No newline at end of file diff --git a/pre-release/c101208095.lua b/pre-release/c101208095.lua deleted file mode 100644 index 3c3b39b698..0000000000 --- a/pre-release/c101208095.lua +++ /dev/null @@ -1,63 +0,0 @@ ---巳剣之磐境 ---Mitsurugi Sacred Boundary ---Scripted by Hatter -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) - --Your opponent cannot target "Mitsurugi" Ritual Monsters you control with effects of monsters that were Special Summoned from the Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_MITSURUGI) and c:IsRitualMonster() end) - e1:SetValue(s.cannottargetval) - c:RegisterEffect(e1) - --Shuffle 4 "Mitsurugi" cards in your GY, except "Mitsurugi Sacred Boundary", into the Deck, then if your opponent controls a monster, make them Tribute 1 monster they control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_MITSURUGI} -function s.cannottargetval(e,re,rp) - if not (re:IsMonsterEffect() and rp==1-e:GetHandlerPlayer()) then return false end - local trig_sum_loc,trig_eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_SUMMON_LOCATION,CHAININFO_TRIGGERING_EFFECT) - if trig_eff==re then - return trig_sum_loc==LOCATION_EXTRA - else - return re:GetHandler():IsSummonLocation(LOCATION_EXTRA) - end -end -function s.tdfilter(c) - return c:IsSetCard(SET_MITSURUGI) and not c:IsCode(id) and c:IsAbleToDeck() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,4,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,4,4,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,4,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 or Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 or not tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then return end - local g=Duel.SelectReleaseGroup(1-tp,nil,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Release(g,REASON_RULE,1-tp) - end -end \ No newline at end of file diff --git a/pre-release/c101208096.lua b/pre-release/c101208096.lua deleted file mode 100644 index 72630e939c..0000000000 --- a/pre-release/c101208096.lua +++ /dev/null @@ -1,44 +0,0 @@ ---八雲断巳剣 ---Mitsurugi Tempest ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Make your opponent banish exactly 8 cards from their hand, Extra Deck, field, and/or GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(s.rmconfilter,tp,LOCATION_GRAVE,0,1,nil) end) - e1:SetCost(s.rmcost) - e1:SetTarget(s.rmtg) - e1:SetOperation(s.rmop) - c:RegisterEffect(e1) -end -s.listed_names={19899073,55397172,101208092} ---"Ame no Murakumo no Mitsurugi", "Futsu no Mitama no Mitsurugi", "Ame no Habakiri no Mitsurugi" -s.listed_series={SET_MITSURUGI} -function s.rmconfilter(c) - return c:IsSetCard(SET_MITSURUGI) and c:IsRitualSpell() -end -function s.rmcostrescon(sg) - return sg:GetClassCount(Card.GetOriginalCodeRule)==3 -end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,false,s.rmcostrescon,nil,19899073,55397172,101208092) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,3,false,s.rmcostrescon,nil,19899073,55397172,101208092) - Duel.Release(g,REASON_COST) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,30459350) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_EXTRA|LOCATION_GRAVE,8,nil,1-tp) end -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local p=1-tp - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(p,Card.IsAbleToRemove,p,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_EXTRA|LOCATION_GRAVE,0,8,8,nil,p) - if #g==8 then - Duel.Remove(g,POS_FACEUP,REASON_RULE,PLAYER_NONE,p) - end -end \ No newline at end of file diff --git a/pre-release/c101301001.lua b/pre-release/c101301001.lua deleted file mode 100644 index d21ea08266..0000000000 --- a/pre-release/c101301001.lua +++ /dev/null @@ -1,108 +0,0 @@ ---ズバババナイト ---Zubababa Knight ---Scripted by The Razgriz -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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Add 1 "Gagaga" monster from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.gathcon) - e3:SetTarget(s.gathtg) - e3:SetOperation(s.gathop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_REMOVE) - c:RegisterEffect(e4) -end -s.listed_series={SET_ZUBABA,SET_GAGAGA} -s.listed_names={id} -function s.zbthfilter(c) - return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) -end -function s.desfilter(c) - return c:IsLevelBelow(4) and c:IsDefensePos() and c:IsFaceup() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) - local b1=Duel.IsExistingMatchingCard(s.zbthfilter,tp,LOCATION_DECK,0,1,nil) - local b2=#g>0 - 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==1 then - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_DESTROY) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Add 1 "Zubaba" monster from your Deck to your hand, except "Zubababa Knight", and if you do, this card's Level becomes that added monster's - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.zbthfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sc) - local lv=sc:GetLevel() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsLevel(lv) then - --This card's Level becomes the added monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - end - elseif op==2 then - --Destroy 1 Level 4 or lower Defense Position monster your opponent controls - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.gathcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.gathfilter(c) - return c:IsSetCard(SET_GAGAGA) and c:IsMonster() and c:IsAbleToHand() -end -function s.gathtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.gathfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.gathop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.gathfilter,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/c101301002.lua b/pre-release/c101301002.lua deleted file mode 100644 index 9543496d60..0000000000 --- a/pre-release/c101301002.lua +++ /dev/null @@ -1,103 +0,0 @@ ---ガガガガンバラナイト ---Gagaga Ganbara Knight ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Gogogo" monster 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:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) -end -s.listed_series={SET_GAGAGA,SET_GOGOGO} -function s.spcostfilter(c) - return c:IsSetCard(SET_GAGAGA) and not c:IsPublic() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleExtra(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,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) -end -function s.gaspfilter(c,e,tp) - return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.gaspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - local b2=Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - if op==1 then - --Special Summon 1 "Gagaga" monster from your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.gaspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --Change the battle position of 1 monster on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end - end - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.thfilter(c) - return c:IsSetCard(SET_GOGOGO) 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 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/c101301003.lua b/pre-release/c101301003.lua deleted file mode 100644 index f596d78500..0000000000 --- a/pre-release/c101301003.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ゴゴゴゴブリンドバーグ ---Gogogo Goblindbergh ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 non-Warrior "Gogogo" monster from your hand, Deck or GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Dododo" monster 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:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) -end -s.listed_series={SET_GOGOGO,SET_DODODO} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_GOGOGO) and not c:IsRace(RACE_WARRIOR) 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_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz 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 not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - 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_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 c:IsRelateToEffect(e) and c:IsAttackPos() then - Duel.BreakEffect() - Duel.ChangePosition(c,POS_FACEUP_DEFENSE) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.thfilter(c) - return c:IsSetCard(SET_DODODO) 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 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/c101301004.lua b/pre-release/c101301004.lua deleted file mode 100644 index 5c00900495..0000000000 --- a/pre-release/c101301004.lua +++ /dev/null @@ -1,96 +0,0 @@ ---ドドドドウォリアー ---Dodododo Warrior ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Zubaba" monster 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:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) -end -s.listed_series={SET_DODODO,SET_ZUBABA} -function s.spcostfilter(c) - return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToGraveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - --Its Level becomes 4 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - --Its ATK becomes 1800 - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(1800) - c:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() - --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz 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 not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function s.thfilter(c) - return c:IsSetCard(SET_ZUBABA) 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 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/c101301005.lua b/pre-release/c101301005.lua deleted file mode 100644 index e94bd18c4c..0000000000 --- a/pre-release/c101301005.lua +++ /dev/null @@ -1,101 +0,0 @@ ---月光金獅子 ---Lunalight Gold Leo ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Lunalight" monster from your Deck to your hand, except "Lunalight Gold Leo", 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.deckthtg) - e1:SetOperation(s.deckthop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Add 1 "Lunalight" monster sent to the GY to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_CUSTOM+id) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.gythtg) - e3:SetOperation(s.gythop) - c:RegisterEffect(e3) - local g=Group.CreateGroup() - g:KeepAlive() - e3:SetLabelObject(g) - --Keep track of "Lunalight" monsters sent to the GY - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetRange(LOCATION_MZONE) - e4:SetLabelObject(e3) - e4:SetOperation(s.regop) - c:RegisterEffect(e4) -end -s.listed_series={SET_LUNALIGHT} -s.listed_names={id} -function s.deckthfilter(c) - return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and not c:IsCode(id) 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 and g:GetFirst():IsLocation(LOCATION_HAND) 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.gythfilter(c,e,tp) - return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and c:IsAbleToHand() - and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.gythfilter,nil,e,tp) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.gythtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetLabelObject():Filter(s.gythfilter,nil,e,tp) - if chkc then return g:IsContains(chkc) and s.gythfilter(chkc,e,tp) end - if chk==0 then return #g>0 end - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,tp,0) -end -function s.gythop(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/c101301006.lua b/pre-release/c101301006.lua deleted file mode 100644 index 43b07931da..0000000000 --- a/pre-release/c101301006.lua +++ /dev/null @@ -1,80 +0,0 @@ ---月光銀狗 ---Lunalight Silver Hound ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Lunalight" monster from your Deck - 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_TO_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the activation of a Spell/Trap Card or effect activated on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) - c:RegisterEffect(e2) -end -s.listed_series={SET_LUNALIGHT} -s.listed_names={id} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_LUNALIGHT) and not 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)>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 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 then - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --You cannot Special Summon from the Extra Deck while you control that face-up monster, except "Lunalight" monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetAbsoluteRange(tp,1,0) - e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_LUNALIGHT) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1,true) - end -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsSpellTrapEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD>0 and Duel.IsChainNegatable(ev) -end -function s.negcostfilter(c) - return c:IsSetCard(SET_LUNALIGHT) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_GRAVE,0,1,1,c) - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) -end \ No newline at end of file diff --git a/pre-release/c101301007.lua b/pre-release/c101301007.lua deleted file mode 100644 index c313b0b2bd..0000000000 --- a/pre-release/c101301007.lua +++ /dev/null @@ -1,82 +0,0 @@ ---リンクスレイヤー@イグニスター ---Linkslayer @Ignister -local s,id=GetID() -function s.initial_effect(c) - --If a Cyberse monster you control would be used as Link Material for an "@Ignister" Link Monster, this card in your hand can also be used as material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_EXTRA_MATERIAL) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(1,0) - e1:SetOperation(s.extracon) - e1:SetValue(s.extraval) - c:RegisterEffect(e1) - if s.flagmap==nil then - s.flagmap={} - end - if s.flagmap[c]==nil then - s.flagmap[c] = {} - end - --Destroy 1 Spell/Trap on the field, or 2 if this card on the field was used as material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCountLimit(1,id) - e2:SetCondition(s.descon) - e2:SetCost(Cost.Discard()) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_IGNISTER} -function s.extrafilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function s.extracon(c,e,tp,sg,mg,lc,og,chk) - return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsRace,1,og,RACE_CYBERSE) and sg:FilterCount(Card.HasFlagEffect,nil,id)<2 -end -function s.extraval(chk,summon_type,e,...) - local c=e:GetHandler() - if chk==0 then - local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(SET_IGNISTER) or Duel.HasFlagEffect(tp,id) then - return Group.CreateGroup() - else - table.insert(s.flagmap[c],c:RegisterFlagEffect(id,0,0,1)) - return Group.FromCards(c) - end - elseif chk==1 then - local sg,sc,tp=... - if summon_type&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK and #sg>0 then - Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - end - elseif chk==2 then - for _,eff in ipairs(s.flagmap[c]) do - eff:Reset() - end - s.flagmap[c]={} - end -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - e:SetLabel(c:IsPreviousLocation(LOCATION_ONFIELD) and 1 or 0) - return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK -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+e:GetLabel(),nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301008.lua b/pre-release/c101301008.lua deleted file mode 100644 index ddcb365b19..0000000000 --- a/pre-release/c101301008.lua +++ /dev/null @@ -1,87 +0,0 @@ ---無垢なる者 メディウス ---Medius the Innocent ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Take 1 "Imprisoned Deity" monster from your Deck and either add it to your hand or Special Summon it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thsptg) - e1:SetOperation(s.thspop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Shuffle 1 monster from your hand or face-up field into the Deck, and if you do, Special Summon this card, but banish it when it leaves the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - c:RegisterEffect(e3) -end -s.listed_series={SET_IMPRISONED_DEITY} -function s.thspfilter(c,e,tp,sp_chk) - return c:IsSetCard(SET_IMPRISONED_DEITY) and c:IsMonster() - and (c:IsAbleToHand() or (sp_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sp_chk) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local tc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,sp_chk):GetFirst() - if not tc then return end - aux.ToHandOrElse(tc,tp, - function() return sp_chk and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,3) - ) -end -function s.tdfilter(c,tp) - return (c:IsLocation(LOCATION_HAND) and c:IsMonster() or c:IsFaceup()) - and c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0 -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp):GetFirst() - if not sc then return end - if sc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,sc) - else Duel.HintSelection(sc) end - local c=e:GetHandler() - if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and sc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) - and 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/c101301009.lua b/pre-release/c101301009.lua deleted file mode 100644 index 84c408523b..0000000000 --- a/pre-release/c101301009.lua +++ /dev/null @@ -1,75 +0,0 @@ ---神芸学徒 ファインメルト ---Artmegia Finemelt ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Your opponent cannot target Level 6 or lower "Artmegia" monsters you control with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsLevelBelow(6) and c:IsSetCard(SET_ARTMEGIA) end) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --Special Summon this card from your hand, then you can draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Negate the effects of all face-up monsters your opponent currently controls, also their current ATK become halved until the end of this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e3:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3 end) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ARTMEGIA} -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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) -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 - and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,0) - if #g==0 then return end - local c=e:GetHandler() - for tc in g:Iter() do - if tc:IsNegatableMonster() then tc:NegateEffects(c) end - --Its ATK becomes halved until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301010.lua b/pre-release/c101301010.lua deleted file mode 100644 index 3702b4d157..0000000000 --- a/pre-release/c101301010.lua +++ /dev/null @@ -1,83 +0,0 @@ ---神芸学徒 グラフレア ---Artmegia Graphlare ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --The first time this card would be destroyed by battle 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(1) - e1:SetValue(function(e,re,r) return (r&REASON_BATTLE)==REASON_BATTLE end) - c:RegisterEffect(e1) - --Special Summon this card from your hand, then you can Set 1 "Artmegia" Spell from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Destroy 1 Spell/Trap your opponent controls - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(aux.NOT(s.quickdescon)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) - --This is a Quick Effect if you control 3 or more Monster Types - local e3a=e3:Clone() - e3a:SetType(EFFECT_TYPE_QUICK_O) - e3a:SetCode(EVENT_FREE_CHAIN) - e3a:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3a:SetCondition(s.quickdescon) - c:RegisterEffect(e3a) -end -s.listed_series={SET_ARTMEGIA} -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.setfilter(c) - return c:IsSetCard(SET_ARTMEGIA) and c:IsSpell() and c:IsSSetable() -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SSet(tp,sg) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function s.quickdescon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3 -end \ No newline at end of file diff --git a/pre-release/c101301011.lua b/pre-release/c101301011.lua deleted file mode 100644 index 7ebde9e8f5..0000000000 --- a/pre-release/c101301011.lua +++ /dev/null @@ -1,82 +0,0 @@ ---神芸学徒 リテラ ---Artmegia Litera ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --You take no battle damage from battles involving this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) - --Special Summon this card from your hand, then you can add 1 "Artmegia" card from your GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Special Summon 1 "Artmegia" monster from your hand or GY, except "Artmegia Litera", then return this card from the field to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e3:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={id} -s.listed_series={SET_ARTMEGIA} -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,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function s.thfilter(c) - return c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToHand() -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.HintSelection(sg) - Duel.BreakEffect() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ARTMEGIA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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 Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) - and c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,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,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,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301012.lua b/pre-release/c101301012.lua deleted file mode 100644 index e03567ba74..0000000000 --- a/pre-release/c101301012.lua +++ /dev/null @@ -1,63 +0,0 @@ ---アルトメギアの獄神獣 ---Imprisoned Deity Beast of Artmegia ---scripted by Naim -local CARD_NERVA=101301033 -local s,id=GetID() -function s.initial_effect(c) - --You cannot Special Summon from the Extra Deck, except Fusion Monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) - c:RegisterEffect(e1) - --Fusion Summon 1 "Artmegia" Fusion Monster or "Nerva the Imprisoned Deity of Creation" - local params={fusfilter=s.fusionfilter,gc=Fusion.ForcedHandler} - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(Fusion.SummonEffTG(params)) - e2:SetOperation(Fusion.SummonEffOP(params)) - c:RegisterEffect(e2) - --Add 1 "Artmegia" Spell/Trap from your Deck to your hand with a different name from the cards in your GY. - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ARTMEGIA} -s.listed_names={CARD_NERVA} -function s.fusionfilter(c) - return c:IsSetCard(SET_ARTMEGIA) or c:IsCode(CARD_NERVA) -end -function s.thfilter(c,tp) - return c:IsSetCard(SET_ARTMEGIA) and c:IsSpellTrap() and c:IsAbleToHand() - and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) -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,tp) 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,tp) - 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/c101301013.lua b/pre-release/c101301013.lua deleted file mode 100644 index 5cdb8f8750..0000000000 --- a/pre-release/c101301013.lua +++ /dev/null @@ -1,90 +0,0 @@ ---静寂のサイコガール+ ---Serene Psychic Girl ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish 1 card from your hand, and if you do, Special Summon 1 Level 4 or lower Psychic monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.rmvsptg) - e1:SetOperation(s.rmvspop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Increase the Level of face-up monster(s) by 1 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.rmvsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.rmvspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 and rg:GetFirst():IsLocation(LOCATION_REMOVED) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - 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 - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:HasLevel() end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil) - if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) -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 by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301014.lua b/pre-release/c101301014.lua deleted file mode 100644 index b2ea8b343a..0000000000 --- a/pre-release/c101301014.lua +++ /dev/null @@ -1,64 +0,0 @@ ---寡黙なるサイコミニスター ---Hushed Psychic Minister ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you control a Psychic monster other than "Hushed Psychic Minister", you can Special Summon this card (from your hand) in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENSE,0) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Banish 1 face-up monster on the field until the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.rmvcost) - e2:SetTarget(s.rmvtg) - e2:SetOperation(s.rmvop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.spconfilter(c) - return c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.rmvcostfilter(c) - return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() -end -function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,1,c) - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - aux.RemoveUntil(tc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) - end -end \ No newline at end of file diff --git a/pre-release/c101301015.lua b/pre-release/c101301015.lua deleted file mode 100644 index 82119965d4..0000000000 --- a/pre-release/c101301015.lua +++ /dev/null @@ -1,70 +0,0 @@ ---メンタルプロシージャー ---Mind Procedure ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card you control would be used as Synchro Material for a Psychic monster, you can treat it as a non-Tuner - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_NONTUNER) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,sc) return sc:IsRace(RACE_PSYCHIC) end) - c:RegisterEffect(e1) - --Add 1 "Teleport" Normal or Quick-Play Spell from your Deck or GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.PayLP(2000)) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) - c:RegisterEffect(e3) - --Special Summn this card - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_REMOVE) - e4:SetCountLimit(1,id) - e4:SetCost(Cost.PayLP(1000)) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -s.listed_series={SET_TELEPORT} -function s.thfilter(c) - return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301016.lua b/pre-release/c101301016.lua deleted file mode 100644 index 6c168ec901..0000000000 --- a/pre-release/c101301016.lua +++ /dev/null @@ -1,75 +0,0 @@ ---プロトタイプサイコガンナー ---Prototype Psychic Blaster ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Psychic monster from your hand or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Special Summon this card from your 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_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(Cost.PayLP(1000),s.selfspcost)) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) - 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_REMOVED,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_REMOVED) -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|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.spcostfilter(c) - return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,c) - Duel.Remove(g,POS_FACEUP,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) 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/c101301017.lua b/pre-release/c101301017.lua deleted file mode 100644 index 308ff63ae1..0000000000 --- a/pre-release/c101301017.lua +++ /dev/null @@ -1,101 +0,0 @@ ---冥帝王エイドス ---Eidos the Underworld Monarch ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Monarch" Spell/Trap or 1 monster with 2800 ATK/1000 DEF from your Deck or GY to your hand - 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_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Change the Attribute of 1 monster on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.attrtg) - e3:SetOperation(s.attrop) - c:RegisterEffect(e3) - --Add this card to your hand or Special Summon it - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(s.thspcon) - e4:SetTarget(s.thsptg) - e4:SetOperation(s.thspop) - c:RegisterEffect(e4) -end -s.listed_series={SET_MONARCH} -function s.thfilter(c) - return ((c:IsSetCard(SET_MONARCH) and c:IsSpellTrap()) or (c:IsAttack(2800) and c:IsDefense(1000))) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local attr=Duel.AnnounceAnotherAttribute(g,tp) - e:SetLabel(attr) -end -function s.attrop(e,tp,eg,ep,ev,re,r,rp) - local attr=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAttributeExcept,attr),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --It becomes the declared Attribute - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(attr) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -end -function s.thspcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ec:IsSummonPlayer(tp) and ec:IsTributeSummoned() and ec:IsAttackAbove(2400) and ec:IsDefense(1000) and ec:IsFaceup() -end -function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - aux.ToHandOrElse(c,tp, - function(sc) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function(sc) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,3) - ) -end \ No newline at end of file diff --git a/pre-release/c101301018.lua b/pre-release/c101301018.lua deleted file mode 100644 index ce0bbc65de..0000000000 --- a/pre-release/c101301018.lua +++ /dev/null @@ -1,98 +0,0 @@ ---源帝従騎テセラ ---Tessera the Prime Squire ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --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) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Tribute Summon 1 monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tribsumtg) - e2:SetOperation(s.tribsumop) - c:RegisterEffect(e2) - --Special Summon 1 monster with 800 ATK/1000 DEF from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_MONARCH} -function s.selfspcostfilter(c) - return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsPublic() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -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 -end -function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,nil,true,nil,1) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,1,nil,true,nil,1):GetFirst() - if tc then - Duel.SummonOrSet(tp,tc,true,nil,1) - end -end -function s.spfilter(c,e,tp) - return c:IsAttack(800) and c:IsDefense(1000) 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) - --You cannot Special Summon from the Extra Deck for the rest of 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_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) - 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 \ No newline at end of file diff --git a/pre-release/c101301019.lua b/pre-release/c101301019.lua deleted file mode 100644 index b4e60fb3c8..0000000000 --- a/pre-release/c101301019.lua +++ /dev/null @@ -1,84 +0,0 @@ ---黒炎の剣士-ブラック・フレア・ソードマン- ---Dark Flare Swordsman ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You take no damage from battles involving this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(s.selfspcost) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Special Summon 1 monster that mentions "Flame Swordsman" from your Deck, except a Level 6 monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.SelfTribute) - e3:SetTarget(s.decksptg) - e3:SetOperation(s.deckspop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_FLAME_SWORDSMAN} -function s.selfcostfilter(c,tp) - return (c:IsCode(CARD_FLAME_SWORDSMAN) or c:ListsCode(CARD_FLAME_SWORDSMAN)) and c:IsAbleToGraveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.selfcostfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.selfcostfilter,tp,LOCATION_EXTRA,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 declare attacks for the rest of this turn, except with Warrior monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_WARRIOR) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) -end -function s.deckspfilter(c,e,tp) - return c:ListsCode(CARD_FLAME_SWORDSMAN) and not c:IsLevel(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.deckspop(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.deckspfilter,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 \ No newline at end of file diff --git a/pre-release/c101301020.lua b/pre-release/c101301020.lua deleted file mode 100644 index 42a0155bb9..0000000000 --- a/pre-release/c101301020.lua +++ /dev/null @@ -1,82 +0,0 @@ ---結瘴龍ティスティナ ---Miasma Dragon Tistina ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Tistina" monster from your Deck to your hand, except "Miasma Dragon Tistina" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Special Summon this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={id} -s.listed_series={SET_TISTINA} -function s.thfilter(c) - return c:IsSetCard(SET_TISTINA) 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 - local c=e:GetHandler() - --For the rest of this turn, LIGHT "Tistina" monsters you control gain 1000 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_TISTINA) end) - e1:SetValue(1000) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 - and 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 - --You cannot Special Summon from the hand or GY for the rest of this turn, except "Tistina" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) and not c:IsSetCard(SET_TISTINA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101301021.lua b/pre-release/c101301021.lua deleted file mode 100644 index f41113ef42..0000000000 --- a/pre-release/c101301021.lua +++ /dev/null @@ -1,90 +0,0 @@ ---正義の伝説 カイバーマン ---Legend of Justice Kaibaman ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Show 3 "Blue-Eyes White Dragon" in your hand/Deck/field/GY, then Special Summon 1 "Blue-Eyes White Dragon" from your hand, Deck, or GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Add 1 "Blue-Eyes" monster 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_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.thcon) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_BLUEEYES_W_DRAGON} -s.listed_series={SET_BLUE_EYES} -function s.showfilter(c) - return c:IsCode(CARD_BLUEEYES_W_DRAGON) and (c:IsFaceup() or not c:IsOnField()) -end -function s.spfilter(c,e,tp) - return c:IsCode(CARD_BLUEEYES_W_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.IsExistingMatchingCard(s.showfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD|LOCATION_GRAVE,0,3,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local rg=Duel.GetMatchingGroup(s.showfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) - if #rg>3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - rg=Duel.SelectMatchingCard(tp,s.showfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD|LOCATION_GRAVE,0,3,3,nil) - end - if #rg==3 then - local fieldgraveg,handdeckg=rg:Split(Card.IsLocation,nil,LOCATION_ONFIELD|LOCATION_GRAVE) - if #fieldgraveg>0 then Duel.HintSelection(fieldgraveg) end - if #handdeckg>0 then Duel.ConfirmCards(1-tp,handdeckg) end - if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then Duel.ShuffleHand(tp) end - if rg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - 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_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.thconfilter(c,tp) - return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsFaceup() and c:IsSummonPlayer(tp) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.thconfilter,1,nil,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_BLUE_EYES) 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 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/c101301022.lua b/pre-release/c101301022.lua deleted file mode 100644 index 46cb5fbfc9..0000000000 --- a/pre-release/c101301022.lua +++ /dev/null @@ -1,120 +0,0 @@ ---VS ホーリー・スー ---Vanquish Soul Holy Sue ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --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_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(Cost.AND(Cost.HardOncePerChain(id),s.spcost)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Activate 1 of these effects by revealing monster(s) in your hand with the listed Attribute(s) - 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_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.HardOncePerChain(id)) - e2:SetTarget(s.vstg) - e2:SetOperation(s.vsop) - c:RegisterEffect(e2) -end -s.listed_series={SET_VANQUISH_SOUL} -function s.spcostfilter(c) - return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsMonster() and not c:IsPublic() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(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) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.vscostfilter(c,att) - return c:IsAttribute(att) and not c:IsPublic() -end -function s.vsrescon(sg) - return sg:GetBinClassCount(Card.GetAttribute)==2 -end -function s.deckspfilter(c,e,tp) - return c:IsSetCard(SET_VANQUISH_SOUL) and not c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.vstg(e,tp,eg,ep,ev,re,r,rp,chk) - local cg1=Duel.GetMatchingGroup(s.vscostfilter,tp,LOCATION_HAND,0,nil,ATTRIBUTE_EARTH|ATTRIBUTE_DARK) - local b1=aux.SelectUnselectGroup(cg1,e,tp,2,2,s.vsrescon,0) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,nil) - local cg2=Duel.GetMatchingGroup(s.vscostfilter,tp,LOCATION_HAND,0,nil,ATTRIBUTE_FIRE|ATTRIBUTE_DARK) - local b2=aux.SelectUnselectGroup(cg2,e,tp,2,2,s.vsrescon,0) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - 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==1 then - --EARTH & DARK - local g=aux.SelectUnselectGroup(cg1,e,tp,2,2,s.vsrescon,1,tp,HINTMSG_CONFIRM) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - e:SetCategory(CATEGORY_CONTROL) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) - elseif op==2 then - --FIRE & DARK - local g=aux.SelectUnselectGroup(cg2,e,tp,2,2,s.vsrescon,1,tp,HINTMSG_CONFIRM) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - end -end -function s.vsop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Take control of 1 monster your opponent controls with the lowest ATK (your choice, if tied) until the End Phase - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,nil) - if #g==0 then return end - local ming=g:GetMinGroup(Card.GetAttack) - local sc=ming:GetFirst() - if #ming>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - sc=ming:Select(tp,1,1,nil) - end - if sc then - Duel.HintSelection(sc) - Duel.GetControl(sc,tp,PHASE_END,1) - end - elseif op==2 then - --Special Summon 1 non-Psychic "Vanquish Soul" monster from your Deck - if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301023.lua b/pre-release/c101301023.lua deleted file mode 100644 index 415e72a4a5..0000000000 --- a/pre-release/c101301023.lua +++ /dev/null @@ -1,179 +0,0 @@ ---シェフ・ド・ヌーベルズ ---Chef de Nouvelles ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Activate and register it as activated this turn - local e0=Effect.CreateEffect(c) - e0:SetDescription(1160) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetRange(LOCATION_HAND) - e0:SetCost(s.regop) - c:RegisterEffect(e0) - --Add 1 "Nouvelles" card from your Deck to your hand, except a Pendulum Monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Place this card in your Pendulum Zone - 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_RELEASE) - e3:SetTarget(s.pltg) - e3:SetOperation(s.plop) - c:RegisterEffect(e3) - --Increase the level of a targeted Effect monster by up to 3 - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,3)) - e4:SetCategory(CATEGORY_LVCHANGE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e4:SetCountLimit(1) - e4:SetCost(Cost.HardOncePerChain(id)) - e4:SetTarget(s.lvtg) - e4:SetOperation(s.lvop) - c:RegisterEffect(e4) - --Apply the effects of a 1 "Recipe" Ritual Spell - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,4)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_DELAY) - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e5:SetCost(Cost.AND(s.applycost,Cost.HardOncePerChain(id))) - e5:SetTarget(s.applytg) - e5:SetOperation(s.applyop) - c:RegisterEffect(e5) -end -s.listed_series={SET_NOUVELLES,SET_RECIPE} -function s.regop(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.thfilter(c) - return c:IsSetCard(SET_NOUVELLES) and c:IsAbleToHand() and not c:IsType(TYPE_PENDULUM) -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.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,POS_FACEUP) 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,true,false,POS_FACEUP) - end -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsLocation(LOCATION_EXTRA) and Duel.CheckPendulumZones(tp) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end -function s.lvfilter(c) - return c:IsType(TYPE_EFFECT) and c:HasLevel() and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local lv=Duel.AnnounceLevel(tp,1,3) - --Increase its Level by up to 3 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.applyfilter(c) - return c:IsRitualSpell() and c:IsSetCard(SET_RECIPE) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil -end -function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end -end -function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - local te=e:GetLabelObject() - return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) - end - if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local te=g:GetFirst():CheckActivateEffect(true,true,false) - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - local tg=te:GetTarget() - if tg then - tg(e,tp,eg,ep,ev,re,r,rp,1) - end - te:SetLabel(e:GetLabel()) - te:SetLabelObject(e:GetLabelObject()) - e:SetLabelObject(te) - Duel.ClearOperationInfo(0) -end -function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if te then - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end - te:SetLabel(e:GetLabel()) - te:SetLabelObject(e:GetLabelObject()) - end -end diff --git a/pre-release/c101301024.lua b/pre-release/c101301024.lua deleted file mode 100644 index 0f6d45c454..0000000000 --- a/pre-release/c101301024.lua +++ /dev/null @@ -1,90 +0,0 @@ ---超量妖精ゼータン ---Super Quantal Fairy Zetan ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card, then you can make its Level become the Level of 1 "Super Quant" monster you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.hspcon) - e1:SetTarget(s.hsptg) - e1:SetOperation(s.hspop) - c:RegisterEffect(e1) - --Special Summon 1 "Super Quant" monster from your Deck, except "Super Quantal Fairy Zetan" - 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.AND(Cost.SelfTribute,s.dspcost)) - e2:SetTarget(s.dsptg) - e2:SetOperation(s.dspop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_SUPER_QUANT} -function s.hspconfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) -end -function s.hspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.hspconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) -end -function s.lvfilter(c,lv) - return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and c:HasLevel() and not c:IsLevel(lv) -end -function s.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,c,c:GetLevel()) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local sc=g:Select(tp,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - Duel.BreakEffect() - --This card's Level becomes that monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(sc:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end -function s.dspcostfilter(c,e,tp) - return c:IsSetCard(SET_SUPER_QUANT) and not c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,c,e,tp) -end -function s.dspfilter(c,e,tp) - return c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.dspcostfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.dspcostfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST) -end -function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.dspop(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.dspfilter,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 \ No newline at end of file diff --git a/pre-release/c101301025.lua b/pre-release/c101301025.lua deleted file mode 100644 index 84608132c6..0000000000 --- a/pre-release/c101301025.lua +++ /dev/null @@ -1,107 +0,0 @@ ---超量士ブラックレイヤー ---Super Quantum Black Layer ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Discard 1 other card, and if you do, Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsMonsterEffect() end) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Special Summon 1 "Super Quantal Mech Beast" Xyz Monster from your Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.xyzsptg) - e2:SetOperation(s.xyzspop) - c:RegisterEffect(e2) - --Add 1 "Super Quant" Spell from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SUPER_QUANT,SET_SUPER_QUANTAL_MECH_BEAST} -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_EFFECT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - 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() - local exc=c:IsRelateToEffect(e) and c or nil - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,exc)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.xyzspfilter(c,e,tp,mc,chk_att) - return c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and mc:IsCanBeXyzMaterial(c,tp) - and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) - and (not chk_att or Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c)) -end -function s.attachfilter(c,tp,xc) - return c:IsSetCard(SET_SUPER_QUANT) and c:IsMonster() and c:IsCanBeXyzMaterial(xc,tp,REASON_EFFECT) -end -function s.xyzsptg(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.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,true) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.xyzspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xc=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,false):GetFirst() - if not xc then return end - xc:SetMaterial(c) - Duel.Overlay(xc,c) - if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end - xc:CompleteProcedure() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) - local ac=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,xc):GetFirst() - if ac then - Duel.Overlay(xc,ac) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_SUPER_QUANT) 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) -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/c101301026.lua b/pre-release/c101301026.lua deleted file mode 100644 index 2e8dffc55c..0000000000 --- a/pre-release/c101301026.lua +++ /dev/null @@ -1,96 +0,0 @@ ---瞳の魔女モルガナ ---Morgana the Witch of Eyes ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Negate the attack of an opponent's monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e1:SetCost(s.negatkcost) - e1:SetTarget(s.negatktg) - e1:SetOperation(function() Duel.NegateAttack() end) - c:RegisterEffect(e1) - --Add 1 "Morganite" 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --Change the ATK of all face-up monsters your opponent controls to 0. - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.atkcon) - e4:SetTarget(s.atktg) - e4:SetOperation(s.atkop) - c:RegisterEffect(e4) -end -s.listed_series={SET_MORGANITE} -function s.negatkcostfilter(c) - return c:IsSetCard(SET_MORGANITE) and c:IsSpell() and c:IsAbleToRemoveAsCost() -end -function s.negatkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.negatkcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.negatkcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.negatktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttacker():IsOnField() and Duel.GetAttacker():IsRelateToBattle() end -end -function s.thfilter(c) - return c:IsSetCard(SET_MORGANITE) 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) -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.morganitefilter(c) - return c:IsSetCard(SET_MORGANITE) and c:IsSpell() and c:IsFaceup() -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.morganitefilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) - return g:GetClassCount(Card.GetCode)>=3 -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,1-tp,0) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,nil) - for tc in g:Iter() do - --Change their ATKs to 0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301027.lua b/pre-release/c101301027.lua deleted file mode 100644 index c511ccd81c..0000000000 --- a/pre-release/c101301027.lua +++ /dev/null @@ -1,92 +0,0 @@ ---黒き魔族-レオ・ウィザード ---Leo Wizard, the Dark Mage ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Monsters whose original Level is 4 or lower with more than 1350 ATK and/or DEF require 1 Tribute to Normal Summon from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e1:SetCondition(s.nsumcon) - e1:SetTarget(aux.FieldSummonProcTg(s.nsumtg,s.nsumcost)) - e1:SetOperation(s.nsumop) - e1:SetValue(SUMMON_TYPE_TRIBUTE) - c:RegisterEffect(e1) - --Destroy a LIGHT monster that this card is battling - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --Add 1 monster with 1350 ATK from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,id) - e3:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -function s.nsumcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - local rg=Duel.GetReleaseGroup(tp) - return aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) -end -function s.nsumtg(e,c) - return c:GetOriginalLevel()<=4 and (c:GetAttack()>1350 or c:GetDefense()>1350) -end -function s.nsumcost(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetReleaseGroup(tp) - local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_RELEASE,nil,nil,true) - if #g>0 then - g:KeepAlive() - e:SetLabelObject(g) - return true - end - return false -end -function s.nsumop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if not g then return end - c:SetMaterial(g) - Duel.Release(g,REASON_COST|REASON_SUMMON|REASON_MATERIAL) - g:DeleteGroup() -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc and bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end -function s.thfilter(c) - return c:IsAttack(1350) 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/c101301028.lua b/pre-release/c101301028.lua deleted file mode 100644 index 3935179eb1..0000000000 --- a/pre-release/c101301028.lua +++ /dev/null @@ -1,99 +0,0 @@ ---WAKE CUP! モカ ---WAKE CUP! Mocha ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Make 1 monster on the field gain 1000 ATK, but send it to the GY during the End Phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FLIP) - e1:SetCountLimit(1,id) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --Special Summon this card from your hand, and if you do, change that monster to Attack Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Change this card to face-down Defense Position - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e3:SetTarget(s.postg) - e3:SetOperation(s.posop) - c:RegisterEffect(e3) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,1000) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --It gains 1000 ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - --Send it to the GY during the End Phase - aux.DelayedOperation(tc,PHASE_END,id,e,tp, - function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, - nil,0,1,aux.Stringid(id,3),aux.Stringid(id,4) - ) - end -end -function s.posfilter(c) - return c:IsFacedown() and c:IsDefensePos() and c:IsCanChangePosition() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - end -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,POS_FACEDOWN_DEFENSE) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101301029.lua b/pre-release/c101301029.lua deleted file mode 100644 index 65853bd446..0000000000 --- a/pre-release/c101301029.lua +++ /dev/null @@ -1,88 +0,0 @@ ---アングリーバーガー ---Angry Burger ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --All monsters your opponent controls must attack this card, if able - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetRange(LOCATION_MZONE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) - e2:SetValue(function(e,c) return c==e:GetHandler() end) - c:RegisterEffect(e2) - --Add 1 "Nouvelles" monster from your Deck to your hand, and if you do, shuffle this card into the Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetCountLimit(1,id) - e3:SetCost(Cost.SelfReveal) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) - --Tribute 1 Attack Position monster on either field, and if you do, Special Summon 1 "Hungry Burger" with 2000 ATK from your hand or Deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e4:SetCountLimit(1,{id,1}) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -s.listed_series={SET_RECIPE,SET_NOUVELLES} -s.listed_names={30243636} --"Hungry Burger" -function s.thfilter(c) - return c:IsSetCard(SET_NOUVELLES) and c:IsMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local 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 c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - end -end -function s.tribfilter(c,tp) - return c:IsAttackPos() and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsCode(30243636) and c:IsAttack(2000) 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.IsExistingTarget(s.tribfilter,tp,LOCATION_MZONE,LOCATION_MZONE,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) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectMatchingCard(tp,s.tribfilter,tp,LOCATION_MZONE,LOCATION_MZONE,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,false,true,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301030.lua b/pre-release/c101301030.lua deleted file mode 100644 index 72a73eb799..0000000000 --- a/pre-release/c101301030.lua +++ /dev/null @@ -1,59 +0,0 @@ ---月光舞獅子神姫 ---Lunalight Liger Dancer -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Lunalight Leo Dancer" + 3 "Lunalight" monsters - Fusion.AddProcMixN(c,false,false,24550676,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT),3) - c:AddMustBeFusionSummoned() - --Unaffected by card effects, except "Lunalight" cards - 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(function(e,te) return not te:GetHandler():IsSetCard(SET_LUNALIGHT) end) - c:RegisterEffect(e1) - --Can make a second attack during each Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - c:RegisterEffect(e2) - --Destroy all your opponent's Special Summoned monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCost(s.descost) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_series={SET_LUNALIGHT} -s.material_setcode={SET_LUNALIGHT} -s.listed_names={24550676} --"Lunalight Leo Dancer" -function s.descostfilter(c,tp) - return c:IsSetCard(SET_LUNALIGHT) and c:IsAbleToGraveAsCost() -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsSpecialSummoned,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(Card.IsSpecialSummoned,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/pre-release/c101301031.lua b/pre-release/c101301031.lua deleted file mode 100644 index b574592641..0000000000 --- a/pre-release/c101301031.lua +++ /dev/null @@ -1,101 +0,0 @@ ---月光舞香姫 ---Lunalight Perfume Dancer ---Scripted by ahtelel -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 "Lunalight" monsters - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT),2) - --Add 1 "Luna Light Perfume" 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_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() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Bounce and Special Summon 1 "Lunalight" monster from hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Apply an ATK reduction effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.SelfBanish) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) -end -s.listed_names={48444114} --"Luna Light Perfume" -s.listed_series={SET_LUNALIGHT} -function s.thfilter(c) - return c:IsCode(48444114) 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,tp,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.tgfilter(c) - return c:IsSetCard(SET_LUNALIGHT) and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra()) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.tgfilter(chkc) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_ONFIELD,0,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_LUNALIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) then - Duel.ShuffleHand(tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,4)) - --This turn, monsters your opponent controls lose ATK equal to their own original DEF - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(function(e,c) return -c:GetBaseDefense() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101301032.lua b/pre-release/c101301032.lua deleted file mode 100644 index 0ef841f51b..0000000000 --- a/pre-release/c101301032.lua +++ /dev/null @@ -1,99 +0,0 @@ ---神芸獄徒 ディアクトロス ---Artmegia Diaktoros ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Medius the Innocent" + 1 "Artmegia" monster - Fusion.AddProcMix(c,true,true,CARD_MEDIUS_THE_INNOCENT,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ARTMEGIA)) - --Change the battle position of 1 monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - c:RegisterEffect(e1) - --Negate the activation of an opponent's card or effect on the field, and if you do, destroy that card - 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) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.negcon) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) - --Special Summon 1 "Medius the Innocent" from your hand, Deck, or banishment - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - 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.spcon) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MEDIUS_THE_INNOCENT} -s.listed_series={SET_ARTMEGIA} -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return rp==1-tp and loc&LOCATION_ONFIELD>0 and Duel.IsChainNegatable(ev) - and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetRace)>=3 -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - local rc=re:GetHandler() - 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 -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() -end -function s.spfilter(c,e,tp) - return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) - 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_DECK|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED) -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|LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301033.lua b/pre-release/c101301033.lua deleted file mode 100644 index 16118c41a6..0000000000 --- a/pre-release/c101301033.lua +++ /dev/null @@ -1,91 +0,0 @@ ---創獄神ネルヴァ ---Nerva the Imprisoned Deity of Creation ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 "Artmegia" monsters - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ARTMEGIA),3,3) - c:AddMustFirstBeFusionSummoned() - c:SetSPSummonOnce(id) - --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) in Defense Position by Tributing 3 monsters with different Types - 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+EFFECT_FLAG_SPSUM_PARAM) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_EXTRA) - e0:SetTargetRange(POS_FACEUP_DEFENSE,0) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --Cannot be destroyed by card effects while a card is in the Field Zone - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function() return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Make your "Artmegia" monster's effect become "Destroy all cards your opponent controls" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.chcon) - e2:SetTarget(s.chtg) - e2:SetOperation(s.chop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ARTMEGIA} -function s.rescon(sg,e,tp) - return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 and sg:GetClassCount(Card.GetRace)==#sg -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local rg=Duel.GetReleaseGroup(tp) - return aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetReleaseGroup(tp) - local mg=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) - if #mg==3 then - mg:KeepAlive() - e:SetLabelObject(mg) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if not g then return end - Duel.Release(g,REASON_COST|REASON_MATERIAL) - g:DeleteGroup() -end -function s.chcon(e,tp,eg,ep,ev,re,r,rp) - if not (re:IsMonsterEffect() and rp==tp) then return false end - local setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_SETCODES) - for _,set in ipairs(setcodes) do - if (SET_ARTMEGIA&0xfff)==(set&0xfff) and (SET_ARTMEGIA&set)==SET_ARTMEGIA then return true end - end - return false -end -function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end -end -function s.chop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - Duel.ChangeTargetCard(ev,g) - Duel.ChangeChainOperation(ev,s.desop) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301034.lua b/pre-release/c101301034.lua deleted file mode 100644 index c1afbda78e..0000000000 --- a/pre-release/c101301034.lua +++ /dev/null @@ -1,74 +0,0 @@ ---アブソリュートサイキッカー ---Absolute Axon Kicker ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Psychic Synchro Monster + 1 Synchro Monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO)) - c:AddMustFirstBeFusionSummoned() - --Banish all face-up cards your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - 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():IsFusionSummoned() end) - e1:SetCost(Cost.PayLP(2000)) - e1:SetTarget(s.rmvtg) - e1:SetOperation(s.rmvop) - c:RegisterEffect(e1) - --Cannot be destroyed by card effects - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - c:RegisterEffect(e2) - --Special Summon 1 Level 10 Psychic Fusion Monster from your Extra Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,id) - e3:SetCondition(aux.exccon) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.miracle_synchro_fusion=true -function s.matfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_SYNCHRO,fc,sumtype,tp) and c:IsRace(RACE_PSYCHIC,fc,sumtype,tp) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsLevel(10) and c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if sc then - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end - end -end \ No newline at end of file diff --git a/pre-release/c101301035.lua b/pre-release/c101301035.lua deleted file mode 100644 index bdf4101ca8..0000000000 --- a/pre-release/c101301035.lua +++ /dev/null @@ -1,64 +0,0 @@ ---原石竜ネザー・ベルセリウス ---Primite Dragon Nether Berzelius ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Primite" monster + 1+ Normal Monsters - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_NORMAL),1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PRIMITE)) - --Gains 1000 ATK for each Normal Monster used for its Fusion Summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(function(e,c) c:UpdateAttack(c:GetMaterial():FilterCount(Card.IsType,nil,TYPE_NORMAL)*1000,RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) end) - c:RegisterEffect(e1) - --Negate the activated effects of monsters your opponent controls whose Level/Rank/Link Rating is less than or equal to the number of Normal Monsters in your field and GY - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.discon) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) - c:RegisterEffect(e2) - --Special Summon 1 Normal Monster from your Deck in Defense Position - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_PRIMITE} -s.material_setcode={SET_PRIMITE} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsMonsterEffect() or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local normal_ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_NORMAL),tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - if normal_ct==0 then return false end - local trig_ctrl,trig_loc,trig_lv,trig_rk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_LEVEL,CHAININFO_TRIGGERING_RANK) - if not (trig_ctrl==1-tp and trig_loc==LOCATION_MZONE) then return false end - local trig_lk=re:GetHandler():GetLink() - if trig_lv>0 and trig_lv<=normal_ct then return true end - if trig_rk>0 and trig_rk<=normal_ct then return true end - if trig_lk>0 and trig_lk<=normal_ct then return true end - return false -end -function s.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,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_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_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101301036.lua b/pre-release/c101301036.lua deleted file mode 100644 index cb8a7fbd2d..0000000000 --- a/pre-release/c101301036.lua +++ /dev/null @@ -1,51 +0,0 @@ ---始祖の竜王 ---First of the Dragonlords ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Normal Monsters - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_NORMAL),3) - c:AddMustBeFusionSummoned() - --You can only control 1 "First of the Dragonlords" - c:SetUniqueOnField(1,0,id) - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --Unaffected by other monsters' effects - 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(function(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end) - c:RegisterEffect(e2) - --Destroy all Spells and Traps on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsSpellTrapEffect() end) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301037.lua b/pre-release/c101301037.lua deleted file mode 100644 index 7a9481a2d0..0000000000 --- a/pre-release/c101301037.lua +++ /dev/null @@ -1,73 +0,0 @@ ---聖秘なる竜騎士 ---Sacramentum Dragoon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Dragon monster + 1 Spellcaster monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) - --Loses 100 ATK for each of your banished cards - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e) return -100*Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_REMOVED,0) end) - c:RegisterEffect(e1) - --While you control this Fusion Summoned card, your opponent cannot activate the effects of Special Summoned Dragon and Spellcaster monsters they control - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) - e2:SetValue(s.actlimval) - c:RegisterEffect(e2) - --Special Summon 1 Dragon or 1 Spellcaster monster from your GY and place the other on the bottom of the Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetTarget(s.sptdtg) - e3:SetOperation(s.sptdop) - c:RegisterEffect(e3) -end -function s.actlimval(e,re,rp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsSpecialSummoned() and rc:IsFaceup() and rc:IsRace(RACE_DRAGON|RACE_SPELLCASTER) and rc:IsLocation(LOCATION_MZONE) -end -function s.sptdfilter(c,e,tp) - return c:IsRace(RACE_DRAGON|RACE_SPELLCASTER) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsAbleToDeck()) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsRace,1,nil,RACE_DRAGON) and sg:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER) - and sg:IsExists(s.spchk,1,nil,e,tp,sg) -end -function s.spchk(c,e,tp,sg) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (#sg==1 or sg:IsExists(Card.IsAbleToDeck,1,c)) -end -function s.sptdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.sptdfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and #g>=2 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_TARGET) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,tp,0) -end -function s.sptdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if (#tg==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=tg:FilterSelect(tp,s.spchk,1,1,nil,e,tp,tg) - if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 and #tg==2 then - local dg=tg-sg - Duel.HintSelection(dg) - Duel.SendtoDeck(dg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301038.lua b/pre-release/c101301038.lua deleted file mode 100644 index 0941bcf39d..0000000000 --- a/pre-release/c101301038.lua +++ /dev/null @@ -1,67 +0,0 @@ ---沈黙のサイコマジシャン ---Silent Psychic Magician ---scripted by Naim -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 1 Level 4 or lower Psychic monster from your GY or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) - 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) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card you control would be used as Synchro Material, you can treat it as a non-Tuner - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_NONTUNER) - e2:SetRange(LOCATION_MZONE) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) -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.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - --Increase its Level by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetTargetRange(1,0) - e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) -end \ No newline at end of file diff --git a/pre-release/c101301039.lua b/pre-release/c101301039.lua deleted file mode 100644 index 9f3fc62cfa..0000000000 --- a/pre-release/c101301039.lua +++ /dev/null @@ -1,83 +0,0 @@ ---メンタルクロス・デーモン ---Thought Cross Archfiend ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTuner(nil),1,99) - --Special Summon 1 of your banished Level 7 or lower Psychic monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Gain LP equal to the original ATK of 1 Tributed monster, and if you do, this card gains that much ATK until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end) - e2:SetCost(s.lpatkost) - e2:SetTarget(s.lpatktg) - e2:SetOperation(s.lpatkop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.atkfilter(c) - return c:GetTextAttack()>0 -end -function s.lpatkost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.atkfilter,1,false,nil,c) end - local g=Duel.SelectReleaseGroupCost(tp,s.atkfilter,1,1,false,nil,c) - Duel.Release(g,REASON_COST) - e:SetLabel(g:GetFirst():GetTextAttack()) -end -function s.lpatktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,e:GetLabel()) -end -function s.lpatkop(e,tp,eg,ep,ev,re,r,rp) - local lpgain=e:GetLabel() - local atk=Duel.Recover(tp,lpgain,REASON_EFFECT) - local c=e:GetHandler() - if atk>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - --This card gains that much ATK until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301040.lua b/pre-release/c101301040.lua deleted file mode 100644 index 87cc6373df..0000000000 --- a/pre-release/c101301040.lua +++ /dev/null @@ -1,80 +0,0 @@ ---サイコガンナーMk-Ⅱ ---Psychic Blaster Mk-II ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner Psychic monsters - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) - --Special Summon 1 banished monster to your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Banish 1 other monster on the field then gain LP equal to its original ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(s.rmvcost) - e2:SetTarget(s.rmvtg) - e2:SetOperation(s.rmvop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.costfilter(c) - return c:IsMonster() and c:IsAbleToRemoveAsCost() -end -function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,tc:GetBaseAttack()) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) then - local atk=tc:GetBaseAttack() - if atk>0 then - Duel.BreakEffect() - Duel.Recover(tp,atk,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301041.lua b/pre-release/c101301041.lua deleted file mode 100644 index 83b3bba8c9..0000000000 --- a/pre-release/c101301041.lua +++ /dev/null @@ -1,81 +0,0 @@ ---THE・スターハム ---The Star Ham ---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) - --Special Summon 1 monster from your GY that was used as material for this card's Synchro Summon, and if you do, it is treated as a Tuner - 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+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(s.gyspcon) - e1:SetCost(Cost.Discard()) - e1:SetTarget(s.gysptg) - e1:SetOperation(s.gyspop) - c:RegisterEffect(e1) - --Special Summon this card, but banish it when it leaves the field - 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,1}) - e2:SetCost(Cost.Discard(nil,false,2)) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) -end -function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsSynchroSummoned() and c:GetMaterialCount()>0 -end -function s.gyspfilter(c,e,tp,sync) - return sync:IsReasonCard(c) and c:IsReason(REASON_SYNCHRO) and c:IsReason(REASON_MATERIAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and not sc:IsType(TYPE_TUNER) then - --It is treated as a Tuner - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -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) 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/c101301042.lua b/pre-release/c101301042.lua deleted file mode 100644 index bf35039bb8..0000000000 --- a/pre-release/c101301042.lua +++ /dev/null @@ -1,86 +0,0 @@ ---FNo.0 未来皇ホープ・ゼアル ---Number F0: Utopic Future Zexal ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Xyz Monsters with the same Rank - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_XYZ),nil,2,nil,nil,nil,nil,false,s.xyzcheck) - --Gains ATK/DEF equal to the total Ranks of all Xyz Monsters you control and in your opponent's GY x 500 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_GRAVE,nil):GetSum(Card.GetRank)*500 end) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2) - --Your opponent's monsters cannot target monsters for attacks, except this one - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(function(e,c) return c~=e:GetHandler() end) - c:RegisterEffect(e3) - --Your opponent cannot target target other cards on the field with card effects - local e4=e3:Clone() - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e4:SetTarget(function(e,c) return c~=e:GetHandler() end) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --Take control of 1 monster your opponent controls - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetCategory(CATEGORY_CONTROL) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetCode(EVENT_CHAINING) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(s.ctcon) - e5:SetCost(Cost.Detach(1)) - e5:SetTarget(s.cttg) - e5:SetOperation(s.ctop) - c:RegisterEffect(e5,false,REGISTER_FLAG_DETACH_XMAT) -end -s.xyz_number=0 -function s.xyzcheck(g,tp,xyz) - local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) - return mg:GetClassCount(Card.GetRank)==1 -end -function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - local trig_loc,trig_p=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER) - return trig_p==1-tp and (trig_loc&LOCATION_ONFIELD)>0 -end -function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0) -end -function s.ctop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp) - end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - --This card cannot be destroyed by battle or card effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3008) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - end -end diff --git a/pre-release/c101301043.lua b/pre-release/c101301043.lua deleted file mode 100644 index a69cef9132..0000000000 --- a/pre-release/c101301043.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ガガガガガール ---Gagagaga Girl ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters - Xyz.AddProcedure(c,nil,4,2) - --Add 1 "Gagaga", "Onomat", or "Xyz" card 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_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,{SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) end) - e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --A "Utopic Future" Xyz Monster that has this card as material gains this effect. - --● If it is Xyz Summoned: Activate this effect; it can make a second attack during each Battle Phase this turn. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(s.secondattackcon) - e2:SetOperation(s.secondattackop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_ONOMAT,SET_XYZ,SET_UTOPIC_FUTURE} -function s.thfilter(c) - return c:IsSetCard({SET_GAGAGA,SET_ONOMAT,SET_XYZ}) 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.secondattackcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsSetCard(SET_UTOPIC_FUTURE) and c:IsXyzSummoned() and (Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and not Duel.IsPhase(PHASE_BATTLE))) -end -function s.secondattackop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - --It can make a second attack during each Battle Phase this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3201) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101301044.lua b/pre-release/c101301044.lua deleted file mode 100644 index 069c10e552..0000000000 --- a/pre-release/c101301044.lua +++ /dev/null @@ -1,119 +0,0 @@ ---H-C マグナム・エクスカリバー ---Heroic Champion - Magnum Excalibur ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 Warrior monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) - --Double this card's ATK during damage calculation only - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCondition(s.atkcon) - e1:SetCost(Cost.Detach(2)) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --Equip this card to another monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.eqtg) - e2:SetOperation(s.eqop) - c:RegisterEffect(e2) - --Shuffle 3 Warrior monsters from your GY into the Deck. - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - c:RegisterEffect(e3) -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - return bc and bc:IsControler(1-tp) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,c:GetAttack()) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - --Double this card's ATK during damage calculation only - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) - c:RegisterEffect(e1) - end -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then - return Duel.SendtoGrave(c,REASON_RULE,PLAYER_NONE,PLAYER_NONE) - else - if not Duel.Equip(tp,c,tc) then return end - --Equip limit - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) - e0:SetValue(function(e,c) return c==tc end) - e0:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e0) - --The equipped monster gains 2000 ATK/DEF - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(2000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2) - end -end -function s.tdfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_GRAVE) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil) - if #g==3 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301045.lua b/pre-release/c101301045.lua deleted file mode 100644 index 9fcffb7452..0000000000 --- a/pre-release/c101301045.lua +++ /dev/null @@ -1,77 +0,0 @@ ---ARG☆S-勇駿のアリオン ---Argostars - Courageous Arion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters, OR 1 "Argostars" monster you control - Xyz.AddProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop) - --Add 1 "Argostars" Spell from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - 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():IsXyzSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Place up to 3 "Argostars" Continuous Traps from your GY, face-up in your Spell & Trap Zone - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Detach(2)) - e2:SetTarget(s.pltg) - e2:SetOperation(s.plop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_ARGOSTARS} -function s.ovfilter(c,tp,lc) - return c:IsSetCard(SET_ARGOSTARS,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.thfilter(c) - return c:IsSetCard(SET_ARGOSTARS) 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) -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.plfilter(c) - return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and not c:IsForbidden() -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_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - ft=math.min(ft,3) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_GRAVE,0,1,ft,nil) - if #g>0 then - for sc in g:Iter() do - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301046.lua b/pre-release/c101301046.lua deleted file mode 100644 index d67eceb3a6..0000000000 --- a/pre-release/c101301046.lua +++ /dev/null @@ -1,80 +0,0 @@ ---VS ロックス ---Vanquish Soul Rocks ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2+ Level 4 "Vanquish Soul" monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_VANQUISH_SOUL),4,2,s.ovfilter,aux.Stringid(id,0),Xyz.InfiniteMats,s.xyzop) - --All monsters your opponent controls lose 800 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(s.attrcon(ATTRIBUTE_DARK)) - e1:SetValue(-800) - c:RegisterEffect(e1) - --"Vanquish Soul" monsters you control gain 1000 ATK - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCondition(s.attrcon(ATTRIBUTE_FIRE)) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VANQUISH_SOUL)) - e2:SetValue(1000) - c:RegisterEffect(e2) - --Destroy 1 card your opponent controls - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(s.attrcon(ATTRIBUTE_EARTH)) - e3:SetCost(Cost.Detach(1)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) - --Track battles involving "Vanquish Soul" monsters - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLED) - ge1:SetOperation(s.regop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_names={28168628} -- "Rock of the Vanquisher" -s.listed_series={SET_VANQUISH_SOUL} -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local a,b=Duel.GetBattleMonster(0) - if (a and a:IsSetCard(SET_VANQUISH_SOUL)) or (b and b:IsSetCard(SET_VANQUISH_SOUL)) then - Duel.RegisterFlagEffect(0,id+100,RESET_PHASE|PHASE_END,0,1) - end -end -function s.ovfilter(c,tp,lc) - return (c:IsSetCard(SET_VANQUISH_SOUL,lc,SUMMON_TYPE_XYZ,tp) or c:IsCode(28168628)) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.HasFlagEffect(0,id+100) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.attrcon(attr) - return function(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,attr) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if chk==0 then return #g>0 end - 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,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/pre-release/c101301047.lua b/pre-release/c101301047.lua deleted file mode 100644 index c9088c6131..0000000000 --- a/pre-release/c101301047.lua +++ /dev/null @@ -1,60 +0,0 @@ ---流麗の騎士ガイアストリーム ---Gaia Stream, the Graceful Force ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2+ Level 6 monsters OR 1 Rank 5 or 7 Xyz Monster you control - Xyz.AddProcedure(c,nil,6,2,s.ovfilter,aux.Stringid(id,0),Xyz.InfiniteMats,s.xyzop) - --Cannot be used as material for an Xyz Summon the turn it was Xyz Summoned - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e0:SetCondition(s.matxyzcond) - e0:SetValue(1) - c:RegisterEffect(e0) - --Cannot attack directly - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --Gains ATK equal to the combined Levels/Ranks of its attached materials x 200 - 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) - --Detach 1 material from this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetOperation(s.detachop) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.ovfilter(c,tp,lc) - return c:IsRank(5,7) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - return true -end -function s.matxyzcond(e) - local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsXyzSummoned() -end -function s.atkval(e,c) - local g=e:GetHandler():GetOverlayGroup():Filter(aux.OR(Card.HasLevel,Card.HasRank),nil) - return 200*(g:GetSum(Card.GetLevel)+g:GetSum(Card.GetRank)) -end -function s.detachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:GetOverlayCount()>0 then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - end -end diff --git a/pre-release/c101301048.lua b/pre-release/c101301048.lua deleted file mode 100644 index f4ee1b3547..0000000000 --- a/pre-release/c101301048.lua +++ /dev/null @@ -1,61 +0,0 @@ ---超念銃士ヴァロン ---Vallon, the Psychic Skyblaster ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 5 monsters - Xyz.AddProcedure(c,nil,5,2) - --Change 1 face-up monster your opponent controls 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_MZONE) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --Destroy 1 face-down card on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - 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:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301049.lua b/pre-release/c101301049.lua deleted file mode 100644 index 1610320d3b..0000000000 --- a/pre-release/c101301049.lua +++ /dev/null @@ -1,90 +0,0 @@ ---閃刀姫=ゼロ ---Sky Striker Ace - Zero ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 "Sky Striker Ace" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SKY_STRIKER_ACE),2) - --You can only Special Summon "Sky Striker Ace - Zero(s)" once per turn - c:SetSPSummonOnce(id) - --Cannot be used as Link Material - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) - e0:SetValue(1) - c:RegisterEffect(e0) - --Add 1 "Sky Striker" Spell from your Deck or GY to your hand - 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:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon both 1 "Sky Striker Ace - Raye" and 1 "Sky Striker Ace - Roze" from your Deck and/or GY, then you can destroy 1 card on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfTribute) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SKY_STRIKER_ACE,SET_SKY_STRIKER} -s.listed_names={id,26077387,37351133} --"Sky Striker Ace - Raye", "Sky Striker Ace - Roze" -function s.thfilter(c) - return c:IsSetCard(SET_SKY_STRIKER) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spfilter(c,e,tp) - return c:IsCode(26077387,37351133) 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 - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) - return Duel.GetMZoneCount(tp,e:GetHandler())>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,0) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -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)<2 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) - if #g<2 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_SPSUMMON) - if #sg==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)==2 - and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301050.lua b/pre-release/c101301050.lua deleted file mode 100644 index 876ebc6f46..0000000000 --- a/pre-release/c101301050.lua +++ /dev/null @@ -1,59 +0,0 @@ ---麗しき磁律機壊 ---Zilofthonia Gorgon ---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 cannot Summon/Set monsters to a zone(s) this card points to - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_FORCE_MZONE) - e0:SetRange(LOCATION_MZONE) - e0:SetTargetRange(1,0) - e0:SetValue(function(e,fp,rp,r) return r==LOCATION_REASON_CONTROL and (ZONES_MMZ|ZONES_EMZ)|~(ZONES_MMZ|ZONES_EMZ) or ~e:GetHandler():GetLinkedZone() end) - c:RegisterEffect(e0) - --Monsters this card points to cannot attack, also their activated effects are negated - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(function(e,c) return e:GetHandler():GetLinkedGroup():IsContains(c) end) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.discon) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) - c:RegisterEffect(e2) - --Gains ATK equal to the total original ATK of all monsters this card points to - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(function(e,c) return e:GetHandler():GetLinkedGroup():Match(Card.IsFaceup,nil):GetSum(Card.GetBaseAttack) end) - c:RegisterEffect(e3) - --Cannot be destroyed by battle or monster effects while it points to no monsters - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(1) - e4:SetCondition(function(e) return e:GetHandler():GetLinkedGroupCount()==0 end) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e5:SetValue(function(e,re) return re:IsMonsterEffect() end) - c:RegisterEffect(e5) -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsRelateToEffect(re) and c:GetLinkedGroup():IsContains(rc) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end diff --git a/pre-release/c101301051.lua b/pre-release/c101301051.lua deleted file mode 100644 index 00b5102437..0000000000 --- a/pre-release/c101301051.lua +++ /dev/null @@ -1,93 +0,0 @@ ---うかのみつねのおなり ---Ukanomitsune-no-Onari ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 LIGHT monsters, including a Beast monster - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),2,2,s.matcheck) - --Your opponent cannot target cards in the Field Zones with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_FZONE,LOCATION_FZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --Set 1 Quick-Play Spell from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE) - 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) - e2:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --Apply effects up to the number of cards in the Field Zones - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.efftg) - e3:SetOperation(s.effop) - c:RegisterEffect(e3) -end -function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsRace,1,nil,RACE_BEAST,lc,sumtype,tp) -end -function s.setfilter(c) - return c:IsQuickPlaySpell() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsSSetable() then - Duel.SSet(tp,tc) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,1500) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE) - if ct==0 then return end - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - local b1=#g>0 - local b2=true - local b3=b1 and ct==2 - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}, - {b3,aux.Stringid(id,4)}) - local breakeffect=false - if op&1>0 then - --Destroy 1 card your opponent controls - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - breakeffect=true - end - end - if op&2>0 then - --Inflict 1500 damage to your opponent - if breakeffect then Duel.BreakEffect() end - Duel.Damage(1-tp,1500,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301052.lua b/pre-release/c101301052.lua deleted file mode 100644 index c92ca3e21f..0000000000 --- a/pre-release/c101301052.lua +++ /dev/null @@ -1,119 +0,0 @@ ---ガガガ・ホープ・タクティクス ---Gagaga Hope Tactics ---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) - --"Utopia" and "Utopic" Xyz Monsters you control whose original Attribute is LIGHT cannot be destroyed by card effects, also your opponent cannot target them with 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(aux.TargetBoolFunction(s.utopixyzfilter)) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --Change the Levels of 2 face-up monsters you control, including a "Gagaga" monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,{id,0}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) - --Destroy 1 card your opponent controls - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.descon) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_series={SET_UTOPIC,SET_GAGAGA} -function s.utopixyzfilter(c) - return c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup() -end -function s.lvfilter(c,e) - return c:HasLevel() and c:IsFaceup() and c:IsCanBeEffectTarget(e) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_GAGAGA) -end -s.nlvfilter=aux.NOT(Card.IsLevel) -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local gg=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil,e) - if chk==0 then return aux.SelectUnselectGroup(gg,e,tp,2,2,s.rescon,0) end - local g1,g2=gg:Split(Card.IsSetCard,nil,SET_GAGAGA) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK) - local lv=Duel.AnnounceNumber(tp,s.get_declarable_levels(g1,g2)) - local g=gg:Match(s.nlvfilter,nil,lv) - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TARGET) - Duel.SetTargetCard(tg) - e:SetLabel(lv) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tg,2,tp,lv) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e):Filter(Card.IsFaceup,nil) - if #tg==0 then return end - local lv=e:GetLabel() - for tc in tg:Iter() do - if not tc:IsLevel(lv) then - --Its Level becomes the declared Level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - end -end -function s.get_declarable_levels(g1,g2) - local opts={} - for lv=1,12 do - local ct=g1:FilterCount(s.nlvfilter,nil,lv) - if ct>1 or (ct>0 and g2:IsExists(s.nlvfilter,1,nil,lv)) then - table.insert(opts,lv) - end - end - return table.unpack(opts) -end -function s.desconfilter(c,tp) - return s.utopixyzfilter(c) and c:IsSummonPlayer(tp) and c:IsXyzSummoned() -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.desconfilter,1,nil,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -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/c101301053.lua b/pre-release/c101301053.lua deleted file mode 100644 index 0147aba760..0000000000 --- a/pre-release/c101301053.lua +++ /dev/null @@ -1,96 +0,0 @@ ---月光舞踏会 ---Lunalight Masquerade ---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) - e0:SetCost(s.actreg) - c:RegisterEffect(e0) - --Send 1 "Lunalight" monster from your Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --Add 1 "Polymerization" from your GY or banishment to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_LUNALIGHT} -s.listed_names={CARD_POLYMERIZATION} -function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.tgfilter(c) - return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() 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 -function s.thconfilter(c,tp) - return c:IsSetCard(SET_LUNALIGHT) and c:IsFusionSummoned() and c:IsSummonPlayer(tp) and c:IsFaceup() -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.thconfilter,1,nil,tp) -end -function s.thfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsFaceup() 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|LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(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,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end - Duel.ShuffleHand(tp) - if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) - --Once this turn, if you Fusion Summon a "Lunalight" monster, you can also banish monsters from your GY as material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_FUSION_MATERIAL) - e1:SetCountLimit(1) - e1:SetTargetRange(LOCATION_GRAVE,0) - e1:SetTarget(function(e,c) return c:IsAbleToRemove() and c:IsMonster() end) - e1:SetOperation(Fusion.BanishMaterial) - e1:SetValue(function(e,c) return c and c:IsSetCard(SET_LUNALIGHT) and c:IsControler(e:GetHandlerPlayer()) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c101301054.lua b/pre-release/c101301054.lua deleted file mode 100644 index 03b2320a0f..0000000000 --- a/pre-release/c101301054.lua +++ /dev/null @@ -1,93 +0,0 @@ ---神芸学都アルトメギア ---Artmegia the Academy City of Divine Arts ---Scripted by Hatter -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 Normal Summon 1 "Medius the Innocent" in addition to your Normal Summon/Set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetRange(LOCATION_FZONE) - e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_MEDIUS_THE_INNOCENT)) - c:RegisterEffect(e1) - --Add 1 declared "Artmegia" monster 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_FZONE) - e2:SetCost(Cost.Discard(Card.IsSpellTrap)) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Track names declared to activate e2 - aux.GlobalCheck(s,function() - s.declared_names={} - s.declared_names[0]={} - s.declared_names[1]={} - aux.AddValuesReset(function() - s.declared_names={} - s.declared_names[0]={} - s.declared_names[1]={} - end) - end) -end -s.listed_names={CARD_MEDIUS_THE_INNOCENT} -s.listed_series={SET_ARTMEGIA} -function s.declfilter(c,exc1,exc2) - return c:IsSetCard(SET_ARTMEGIA) and c:IsMonster() and c:IsAbleToHand() - and (#exc1==0 or not c:IsCode(table.unpack(exc1))) and (#exc2==0 or not c:IsCode(table.unpack(exc2))) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local fcs=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_MZONE,0,nil):GetClass(Card.GetCode) - local g=Duel.GetMatchingGroup(s.declfilter,tp,LOCATION_DECK,0,nil,fcs,s.declared_names[tp]) - if chk==0 then return #g>0 end - s.announce_filter={} - for _,code in ipairs(g:GetClass(Card.GetCode)) do - if #s.announce_filter==0 then - table.insert(s.announce_filter,code) - table.insert(s.announce_filter,OPCODE_ISCODE) - else - table.insert(s.announce_filter,code) - table.insert(s.announce_filter,OPCODE_ISCODE) - table.insert(s.announce_filter,OPCODE_OR) - end - end - local ac=Duel.AnnounceCard(tp,table.unpack(s.announce_filter)) - table.insert(s.declared_names[tp],ac) - Duel.SetTargetParam(ac) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER) -end -function s.thfilter(c,code) - return c:IsCode(code) and c:IsMonster() and c:IsAbleToHand() -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,code) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - if not Duel.HasFlagEffect(tp,id) then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --Cannot Special Summon from outside the Extra Deck for the rest of this turn, except "Artmegia" monsters and "Medius the Innocent" - 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 not (c:IsSetCard(SET_ARTMEGIA) or c:IsCode(CARD_MEDIUS_THE_INNOCENT) or c:IsLocation(LOCATION_EXTRA)) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end diff --git a/pre-release/c101301055.lua b/pre-release/c101301055.lua deleted file mode 100644 index 3f060c769e..0000000000 --- a/pre-release/c101301055.lua +++ /dev/null @@ -1,83 +0,0 @@ ---無垢なる予幻視 ---Theorealize ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Look at the top card of your opponent's Deck and place it on either the top or the bottom of the Deck - 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) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Change the Monster Type and Attribute of 1 face-up monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.chngtg) - e2:SetOperation(s.chngop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MEDIUS_THE_INNOCENT} -function s.costfilter(c) - return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsAbleToGraveAsCost() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(1-tp,1) - if #g>0 then - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) - if ac==1 then Duel.MoveSequence(g:GetFirst(),1) end - end -end -function s.chngtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - local race=Duel.AnnounceRace(tp,1,RACE_ALL) - local attr=tc:IsDifferentRace(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or tc:AnnounceAnotherAttribute(tp) - e:SetLabel(race,attr) -end -function s.chngop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if (not tc:IsFaceup() and tc:IsRelateToEffect(e)) then return end - local c=e:GetHandler() - local race,attr=e:GetLabel() - if tc:IsDifferentRace(race) then - --Change its Monster Type - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(race) - e1:SetReset(RESETS_STANDARD_PHASE_END,2) - tc:RegisterEffect(e1) - end - if tc:IsAttributeExcept(attr) then - --Change its Attribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(attr) - e2:SetReset(RESETS_STANDARD_PHASE_END,2) - tc:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/pre-release/c101301056.lua b/pre-release/c101301056.lua deleted file mode 100644 index ca5777ce08..0000000000 --- a/pre-release/c101301056.lua +++ /dev/null @@ -1,66 +0,0 @@ ---アルトメギア・マスターワーク-継承- ---Artmegia Masterwork - Succession ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Fusion Monster from your Extra Deck - local e1=Fusion.CreateSummonEff({handler=c,extrafil=s.fextra,stage2=s.atkop,extratg=s.atktg}) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCondition(function() return Duel.IsMainPhase() end) - c:RegisterEffect(e1) - --Shuffle into your Deck 3 "Artmegia" cards in your GY with different names - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ARTMEGIA} -function s.matcheck(tp,sg,fc) - return sg:IsExists(Card.IsSetCard,1,nil,SET_ARTMEGIA,fc,SUMMON_TYPE_FUSION,tp) -end -function s.fextra(e,tp,mg,sumtype) - return nil,s.matcheck -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,500) -end -function s.atkop(e,tc,tp,mg,chk) - if chk==1 then - if not Duel.IsExistingMatchingCard(nil,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) then return end - Duel.BreakEffect() - --Gains 500 ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.tdfilter(c,e) - return c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) - if chk==0 then return #g>=3 and g:GetClassCount(Card.GetCode)>=3 end - local tg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_TODECK) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301057.lua b/pre-release/c101301057.lua deleted file mode 100644 index 65c8dbaaa4..0000000000 --- a/pre-release/c101301057.lua +++ /dev/null @@ -1,79 +0,0 @@ ---アルトメギア・ヴァンダリズム-襲撃- ---Artmegia Vandalism - Assault ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can add 1 "Medius the Innocent" from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Make 1 face-up monster you control able to be treated as an "Artmegia" monster if used as Fusion Material this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.fusmattg) - e2:SetOperation(s.fusmatop) - c:RegisterEffect(e2) - --If "Artmegia the Academy City of Divine Arts" you control would be destroyed by card effect, you can send this card to the GY instead - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(s.reptg) - e3:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) - e3:SetOperation(function(e) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MEDIUS_THE_INNOCENT,101301054} --"Artmegia the Academy City of Divine Arts" -s.listed_series={SET_ARTMEGIA} -function s.thfilter(c) - return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsAbleToHand() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.fusmattg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.fusmatop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --It can be treated as an "Artmegia" monster if used as Fusion Material this turn - 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_ADD_SETCODE) - e1:SetValue(SET_ARTMEGIA) - e1:SetOperation(function(scard,sumtype,tp) return (sumtype&MATERIAL_FUSION)>0 or (sumtype&SUMMON_TYPE_FUSION)>0 end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.repfilter(c,tp) - return c:IsCode(101301054) and c:IsFaceup() and c:IsControler(tp) and c:IsOnField() - and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGrave() and eg:IsExists(s.repfilter,1,nil,tp) end - return Duel.SelectEffectYesNo(tp,c,96) -end \ No newline at end of file diff --git a/pre-release/c101301058.lua b/pre-release/c101301058.lua deleted file mode 100644 index ec94753398..0000000000 --- a/pre-release/c101301058.lua +++ /dev/null @@ -1,85 +0,0 @@ ---アルトメギア・バーニッシュ-改変- ---Artmegia Banish - Change ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Place 1 "Artmegia the Academy City of Divine Arts" from your Deck or GY face-up in your Field Zone - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Negate an attack targeting your "Artmegia" monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.negcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MEDIUS_THE_INNOCENT,101301054,id} --"Artmegia the Academy City of Divine Arts" -s.listed_series={SET_ARTMEGIA} -function s.plthfilter(c,tohand_chk) - return (c:IsCode(101301054) and not c:IsForbidden()) or (tohand_chk and c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToHand() and c:IsLocation(LOCATION_DECK) and not c:IsCode(id)) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,101301054),tp,LOCATION_ONFIELD,0,1,nil) - return Duel.IsExistingMatchingCard(s.plthfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tohand_chk) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,101301054),tp,LOCATION_ONFIELD,0,1,nil) - local hint_desc=tohand_chk and aux.Stringid(id,2) or HINTMSG_TOFIELD - Duel.Hint(HINT_SELECTMSG,tp,hint_desc) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plthfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tohand_chk):GetFirst() - if not sc then return end - if sc:IsCode(101301054) then - if not tohand_chk then - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - else - aux.ToHandOrElse(sc,tp, - function() return tohand_chk and not sc:IsForbidden() end, - function() Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) end, - aux.Stringid(id,3) - ) - end - else - Duel.SendtoHand(sc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sc) - end -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - return bc and bc:IsSetCard(SET_ARTMEGIA) and bc:IsControler(tp) and bc:IsFaceup() -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spfilter(c,e,tp) - return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/pre-release/c101301059.lua b/pre-release/c101301059.lua deleted file mode 100644 index a6f8423a7b..0000000000 --- a/pre-release/c101301059.lua +++ /dev/null @@ -1,67 +0,0 @@ ---パラレル・テレポート ---Parallel Teleport ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 7 or lower Psychic monster from your Deck or Extra Deck - 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_PSYCHIC) end) -end -function s.costfilter(c,e,tp) - return c:IsRace(RACE_PSYCHIC) and c:HasLevel() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,mc) - if not (c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetMZoneCount(tp,mc)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - end -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 - and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,e,tp) end - local rc=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,e,tp):GetFirst() - e:SetLabel(rc:GetOriginalLevel()) - Duel.Release(rc,REASON_COST) - --You cannot Special Summon the turn you activate this card, except Psychic monsters - 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_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_PSYCHIC) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local cost_chk=e:GetLabel()==100 - e:SetLabel(0) - return cost_chk or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - local lv_diff=math.abs(sc:GetOriginalLevel()-e:GetLabel()) - if lv_diff>0 then - Duel.BreakEffect() - Duel.SetLP(tp,Duel.GetLP(tp)-lv_diff*1000) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301060.lua b/pre-release/c101301060.lua deleted file mode 100644 index 83a3965560..0000000000 --- a/pre-release/c101301060.lua +++ /dev/null @@ -1,67 +0,0 @@ ---テレポート・フュージョン ---Teleport Fusion ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Psychic Fusion Monster by banishing Psychic monsters from your field and/or GY as material - local e1=Fusion.CreateSummonEff({handler=c, - fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC), - matfilter=Fusion.OnFieldMat(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC)), - extrafil=s.fextramat, - extraop=Fusion.BanishMaterial, - extratg=s.extratg} - ) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e1:SetCondition(function() return Duel.IsMainPhase() end) - c:RegisterEffect(e1) - --Special Summon 1 of your banished Psychic monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.fextramat(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC),Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil -end -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_MZONE|LOCATION_GRAVE) -end -function s.spconfilter(c,tp) - return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSummonLocation(LOCATION_EXTRA) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) and c:IsPreviousRaceOnField(RACE_PSYCHIC) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301061.lua b/pre-release/c101301061.lua deleted file mode 100644 index 7210fd5e42..0000000000 --- a/pre-release/c101301061.lua +++ /dev/null @@ -1,78 +0,0 @@ ---帝王の策略 ---Scheme of the Monarchs ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Send 1 "Monarch" Spell/Trap from your Deck to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --Add 1 monster with 2400 ATK/1000 DEF from your Deck or GY to your hand, then you can Normal Summon 1 listed monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MONARCH} -s.listed_names={id,51945556,4929256,26205777,60229110,73125233,9748752} ---"Zaborg the Thunder Monarch", "Mobius the Frost Monarch", "Thestalos the Firestorm Monarch", "Granmarg the Rock Monarch", "Raiza the Storm Monarch", "Caius the Shadow Monarch" -function s.tgfilter(c) - return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsCode(id) 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 -function s.attrfilter(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetAttribute()) -end -function s.thfilter(c,attr) - return c:IsAttribute(attr) and c:IsAttack(2400) and c:IsDefense(1000) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.attrfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.attrfilter,tp,0,LOCATION_MZONE,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.attrfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.sumfilter(c) - return c:IsSummonable(true,nil) and c:IsCode(51945556,4929256,26205777,60229110,73125233,9748752) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end - 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,tc:GetAttribute()):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - local sg=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) - if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sumc=sg:Select(tp,1,1,nil):GetFirst() - Duel.BreakEffect() - Duel.Summon(tp,sumc,true,nil) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301062.lua b/pre-release/c101301062.lua deleted file mode 100644 index 2c7a9f292e..0000000000 --- a/pre-release/c101301062.lua +++ /dev/null @@ -1,78 +0,0 @@ ---叛逆の帝王 ---Rebellion of the Monarchs ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Reveal 3 monsters with 800 or 2400 or more ATK, and 1000 DEF, from your Deck, your opponent chooses 1 for you to add to your hand, and you send the rest to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Discard(nil,true)) - e1:SetTarget(s.thtgtg) - e1:SetOperation(s.thtgop) - c:RegisterEffect(e1) - --Special Summon 1 monster with 800 ATK/1000 DEF 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,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.revfilter(c) - return (c:IsAttack(800) or c:IsAttackAbove(2400)) and c:IsDefense(1000) and (c:IsAbleToHand() or c:IsAbleToGrave()) -end -function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) - if chk==0 then return #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsAbleToHand,1,nil) -end -function s.thtgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) - if #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) then - local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_CONFIRM) - Duel.ConfirmCards(1-tp,rg) - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,2)) - local sc=rg:FilterSelect(1-tp,Card.IsAbleToHand,1,1,nil):GetFirst() - Duel.SendtoHand(sc,nil,REASON_EFFECT) - Duel.SendtoGrave(rg-sc,REASON_EFFECT) - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves - 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:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spfilter(c,e,tp) - return c:IsAttack(800) and c:IsDefense(1000) 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 diff --git a/pre-release/c101301063.lua b/pre-release/c101301063.lua deleted file mode 100644 index 3284d0bae5..0000000000 --- a/pre-release/c101301063.lua +++ /dev/null @@ -1,67 +0,0 @@ ---再世律 ---Regenesis Pentateuch ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Banish 1 card your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Special Summon 1 monster with 2500 ATK or DEF 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,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={22812963} --"Regenesis Lord" -function s.confilter(c) - return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,22812963),tp,LOCATION_ONFIELD,0,1,nil) and 2 or 1 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return (c:IsAttack(2500) or c:IsDefense(2500)) 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 \ No newline at end of file diff --git a/pre-release/c101301064.lua b/pre-release/c101301064.lua deleted file mode 100644 index a69742a8b2..0000000000 --- a/pre-release/c101301064.lua +++ /dev/null @@ -1,69 +0,0 @@ ---灰滅の劫火 ---Inferno of the Ashened ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can place 1 "Obsidim, the Ashened City" from your Deck face-up in either Field Zone - 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,EFFECT_COUNT_CODE_OATH) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Send 1 face-up card your opponent controls to the GY and Special Summon 1 Level 8 or higher DARK Pyro monster from your GY to your opponent's field in Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tgsptg) - e2:SetOperation(s.tgspop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_OBSIDIM_ASHENED_CITY} -function s.plfilter(c) - return c:IsCode(CARD_OBSIDIM_ASHENED_CITY) and not c:IsForbidden() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_DECK,0,nil,tp) - if Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc then - local op=Duel.SelectOption(tp,false,aux.Stringid(id,3),aux.Stringid(id,4)) - local target_player=op==0 and tp or 1-tp - Duel.MoveToField(sc,tp,target_player,LOCATION_FZONE,POS_FACEUP,true) - end - end -end -function s.tgfilter(c,tp) - return c:IsFaceup() and c:IsAbleToGrave() and Duel.GetMZoneCount(1-tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsLevelAbove(8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_PYRO) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) -end -function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,tp,0) -end -function s.tgspop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - local fg,gg=tg:Split(Card.IsLocation,nil,LOCATION_ONFIELD) - if #fg>0 and Duel.SendtoGrave(fg,REASON_EFFECT)>0 and fg:GetFirst():IsLocation(LOCATION_GRAVE) - and #gg>0 then - Duel.SpecialSummon(gg,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101301065.lua b/pre-release/c101301065.lua deleted file mode 100644 index 6bea2b3900..0000000000 --- a/pre-release/c101301065.lua +++ /dev/null @@ -1,50 +0,0 @@ ---原石融合 ---Primite Fusion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Dragon Fusion Monster from your Extra Deck, by shuffling its materials from your field, GY, and/or banishment into the Deck, including a Normal Monster - local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),matfilter=aux.FALSE,extrafil=s.fextra,extraop=Fusion.ShuffleMaterial,extratg=s.extratg}) - e1:SetCountLimit(1,id) - c:RegisterEffect(e1) - --Add 1 Level 5 or higher "Primite" monster from your Deck or GY 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:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_PRIMITE} -function s.fextrafil(c) - return c:IsAbleToDeck() and (c:IsOnField() or c:IsFaceup()) -end -function s.fcheck(tp,sg,fc) - return sg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(s.fextrafil),tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED,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_TODECK,nil,1,tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED) -end -function s.thfilter(c) - return c:IsLevelAbove(5) and c:IsSetCard(SET_PRIMITE) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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/c101301066.lua b/pre-release/c101301066.lua deleted file mode 100644 index 983dab2954..0000000000 --- a/pre-release/c101301066.lua +++ /dev/null @@ -1,109 +0,0 @@ ---Start for VS! ---Vanquish Soul, Start! ---Scripted by Hatter -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) - --Add 1 "Vanquish Soul" monster 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:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If a "Vanquish Soul" monster(s) you control would be destroyed by battle or card effect, you can reveal 1 "Vanquish Soul" monster in your hand instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.repltg) - e2:SetOperation(s.replop) - e2:SetValue(function(e,c) return s.replfilter(c,e:GetHandlerPlayer()) end) - c:RegisterEffect(e2) - --Set 1 "Vanquish Soul" Trap from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.setcon) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_VANQUISH_SOUL} -function s.thtgfilter(c,tp) - return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute()) -end -function s.thfilter(c,attr) - return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsMonster() and not c:IsAttribute(attr) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thtgfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.thtgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.thtgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttribute()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.replfilter(c,tp) - return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() - and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) -end -function s.rvfilter(c) - return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsMonster() and not c:IsPublic() -end -function s.repltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(s.replfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.rvfilter,tp,LOCATION_HAND,0,1,nil) end - if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local tg=Duel.SelectMatchingCard(tp,s.rvfilter,tp,LOCATION_HAND,0,1,1,nil) - e:SetLabelObject(tg:GetFirst()) - return true - end - return false -end -function s.replop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,1-tp,id) - local tc=e:GetLabelObject() - Duel.ConfirmCards(1-tp,tc) - Duel.ShuffleHand(tp) -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_VANQUISH_SOUL),tp,LOCATION_MZONE,0,2,nil) -end -function s.setfilter(c) - return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsTrap() 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 -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 \ No newline at end of file diff --git a/pre-release/c101301067.lua b/pre-release/c101301067.lua deleted file mode 100644 index 1d825591b1..0000000000 --- a/pre-release/c101301067.lua +++ /dev/null @@ -1,125 +0,0 @@ ---Recettes de Nouvellez~ヌーベルズのレシピ帳~ ---Nouvelles Recipe Book "Recettes de Nouvellez" ---scripted by Naim -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) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - c:RegisterEffect(e0) - --While you control a "Nouvelles" Monster Card, all face-up monsters your opponent controls are changed to Attack Position - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SET_POSITION) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(s.atkposcon) - e1:SetValue(POS_FACEUP_ATTACK) - c:RegisterEffect(e1) - --Each time a monster(s) is Tributed by a Ritual Monster's effect, your opponent pays 850 LP - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_RELEASE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(s.lpcon) - e2:SetOperation(s.lpop) - c:RegisterEffect(e2) - --Add 1 "Recipe" or "Nouvelles" card from your Deck to your hand, except a Continuous Spell, and if you do, increase the target's Level by 1 - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,1)) - e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_CUSTOM+id+1) - e3a:SetRange(LOCATION_SZONE) - e3a:SetCountLimit(1) - e3a:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) - e3a:SetTarget(s.thtg) - e3a:SetOperation(s.thop) - c:RegisterEffect(e3a) - local g=Group.CreateGroup() - g:KeepAlive() - e3a:SetLabelObject(g) - --Register your Special Summoned Ritual monsters - local e3b=Effect.CreateEffect(c) - e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3b:SetCode(EVENT_SPSUMMON_SUCCESS) - e3b:SetRange(LOCATION_SZONE) - e3b:SetLabelObject(e3a) - e3b:SetOperation(s.regsumop) - c:RegisterEffect(e3b) -end -s.listed_seris={SET_NOUVELLES,SET_RECIPE} -function s.nouvfilter(c) - return c:IsSetCard(SET_NOUVELLES) and c:IsMonsterCard() and c:IsFaceup() -end -function s.atkposcon(e) - return Duel.IsExistingMatchingCard(s.nouvfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function s.lpcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsMonsterEffect() and re:GetHandler():IsRitualMonster() - and r&REASON_EFFECT>0 and eg:IsExists(Card.IsMonster,1,nil) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(1-tp,850) then - Duel.Hint(HINT_CARD,1-tp,id) - Duel.PayLPCost(1-tp,850) - end -end -function s.lvfilter(c,e,tp) - return c:IsRitualMonster() and c:IsSummonPlayer(tp) and c:IsFaceup() - and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) and c:HasLevel() -end -function s.thfilter(c) - return c:IsSetCard({SET_RECIPE,SET_NOUVELLES}) and not c:IsContinuousSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetLabelObject():Filter(s.lvfilter,nil,e,tp) - if chkc then return g:IsContains(chkc) and s.lvfilter(chkc,e,tp) end - if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) 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_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tc,1,tp,1) -end -function s.thop(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) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --Increase that monster's Level by 1 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - end -end -function s.regsumop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.lvfilter,nil,e,tp) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id+1,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id+1)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id+1,e,0,tp,tp,0) - end -end \ No newline at end of file diff --git a/pre-release/c101301068.lua b/pre-release/c101301068.lua deleted file mode 100644 index ad046860b4..0000000000 --- a/pre-release/c101301068.lua +++ /dev/null @@ -1,103 +0,0 @@ ---第19層『襲来干渉!漆黒の超量士!!』 ---Layer 19: "Preventing the Invasion! The Pitch-Black Super Quantum!!" ---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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_SUPER_QUANT} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SUPER_QUANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalAttribute,c:GetOriginalAttribute()),tp,LOCATION_MZONE,0,1,nil) -end -function s.setfilter(c) - return c:IsSetCard(SET_SUPER_QUANT) and c:IsTrap() and c:IsSSetable() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - local b3=not Duel.HasFlagEffect(tp,id+200) - and (e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 or b3 end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetLabel()==1 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttackPos() and chkc:IsCanChangePosition() end - local cost_skip=e:GetLabel()~=-100 - local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) - and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=(cost_skip or (not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil))) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) - and (not e:IsHasType(EFFECT_TYPE_ACTIVATE) or e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then e:SetLabel(0) 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_POSITION) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - elseif op==3 then - e:SetCategory(0) - e:SetProperty(0) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Change 1 Attack Position monster on the field to Defense Position - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) - end - elseif op==2 then - --Special Summon 1 "Super Quant" monster from your Deck in Defense Position, with a different original Attribute from the monsters you control - 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_DEFENSE) - end - elseif op==3 then - --Set 1 "Super Quant" Trap from your Deck - 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 - --It can be activated this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301069.lua b/pre-release/c101301069.lua deleted file mode 100644 index 80244431a6..0000000000 --- a/pre-release/c101301069.lua +++ /dev/null @@ -1,95 +0,0 @@ ---閃刀亜式-レムニスゲート ---Sky Striker Alternative - Lemnis Gate ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Immediately after this effect resolves, Link Summon 1 "Sky Striker Ace" Link Monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SKY_STRIKER_ACE,SET_SKY_STRIKER} -function s.tdfilter(c,e) - return ((c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsMonster()) or (c:IsSetCard(SET_SKY_STRIKER) and c:IsSpell())) - and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) -end -function s.rescon(full_mct,full_sct) - return function(sg,e,tp,mg) - local mct=sg:FilterCount(Card.IsMonster,nil) - local sct=#sg-mct - if mct==sct then return true end - local rem_mct=full_mct-mct - local rem_sct=full_sct-sct - return false,mct>sct and rem_sct<(mct-sct) or rem_mct<(sct-mct) - end -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e) - local full_mct=g:FilterCount(Card.IsMonster,nil) - local full_sct=#g-full_mct - local rescon=s.rescon(full_mct,full_sct) - if chk==0 then return full_mct>0 and full_sct>0 and aux.SelectUnselectGroup(g,e,tp,2,2,rescon,0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,math.min(full_mct,full_sct)*2,rescon,1,tp,HINTMSG_TODECK,rescon) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then - local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA)//3 - if ct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - end - end -end -function s.spconfilter(c,tp) - return c:IsSetCard(SET_SKY_STRIKER) 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.spfilter(c) - return c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsLinkSummonable() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc then - Duel.LinkSummon(tp,sc) - end -end diff --git a/pre-release/c101301070.lua b/pre-release/c101301070.lua deleted file mode 100644 index cfda863561..0000000000 --- a/pre-release/c101301070.lua +++ /dev/null @@ -1,99 +0,0 @@ ---咎を擁く魔瞳 ---Guilt Gripping Morganite ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Apply effects for the rest of the Duel - 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) - c:RegisterEffect(e1) - --Place 1 revealed "Morganite" card on the bottom of the Deck, then draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.tddrawcost) - e2:SetTarget(s.tddrawtg) - e2:SetOperation(s.tddrawop) - c:RegisterEffect(e2) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,0,0,1) - local c=e:GetHandler() - --You cannot activate monster effects in the hand - 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.aclimit) - Duel.RegisterEffect(e1,tp) - --You can Normal Summon Level 5 or higher monsters without Tributing. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,3)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetCondition(s.nontribcon) - e2:SetTarget(aux.FieldSummonProcTg(function(e,c) return c:IsLevelAbove(5) end)) - Duel.RegisterEffect(e2,tp) - --You do not pay LP to activate Spell/Trap Cards - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_LPCOST_CHANGE) - e3:SetTargetRange(1,0) - e3:SetValue(s.nolpcost) - Duel.RegisterEffect(e3,tp) -end -s.listed_series={SET_MORGANITE} -function s.aclimit(e,re,tp) - local rc=re:GetHandler() - return rc and rc:IsLocation(LOCATION_HAND) and re:IsMonsterEffect() -end -function s.nontribcon(e,c,minc) - if c==nil then return true end - return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function s.nolpcost(e,re,rp,val) - return (re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSpellTrap()) and 0 or val -end -function s.revealfilter(c) - return c:IsSetCard(SET_MORGANITE) and not c:IsPublic() -end -function s.tddrawcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Remove(c,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - Duel.ConfirmCards(1-tp,rc) - Duel.ShuffleHand(tp) - e:SetLabelObject(rc) - Duel.SetTargetCard(rc) -end -function s.tddrawtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetLabelObject(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.tddrawop(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetLabelObject() - if rc:IsRelateToEffect(e) and Duel.SendtoDeck(rc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 - and Duel.IsPlayerCanDraw(tp) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301071.lua b/pre-release/c101301071.lua deleted file mode 100644 index 97ba3e50e7..0000000000 --- a/pre-release/c101301071.lua +++ /dev/null @@ -1,31 +0,0 @@ ---リターン・オブ・ザ・デュエリスト ---Return of the Duelist -local s,id=GetID() -function s.initial_effect(c) - --Add 1 Equip Spell from your Deck or GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),0,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.thfilter(c) - return c:IsEquipSpell() 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|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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/c101301072.lua b/pre-release/c101301072.lua deleted file mode 100644 index 1903a9d7cb..0000000000 --- a/pre-release/c101301072.lua +++ /dev/null @@ -1,101 +0,0 @@ ---急雷の泥沼 ---Sudden Thunderous Swamp ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can discard 1 card, and if you do, Set 1 Continuous Trap from your Deck or GY, with an effect that Special Summons itself as a monster, except the discarded card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Add 1 card with the same name as 1 of your destroyed cards 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_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local g=Group.CreateGroup() - g:KeepAlive() - e2:SetLabelObject(g) - --Keep track of cards destroyed on your field - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_SZONE) - e3:SetLabelObject(e2) - e3:SetOperation(s.regop) - c:RegisterEffect(e3) -end -function s.setfilter(c) - return c:IsContinuousTrap() and c:IsTrapMonster() and c:IsSSetable() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) - and Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD|REASON_EFFECT)>0 then - local og=Duel.GetOperatedGroup() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,og) - if #g>0 then - Duel.SSet(tp,g) - end - end -end -function s.tgfilter(c,e,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsCanBeEffectTarget(e) and c:IsReason(REASON_BATTLE|REASON_EFFECT) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) -end -function s.thfilter(c,code) - return c:IsCode(code) and c:IsAbleToHand() -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:Filter(s.tgfilter,nil,e,tp) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetLabelObject():Filter(s.tgfilter,nil,e,tp) - if chkc then return g:IsContains(chkc) and s.tgfilter(chkc,e,tp) end - if chk==0 then return #g>0 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_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301073.lua b/pre-release/c101301073.lua deleted file mode 100644 index 2f5edf1912..0000000000 --- a/pre-release/c101301073.lua +++ /dev/null @@ -1,104 +0,0 @@ ---春 ---Spring ---scripted by Naim -local COUNTER_SEASON=0x214 -local s,id=GetID() -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_SEASON) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Select any number of your Main Monster Zones to make them unusuable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1) - e1:SetTarget(s.countertg) - e1:SetOperation(s.counterop) - c:RegisterEffect(e1) - --Monsters you control gain 400 ATK for each Season Counter on this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetValue(function(e,c) return e:GetHandler():GetCounter(COUNTER_SEASON)*400 end) - c:RegisterEffect(e2) - --Place 1 Field Spell from your Deck that you can place a Season Counter on face-up on your field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e3:SetTarget(s.pltg) - e3:SetOperation(s.plop) - c:RegisterEffect(e3) -end -s.counter_place_list={COUNTER_SEASON} -function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) - local max_zones=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return max_zones>0 end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,max_zones,tp,COUNTER_SEASON) -end -function s.counterop(e,tp,eg,ep,ev,re,r,rp) - local max_zones=Duel.GetLocationCount(tp,LOCATION_MZONE) - if max_zones<=0 then return end - local ct=0 - local selected_zones=0 - repeat - ct=ct+1 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE) - local new_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,selected_zones) - selected_zones=selected_zones|new_zone - until (ct>=max_zones or not Duel.SelectYesNo(tp,aux.Stringid(id,2))) - local c=e:GetHandler() - c:AddCounter(COUNTER_SEASON,ct) - --Those zones cannot be used while this card is on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE_FIELD) - e1:SetRange(LOCATION_FZONE) - e1:SetOperation(function() return selected_zones end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) -end -function s.plfilter(c) - return c:IsFieldSpell() and c:IsCanAddCounter(COUNTER_SEASON,1,false,LOCATION_ONFIELD) and not c:IsForbidden() -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler():GetCounter(COUNTER_SEASON),tp,COUNTER_SEASON) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if not sc then return end - local c=e:GetHandler() - local ct=c:GetCounter(COUNTER_SEASON) - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - if Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then - --Cannot activate its effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3302) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - if ct>0 then - sc:AddCounter(COUNTER_SEASON,ct) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301074.lua b/pre-release/c101301074.lua deleted file mode 100644 index 0fecdc0e3a..0000000000 --- a/pre-release/c101301074.lua +++ /dev/null @@ -1,86 +0,0 @@ ---エクシーズ・アンブレイカブル・バリア ---Xyz Unbreakable Barrier ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Negate the activation of a Spell/Trap Card, or monster effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,id) - e1:SetCondition(s.negcon) - e1:SetTarget(s.negtg) - e1:SetOperation(s.negop) - c:RegisterEffect(e1) - --Attach 1 LIGHT "Utopia" or "Utopic" Xyz Monster from your GY to 1 Xyz Monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.attachtg) - e2:SetOperation(s.attachop) - c:RegisterEffect(e2) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,1,nil) -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 - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - if Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT)==2 then - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) - if #dg==0 then return end - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end -function s.xyzfilter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c) -end -function s.matfilter(c,tp,xyzc) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) - and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) -end -function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.attachop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,tc) - if #g>0 then - Duel.Overlay(tc,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301075.lua b/pre-release/c101301075.lua deleted file mode 100644 index d42a02d27f..0000000000 --- a/pre-release/c101301075.lua +++ /dev/null @@ -1,136 +0,0 @@ ---アルトメギア・メセナ-覚醒- ---Artmegia Messena - Awakening ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Return 1 "Artmegia" monster you control to the hand/Extra Deck, and if you do, destroy 1 card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ARTMEGIA} -s.listed_names={CARD_MEDIUS_THE_INNOCENT} -function s.spfilter(c,e,tp) - return (c:IsSetCard(SET_ARTMEGIA) or c:IsCode(CARD_MEDIUS_THE_INNOCENT)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - 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 - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) - --This turn, the activation of your cards and effects that include an effect that Fusion Summons a Fusion Monster cannot be negated - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_INACTIVATE) - e1:SetValue(s.efilter) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --This turn, your opponent cannot activate cards or effects when a monster is Fusion Summoned this way - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(s.limcon) - e2:SetOperation(s.limop) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_END) - e3:SetOperation(s.limop2) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function s.efilter(e,ct) - local p=e:GetHandlerPlayer() - local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) - return p==tp and te:IsHasCategory(CATEGORY_FUSION_SUMMON) -end -function s.limfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) -end -function s.limcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.limfilter,1,nil,tp) -end -function s.limop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentChain()==0 then - Duel.SetChainLimitTillChainEnd(s.chainlm) - elseif Duel.GetCurrentChain()==1 then - e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetOperation(s.resetop) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EVENT_BREAK_EFFECT) - e2:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e2,tp) - end -end -function s.resetop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():ResetFlagEffect(id) - e:Reset() -end -function s.limop2(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():HasFlagEffect(id) then - Duel.SetChainLimitTillChainEnd(s.chainlm) - end - e:GetHandler():ResetFlagEffect(id) -end -function s.chainlm(e,rp,tp) - return tp==rp -end -function s.thfilter(c) - return c:IsSetCard(SET_ARTMEGIA) and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end - local dg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if chk==0 then return #dg>0 and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) 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.Destroy(g,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301076.lua b/pre-release/c101301076.lua deleted file mode 100644 index ca280da32c..0000000000 --- a/pre-release/c101301076.lua +++ /dev/null @@ -1,151 +0,0 @@ ---帝王の極致 ---Culmination of the Monarchs ---Scripted by The Razgriz -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) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_MONARCH} -function s.effcostfilter(c) - return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local cost_skip=e:GetLabel()~=-100 - --Destroy 1 monster on the field - local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - --Destroy up to 2 Spells/Traps on the field - local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) - and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - --Discard 1 random card from your opponent's hand - local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+200)) - and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT) - --Destroy 1 face-down card on the field - local b4=(cost_skip or not Duel.HasFlagEffect(tp,id+300)) - and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - --Place 1 card on the field on top of the Deck - local b5=(cost_skip or not Duel.HasFlagEffect(tp,id+400)) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - --Banish 1 card on the field - local b6=(cost_skip or not Duel.HasFlagEffect(tp,id+500)) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - if chk==0 then e:SetLabel(0) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) - and (b1 or b2 or b3 or b4 or b5 or b6) end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}, - {b4,aux.Stringid(id,4)}, - {b5,aux.Stringid(id,5)}, - {b6,aux.Stringid(id,6)}) - e:SetLabel(op) - if op==1 then - --Destroy 1 monster on the field - e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - elseif op==2 then - --Destroy up to 2 Spells/Traps on the field - e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - elseif op==3 then - --Discard 1 random card from your opponent's hand - e:SetCategory(CATEGORY_HANDES) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) - elseif op==4 then - --Destroy 1 face-down card on the field - e:SetCategory(CATEGORY_DESTROY) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+300,RESET_PHASE|PHASE_END,0,1) end - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - elseif op==5 then - --Place 1 card on the field on top of the Deck - e:SetCategory(CATEGORY_TODECK) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+400,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD) - elseif op==6 then - --Banish 1 card on the field - e:SetCategory(CATEGORY_REMOVE) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+500,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Destroy 1 monster on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==2 then - --Destroy up to 2 Spells/Traps on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==3 then - --Discard 1 random card from your opponent's hand - local hg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,0,LOCATION_HAND,nil,REASON_EFFECT) - if #hg>0 then - local g=hg:RandomSelect(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) - end - elseif op==4 then - --Destroy 1 face-down card on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==5 then - --Place 1 card on the field on top of the Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) - end - elseif op==6 then - --Banish 1 card on the field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301077.lua b/pre-release/c101301077.lua deleted file mode 100644 index ad6fabb9bc..0000000000 --- a/pre-release/c101301077.lua +++ /dev/null @@ -1,60 +0,0 @@ ---再世十戒 ---Regenesis Commandments ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Apply effects to all cards your opponent controls in the same column as your "Regenesis" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_REGENESIS} -function s.oppfilter(c,tp) - return (c:IsNegatable() or c:IsFacedown()) and c:GetColumnGroup():IsExists(s.regenesisfilter,1,nil,tp) -end -function s.regenesisfilter(c,tp) - return c:IsSetCard(SET_REGENESIS) and c:IsMonster() and c:IsFaceup() and c:IsControler(tp) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.oppfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.oppfilter,tp,0,LOCATION_ONFIELD,nil,tp) - if #g==0 then return end - local c=e:GetHandler() - local faceup_g,facedown_g=g:Split(Card.IsFaceup,nil) - for neg_c in faceup_g:Iter() do - --Negate their effects - neg_c:NegateEffects(c,nil,true) - end - if #facedown_g==0 then return end - local facedown_mons,facedown_st=facedown_g:Split(Card.IsMonster,nil) - for pos_c in facedown_mons:Iter() do - --Cannot change their battle positions - local e1=Effect.CreateEffect(c) - e1:SetDescription(3313) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - pos_c:RegisterEffect(e1) - end - for act_c in facedown_st:Iter() do - --Cannot be activated until the end of the next turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(3302) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESETS_STANDARD_PHASE_END,2) - act_c:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/pre-release/c101301078.lua b/pre-release/c101301078.lua deleted file mode 100644 index a1c51008df..0000000000 --- a/pre-release/c101301078.lua +++ /dev/null @@ -1,55 +0,0 @@ ---トラップホリック ---Trapholic ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Destroy 1 Spell/Trap you control, and if you do, Set 1 Normal Trap from your Deck - 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:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.desfilter(c,tp,ft) - if not c:IsSpellTrap() then return false end - if c:IsLocation(LOCATION_STZONE) then ft=ft+1 end - return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,ft>0) -end -function s.setfilter(c,haszone) - return c:IsNormalTrap() and c:IsSSetable(haszone) and not c:IsCode(id) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if not c:IsLocation(LOCATION_SZONE) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then ft=ft-1 end - if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp,ft) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,c,tp,ft) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,tp,ft) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.activate(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_SZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,false):GetFirst() - if sc and Duel.SSet(tp,sc)>0 then - --It can be activated this turn while you have 3 or more Traps in your GY - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetCondition(function(e) return Duel.GetMatchingGroupCount(Card.IsTrap,tp,LOCATION_GRAVE,0,nil)>=3 end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101301079.lua b/pre-release/c101301079.lua deleted file mode 100644 index e6da7c0315..0000000000 --- a/pre-release/c101301079.lua +++ /dev/null @@ -1,56 +0,0 @@ ---誤出荷 ---Shipment Error ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --An activated effect becomes "Your opponent takes 1 card from their Deck for you to add to your hand, and you must keep that card revealed" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.changecon) - e1:SetTarget(s.changetg) - e1:SetOperation(s.changeop) - c:RegisterEffect(e1) -end -function s.changecon(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasCategory(CATEGORY_SEARCH) or re:IsHasCategory(CATEGORY_DRAW) then return true end - local ex1,g1,gc1,dp1,loc1=Duel.GetOperationInfo(ev,CATEGORY_TOHAND) - local ex2,g2,gc2,dp2,loc2=Duel.GetPossibleOperationInfo(ev,CATEGORY_TOHAND) - local g=Group.CreateGroup() - if g1 then g:Merge(g1) end - if g2 then g:Merge(g2) end - return (((loc1 or 0)|(loc2 or 0))&LOCATION_DECK)>0 or (#g>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK)) -end -function s.changetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,1-rp,LOCATION_DECK,0,1,nil) end -end -function s.changeop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - Duel.ChangeTargetCard(ev,g) - Duel.ChangeChainOperation(ev,s.replaceop) -end -function s.replaceop(e,tp,eg,ep,ev,re,r,rp) - local opp=1-tp - Duel.Hint(HINT_SELECTMSG,opp,aux.Stringid(id,1)) - local sc=Duel.SelectMatchingCard(opp,Card.IsAbleToHand,opp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,tp,REASON_EFFECT)>0 then - local c=e:GetHandler() - --Keep it revealed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - --During the End Phase of this turn, shuffle it into the Deck, and if you do, draw 1 card - aux.DelayedOperation(sc,PHASE_END,id,e,tp, - function() - if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK) then - Duel.Draw(tp,1,REASON_EFFECT) - end - end - ) - end -end \ No newline at end of file diff --git a/pre-release/c101301080.lua b/pre-release/c101301080.lua deleted file mode 100644 index 5b67095208..0000000000 --- a/pre-release/c101301080.lua +++ /dev/null @@ -1,120 +0,0 @@ ---精霊の狩人 ---Spirit Hunter ---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) - --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_SZONE) - e1:SetCountLimit(1) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE) - e1:SetCondition(function(e,tp) return Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(1-tp) end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Special Summon 1 Level 4 or lower monster from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.plfilter(c,tp) - return c:IsMonster() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.stspfilter(c,e,opp,opp_lp) - return c:IsMonsterCard() and c:GetBaseAttack()0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) - local opp=1-tp - local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.stspfilter,tp,LOCATION_STZONE,0,1,nil,e,opp,Duel.GetLP(opp)) - 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==1 then - e:SetCategory(0) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_STZONE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Place 1 monster from your Deck in your Spell & Trap Zone as a face-up Continuous Spell - 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 and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - --Treated as a Continuous Spell - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) - sc:RegisterEffect(e1) - end - elseif op==2 then - --Your opponent can Special Summon 1 Monster Card with less original ATK than their LP from your Spell & Trap Zone to their field, then they pay LP equal to its original ATK - local opp=1-tp - local opp_lp=Duel.GetLP(opp) - if Duel.GetLocationCount(opp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.stspfilter,tp,LOCATION_STZONE,0,1,nil,e,opp,opp_lp) - and Duel.SelectYesNo(opp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(opp,s.stspfilter,tp,LOCATION_STZONE,0,1,1,nil,e,opp,opp_lp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,opp,opp,false,false,POS_FACEUP)>0 then - Duel.BreakEffect() - Duel.PayLPCost(opp,sc:GetBaseAttack()) - end - end - end -end -function s.spconfilter(c,tp) - return c:IsType(TYPE_EFFECT) and c:IsOwner(tp) and c:IsControler(1-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.spcost(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) end - Duel.SendtoGrave(c,REASON_COST) -end -function s.deckspfilter(c,e,tp) - return c:IsLevelBelow(4) 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.deckspfilter,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.deckspfilter,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 \ No newline at end of file diff --git a/pre-release/c101302101.lua b/pre-release/c101302101.lua deleted file mode 100644 index aef09c86fb..0000000000 --- a/pre-release/c101302101.lua +++ /dev/null @@ -1,78 +0,0 @@ ---DDランス・ソルジャー ---D/D Lance Soldier ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.lvtg) - e1:SetOperation(s.lvop) - c:RegisterEffect(e1) - --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DARK_CONTRACT} -function s.lvfilter(c) - return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) - if ct==0 then return end - local lv=Duel.AnnounceLevel(tp,1,ct) - if lv then - tc:UpdateLevel(lv,nil,e:GetHandler()) - end -end -function s.desfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,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_ONFIELD,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.desop(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) - 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/c101302102.lua b/pre-release/c101302102.lua deleted file mode 100644 index e331afd54a..0000000000 --- a/pre-release/c101302102.lua +++ /dev/null @@ -1,102 +0,0 @@ ---DDディフェンス・ソルジャー ---D/D Defense Soldier ---Scripted by Hatter -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_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or 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,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DDD} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.limcostfilter(c) - return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) - local b2=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) - 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==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - elseif op==2 then - e:SetCategory(0) - e:SetProperty(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - local op=e:GetLabel() - if op==1 then - --Special Summon 1 "D/D" card in your Pendulum Zone - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetCondition(s.actcon) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.actcon(e) - local tc=Duel.GetAttacker() - return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) -end -function s.thfilter(c) - return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() 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_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|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.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,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/c101302103.lua b/pre-release/c101302103.lua deleted file mode 100644 index 98f9147c64..0000000000 --- a/pre-release/c101302103.lua +++ /dev/null @@ -1,104 +0,0 @@ ---DDD零死王ゼロ・マキナ ---D/D/D Zero Demise King Zero Machinex ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Check if it was activated this turn - local e0=Effect.CreateEffect(c) - e0:SetDescription(1160) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetRange(LOCATION_HAND) - e0:SetCost(s.actreg) - c:RegisterEffect(e0) - --Place 1 "Dark Contract" Continuous Spell/Trap on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_EXTRA) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Place this card in the Pendulum Zone if it's destroyed - 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:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e3:SetOperation(s.penop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_CONTRACT,SET_DDD} -s.listed_names={id} -function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.plfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() 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,0,1,nil,tp) end -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,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 -end -function s.spconfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) - and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and 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.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -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 - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.penop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua deleted file mode 100644 index 73710e3b3b..0000000000 --- a/pre-release/c101302104.lua +++ /dev/null @@ -1,171 +0,0 @@ ---DDDD偉次元王アーク・クライシス ---D/D/D/D Great Dimension King Arc Crisis ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) - Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) - --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY - Fusion.AddContactProc(c,s.contactfil,s.contactop,false) - c:AddMustBeFusionSummoned() - --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn - 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) - --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck - 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_PZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the effects of all face-up monsters your opponent currently controls - 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) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Can attack all monsters your opponent controls once each - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetValue(1) - c:RegisterEffect(e3) - --Place this card in your Pendulum Zone - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e4:SetOperation(s.penop) - c:RegisterEffect(e4) -end -s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} -s.miracle_synchro_fusion=true -function s.matfilter(typ) - return function(c,fc,sumtype,tp) - return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) - end -end -function s.contactfil(tp) - local loc=LOCATION_ONFIELD|LOCATION_GRAVE - if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end - return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) -end -function s.contactop(g) - Duel.Remove(g,POS_FACEUP,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) - --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn - 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.desfilter(c,e,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) -end -function s.spfilter(c,e,tp,dc) - if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end - local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.rescon(mmz_ct,linkmz_ct) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct - and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if tg==0 then return end - local ct=Duel.Destroy(tg,REASON_EFFECT) - if ct==0 then return end - local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) - local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) - local ft=math.min(mmz_ct+emz_ct,ct) - if ft<=0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) - if #sg==0 then return end - local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) - local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) - local priority_0,priority_1 - if linkmz_ct0 - and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua deleted file mode 100644 index 1e04dd7902..0000000000 --- a/pre-release/c101302106.lua +++ /dev/null @@ -1,85 +0,0 @@ ---DDD智慧王ソロモン ---D/D/D Wisdom King Solomon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 "D/D" monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) - --Add 1 "D/D" card 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_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --A targeted "D/D" Effect Monster gains an effect until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD} -function s.thfilter(c) - return c:IsSetCard(SET_DD) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.tgfilter(c) - return c:IsSetCard(SET_DD) and c:IsType(TYPE_EFFECT) and c:IsFaceup() -end -function s.efftg(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) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --Inflict damage to your opponent equal to the original ATK of a monster this card destroys a monster by battle - local e1=Effect.CreateEffect(tc) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdcon) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c101302107.lua b/pre-release/c101302107.lua deleted file mode 100644 index b613a85209..0000000000 --- a/pre-release/c101302107.lua +++ /dev/null @@ -1,240 +0,0 @@ ---DDD天空王ゼウス・ラグナロク ---D/D/D Sky King Zeus Ragnarok ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ "D/D" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) - --Destroy 1 "D/D" or "Dark Contract" card you control, also, you can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Negate the activation of monster effect your opponent activates in the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE) - 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) - e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DARK_CONTRACT} -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - --You can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_ADJUST) - e1:SetOperation(s.checkop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - s.checkop(e,tp) -end -function s.checkop(e,tp) - local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) - if lpz~=nil and lpz:GetFlagEffect(id)<=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC_G) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_PZONE) - e1:SetCondition(s.pencon1) - e1:SetOperation(s.penop1) - e1:SetValue(SUMMON_TYPE_PENDULUM) - e1:SetReset(RESET_PHASE|PHASE_END) - lpz:RegisterEffect(e1) - lpz:RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) - end - local olpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0) - local orpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) - if olpz~=nil and orpz~=nil and olpz:GetFlagEffect(id)<=0 - and olpz:GetFlagEffectLabel(31531170)==orpz:GetFieldID() - and orpz:GetFlagEffectLabel(31531170)==olpz:GetFieldID() then - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetDescription(aux.Stringid(id,3)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC_G) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(s.pencon2) - e2:SetOperation(s.penop2) - e2:SetValue(SUMMON_TYPE_PENDULUM) - e2:SetReset(RESETS_STANDARD_PHASE_END) - olpz:RegisterEffect(e2) - olpz:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) - end -end -function s.penfilter(c,e,tp,lscale,rscale) - return c:IsSetCard(SET_DD) and Pendulum.Filter(c,e,tp,lscale,rscale) -end -function s.pencon1(e,c,og) - if c==nil then return true end - local tp=c:GetControler() - local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) - if rpz==nil or c==rpz or Duel.GetFlagEffect(tp,29432356)>0 then return false end - local lscale=c:GetLeftScale() - local rscale=rpz:GetRightScale() - if lscale>rscale then lscale,rscale=rscale,lscale end - local loc=0 - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_HAND end - if Duel.GetLocationCountFromEx(tp)>0 then loc=loc|LOCATION_EXTRA end - if loc==0 then return false end - local g=nil - if og then - g=og:Filter(Card.IsLocation,nil,loc) - else - g=Duel.GetFieldGroup(tp,loc,0) - end - return g:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) -end -function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) - local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) - local lscale=c:GetLeftScale() - local rscale=rpz:GetRightScale() - if lscale>rscale then lscale,rscale=rscale,lscale end - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ft2=Duel.GetLocationCountFromEx(tp) - local ft=Duel.GetUsableMZoneCount(tp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then - if ft1>0 then ft1=1 end - if ft2>0 then ft2=1 end - ft=1 - end - local loc=0 - if ft1>0 then loc=loc|LOCATION_HAND end - if ft2>0 then loc=loc|LOCATION_EXTRA end - local tg=nil - if og then - tg=og:Filter(Card.IsLocation,nil,loc):Filter(s.penfilter,nil,e,tp,lscale,rscale) - else - tg=Duel.GetMatchingGroup(s.penfilter,tp,loc,0,nil,e,tp,lscale,rscale) - end - ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND)) - ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)) - ft2=math.min(ft2,aux.CheckSummonGate(tp) or ft2) - while true do - local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND) - local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) - local ct=ft - if ct1>ft1 then ct=math.min(ct,ft1) end - if ct2>ft2 then ct=math.min(ct,ft2) end - local loc=0 - if ft1>0 then loc=loc|LOCATION_HAND end - if ft2>0 then loc=loc|LOCATION_EXTRA end - local g=tg:Filter(Card.IsLocation,sg,loc) - if #g==0 or ft==0 then break end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Group.SelectUnselect(g,sg,tp,#sg>0,Duel.IsSummonCancelable()) - if not tc then break end - if sg:IsContains(tc) then - sg:RemoveCard(tc) - if tc:IsLocation(LOCATION_HAND) then - ft1=ft1+1 - else - ft2=ft2+1 - end - ft=ft+1 - else - sg:AddCard(tc) - if tc:IsLocation(LOCATION_HAND) then - ft1=ft1-1 - else - ft2=ft2-1 - end - ft=ft-1 - end - end - if #sg>0 then - Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) - Duel.HintSelection(Group.FromCards(c)) - Duel.HintSelection(Group.FromCards(rpz)) - end -end -function s.pencon2(e,c,inchain,re,rp) - if c==nil then return true end - local tp=e:GetOwnerPlayer() - if inchain and tp~=rp then return false end - local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) - if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) or Duel.GetFlagEffect(tp,29432356)>0 then return false end - local lscale=c:GetLeftScale() - local rscale=rpz:GetRightScale() - if lscale>rscale then lscale,rscale=rscale,lscale end - local ft=Duel.GetLocationCountFromEx(tp) - if ft<=0 then return false end - if og then - return og:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) - else - return Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale) - end -end -function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) - local tp=e:GetOwnerPlayer() - local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) - local lscale=c:GetLeftScale() - local rscale=rpz:GetRightScale() - if lscale>rscale then lscale,rscale=rscale,lscale end - local ft=Duel.GetLocationCountFromEx(tp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - ft=math.min(ft,aux.CheckSummonGate(tp) or ft) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.penfilter,tp,LOCATION_EXTRA,0,inchain and 1 or 0,ft,nil,e,tp,lscale,rscale) - if g then - sg:Merge(g) - end - if #sg>0 then - Duel.Hint(HINT_CARD,0,31531170) - Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) - Duel.HintSelection(Group.FromCards(c)) - Duel.HintSelection(Group.FromCards(rpz)) - end -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc==LOCATION_HAND - and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end -function s.costfilter(c) - return (c:IsSetCard(SET_DARK_CONTRACT) or (c:IsSetCard(SET_DD) and c:IsMonster())) and c:IsAbleToRemoveAsCost() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_DARK_CONTRACT) and sg:IsExists(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,1,nil) -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_GRAVE,0,nil) - if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) -end \ No newline at end of file diff --git a/pre-release/c101302108.lua b/pre-release/c101302108.lua deleted file mode 100644 index f860d7103f..0000000000 --- a/pre-release/c101302108.lua +++ /dev/null @@ -1,81 +0,0 @@ ---零王の契約書 ---Dark Contract with the Zero King ---Scripted by Hatter -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) - --Destroy 1 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck - 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_SZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Take 1000 damage - 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_PHASE|PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_DD} -function s.desfilter(c,tp) - return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DD) 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:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -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_DECK,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 for the rest of this turn, except "D/D" monsters - 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 not c:IsSetCard(SET_DD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -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/c101302109.lua b/pre-release/c101302109.lua deleted file mode 100644 index a30b3256ec..0000000000 --- a/pre-release/c101302109.lua +++ /dev/null @@ -1,95 +0,0 @@ ---異次元の契約書 ---Dark Contract with the Different Dimension ---Scripted by Hatter -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) - --Take 1000 damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --Banish 1 card in your opponent's field or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCost(s.rmcost) - e2:SetTarget(s.rmtg) - e2:SetOperation(s.rmop) - c:RegisterEffect(e2) - --Gain 500 LP - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_RECOVER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.lptg) - e3:SetOperation(s.lpop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_CONTRACT} -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -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 -function s.rmcostfilter(c) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() -end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmop(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.lptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then - Duel.BreakEffect() - Duel.Recover(p,500,REASON_EFFECT) - end -end \ No newline at end of file From 9ecee1db331627884f86174fe26f068f6c0562a4 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 25 May 2025 19:07:57 +0300 Subject: [PATCH 2/3] Add files via upload --- card_counter_constants.lua | 2 +- pre-release/c100200272.lua | 41 +++++++ pre-release/c100201001.lua | 42 +++++++ pre-release/c100201002.lua | 31 +++++ pre-release/c100201003.lua | 56 +++++++++ pre-release/c100443001.lua | 79 ++++++++++++ pre-release/c100443003.lua | 80 +++++++++++++ pre-release/c100443005.lua | 39 ++++++ pre-release/c100443007.lua | 91 ++++++++++++++ pre-release/c100443010.lua | 67 +++++++++++ pre-release/c100443101.lua | 101 ++++++++++++++++ pre-release/c100443102.lua | 63 ++++++++++ pre-release/c100443103.lua | 66 ++++++++++ pre-release/c100443104.lua | 76 ++++++++++++ pre-release/c100443105.lua | 37 ++++++ pre-release/c100444001.lua | 86 +++++++++++++ pre-release/c100444002.lua | 78 ++++++++++++ pre-release/c100444003.lua | 54 +++++++++ pre-release/c100445001.lua | 107 +++++++++++++++++ pre-release/c100445002.lua | 86 +++++++++++++ pre-release/c100445003.lua | 60 ++++++++++ pre-release/c100445024.lua | 69 +++++++++++ pre-release/c100445025.lua | 91 ++++++++++++++ pre-release/c100445026.lua | 76 ++++++++++++ pre-release/c101302101.lua | 78 ++++++++++++ pre-release/c101302102.lua | 102 ++++++++++++++++ pre-release/c101302103.lua | 104 ++++++++++++++++ pre-release/c101302104.lua | 171 ++++++++++++++++++++++++++ pre-release/c101302105.lua | 64 ++++++++++ pre-release/c101302106.lua | 85 +++++++++++++ pre-release/c101302107.lua | 240 +++++++++++++++++++++++++++++++++++++ pre-release/c101302108.lua | 81 +++++++++++++ pre-release/c101302109.lua | 95 +++++++++++++++ 33 files changed, 2597 insertions(+), 1 deletion(-) create mode 100644 pre-release/c100200272.lua create mode 100644 pre-release/c100201001.lua create mode 100644 pre-release/c100201002.lua create mode 100644 pre-release/c100201003.lua create mode 100644 pre-release/c100443001.lua create mode 100644 pre-release/c100443003.lua create mode 100644 pre-release/c100443005.lua create mode 100644 pre-release/c100443007.lua create mode 100644 pre-release/c100443010.lua create mode 100644 pre-release/c100443101.lua create mode 100644 pre-release/c100443102.lua create mode 100644 pre-release/c100443103.lua create mode 100644 pre-release/c100443104.lua create mode 100644 pre-release/c100443105.lua create mode 100644 pre-release/c100444001.lua create mode 100644 pre-release/c100444002.lua create mode 100644 pre-release/c100444003.lua create mode 100644 pre-release/c100445001.lua create mode 100644 pre-release/c100445002.lua create mode 100644 pre-release/c100445003.lua create mode 100644 pre-release/c100445024.lua create mode 100644 pre-release/c100445025.lua create mode 100644 pre-release/c100445026.lua create mode 100644 pre-release/c101302101.lua create mode 100644 pre-release/c101302102.lua create mode 100644 pre-release/c101302103.lua create mode 100644 pre-release/c101302104.lua create mode 100644 pre-release/c101302105.lua create mode 100644 pre-release/c101302106.lua create mode 100644 pre-release/c101302107.lua create mode 100644 pre-release/c101302108.lua create mode 100644 pre-release/c101302109.lua diff --git a/card_counter_constants.lua b/card_counter_constants.lua index fb0709ba11..65be965fec 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -53,7 +53,7 @@ CARD_LABRYNTH_LABYRINTH = 33407125 CARD_LIGHT_BARRIER = 73206827 CARD_MAGICAL_MIDBREAKER = 71650854 CARD_MAX_METALMORPH = 89812483 -CARD_MEDIUS_THE_INNOCENT = 101301008 +CARD_MEDIUS_THE_INNOCENT = 97556336 CARD_MEMENTOAL_TECUHTLICA = 23288411 CARD_MILLENNIUM_CROSS = 37613663 CARD_MONSTER_REBORN = 83764718 diff --git a/pre-release/c100200272.lua b/pre-release/c100200272.lua new file mode 100644 index 0000000000..1a8e65ff88 --- /dev/null +++ b/pre-release/c100200272.lua @@ -0,0 +1,41 @@ +--ドローパン +--Drawbread +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Draw 1 card and show it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,1,nil) end) + e1:SetCost(Cost.PayLP(200)) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.target(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) + Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Draw(p,d,REASON_EFFECT)==0 then return end + local dc=Duel.GetOperatedGroup():GetFirst() + Duel.ConfirmCards(1-tp,dc) + Duel.ShuffleHand(tp) + if not dc:IsMonster() then return end + Duel.BreakEffect() + if not Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,dc:GetAttribute()) then + --Draw 1 card + Duel.Draw(tp,1,REASON_EFFECT) + else + --Discard 1 card + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end +end \ No newline at end of file diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua new file mode 100644 index 0000000000..8ee5fa9d59 --- /dev/null +++ b/pre-release/c100201001.lua @@ -0,0 +1,42 @@ +--契約を結びし竜の戦士 +--Dragonic Warrior +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated + 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) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.spcostfilter(c,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,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_HAND,0,1,nil,e,tp) end + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 + and Duel.IsExistingMatchingCard(s.spfilter,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)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,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 + Duel.SpecialSummonComplete() +end diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua new file mode 100644 index 0000000000..9b0c446078 --- /dev/null +++ b/pre-release/c100201002.lua @@ -0,0 +1,31 @@ +--アイン・ロイド +--Einroid +local s,id=GetID() +function s.initial_effect(c) + --Send 2 Level 4 or lower Machine monsters from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) +end +function s.tgfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) 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,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,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,2,2,nil) + if #g==2 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua new file mode 100644 index 0000000000..35f72f4627 --- /dev/null +++ b/pre-release/c100201003.lua @@ -0,0 +1,56 @@ +--妖魔ヌリカベ +--Nurikabe +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCondition(aux.exccon) + e1:SetCost(Cost.PayLP(1000)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + for sc in Group.FromCards(c,tc):Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(c) + --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) + sc:RegisterEffect(e1,true) + end + end + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100443001.lua b/pre-release/c100443001.lua new file mode 100644 index 0000000000..8104029c84 --- /dev/null +++ b/pre-release/c100443001.lua @@ -0,0 +1,79 @@ +--恋する乙女 +--Maiden in Love +--scripted by Naim +local s,id=GetID() +local COUNTER_MAIDEN=0x1090 +function s.initial_effect(c) + --Monsters your opponent controls that can attack must attack this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_MUST_ATTACK) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetRange(LOCATION_MZONE) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) + e2:SetValue(function(e,c) return c==e:GetHandler() end) + c:RegisterEffect(e2) + --Cannot be destroyed by battle + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(1) + c:RegisterEffect(e3) + --Activate 1 of these effects at the end of the Damage Step, if this card battled an opponent's monster + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_DAMAGE_STEP_END) + e4:SetCondition(s.effcon) + e4:SetTarget(s.efftg) + e4:SetOperation(s.effop) + c:RegisterEffect(e4) +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) +end +function s.controlfilter(c) + return c:HasCounter(COUNTER_MAIDEN) and c:IsControlerCanBeChanged() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_MAIDEN,1) + local b2=Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil) + local c=e:GetHandler() + if chk==0 then return c:IsLocation(LOCATION_MZONE) and c:IsRelateToBattle() and (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(CATEGORY_COUNTER) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_MAIDEN) + elseif op==2 then + e:SetCategory(CATEGORY_CONTROL) + local g=Duel.GetMatchingGroup(s.controlfilter,tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Place 1 Maiden Counter on 1 face-up monster your opponent controls. + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) + local sc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_MAIDEN,1):GetFirst() + if sc then + sc:AddCounter(COUNTER_MAIDEN,1) + end + elseif op==2 then + --Take control of 1 opponent's monster with a Maiden Counter. + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local sc=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.GetControl(sc,tp) + end + + end +end \ No newline at end of file diff --git a/pre-release/c100443003.lua b/pre-release/c100443003.lua new file mode 100644 index 0000000000..b1dacd544f --- /dev/null +++ b/pre-release/c100443003.lua @@ -0,0 +1,80 @@ +--ユーカリ・モール +--Eucalyptus Mole +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Beast monster from your Deck in face-down Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.fdsptg) + e1:SetOperation(s.fdspop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Special Summon 1 "Koala" monster from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.koalasptg) + e3:SetOperation(s.koalaspop) + c:RegisterEffect(e3) +end +s.listed_series={SET_KOALA} +function s.fdspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) +end +function s.fdsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.fdspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,tp,POS_FACEUP_DEFENSE) +end +function s.fdspop(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.fdspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then + Duel.ConfirmCards(1-tp,g) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsAttackPos() then + Duel.BreakEffect() + Duel.ChangePosition(c,POS_FACEUP_DEFENSE) + end + end +end +function s.koalaspfilter(c,e,tp) + return c:IsSetCard(SET_KOALA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.koalasptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.koalaspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.koalaspop(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.koalaspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) + --Non-Effect Beast monsters you control gain ATK equal to their own original DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsNonEffectMonster() and c:IsRace(RACE_BEAST) end) + e1:SetValue(function(e,c) return c:GetBaseDefense() end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100443005.lua b/pre-release/c100443005.lua new file mode 100644 index 0000000000..8a657b806a --- /dev/null +++ b/pre-release/c100443005.lua @@ -0,0 +1,39 @@ +--幻魔の扉 +--Illusion Gate +local s,id=GetID() +function s.initial_effect(c) + --Destroy as many monsters your opponent controls as possible, then you can Special Summon 1 monster from your opponent's GY to your field, ignoring its Summoning conditions + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(Cost.PayLP(1/2)) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return not Duel.HasFlagEffect(tp,id) and #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,0,0,1) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100443007.lua b/pre-release/c100443007.lua new file mode 100644 index 0000000000..0ffd8ecc80 --- /dev/null +++ b/pre-release/c100443007.lua @@ -0,0 +1,91 @@ +--プリマの光 +--Prima Light +--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) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 Warrior or Fairy "Cyber" monster 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) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CYBER} +function s.tribfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.nsfilter(c) + return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.CheckReleaseGroup(tp,s.tribfilter,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) + local b2=Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,nil) + 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==1 then + e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Tribute 1 EARTH Warrior monster, and if you do, Special Summon 1 LIGHT Warrior monster from your hand or Deck + local rg=Duel.SelectReleaseGroup(tp,s.tribfilter,1,1,nil,tp) + if #rg>0 and Duel.Release(rg,REASON_EFFECT)>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,false,false,POS_FACEUP) + end + end + elseif op==2 then + --Immediately after this effect resolves, Normal Summon 1 Warrior monster from your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end + end +end +function s.thfilter(c) + return c:IsRace(RACE_WARRIOR|RACE_FAIRY) and c:IsSetCard(SET_CYBER) 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/c100443010.lua b/pre-release/c100443010.lua new file mode 100644 index 0000000000..c5890ee4ea --- /dev/null +++ b/pre-release/c100443010.lua @@ -0,0 +1,67 @@ +--魂の結束-ソウル・ユニオン +--Soul Union +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.atkfilter(c) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:HasNonZeroAttack() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + e:SetLabelObject(tc) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.fusconfilter(c) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsFaceup() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg~=2 then return end + local fc=e:GetLabelObject() + local gc=(tg-fc):GetFirst() + if fc:IsFaceup() and not fc:IsImmuneToEffect(e) then + --That monster on the field gains ATK equal to the ATK of that other monster in the GY until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(gc:GetAttack()) + e1:SetReset(RESETS_STANDARD_PHASE_END) + fc:RegisterEffect(e1) + if not Duel.IsExistingMatchingCard(s.fusconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) then return end + local params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),matfilter=function(c) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() end,extrafil=s.fextra,extraop=Fusion.BanishMaterial} + if Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Fusion.SummonEffOP(params)(e,tp,eg,ep,ev,re,r,rp) + end + end +end +function s.fextra(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end \ No newline at end of file diff --git a/pre-release/c100443101.lua b/pre-release/c100443101.lua new file mode 100644 index 0000000000..b4a1065c52 --- /dev/null +++ b/pre-release/c100443101.lua @@ -0,0 +1,101 @@ +--超電導戦士 リニア・マグナム± +--Conduction Warrior Linear Magnum ± +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must first be Special Summoned (from your hand) by sending 2 "Magnet Warrior" monsters whose original Level is 4 or lower from your hand, Deck, and/or face-up field to the GY + 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) + --Gains ATK equal to half of the ATK 1 other EARTH monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,1}) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --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_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,2}) + e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_DESTROY) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MAGNET_WARRIOR} +function s.spconfilter(c) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsMonster() and c:GetOriginalLevel()<=4 + and c:IsAbleToGraveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.SendtoGrave(g,REASON_COST) + g:DeleteGroup() +end +function s.atkfilter(c) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:HasNonZeroAttack() +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 tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,tc:GetAttack()//2) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local c=e:GetHandler() + if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then + --Gains ATK equal to half of that monster's ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(tc:GetAttack()//2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end +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,e:GetHandler(),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/c100443102.lua b/pre-release/c100443102.lua new file mode 100644 index 0000000000..8341e1eb8a --- /dev/null +++ b/pre-release/c100443102.lua @@ -0,0 +1,63 @@ +--錬金釜-カオス・ディスティル +--Chaos Distill +--scripted by Naim +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) + --Any card sent to your GY is banished instead + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) + e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_ALL,0) + e1:SetValue(LOCATION_REMOVED) + e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) + c:RegisterEffect(e1) + --Activate 1 of these effects + 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_SZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +local CARD_MACRO_COSMOS=30241314 +s.listed_names={CARD_MACRO_COSMOS,id} +function s.macrofilter(c) + return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.monsterfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) + local c=e:GetHandler() + local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,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==2 then + Duel.Remove(c,POS_FACEUP,REASON_COST) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,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 diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua new file mode 100644 index 0000000000..dfaf24888f --- /dev/null +++ b/pre-release/c100443103.lua @@ -0,0 +1,66 @@ +--ヒーローズルール1 ファイブ・フリーダムス +--Hero's Rule 1: Five Freedoms +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish up to 5 cards from the GYs + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.rmvtg) + e1:SetOperation(s.rmvop) + c:RegisterEffect(e1) + --Special Summon 1 of your banished "Elemental HERO" monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.rmvfilter(c) + return c:IsAbleToRemove() and aux.SpElimFilter(c) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua new file mode 100644 index 0000000000..6e4745de52 --- /dev/null +++ b/pre-release/c100443104.lua @@ -0,0 +1,76 @@ +--デーモンズ・マタドール +--Archfiend Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" + 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():IsRitualSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Cannot be destroyed by battle, also you take no battle damage from battles involving this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + c:RegisterEffect(e3) + --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e4:SetCode(EVENT_BATTLED) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_names={100443105,id} --"Ritual of the Matador" +s.listed_series={SET_ARCHFIEND} +function s.thfilter(c) + return c:IsSetCard(SET_ARCHFIEND) 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,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,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,2,2,nil) + if #g==2 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + --This card cannot attack for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return bc and bc:IsRelateToBattle() end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,1000,REASON_EFFECT) + end +end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua new file mode 100644 index 0000000000..61c24806c2 --- /dev/null +++ b/pre-release/c100443105.lua @@ -0,0 +1,37 @@ +--マタドール降臨の儀式 ダーク・パセオ +--Ritual of the Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon "Archfiend Matador" + Ritual.AddProcGreaterCode(c,6,nil,100443104) + --Special Summon 1 non-Ritual "Archfiend" monster from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfBanish) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={100443104} --"Archfiend Matador" +s.listed_series={SET_ARCHFIEND} +function s.spfilter(c,e,tp) + return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) 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 \ No newline at end of file diff --git a/pre-release/c100444001.lua b/pre-release/c100444001.lua new file mode 100644 index 0000000000..aa8e637ee6 --- /dev/null +++ b/pre-release/c100444001.lua @@ -0,0 +1,86 @@ +--E・HERO サンダー・ジャイアント-ボルティック・サンダー +--Elemental HERO Thunder Giant - Voltic Thunder +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 "Elemental HERO" monsters with different Attributes + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + c:AddMustBeFusionSummoned() + --Destroy all other cards on the field + 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) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Special Summon 1 "Elemental HERO" monster from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) local c=e:GetHandler() return c:IsFusionSummoned() and c:HasFlagEffect(id) end) + e2:SetCost(Cost.SelfTribute) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Check if a Normal Monster was used as material for the above effect + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_MATERIAL_CHECK) + e3:SetValue(s.valcheck) + c:RegisterEffect(e3) +end +s.material_setcode={SET_ELEMENTAL_HERO} +s.listed_series={SET_ELEMENTAL_HERO} +function s.matfilter(c,fc,sumtype,tp,sub,mg,sg) + local attr=c:GetAttribute(fc,sumtype,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO,fc,sumtype,tp) and attr>0 + and (not sg or not sg:IsExists(s.diffattfilter,1,c,attr,fc,sumtype,tp)) +end +function s.diffattfilter(c,attr,fc,sumtype,tp) + return c:IsAttribute(attr,fc,sumtype,tp) and not c:IsHasEffect(511002961) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) + if chk==0 then return #g>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end + 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 exc=c:IsRelateToEffect(e) and c or nil + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.valcheck(e,c) + local mg=c:GetMaterial() + if mg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_LEAVE),0,1) + end +end \ No newline at end of file diff --git a/pre-release/c100444002.lua b/pre-release/c100444002.lua new file mode 100644 index 0000000000..98682443a1 --- /dev/null +++ b/pre-release/c100444002.lua @@ -0,0 +1,78 @@ +--ドリル・アームド・ドラゴン +--Drill Armed Dragon +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Apply a "for the rest of this turn, all WIND Dragon monsters you control will gain 300 ATK" effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.atkcost) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Add 1 Dragon monster from your Deck to your hand with a Level equal to the number of banished monsters + 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_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.atkcostfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToGraveAsCost() +end +function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_HAND,0,1,1,c) + Duel.SendtoGrave(g+c,REASON_COST) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + --For the rest of this turn, all WIND Dragon monsters you control will gain 300 ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON) end) + e1:SetValue(300) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thcostfilter(c) + return c:IsRace(RACE_DRAGON) and (c:IsLevelAbove(7) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +end +function s.rescon(sg,e,tp,mg) + return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,#sg) +end +function s.thfilter(c,lv) + return c:IsRace(RACE_DRAGON) and c:IsLevel(lv) and not c:IsCode(id) +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local rg=Duel.GetMatchingGroup(s.thcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + if chk==0 then return aux.SelectUnselectGroup(rg,e,tp,1,#rg,s.rescon,0) end + local g=aux.SelectUnselectGroup(rg,e,tp,1,#rg,s.rescon,1,tp,HINTMSG_REMOVE) + e:SetLabel(#g) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then local res=e:GetLabel()==-100 e:SetLabel(0) return res 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:GetLabel()) + 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/c100444003.lua b/pre-release/c100444003.lua new file mode 100644 index 0000000000..a00ac365ad --- /dev/null +++ b/pre-release/c100444003.lua @@ -0,0 +1,54 @@ +--ライトウォーター・ドラゴン +--Light Water Dragon +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 3 Level 5 or lower Dinosaur monsters (WATER and/or WIND) from your Deck in Defense Position, but their effects are negated + 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) + e1:SetCost(Cost.SelfBanish) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={85066822} --"Water Dragon" +function s.spfilter(c,e,tp) + return c:IsLevelBelow(5) and c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_WATER|ATTRIBUTE_WIND) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>=3 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,3,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,3,3,nil,e,tp) + if #g==3 then + for sc in g:Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Negate its effects + sc:NegateEffects(c) + end + end + Duel.SpecialSummonComplete() + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Dinosaur and Sea Serpent 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:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_DINOSAUR|RACE_SEASERPENT) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100445001.lua b/pre-release/c100445001.lua new file mode 100644 index 0000000000..b011e672b6 --- /dev/null +++ b/pre-release/c100445001.lua @@ -0,0 +1,107 @@ +--滅びの黒魔術師 +--Dark Magician of Destruction +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Dark Magician" + 1 LIGHT or DARK monster + Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_DARK)) + c:AddMustBeFusionSummoned() + --You can only Fusion Summon or Special Summon by its alternate procedure "Dark Magician of Destruction" once per turn + 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) + --You can Special Summon this card by banishing 1 Level 6 or higher DARK Spellcaster monster you control during the turn a Spell Card or effect was activated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_EXTRA) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + e1:SetValue(1) + c:RegisterEffect(e1) + --Add 1 "Dark Magician" or 1 card that mentions it 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_SPSUMMON_SUCCESS) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --This card's name becomes "Dark Magician" while on the field or in the GY + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_CHANGE_CODE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e3:SetValue(CARD_DARK_MAGICIAN) + c:RegisterEffect(e3) + --Keep track of a turn a Spell Card or effect was activated + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) +end +s.listed_names={CARD_DARK_MAGICIAN} +s.material_setcode=SET_DARK_MAGICIAN +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) + --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn + 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.selfspcostfilter(c,tp,sc) + return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) + and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 +end +function s.selfspcon(e,c) + if not c then return true end + local tp=c:GetControler() + return (Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) + and Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_MZONE,0,1,1,true,nil,tp,c) + if g and #g>0 then + g:KeepAlive() + 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 not g then return end + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) + g:DeleteGroup() +end +function s.thfilter(c) + return (c:IsCode(CARD_DARK_MAGICIAN) or c:ListsCode(CARD_DARK_MAGICIAN)) 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 diff --git a/pre-release/c100445002.lua b/pre-release/c100445002.lua new file mode 100644 index 0000000000..840c21495d --- /dev/null +++ b/pre-release/c100445002.lua @@ -0,0 +1,86 @@ +--合体魔竜ティマイオス +--Timaeus the United Magidragon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Dark Magician" or "Dark Magician Girl" + 1 Dragon or Spellcaster monster + Fusion.AddProcMix(c,true,true,{CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL},aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)) + --After this card is Special Summoned, until the end of your next turn, it is unaffected by other cards' effects + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --Make this card gain 100 ATK for each Spell in the GYs and banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Destroy 1 Spell/Trap on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.material_setcode={SET_DARK_MAGICIAN,SET_MAGICIAN_GIRL,SET_DARK_MAGICIAN_GIRL} +s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL} +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ct=Duel.IsTurnPlayer(tp) and 3 or 2 + --Unaffected by other cards' effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(3100) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetValue(function(e,re) return e:GetHandler()~=re:GetOwner() end) + e1:SetReset(RESETS_STANDARD_PHASE_END,ct) + c:RegisterEffect(e1) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) + if chk==0 then return ct>0 end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,100*ct) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) + if ct==0 then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --Gains 100 ATK for each Spell in the GYs and banishment + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(100*ct) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + 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) +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/c100445003.lua b/pre-release/c100445003.lua new file mode 100644 index 0000000000..24e15e5fd4 --- /dev/null +++ b/pre-release/c100445003.lua @@ -0,0 +1,60 @@ +--ティマイオスの眼光 +--The Gaze of Timaeus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fusion Monster from your Extra Deck that mentions a targeted "Dark Magician" or "Dark Magician Girl" as material, by shuffling that target into the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL,1784686} --"The Eye of Timaeus" +function s.tdfilter(c,e,tp) + return c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) and c:IsFaceup() + and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,mc) + if Duel.GetLocationCountFromEx(tp,tp,mc,c)<=0 then return false end + local mustg=aux.GetMustBeMaterialGroup(tp,nil,tp,c,nil,REASON_FUSION) + return c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(mc:GetCode()) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) + and (#mustg==0 or (#mustg==1 and mustg:IsContains(mc))) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc==0 then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() + if sc then + sc:SetMaterial(Group.FromCards(tc)) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT|REASON_MATERIAL|REASON_FUSION) + Duel.BreakEffect() + if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + --Banish it during the End Phase of the next turn + local turn_summoned=Duel.GetTurnCount() + aux.DelayedOperation(sc,PHASE_END,id,e,tp, + function(sc) Duel.Remove(sc,POS_FACEUP,REASON_EFFECT) end, + function() return Duel.GetTurnCount()==turn_summoned+1 end, + nil,2,aux.Stringid(id,1) + ) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c100445024.lua b/pre-release/c100445024.lua new file mode 100644 index 0000000000..8695f4d3c8 --- /dev/null +++ b/pre-release/c100445024.lua @@ -0,0 +1,69 @@ +--M・HERO ダスク・クロウ +--Masked HERO Dusk Crow +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --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) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Masked HERO" monster from your Deck or GY to your hand, except "Masked HERO Dusk Crow" + 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) +end +s.listed_series={SET_HERO,SET_MASKED_HERO} +s.listed_names={id} +function s.spcostfilter(c) + return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +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|LOCATION_GRAVE,0,1,nil) end + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_MASKED_HERO) 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|LOCATION_GRAVE,0,1,nil) 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):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/c100445025.lua b/pre-release/c100445025.lua new file mode 100644 index 0000000000..66342fd025 --- /dev/null +++ b/pre-release/c100445025.lua @@ -0,0 +1,91 @@ +--M・HERO ファーネス +--Masked HERO Furnace +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Mask Change" or "Polymerization" 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.AND(Cost.SelfReveal,s.thcost)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon this card if you Special Summon a non-FIRE "HERO" Fusion Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Checks to see if non-"HERO" monsters were Summoned from the Extra Deck + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_HERO) end) +end +s.listed_series={SET_HERO} +s.listed_names={21143940,CARD_POLYMERIZATION} --"Mask Change" +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon from the Extra Deck the turn you activate this effect, except "HERO" monsters + 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_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return c:IsCode(21143940,CARD_POLYMERIZATION) 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,1,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.spconfilter(c,tp) + return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_HERO) and c:IsType(TYPE_FUSION) and c:IsSummonPlayer(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/c100445026.lua b/pre-release/c100445026.lua new file mode 100644 index 0000000000..1cdd0fc079 --- /dev/null +++ b/pre-release/c100445026.lua @@ -0,0 +1,76 @@ +--M・HERO アトミック +--Masked HERO Atomic +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with "Mask Change" + c:AddMustBeSpecialSummoned() + --The first time this card would be destroyed by battle or 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(1) + e1:SetValue(function(e,re,r,rp) return (r&(REASON_BATTLE|REASON_EFFECT))>0 end) + c:RegisterEffect(e1) + --Special Summon 1 non-FIRE "Masked HERO" monster from your GY or banishment in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + 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) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Set 1 "Change" Quick-Play Spell from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_LEAVE_GRAVE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MASKED_HERO,SET_CHANGE} +function s.spfilter(c,e,tp) + return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_MASKED_HERO) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_CHANGE) and c:IsQuickPlaySpell() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SSet(tp,tc) + end +end \ No newline at end of file diff --git a/pre-release/c101302101.lua b/pre-release/c101302101.lua new file mode 100644 index 0000000000..aef09c86fb --- /dev/null +++ b/pre-release/c101302101.lua @@ -0,0 +1,78 @@ +--DDランス・ソルジャー +--D/D Lance Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.lvtg) + e1:SetOperation(s.lvop) + c:RegisterEffect(e1) + --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.lvfilter(c) + return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if ct==0 then return end + local lv=Duel.AnnounceLevel(tp,1,ct) + if lv then + tc:UpdateLevel(lv,nil,e:GetHandler()) + end +end +function s.desfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,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_ONFIELD,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.desop(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) + 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/c101302102.lua b/pre-release/c101302102.lua new file mode 100644 index 0000000000..e331afd54a --- /dev/null +++ b/pre-release/c101302102.lua @@ -0,0 +1,102 @@ +--DDディフェンス・ソルジャー +--D/D Defense Soldier +--Scripted by Hatter +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_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or 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,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DDD} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.limcostfilter(c) + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) + local b2=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) + 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==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + elseif op==2 then + e:SetCategory(0) + e:SetProperty(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 "D/D" card in your Pendulum Zone + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,1) + e1:SetCondition(s.actcon) + e1:SetValue(1) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.actcon(e) + local tc=Duel.GetAttacker() + return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) +end +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() 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_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|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.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,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/c101302103.lua b/pre-release/c101302103.lua new file mode 100644 index 0000000000..98f9147c64 --- /dev/null +++ b/pre-release/c101302103.lua @@ -0,0 +1,104 @@ +--DDD零死王ゼロ・マキナ +--D/D/D Zero Demise King Zero Machinex +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Check if it was activated this turn + local e0=Effect.CreateEffect(c) + e0:SetDescription(1160) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetRange(LOCATION_HAND) + e0:SetCost(s.actreg) + c:RegisterEffect(e0) + --Place 1 "Dark Contract" Continuous Spell/Trap on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_EXTRA) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place this card in the Pendulum Zone if it's destroyed + 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:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e3:SetOperation(s.penop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT,SET_DDD} +s.listed_names={id} +function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.plfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() 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,0,1,nil,tp) end +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,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 +end +function s.spconfilter(c,tp) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) + and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and 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.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +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 + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua new file mode 100644 index 0000000000..73710e3b3b --- /dev/null +++ b/pre-release/c101302104.lua @@ -0,0 +1,171 @@ +--DDDD偉次元王アーク・クライシス +--D/D/D/D Great Dimension King Arc Crisis +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) + Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) + --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY + Fusion.AddContactProc(c,s.contactfil,s.contactop,false) + c:AddMustBeFusionSummoned() + --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn + 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) + --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck + 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_PZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the effects of all face-up monsters your opponent currently controls + 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) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Can attack all monsters your opponent controls once each + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_ATTACK_ALL) + e3:SetValue(1) + c:RegisterEffect(e3) + --Place this card in your Pendulum Zone + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e4:SetOperation(s.penop) + c:RegisterEffect(e4) +end +s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} +s.miracle_synchro_fusion=true +function s.matfilter(typ) + return function(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) + end +end +function s.contactfil(tp) + local loc=LOCATION_ONFIELD|LOCATION_GRAVE + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end + return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) +end +function s.contactop(g) + Duel.Remove(g,POS_FACEUP,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) + --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn + 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.desfilter(c,e,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) +end +function s.spfilter(c,e,tp,dc) + if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end + local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.rescon(mmz_ct,linkmz_ct) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct + and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if tg==0 then return end + local ct=Duel.Destroy(tg,REASON_EFFECT) + if ct==0 then return end + local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) + local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) + local ft=math.min(mmz_ct+emz_ct,ct) + if ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) + if #sg==0 then return end + local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) + local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) + local priority_0,priority_1 + if linkmz_ct0 + and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua new file mode 100644 index 0000000000..1e04dd7902 --- /dev/null +++ b/pre-release/c101302106.lua @@ -0,0 +1,85 @@ +--DDD智慧王ソロモン +--D/D/D Wisdom King Solomon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 "D/D" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) + --Add 1 "D/D" card 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_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --A targeted "D/D" Effect Monster gains an effect until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_REMOVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD} +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.tgfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_EFFECT) and c:IsFaceup() +end +function s.efftg(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) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --Inflict damage to your opponent equal to the original ATK of a monster this card destroys a monster by battle + local e1=Effect.CreateEffect(tc) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(aux.bdcon) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() + if dam<0 then dam=0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c101302107.lua b/pre-release/c101302107.lua new file mode 100644 index 0000000000..b613a85209 --- /dev/null +++ b/pre-release/c101302107.lua @@ -0,0 +1,240 @@ +--DDD天空王ゼウス・ラグナロク +--D/D/D Sky King Zeus Ragnarok +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ "D/D" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) + --Destroy 1 "D/D" or "Dark Contract" card you control, also, you can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Negate the activation of monster effect your opponent activates in the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE) + 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) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and chkc:IsFaceup() end + if chk==0 then return not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + --You can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + local c=e:GetHandler() + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) + e1:SetCode(EVENT_ADJUST) + e1:SetOperation(s.checkop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + s.checkop(e,tp) +end +function s.checkop(e,tp) + local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) + if lpz~=nil and lpz:GetFlagEffect(id)<=0 then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_SPSUMMON_PROC_G) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.pencon1) + e1:SetOperation(s.penop1) + e1:SetValue(SUMMON_TYPE_PENDULUM) + e1:SetReset(RESET_PHASE|PHASE_END) + lpz:RegisterEffect(e1) + lpz:RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) + end + local olpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0) + local orpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + if olpz~=nil and orpz~=nil and olpz:GetFlagEffect(id)<=0 + and olpz:GetFlagEffectLabel(31531170)==orpz:GetFieldID() + and orpz:GetFlagEffectLabel(31531170)==olpz:GetFieldID() then + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetDescription(aux.Stringid(id,3)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_SPSUMMON_PROC_G) + e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE) + e2:SetRange(LOCATION_PZONE) + e2:SetCondition(s.pencon2) + e2:SetOperation(s.penop2) + e2:SetValue(SUMMON_TYPE_PENDULUM) + e2:SetReset(RESETS_STANDARD_PHASE_END) + olpz:RegisterEffect(e2) + olpz:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + end +end +function s.penfilter(c,e,tp,lscale,rscale) + return c:IsSetCard(SET_DD) and Pendulum.Filter(c,e,tp,lscale,rscale) +end +function s.pencon1(e,c,og) + if c==nil then return true end + local tp=c:GetControler() + local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) + if rpz==nil or c==rpz or Duel.GetFlagEffect(tp,29432356)>0 then return false end + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local loc=0 + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_HAND end + if Duel.GetLocationCountFromEx(tp)>0 then loc=loc|LOCATION_EXTRA end + if loc==0 then return false end + local g=nil + if og then + g=og:Filter(Card.IsLocation,nil,loc) + else + g=Duel.GetFieldGroup(tp,loc,0) + end + return g:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) +end +function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) + local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) + local ft2=Duel.GetLocationCountFromEx(tp) + local ft=Duel.GetUsableMZoneCount(tp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + if ft1>0 then ft1=1 end + if ft2>0 then ft2=1 end + ft=1 + end + local loc=0 + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end + local tg=nil + if og then + tg=og:Filter(Card.IsLocation,nil,loc):Filter(s.penfilter,nil,e,tp,lscale,rscale) + else + tg=Duel.GetMatchingGroup(s.penfilter,tp,loc,0,nil,e,tp,lscale,rscale) + end + ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND)) + ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)) + ft2=math.min(ft2,aux.CheckSummonGate(tp) or ft2) + while true do + local ct1=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND) + local ct2=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) + local ct=ft + if ct1>ft1 then ct=math.min(ct,ft1) end + if ct2>ft2 then ct=math.min(ct,ft2) end + local loc=0 + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end + local g=tg:Filter(Card.IsLocation,sg,loc) + if #g==0 or ft==0 then break end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Group.SelectUnselect(g,sg,tp,#sg>0,Duel.IsSummonCancelable()) + if not tc then break end + if sg:IsContains(tc) then + sg:RemoveCard(tc) + if tc:IsLocation(LOCATION_HAND) then + ft1=ft1+1 + else + ft2=ft2+1 + end + ft=ft+1 + else + sg:AddCard(tc) + if tc:IsLocation(LOCATION_HAND) then + ft1=ft1-1 + else + ft2=ft2-1 + end + ft=ft-1 + end + end + if #sg>0 then + Duel.Hint(HINT_CARD,0,id) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) + Duel.HintSelection(Group.FromCards(c)) + Duel.HintSelection(Group.FromCards(rpz)) + end +end +function s.pencon2(e,c,inchain,re,rp) + if c==nil then return true end + local tp=e:GetOwnerPlayer() + if inchain and tp~=rp then return false end + local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) or Duel.GetFlagEffect(tp,29432356)>0 then return false end + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft=Duel.GetLocationCountFromEx(tp) + if ft<=0 then return false end + if og then + return og:IsExists(s.penfilter,1,nil,e,tp,lscale,rscale) + else + return Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale) + end +end +function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) + local tp=e:GetOwnerPlayer() + local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) + local lscale=c:GetLeftScale() + local rscale=rpz:GetRightScale() + if lscale>rscale then lscale,rscale=rscale,lscale end + local ft=Duel.GetLocationCountFromEx(tp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + ft=math.min(ft,aux.CheckSummonGate(tp) or ft) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.penfilter,tp,LOCATION_EXTRA,0,inchain and 1 or 0,ft,nil,e,tp,lscale,rscale) + if g then + sg:Merge(g) + end + if #sg>0 then + Duel.Hint(HINT_CARD,0,31531170) + Duel.Hint(HINT_CARD,0,id) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) + Duel.HintSelection(Group.FromCards(c)) + Duel.HintSelection(Group.FromCards(rpz)) + end +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc==LOCATION_HAND + and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) +end +function s.costfilter(c) + return (c:IsSetCard(SET_DARK_CONTRACT) or (c:IsSetCard(SET_DD) and c:IsMonster())) and c:IsAbleToRemoveAsCost() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_DARK_CONTRACT) and sg:IsExists(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,1,nil) +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_GRAVE,0,nil) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) + Duel.Remove(rg,POS_FACEUP,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) +end \ No newline at end of file diff --git a/pre-release/c101302108.lua b/pre-release/c101302108.lua new file mode 100644 index 0000000000..f860d7103f --- /dev/null +++ b/pre-release/c101302108.lua @@ -0,0 +1,81 @@ +--零王の契約書 +--Dark Contract with the Zero King +--Scripted by Hatter +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) + --Destroy 1 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck + 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_SZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Take 1000 damage + 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_PHASE|PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_DD} +function s.desfilter(c,tp) + return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) 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:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +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_DECK,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 for the rest of this turn, except "D/D" monsters + 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 not c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +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/c101302109.lua b/pre-release/c101302109.lua new file mode 100644 index 0000000000..a30b3256ec --- /dev/null +++ b/pre-release/c101302109.lua @@ -0,0 +1,95 @@ +--異次元の契約書 +--Dark Contract with the Different Dimension +--Scripted by Hatter +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) + --Take 1000 damage + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Banish 1 card in your opponent's field or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCost(s.rmcost) + e2:SetTarget(s.rmtg) + e2:SetOperation(s.rmop) + c:RegisterEffect(e2) + --Gain 500 LP + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_RECOVER) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.lptg) + e3:SetOperation(s.lpop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT} +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) +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 +function s.rmcostfilter(c) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() +end +function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(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.lptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then + Duel.BreakEffect() + Duel.Recover(p,500,REASON_EFFECT) + end +end \ No newline at end of file From 84a3a41a6ae43b20a32a48e8f4182ad3986c7141 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 25 May 2025 19:09:06 +0300 Subject: [PATCH 3/3] Add files via upload --- official/c1122030.lua | 79 ++++++++++++++++++ official/c12067160.lua | 59 ++++++++++++++ official/c12210097.lua | 63 +++++++++++++++ official/c12500059.lua | 93 +++++++++++++++++++++ official/c12888461.lua | 63 +++++++++++++++ official/c13289758.lua | 60 ++++++++++++++ official/c13332685.lua | 82 +++++++++++++++++++ official/c14301396.lua | 119 +++++++++++++++++++++++++++ official/c14554127.lua | 97 ++++++++++++++++++++++ official/c15123983.lua | 81 +++++++++++++++++++ official/c16246535.lua | 67 +++++++++++++++ official/c1665819.lua | 95 ++++++++++++++++++++++ official/c22377092.lua | 55 +++++++++++++ official/c2344618.lua | 96 ++++++++++++++++++++++ official/c23599634.lua | 136 +++++++++++++++++++++++++++++++ official/c23611122.lua | 101 +++++++++++++++++++++++ official/c23829452.lua | 62 ++++++++++++++ official/c26462013.lua | 64 +++++++++++++++ official/c27184601.lua | 99 +++++++++++++++++++++++ official/c28306253.lua | 88 ++++++++++++++++++++ official/c29251488.lua | 179 +++++++++++++++++++++++++++++++++++++++++ official/c29439831.lua | 96 ++++++++++++++++++++++ official/c30373970.lua | 82 +++++++++++++++++++ official/c31596518.lua | 101 +++++++++++++++++++++++ official/c34433770.lua | 95 ++++++++++++++++++++++ official/c34541940.lua | 75 +++++++++++++++++ official/c35550352.lua | 109 +++++++++++++++++++++++++ official/c35763582.lua | 80 ++++++++++++++++++ official/c35886170.lua | 84 +++++++++++++++++++ official/c36218106.lua | 64 +++++++++++++++ official/c36494597.lua | 67 +++++++++++++++ official/c36608728.lua | 87 ++++++++++++++++++++ official/c36672909.lua | 67 +++++++++++++++ official/c37517035.lua | 66 +++++++++++++++ official/c40543231.lua | 59 ++++++++++++++ official/c40673853.lua | 61 ++++++++++++++ official/c40706444.lua | 77 ++++++++++++++++++ official/c41522092.lua | 86 ++++++++++++++++++++ official/c47060528.lua | 84 +++++++++++++++++++ official/c483.lua | 67 +++++++++++++++ official/c48739627.lua | 83 +++++++++++++++++++ official/c48882106.lua | 59 ++++++++++++++ official/c49451215.lua | 93 +++++++++++++++++++++ official/c49604192.lua | 44 ++++++++++ official/c49721684.lua | 44 ++++++++++ official/c49904658.lua | 73 +++++++++++++++++ official/c52644170.lua | 83 +++++++++++++++++++ official/c53466722.lua | 51 ++++++++++++ official/c53589300.lua | 91 +++++++++++++++++++++ official/c54701958.lua | 59 ++++++++++++++ official/c55423549.lua | 92 +++++++++++++++++++++ official/c58761791.lua | 56 +++++++++++++ official/c59983249.lua | 151 ++++++++++++++++++++++++++++++++++ official/c60600821.lua | 104 ++++++++++++++++++++++++ official/c60946049.lua | 83 +++++++++++++++++++ official/c61168637.lua | 82 +++++++++++++++++++ official/c61822419.lua | 99 +++++++++++++++++++++++ official/c61944066.lua | 125 ++++++++++++++++++++++++++++ official/c62006866.lua | 108 +++++++++++++++++++++++++ official/c62606805.lua | 70 ++++++++++++++++ official/c62767644.lua | 69 ++++++++++++++++ official/c62880279.lua | 96 ++++++++++++++++++++++ official/c63899196.lua | 78 ++++++++++++++++++ official/c66646087.lua | 90 +++++++++++++++++++++ official/c67584223.lua | 98 ++++++++++++++++++++++ official/c67768675.lua | 90 +++++++++++++++++++++ official/c74011784.lua | 85 +++++++++++++++++++ official/c74271714.lua | 73 +++++++++++++++++ official/c74733322.lua | 93 +++++++++++++++++++++ official/c75493362.lua | 70 ++++++++++++++++ official/c75956913.lua | 119 +++++++++++++++++++++++++++ official/c76072561.lua | 90 +++++++++++++++++++++ official/c76725398.lua | 63 +++++++++++++++ official/c76948970.lua | 83 +++++++++++++++++++ official/c77894049.lua | 80 ++++++++++++++++++ official/c80073414.lua | 74 +++++++++++++++++ official/c81196066.lua | 101 +++++++++++++++++++++++ official/c8379983.lua | 101 +++++++++++++++++++++++ official/c85150300.lua | 120 +++++++++++++++++++++++++++ official/c88139289.lua | 80 ++++++++++++++++++ official/c88917691.lua | 64 +++++++++++++++ official/c89851827.lua | 73 +++++++++++++++++ official/c91818544.lua | 99 +++++++++++++++++++++++ official/c92034192.lua | 107 ++++++++++++++++++++++++ official/c9213491.lua | 90 +++++++++++++++++++++ official/c9283801.lua | 78 ++++++++++++++++++ official/c93156774.lua | 120 +++++++++++++++++++++++++++ official/c9491461.lua | 103 ++++++++++++++++++++++++ official/c94979322.lua | 84 +++++++++++++++++++ official/c95091919.lua | 75 +++++++++++++++++ official/c95382988.lua | 60 ++++++++++++++ official/c96004535.lua | 86 ++++++++++++++++++++ official/c97227123.lua | 31 +++++++ official/c97434754.lua | 82 +++++++++++++++++++ official/c97556336.lua | 87 ++++++++++++++++++++ official/c98349765.lua | 103 ++++++++++++++++++++++++ official/c99161253.lua | 50 ++++++++++++ 97 files changed, 8140 insertions(+) create mode 100644 official/c1122030.lua create mode 100644 official/c12067160.lua create mode 100644 official/c12210097.lua create mode 100644 official/c12500059.lua create mode 100644 official/c12888461.lua create mode 100644 official/c13289758.lua create mode 100644 official/c13332685.lua create mode 100644 official/c14301396.lua create mode 100644 official/c14554127.lua create mode 100644 official/c15123983.lua create mode 100644 official/c16246535.lua create mode 100644 official/c1665819.lua create mode 100644 official/c22377092.lua create mode 100644 official/c2344618.lua create mode 100644 official/c23599634.lua create mode 100644 official/c23611122.lua create mode 100644 official/c23829452.lua create mode 100644 official/c26462013.lua create mode 100644 official/c27184601.lua create mode 100644 official/c28306253.lua create mode 100644 official/c29251488.lua create mode 100644 official/c29439831.lua create mode 100644 official/c30373970.lua create mode 100644 official/c31596518.lua create mode 100644 official/c34433770.lua create mode 100644 official/c34541940.lua create mode 100644 official/c35550352.lua create mode 100644 official/c35763582.lua create mode 100644 official/c35886170.lua create mode 100644 official/c36218106.lua create mode 100644 official/c36494597.lua create mode 100644 official/c36608728.lua create mode 100644 official/c36672909.lua create mode 100644 official/c37517035.lua create mode 100644 official/c40543231.lua create mode 100644 official/c40673853.lua create mode 100644 official/c40706444.lua create mode 100644 official/c41522092.lua create mode 100644 official/c47060528.lua create mode 100644 official/c483.lua create mode 100644 official/c48739627.lua create mode 100644 official/c48882106.lua create mode 100644 official/c49451215.lua create mode 100644 official/c49604192.lua create mode 100644 official/c49721684.lua create mode 100644 official/c49904658.lua create mode 100644 official/c52644170.lua create mode 100644 official/c53466722.lua create mode 100644 official/c53589300.lua create mode 100644 official/c54701958.lua create mode 100644 official/c55423549.lua create mode 100644 official/c58761791.lua create mode 100644 official/c59983249.lua create mode 100644 official/c60600821.lua create mode 100644 official/c60946049.lua create mode 100644 official/c61168637.lua create mode 100644 official/c61822419.lua create mode 100644 official/c61944066.lua create mode 100644 official/c62006866.lua create mode 100644 official/c62606805.lua create mode 100644 official/c62767644.lua create mode 100644 official/c62880279.lua create mode 100644 official/c63899196.lua create mode 100644 official/c66646087.lua create mode 100644 official/c67584223.lua create mode 100644 official/c67768675.lua create mode 100644 official/c74011784.lua create mode 100644 official/c74271714.lua create mode 100644 official/c74733322.lua create mode 100644 official/c75493362.lua create mode 100644 official/c75956913.lua create mode 100644 official/c76072561.lua create mode 100644 official/c76725398.lua create mode 100644 official/c76948970.lua create mode 100644 official/c77894049.lua create mode 100644 official/c80073414.lua create mode 100644 official/c81196066.lua create mode 100644 official/c8379983.lua create mode 100644 official/c85150300.lua create mode 100644 official/c88139289.lua create mode 100644 official/c88917691.lua create mode 100644 official/c89851827.lua create mode 100644 official/c91818544.lua create mode 100644 official/c92034192.lua create mode 100644 official/c9213491.lua create mode 100644 official/c9283801.lua create mode 100644 official/c93156774.lua create mode 100644 official/c9491461.lua create mode 100644 official/c94979322.lua create mode 100644 official/c95091919.lua create mode 100644 official/c95382988.lua create mode 100644 official/c96004535.lua create mode 100644 official/c97227123.lua create mode 100644 official/c97434754.lua create mode 100644 official/c97556336.lua create mode 100644 official/c98349765.lua create mode 100644 official/c99161253.lua diff --git a/official/c1122030.lua b/official/c1122030.lua new file mode 100644 index 0000000000..116b03221c --- /dev/null +++ b/official/c1122030.lua @@ -0,0 +1,79 @@ +--アルトメギア・ヴァンダリズム-襲撃- +--Artmegia Vandalism - Assault +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can add 1 "Medius the Innocent" from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Make 1 face-up monster you control able to be treated as an "Artmegia" monster if used as Fusion Material this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.fusmattg) + e2:SetOperation(s.fusmatop) + c:RegisterEffect(e2) + --If "Artmegia the Academy City of Divine Arts" you control would be destroyed by card effect, you can send this card to the GY instead + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EFFECT_DESTROY_REPLACE) + e3:SetRange(LOCATION_SZONE) + e3:SetTarget(s.reptg) + e3:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + e3:SetOperation(function(e) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MEDIUS_THE_INNOCENT,74733322} --"Artmegia the Academy City of Divine Arts" +s.listed_series={SET_ARTMEGIA} +function s.thfilter(c) + return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.fusmattg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.fusmatop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --It can be treated as an "Artmegia" monster if used as Fusion Material this turn + 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_ADD_SETCODE) + e1:SetValue(SET_ARTMEGIA) + e1:SetOperation(function(scard,sumtype,tp) return (sumtype&MATERIAL_FUSION)>0 or (sumtype&SUMMON_TYPE_FUSION)>0 end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.repfilter(c,tp) + return c:IsCode(74733322) and c:IsFaceup() and c:IsControler(tp) and c:IsOnField() + and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToGrave() and eg:IsExists(s.repfilter,1,nil,tp) end + return Duel.SelectEffectYesNo(tp,c,96) +end \ No newline at end of file diff --git a/official/c12067160.lua b/official/c12067160.lua new file mode 100644 index 0000000000..70c240b355 --- /dev/null +++ b/official/c12067160.lua @@ -0,0 +1,59 @@ +--麗しき磁律機壊 +--Zilofthonia Gorgon +--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 cannot Summon/Set monsters to a zone(s) this card points to + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_FORCE_MZONE) + e0:SetRange(LOCATION_MZONE) + e0:SetTargetRange(1,0) + e0:SetValue(function(e,fp,rp,r) return r==LOCATION_REASON_CONTROL and (ZONES_MMZ|ZONES_EMZ)|~(ZONES_MMZ|ZONES_EMZ) or ~e:GetHandler():GetLinkedZone() end) + c:RegisterEffect(e0) + --Monsters this card points to cannot attack, also their activated effects are negated + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(function(e,c) return e:GetHandler():GetLinkedGroup():IsContains(c) end) + c:RegisterEffect(e1) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVING) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.discon) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) + c:RegisterEffect(e2) + --Gains ATK equal to the total original ATK of all monsters this card points to + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_UPDATE_ATTACK) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(function(e,c) return e:GetHandler():GetLinkedGroup():Match(Card.IsFaceup,nil):GetSum(Card.GetBaseAttack) end) + c:RegisterEffect(e3) + --Cannot be destroyed by battle or monster effects while it points to no monsters + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e4:SetRange(LOCATION_MZONE) + e4:SetValue(1) + e4:SetCondition(function(e) return e:GetHandler():GetLinkedGroupCount()==0 end) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e5:SetValue(function(e,re) return re:IsMonsterEffect() end) + c:RegisterEffect(e5) +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsRelateToEffect(re) and c:GetLinkedGroup():IsContains(rc) and not c:IsStatus(STATUS_BATTLE_DESTROYED) +end \ No newline at end of file diff --git a/official/c12210097.lua b/official/c12210097.lua new file mode 100644 index 0000000000..3c3b39b698 --- /dev/null +++ b/official/c12210097.lua @@ -0,0 +1,63 @@ +--巳剣之磐境 +--Mitsurugi Sacred Boundary +--Scripted by Hatter +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) + --Your opponent cannot target "Mitsurugi" Ritual Monsters you control with effects of monsters that were Special Summoned from the Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_MITSURUGI) and c:IsRitualMonster() end) + e1:SetValue(s.cannottargetval) + c:RegisterEffect(e1) + --Shuffle 4 "Mitsurugi" cards in your GY, except "Mitsurugi Sacred Boundary", into the Deck, then if your opponent controls a monster, make them Tribute 1 monster they control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_MITSURUGI} +function s.cannottargetval(e,re,rp) + if not (re:IsMonsterEffect() and rp==1-e:GetHandlerPlayer()) then return false end + local trig_sum_loc,trig_eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_SUMMON_LOCATION,CHAININFO_TRIGGERING_EFFECT) + if trig_eff==re then + return trig_sum_loc==LOCATION_EXTRA + else + return re:GetHandler():IsSummonLocation(LOCATION_EXTRA) + end +end +function s.tdfilter(c) + return c:IsSetCard(SET_MITSURUGI) and not c:IsCode(id) and c:IsAbleToDeck() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,4,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,4,4,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,4,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 or Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 or not tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then return end + local g=Duel.SelectReleaseGroup(1-tp,nil,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Release(g,REASON_RULE,1-tp) + end +end \ No newline at end of file diff --git a/official/c12500059.lua b/official/c12500059.lua new file mode 100644 index 0000000000..5120eecf1d --- /dev/null +++ b/official/c12500059.lua @@ -0,0 +1,93 @@ +--暁天使カムビン +--Dawn Angel Kambi +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --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) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Special Summon 1 Fairy monster from your Deck whose Level equals the total Levels the Tributed monsters had on the field + 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(s.deckspcost) + e2:SetTarget(s.decksptg) + e2:SetOperation(s.deckspop) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_FAIRY) end) +end +function s.selfspconfilter(c) + return c:IsFacedown() or not c:IsRace(RACE_FAIRY) +end +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return not Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,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) +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.deckspcostfilter(c) + return c:IsRace(RACE_FAIRY) and c:HasLevel() +end +function s.rescon(sg,tp,exg,e,handler) + return sg:IsContains(handler) and Duel.GetMZoneCount(tp,sg)>0 + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sg:GetSum(Card.GetLevel)),not sg:IsContains(handler) +end +function s.deckspfilter(c,e,tp,lv) + return c:IsRace(RACE_FAIRY) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.deckspcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local c=e:GetHandler() + if chk==0 then return c:IsReleasable() and c:HasLevel() and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 + and Duel.CheckReleaseGroupCost(tp,s.deckspcostfilter,1,false,s.rescon,nil,e,c) end + local g=Duel.SelectReleaseGroupCost(tp,s.deckspcostfilter,1,99,false,s.rescon,nil,e,c) + g:AddCard(c) + e:SetLabel(g:GetSum(Card.GetLevel)) + Duel.Release(g,REASON_COST) + --You cannot Special Summon the turn you activate this effect, except Fairy 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_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_FAIRY) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local res=e:GetLabel()==-100 + e:SetLabel(0) + return res + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.deckspop(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.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c12888461.lua b/official/c12888461.lua new file mode 100644 index 0000000000..8b6fe72c8c --- /dev/null +++ b/official/c12888461.lua @@ -0,0 +1,63 @@ +--アスピスクール +--Aspischool +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 6 or lower Fish monster from your hand in Defense Position, but banish it when it leaves the field + 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:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetTarget(s.handsptg) + e1:SetOperation(s.handspop) + c:RegisterEffect(e1) + --Special Summon this card in Defense Position + 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_REMOVE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) +end +function s.handspfilter(c,e,tp) + return c:IsLevelBelow(6) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.handspop(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,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + sc:RegisterEffect(e1,true) + end + Duel.SpecialSummonComplete() +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,POS_FACEUP_DEFENSE) 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_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c13289758.lua b/official/c13289758.lua new file mode 100644 index 0000000000..6caa0667df --- /dev/null +++ b/official/c13289758.lua @@ -0,0 +1,60 @@ +--流麗の騎士ガイアストリーム +--Gaia Stream, the Graceful Force +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2+ Level 6 monsters OR 1 Rank 5 or 7 Xyz Monster you control + Xyz.AddProcedure(c,nil,6,2,s.ovfilter,aux.Stringid(id,0),Xyz.InfiniteMats,s.xyzop) + --Cannot be used as material for an Xyz Summon the turn it was Xyz Summoned + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e0:SetCondition(s.matxyzcond) + e0:SetValue(1) + c:RegisterEffect(e0) + --Cannot attack directly + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + c:RegisterEffect(e1) + --Gains ATK equal to the combined Levels/Ranks of its attached materials x 200 + 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) + --Detach 1 material from this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e3:SetCode(EVENT_DAMAGE_STEP_END) + e3:SetOperation(s.detachop) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.ovfilter(c,tp,lc) + return c:IsRank(5,7) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) + return true +end +function s.matxyzcond(e) + local c=e:GetHandler() + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsXyzSummoned() +end +function s.atkval(e,c) + local g=e:GetHandler():GetOverlayGroup():Filter(aux.OR(Card.HasLevel,Card.HasRank),nil) + return 200*(g:GetSum(Card.GetLevel)+g:GetSum(Card.GetRank)) +end +function s.detachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:GetOverlayCount()>0 then + c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c13332685.lua b/official/c13332685.lua new file mode 100644 index 0000000000..cfe7f7ad7f --- /dev/null +++ b/official/c13332685.lua @@ -0,0 +1,82 @@ +--天羽々斬之巳剣 +--Ame no Habakiri no Mitsurugi +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Monsters your opponent controls lose 800 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetValue(-800) + c:RegisterEffect(e1) + --Special Summon 1 "Mitsurugi" monster from your Deck, then Tribute 1 monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Mitsurugi" card from your Deck to your hand then you can Special Summon this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_RELEASE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MITSURUGI} +s.listed_names={id,81560239} --"Mitsurugi Ritual" +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_MITSURUGI) 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.IsPlayerCanRelease(tp) + 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) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) +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 sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local rg=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,0,1,1,nil) + if #rg>0 then + Duel.HintSelection(rg) + Duel.BreakEffect() + Duel.Release(rg,REASON_EFFECT) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_MITSURUGI) 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.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) +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 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end + Duel.ConfirmCards(1-tp,g) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c14301396.lua b/official/c14301396.lua new file mode 100644 index 0000000000..069c10e552 --- /dev/null +++ b/official/c14301396.lua @@ -0,0 +1,119 @@ +--H-C マグナム・エクスカリバー +--Heroic Champion - Magnum Excalibur +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 Warrior monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),4,2) + --Double this card's ATK during damage calculation only + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(s.atkcon) + e1:SetCost(Cost.Detach(2)) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --Equip this card to another monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_EQUIP) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.eqtg) + e2:SetOperation(s.eqop) + c:RegisterEffect(e2) + --Shuffle 3 Warrior monsters from your GY into the Deck. + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + c:RegisterEffect(e3) +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + return bc and bc:IsControler(1-tp) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,c:GetAttack()) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFaceup() and c:IsRelateToEffect(e) then + --Double this card's ATK during damage calculation only + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(c:GetAttack()*2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) + c:RegisterEffect(e1) + end +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then + return Duel.SendtoGrave(c,REASON_RULE,PLAYER_NONE,PLAYER_NONE) + else + if not Duel.Equip(tp,c,tc) then return end + --Equip limit + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(function(e,c) return c==tc end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e0) + --The equipped monster gains 2000 ATK/DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(2000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2) + end +end +function s.tdfilter(c) + return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_GRAVE) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil) + if #g==3 then + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c14554127.lua b/official/c14554127.lua new file mode 100644 index 0000000000..3875b71721 --- /dev/null +++ b/official/c14554127.lua @@ -0,0 +1,97 @@ +--ピース・オブ・スタチュー +--Tiki Peace +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card as an Effect Monster + 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and s.selfsptg(e,tp,eg,ep,ev,re,r,rp,0) then + c:AddMonsterAttribute(TYPE_EFFECT|TYPE_TRAP) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + --Special Summon 1 Continuous Trap, except "Tiki Peace", from your GY or banishment as a Normal Monster and its name becomes "Tiki Peace" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(Cost.PayLP(800)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1,true) + c:AddMonsterAttributeComplete() + end + Duel.SpecialSummonComplete() +end +function s.spfilter(c,tp) + return c:IsContinuousTrap() and c:IsFaceup() and not c:IsCode(id) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,nil,TYPE_MONSTER|TYPE_NORMAL,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) +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|LOCATION_REMOVED,0,1,nil,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) +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_GRAVE|LOCATION_REMOVED,0,1,1,nil,tp):GetFirst() + if not sc then return end + sc:AssumeProperty(ASSUME_CODE,id) + if Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP) then + --Special Summon it as Normal Monster (Rock/EARTH/Level 4/ATK 1000/DEF 1000) and its name becomes "Tiki Peace" (even while face-down) + local e1=Effect.CreateEffect(e:GetHandler()) + 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|RESETS_STANDARD&~RESET_TURN_SET) + sc:RegisterEffect(e1,true) + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_RACE) + e2:SetValue(RACE_ROCK) + sc:RegisterEffect(e2,true) + local e3=e1:Clone() + e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e3:SetValue(ATTRIBUTE_EARTH) + sc:RegisterEffect(e3,true) + local e4=e1:Clone() + e4:SetCode(EFFECT_CHANGE_LEVEL) + e4:SetValue(4) + sc:RegisterEffect(e4,true) + local e5=e1:Clone() + e5:SetCode(EFFECT_SET_BASE_ATTACK) + e5:SetValue(1000) + sc:RegisterEffect(e5,true) + local e6=e1:Clone() + e6:SetCode(EFFECT_SET_BASE_DEFENSE) + e6:SetValue(1000) + sc:RegisterEffect(e6,true) + local e7=e1:Clone() + e7:SetCode(EFFECT_CHANGE_CODE) + e7:SetValue(id) + sc:RegisterEffect(e7,true) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c15123983.lua b/official/c15123983.lua new file mode 100644 index 0000000000..83b3bba8c9 --- /dev/null +++ b/official/c15123983.lua @@ -0,0 +1,81 @@ +--THE・スターハム +--The Star Ham +--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) + --Special Summon 1 monster from your GY that was used as material for this card's Synchro Summon, and if you do, it is treated as a Tuner + 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+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(s.gyspcon) + e1:SetCost(Cost.Discard()) + e1:SetTarget(s.gysptg) + e1:SetOperation(s.gyspop) + c:RegisterEffect(e1) + --Special Summon this card, but banish it when it leaves the field + 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,1}) + e2:SetCost(Cost.Discard(nil,false,2)) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) +end +function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsSynchroSummoned() and c:GetMaterialCount()>0 +end +function s.gyspfilter(c,e,tp,sync) + return sync:IsReasonCard(c) and c:IsReason(REASON_SYNCHRO) and c:IsReason(REASON_MATERIAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and not sc:IsType(TYPE_TUNER) then + --It is treated as a Tuner + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_ADD_TYPE) + e1:SetValue(TYPE_TUNER) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +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) 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/c16246535.lua b/official/c16246535.lua new file mode 100644 index 0000000000..0941bcf39d --- /dev/null +++ b/official/c16246535.lua @@ -0,0 +1,67 @@ +--沈黙のサイコマジシャン +--Silent Psychic Magician +--scripted by Naim +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 1 Level 4 or lower Psychic monster from your GY or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) + 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) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card you control would be used as Synchro Material, you can treat it as a non-Tuner + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_NONTUNER) + e2:SetRange(LOCATION_MZONE) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +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.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + --Increase its Level by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e2:SetTargetRange(1,0) + e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) +end \ No newline at end of file diff --git a/official/c1665819.lua b/official/c1665819.lua new file mode 100644 index 0000000000..1008a43716 --- /dev/null +++ b/official/c1665819.lua @@ -0,0 +1,95 @@ +--レプリカルド・ラッド +--Replicard LAD +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --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) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Special Summon 1 monster from your Deck with a different name that has 2 or more of the same Level, ATK, and/or DEF as the targeted monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.decksptg) + e2:SetOperation(s.deckspop) + c:RegisterEffect(e2) +end +function s.selfspcostfilter(c,tp) + return c:IsLevelAbove(7) and c:IsAbleToRemoveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_HAND,0,1,1,c) + Duel.Remove(g,POS_FACEUP,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 +end +function s.tgfilter(c,e,tp) + if c:IsFacedown() then return false end + local code=c:GetCode() + local lv=c:HasLevel() and c:GetLevel() or -1 + local atk=c:GetAttack() + local def=c:HasDefense() and c:GetDefense() or -1 + return Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code,lv,atk,def) +end +function s.deckspfilter(c,e,tp,code,lv,atk,def) + if c:IsCode(code) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end + local ct=0 + if c:IsLevel(lv) then ct=ct+1 end + if c:IsAttack(atk) then ct=ct+1 end + if c:IsDefense(def) then ct=ct+1 end + return ct>=2 +end +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.deckspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end + local code=tc:GetCode() + local lv=tc:HasLevel() and tc:GetLevel() or -1 + local atk=tc:GetAttack() + local def=tc:HasDefense() and tc:GetDefense() or -1 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code,lv,atk,def):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --It cannot activate its effects this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3302) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c22377092.lua b/official/c22377092.lua new file mode 100644 index 0000000000..a1c51008df --- /dev/null +++ b/official/c22377092.lua @@ -0,0 +1,55 @@ +--トラップホリック +--Trapholic +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Destroy 1 Spell/Trap you control, and if you do, Set 1 Normal Trap from your Deck + 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:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.desfilter(c,tp,ft) + if not c:IsSpellTrap() then return false end + if c:IsLocation(LOCATION_STZONE) then ft=ft+1 end + return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,ft>0) +end +function s.setfilter(c,haszone) + return c:IsNormalTrap() and c:IsSSetable(haszone) and not c:IsCode(id) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if not c:IsLocation(LOCATION_SZONE) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then ft=ft-1 end + if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp,ft) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,c,tp,ft) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,tp,ft) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.activate(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_SZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,false):GetFirst() + if sc and Duel.SSet(tp,sc)>0 then + --It can be activated this turn while you have 3 or more Traps in your GY + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetCondition(function(e) return Duel.GetMatchingGroupCount(Card.IsTrap,tp,LOCATION_GRAVE,0,nil)>=3 end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/official/c2344618.lua b/official/c2344618.lua new file mode 100644 index 0000000000..0147aba760 --- /dev/null +++ b/official/c2344618.lua @@ -0,0 +1,96 @@ +--月光舞踏会 +--Lunalight Masquerade +--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) + e0:SetCost(s.actreg) + c:RegisterEffect(e0) + --Send 1 "Lunalight" monster from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --Add 1 "Polymerization" from your GY or banishment to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_LUNALIGHT} +s.listed_names={CARD_POLYMERIZATION} +function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.tgfilter(c) + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() 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 +function s.thconfilter(c,tp) + return c:IsSetCard(SET_LUNALIGHT) and c:IsFusionSummoned() and c:IsSummonPlayer(tp) and c:IsFaceup() +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.thconfilter,1,nil,tp) +end +function s.thfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsFaceup() 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|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(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,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end + Duel.ShuffleHand(tp) + if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) + --Once this turn, if you Fusion Summon a "Lunalight" monster, you can also banish monsters from your GY as material + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_FUSION_MATERIAL) + e1:SetCountLimit(1) + e1:SetTargetRange(LOCATION_GRAVE,0) + e1:SetTarget(function(e,c) return c:IsAbleToRemove() and c:IsMonster() end) + e1:SetOperation(Fusion.BanishMaterial) + e1:SetValue(function(e,c) return c and c:IsSetCard(SET_LUNALIGHT) and c:IsControler(e:GetHandlerPlayer()) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/official/c23599634.lua b/official/c23599634.lua new file mode 100644 index 0000000000..d42a02d27f --- /dev/null +++ b/official/c23599634.lua @@ -0,0 +1,136 @@ +--アルトメギア・メセナ-覚醒- +--Artmegia Messena - Awakening +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Return 1 "Artmegia" monster you control to the hand/Extra Deck, and if you do, destroy 1 card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARTMEGIA} +s.listed_names={CARD_MEDIUS_THE_INNOCENT} +function s.spfilter(c,e,tp) + return (c:IsSetCard(SET_ARTMEGIA) or c:IsCode(CARD_MEDIUS_THE_INNOCENT)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + 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 + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) + --This turn, the activation of your cards and effects that include an effect that Fusion Summons a Fusion Monster cannot be negated + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_INACTIVATE) + e1:SetValue(s.efilter) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --This turn, your opponent cannot activate cards or effects when a monster is Fusion Summoned this way + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCondition(s.limcon) + e2:SetOperation(s.limop) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_CHAIN_END) + e3:SetOperation(s.limop2) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) +end +function s.efilter(e,ct) + local p=e:GetHandlerPlayer() + local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) + return p==tp and te:IsHasCategory(CATEGORY_FUSION_SUMMON) +end +function s.limfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) +end +function s.limcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.limfilter,1,nil,tp) +end +function s.limop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetCurrentChain()==0 then + Duel.SetChainLimitTillChainEnd(s.chainlm) + elseif Duel.GetCurrentChain()==1 then + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAINING) + e1:SetOperation(s.resetop) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EVENT_BREAK_EFFECT) + e2:SetReset(RESET_CHAIN) + Duel.RegisterEffect(e2,tp) + end +end +function s.resetop(e,tp,eg,ep,ev,re,r,rp) + e:GetHandler():ResetFlagEffect(id) + e:Reset() +end +function s.limop2(e,tp,eg,ep,ev,re,r,rp) + if e:GetHandler():HasFlagEffect(id) then + Duel.SetChainLimitTillChainEnd(s.chainlm) + end + e:GetHandler():ResetFlagEffect(id) +end +function s.chainlm(e,rp,tp) + return tp==rp +end +function s.thfilter(c) + return c:IsSetCard(SET_ARTMEGIA) and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end + local dg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if chk==0 then return #dg>0 and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) 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.Destroy(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c23611122.lua b/official/c23611122.lua new file mode 100644 index 0000000000..1903a9d7cb --- /dev/null +++ b/official/c23611122.lua @@ -0,0 +1,101 @@ +--急雷の泥沼 +--Sudden Thunderous Swamp +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can discard 1 card, and if you do, Set 1 Continuous Trap from your Deck or GY, with an effect that Special Summons itself as a monster, except the discarded card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Add 1 card with the same name as 1 of your destroyed cards 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_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local g=Group.CreateGroup() + g:KeepAlive() + e2:SetLabelObject(g) + --Keep track of cards destroyed on your field + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_SZONE) + e3:SetLabelObject(e2) + e3:SetOperation(s.regop) + c:RegisterEffect(e3) +end +function s.setfilter(c) + return c:IsContinuousTrap() and c:IsTrapMonster() and c:IsSSetable() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) + and Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD|REASON_EFFECT)>0 then + local og=Duel.GetOperatedGroup() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,og) + if #g>0 then + Duel.SSet(tp,g) + end + end +end +function s.tgfilter(c,e,tp) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsCanBeEffectTarget(e) and c:IsReason(REASON_BATTLE|REASON_EFFECT) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) +end +function s.thfilter(c,code) + return c:IsCode(code) and c:IsAbleToHand() +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.tgfilter,nil,e,tp) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=e:GetLabelObject():Filter(s.tgfilter,nil,e,tp) + if chkc then return g:IsContains(chkc) and s.tgfilter(chkc,e,tp) end + if chk==0 then return #g>0 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_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end \ No newline at end of file diff --git a/official/c23829452.lua b/official/c23829452.lua new file mode 100644 index 0000000000..9a23093f39 --- /dev/null +++ b/official/c23829452.lua @@ -0,0 +1,62 @@ +--アルトメギアの獄神獣 +--Imprisoned Deity Beast of Artmegia +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You cannot Special Summon from the Extra Deck, except Fusion Monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end) + c:RegisterEffect(e1) + --Fusion Summon 1 "Artmegia" Fusion Monster or "Nerva the Imprisoned Deity of Creation" + local params={fusfilter=s.fusionfilter,gc=Fusion.ForcedHandler} + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(Fusion.SummonEffTG(params)) + e2:SetOperation(Fusion.SummonEffOP(params)) + c:RegisterEffect(e2) + --Add 1 "Artmegia" Spell/Trap from your Deck to your hand with a different name from the cards in your GY. + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ARTMEGIA} +s.listed_names={53589300} --"Nerva the Imprisoned Deity of Creation" +function s.fusionfilter(c) + return c:IsSetCard(SET_ARTMEGIA) or c:IsCode(53589300) +end +function s.thfilter(c,tp) + return c:IsSetCard(SET_ARTMEGIA) and c:IsSpellTrap() and c:IsAbleToHand() + and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) +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,tp) 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,tp) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c26462013.lua b/official/c26462013.lua new file mode 100644 index 0000000000..bdf4101ca8 --- /dev/null +++ b/official/c26462013.lua @@ -0,0 +1,64 @@ +--原石竜ネザー・ベルセリウス +--Primite Dragon Nether Berzelius +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Primite" monster + 1+ Normal Monsters + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_NORMAL),1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PRIMITE)) + --Gains 1000 ATK for each Normal Monster used for its Fusion Summon + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_MATERIAL_CHECK) + e1:SetValue(function(e,c) c:UpdateAttack(c:GetMaterial():FilterCount(Card.IsType,nil,TYPE_NORMAL)*1000,RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) end) + c:RegisterEffect(e1) + --Negate the activated effects of monsters your opponent controls whose Level/Rank/Link Rating is less than or equal to the number of Normal Monsters in your field and GY + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVING) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.discon) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) + c:RegisterEffect(e2) + --Special Summon 1 Normal Monster from your Deck in Defense Position + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_PRIMITE} +s.material_setcode={SET_PRIMITE} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsMonsterEffect() or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end + local normal_ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_NORMAL),tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + if normal_ct==0 then return false end + local trig_ctrl,trig_loc,trig_lv,trig_rk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_LEVEL,CHAININFO_TRIGGERING_RANK) + if not (trig_ctrl==1-tp and trig_loc==LOCATION_MZONE) then return false end + local trig_lk=re:GetHandler():GetLink() + if trig_lv>0 and trig_lv<=normal_ct then return true end + if trig_rk>0 and trig_rk<=normal_ct then return true end + if trig_lk>0 and trig_lk<=normal_ct then return true end + return false +end +function s.spfilter(c,e,tp) + return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,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_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_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c27184601.lua b/official/c27184601.lua new file mode 100644 index 0000000000..0ef841f51b --- /dev/null +++ b/official/c27184601.lua @@ -0,0 +1,99 @@ +--神芸獄徒 ディアクトロス +--Artmegia Diaktoros +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Medius the Innocent" + 1 "Artmegia" monster + Fusion.AddProcMix(c,true,true,CARD_MEDIUS_THE_INNOCENT,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ARTMEGIA)) + --Change the battle position of 1 monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + c:RegisterEffect(e1) + --Negate the activation of an opponent's card or effect on the field, and if you do, destroy that card + 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) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.negcon) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) + --Special Summon 1 "Medius the Innocent" from your hand, Deck, or banishment + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + 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.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MEDIUS_THE_INNOCENT} +s.listed_series={SET_ARTMEGIA} +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return rp==1-tp and loc&LOCATION_ONFIELD>0 and Duel.IsChainNegatable(ev) + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetRace)>=3 +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + local rc=re:GetHandler() + 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 +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() +end +function s.spfilter(c,e,tp) + return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) + 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_DECK|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_REMOVED) +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|LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c28306253.lua b/official/c28306253.lua new file mode 100644 index 0000000000..65853bd446 --- /dev/null +++ b/official/c28306253.lua @@ -0,0 +1,88 @@ +--アングリーバーガー +--Angry Burger +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --All monsters your opponent controls must attack this card, if able + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_MUST_ATTACK) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetRange(LOCATION_MZONE) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) + e2:SetValue(function(e,c) return c==e:GetHandler() end) + c:RegisterEffect(e2) + --Add 1 "Nouvelles" monster from your Deck to your hand, and if you do, shuffle this card into the Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_HAND) + e3:SetCountLimit(1,id) + e3:SetCost(Cost.SelfReveal) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) + --Tribute 1 Attack Position monster on either field, and if you do, Special Summon 1 "Hungry Burger" with 2000 ATK from your hand or Deck + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetCode(EVENT_FREE_CHAIN) + e4:SetRange(LOCATION_MZONE) + e4:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e4:SetCountLimit(1,{id,1}) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +s.listed_series={SET_RECIPE,SET_NOUVELLES} +s.listed_names={30243636} --"Hungry Burger" +function s.thfilter(c) + return c:IsSetCard(SET_NOUVELLES) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local 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 c:IsRelateToEffect(e) then + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end +end +function s.tribfilter(c,tp) + return c:IsAttackPos() and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsCode(30243636) and c:IsAttack(2000) 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.IsExistingTarget(s.tribfilter,tp,LOCATION_MZONE,LOCATION_MZONE,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) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local rg=Duel.SelectMatchingCard(tp,s.tribfilter,tp,LOCATION_MZONE,LOCATION_MZONE,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,false,true,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c29251488.lua b/official/c29251488.lua new file mode 100644 index 0000000000..415e72a4a5 --- /dev/null +++ b/official/c29251488.lua @@ -0,0 +1,179 @@ +--シェフ・ド・ヌーベルズ +--Chef de Nouvelles +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Activate and register it as activated this turn + local e0=Effect.CreateEffect(c) + e0:SetDescription(1160) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetRange(LOCATION_HAND) + e0:SetCost(s.regop) + c:RegisterEffect(e0) + --Add 1 "Nouvelles" card from your Deck to your hand, except a Pendulum Monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_PZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place this card in your Pendulum Zone + 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_RELEASE) + e3:SetTarget(s.pltg) + e3:SetOperation(s.plop) + c:RegisterEffect(e3) + --Increase the level of a targeted Effect monster by up to 3 + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,3)) + e4:SetCategory(CATEGORY_LVCHANGE) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetCode(EVENT_FREE_CHAIN) + e4:SetRange(LOCATION_MZONE) + e4:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e4:SetCountLimit(1) + e4:SetCost(Cost.HardOncePerChain(id)) + e4:SetTarget(s.lvtg) + e4:SetOperation(s.lvop) + c:RegisterEffect(e4) + --Apply the effects of a 1 "Recipe" Ritual Spell + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,4)) + e5:SetCategory(CATEGORY_SPECIAL_SUMMON) + e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e5:SetProperty(EFFECT_FLAG_DELAY) + e5:SetCode(EVENT_SPSUMMON_SUCCESS) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e5:SetCost(Cost.AND(s.applycost,Cost.HardOncePerChain(id))) + e5:SetTarget(s.applytg) + e5:SetOperation(s.applyop) + c:RegisterEffect(e5) +end +s.listed_series={SET_NOUVELLES,SET_RECIPE} +function s.regop(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.thfilter(c) + return c:IsSetCard(SET_NOUVELLES) and c:IsAbleToHand() and not c:IsType(TYPE_PENDULUM) +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.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,POS_FACEUP) 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,true,false,POS_FACEUP) + end +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsLocation(LOCATION_EXTRA) and Duel.CheckPendulumZones(tp) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end +function s.lvfilter(c) + return c:IsType(TYPE_EFFECT) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local lv=Duel.AnnounceLevel(tp,1,3) + --Increase its Level by up to 3 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.applyfilter(c) + return c:IsRitualSpell() and c:IsSetCard(SET_RECIPE) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil +end +function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end +end +function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + local te=e:GetLabelObject() + return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) + end + if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + local te=g:GetFirst():CheckActivateEffect(true,true,false) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + local tg=te:GetTarget() + if tg then + tg(e,tp,eg,ep,ev,re,r,rp,1) + end + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + e:SetLabelObject(te) + Duel.ClearOperationInfo(0) +end +function s.applyop(e,tp,eg,ep,ev,re,r,rp) + local te=e:GetLabelObject() + if te then + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + local op=te:GetOperation() + if op then op(e,tp,eg,ep,ev,re,r,rp) end + te:SetLabel(e:GetLabel()) + te:SetLabelObject(e:GetLabelObject()) + end +end diff --git a/official/c29439831.lua b/official/c29439831.lua new file mode 100644 index 0000000000..2e8dffc55c --- /dev/null +++ b/official/c29439831.lua @@ -0,0 +1,96 @@ +--瞳の魔女モルガナ +--Morgana the Witch of Eyes +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Negate the attack of an opponent's monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_ATTACK_ANNOUNCE) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + e1:SetCost(s.negatkcost) + e1:SetTarget(s.negatktg) + e1:SetOperation(function() Duel.NegateAttack() end) + c:RegisterEffect(e1) + --Add 1 "Morganite" 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) + --Change the ATK of all face-up monsters your opponent controls to 0. + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_ATKCHANGE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.atkcon) + e4:SetTarget(s.atktg) + e4:SetOperation(s.atkop) + c:RegisterEffect(e4) +end +s.listed_series={SET_MORGANITE} +function s.negatkcostfilter(c) + return c:IsSetCard(SET_MORGANITE) and c:IsSpell() and c:IsAbleToRemoveAsCost() +end +function s.negatkcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.negatkcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.negatkcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.negatktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetAttacker():IsOnField() and Duel.GetAttacker():IsRelateToBattle() end +end +function s.thfilter(c) + return c:IsSetCard(SET_MORGANITE) 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) +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.morganitefilter(c) + return c:IsSetCard(SET_MORGANITE) and c:IsSpell() and c:IsFaceup() +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.morganitefilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) + return g:GetClassCount(Card.GetCode)>=3 +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,1-tp,0) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,nil) + for tc in g:Iter() do + --Change their ATKs to 0 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c30373970.lua b/official/c30373970.lua new file mode 100644 index 0000000000..42a0155bb9 --- /dev/null +++ b/official/c30373970.lua @@ -0,0 +1,82 @@ +--結瘴龍ティスティナ +--Miasma Dragon Tistina +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Tistina" monster from your Deck to your hand, except "Miasma Dragon Tistina" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Special Summon this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={id} +s.listed_series={SET_TISTINA} +function s.thfilter(c) + return c:IsSetCard(SET_TISTINA) 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 + local c=e:GetHandler() + --For the rest of this turn, LIGHT "Tistina" monsters you control gain 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_TISTINA) end) + e1:SetValue(1000) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 + and 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 + --You cannot Special Summon from the hand or GY for the rest of this turn, except "Tistina" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) and not c:IsSetCard(SET_TISTINA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c31596518.lua b/official/c31596518.lua new file mode 100644 index 0000000000..308ff63ae1 --- /dev/null +++ b/official/c31596518.lua @@ -0,0 +1,101 @@ +--冥帝王エイドス +--Eidos the Underworld Monarch +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Monarch" Spell/Trap or 1 monster with 2800 ATK/1000 DEF from your Deck or GY to your hand + 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_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Change the Attribute of 1 monster on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.attrtg) + e3:SetOperation(s.attrop) + c:RegisterEffect(e3) + --Add this card to your hand or Special Summon it + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e4:SetCode(EVENT_SUMMON_SUCCESS) + e4:SetRange(LOCATION_GRAVE) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(s.thspcon) + e4:SetTarget(s.thsptg) + e4:SetOperation(s.thspop) + c:RegisterEffect(e4) +end +s.listed_series={SET_MONARCH} +function s.thfilter(c) + return ((c:IsSetCard(SET_MONARCH) and c:IsSpellTrap()) or (c:IsAttack(2800) and c:IsDefense(1000))) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + local attr=Duel.AnnounceAnotherAttribute(g,tp) + e:SetLabel(attr) +end +function s.attrop(e,tp,eg,ep,ev,re,r,rp) + local attr=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAttributeExcept,attr),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --It becomes the declared Attribute + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e1:SetValue(attr) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +end +function s.thspcon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsSummonPlayer(tp) and ec:IsTributeSummoned() and ec:IsAttackAbove(2400) and ec:IsDefense(1000) and ec:IsFaceup() +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + aux.ToHandOrElse(c,tp, + function(sc) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function(sc) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,3) + ) +end \ No newline at end of file diff --git a/official/c34433770.lua b/official/c34433770.lua new file mode 100644 index 0000000000..80244431a6 --- /dev/null +++ b/official/c34433770.lua @@ -0,0 +1,95 @@ +--閃刀亜式-レムニスゲート +--Sky Striker Alternative - Lemnis Gate +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Immediately after this effect resolves, Link Summon 1 "Sky Striker Ace" Link Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SKY_STRIKER_ACE,SET_SKY_STRIKER} +function s.tdfilter(c,e) + return ((c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsMonster()) or (c:IsSetCard(SET_SKY_STRIKER) and c:IsSpell())) + and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) +end +function s.rescon(full_mct,full_sct) + return function(sg,e,tp,mg) + local mct=sg:FilterCount(Card.IsMonster,nil) + local sct=#sg-mct + if mct==sct then return true end + local rem_mct=full_mct-mct + local rem_sct=full_sct-sct + return false,mct>sct and rem_sct<(mct-sct) or rem_mct<(sct-mct) + end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e) + local full_mct=g:FilterCount(Card.IsMonster,nil) + local full_sct=#g-full_mct + local rescon=s.rescon(full_mct,full_sct) + if chk==0 then return full_mct>0 and full_sct>0 and aux.SelectUnselectGroup(g,e,tp,2,2,rescon,0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,math.min(full_mct,full_sct)*2,rescon,1,tp,HINTMSG_TODECK,rescon) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then + local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA)//3 + if ct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + end + end +end +function s.spconfilter(c,tp) + return c:IsSetCard(SET_SKY_STRIKER) 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.spfilter(c) + return c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsLinkSummonable() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc then + Duel.LinkSummon(tp,sc) + end +end diff --git a/official/c34541940.lua b/official/c34541940.lua new file mode 100644 index 0000000000..84c408523b --- /dev/null +++ b/official/c34541940.lua @@ -0,0 +1,75 @@ +--神芸学徒 ファインメルト +--Artmegia Finemelt +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Your opponent cannot target Level 6 or lower "Artmegia" monsters you control with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsLevelBelow(6) and c:IsSetCard(SET_ARTMEGIA) end) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --Special Summon this card from your hand, then you can draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Negate the effects of all face-up monsters your opponent currently controls, also their current ATK become halved until the end of this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e3:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3 end) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ARTMEGIA} +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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) +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 + and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,0) + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + if tc:IsNegatableMonster() then tc:NegateEffects(c) end + --Its ATK becomes halved until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetValue(tc:GetAttack()/2) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c35550352.lua b/official/c35550352.lua new file mode 100644 index 0000000000..983dab2954 --- /dev/null +++ b/official/c35550352.lua @@ -0,0 +1,109 @@ +--Start for VS! +--Vanquish Soul, Start! +--Scripted by Hatter +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) + --Add 1 "Vanquish Soul" monster 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:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If a "Vanquish Soul" monster(s) you control would be destroyed by battle or card effect, you can reveal 1 "Vanquish Soul" monster in your hand instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.repltg) + e2:SetOperation(s.replop) + e2:SetValue(function(e,c) return s.replfilter(c,e:GetHandlerPlayer()) end) + c:RegisterEffect(e2) + --Set 1 "Vanquish Soul" Trap from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.setcon) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_VANQUISH_SOUL} +function s.thtgfilter(c,tp) + return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute()) +end +function s.thfilter(c,attr) + return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsMonster() and not c:IsAttribute(attr) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thtgfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.thtgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.thtgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttribute()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.replfilter(c,tp) + return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() + and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) +end +function s.rvfilter(c) + return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsMonster() and not c:IsPublic() +end +function s.repltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return eg:IsExists(s.replfilter,1,nil,tp) + and Duel.IsExistingMatchingCard(s.rvfilter,tp,LOCATION_HAND,0,1,nil) end + if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local tg=Duel.SelectMatchingCard(tp,s.rvfilter,tp,LOCATION_HAND,0,1,1,nil) + e:SetLabelObject(tg:GetFirst()) + return true + end + return false +end +function s.replop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_CARD,1-tp,id) + local tc=e:GetLabelObject() + Duel.ConfirmCards(1-tp,tc) + Duel.ShuffleHand(tp) +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsTurnPlayer(tp) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_VANQUISH_SOUL),tp,LOCATION_MZONE,0,2,nil) +end +function s.setfilter(c) + return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsTrap() 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 +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 \ No newline at end of file diff --git a/official/c35763582.lua b/official/c35763582.lua new file mode 100644 index 0000000000..43b07931da --- /dev/null +++ b/official/c35763582.lua @@ -0,0 +1,80 @@ +--月光銀狗 +--Lunalight Silver Hound +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Lunalight" monster from your Deck + 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_TO_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the activation of a Spell/Trap Card or effect activated on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_LUNALIGHT} +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_LUNALIGHT) and not 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)>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 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 then + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --You cannot Special Summon from the Extra Deck while you control that face-up monster, except "Lunalight" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_LUNALIGHT) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return re:IsSpellTrapEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD>0 and Duel.IsChainNegatable(ev) +end +function s.negcostfilter(c) + return c:IsSetCard(SET_LUNALIGHT) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_GRAVE,0,1,1,c) + g:AddCard(c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) +end \ No newline at end of file diff --git a/official/c35886170.lua b/official/c35886170.lua new file mode 100644 index 0000000000..f596d78500 --- /dev/null +++ b/official/c35886170.lua @@ -0,0 +1,84 @@ +--ゴゴゴゴブリンドバーグ +--Gogogo Goblindbergh +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 non-Warrior "Gogogo" monster from your hand, Deck or GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Dododo" monster 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:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_REMOVE) + c:RegisterEffect(e3) +end +s.listed_series={SET_GOGOGO,SET_DODODO} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GOGOGO) and not c:IsRace(RACE_WARRIOR) 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_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + local c=e:GetHandler() + if c:IsAttackPos() then + Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz 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 not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + 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_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 c:IsRelateToEffect(e) and c:IsAttackPos() then + Duel.BreakEffect() + Duel.ChangePosition(c,POS_FACEUP_DEFENSE) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.thfilter(c) + return c:IsSetCard(SET_DODODO) 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 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c36218106.lua b/official/c36218106.lua new file mode 100644 index 0000000000..b2ea8b343a --- /dev/null +++ b/official/c36218106.lua @@ -0,0 +1,64 @@ +--寡黙なるサイコミニスター +--Hushed Psychic Minister +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you control a Psychic monster other than "Hushed Psychic Minister", you can Special Summon this card (from your hand) in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetTargetRange(POS_FACEUP_DEFENSE,0) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Banish 1 face-up monster on the field until the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.rmvcost) + e2:SetTarget(s.rmvtg) + e2:SetOperation(s.rmvop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.spconfilter(c) + return c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.rmvcostfilter(c) + return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() +end +function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.rmvcostfilter,tp,LOCATION_GRAVE,0,1,1,c) + g:AddCard(c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + aux.RemoveUntil(tc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) + end +end \ No newline at end of file diff --git a/official/c36494597.lua b/official/c36494597.lua new file mode 100644 index 0000000000..83a3965560 --- /dev/null +++ b/official/c36494597.lua @@ -0,0 +1,67 @@ +--テレポート・フュージョン +--Teleport Fusion +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Psychic Fusion Monster by banishing Psychic monsters from your field and/or GY as material + local e1=Fusion.CreateSummonEff({handler=c, + fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC), + matfilter=Fusion.OnFieldMat(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC)), + extrafil=s.fextramat, + extraop=Fusion.BanishMaterial, + extratg=s.extratg} + ) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCondition(function() return Duel.IsMainPhase() end) + c:RegisterEffect(e1) + --Special Summon 1 of your banished Psychic monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.fextramat(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC),Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end +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_MZONE|LOCATION_GRAVE) +end +function s.spconfilter(c,tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + and c:IsSummonLocation(LOCATION_EXTRA) and c:IsPreviousPosition(POS_FACEUP) + and c:IsPreviousControler(tp) and c:IsPreviousRaceOnField(RACE_PSYCHIC) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c36608728.lua b/official/c36608728.lua new file mode 100644 index 0000000000..9e08da14cd --- /dev/null +++ b/official/c36608728.lua @@ -0,0 +1,87 @@ +--戦刀匠サイバ +--Saiba the Fighting Swordsmith +--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) + --Special Summon 1 Level 6 or lower Warrior monster from your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a Warrior 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_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) + e2:SetTarget(s.synchtg) + e2:SetOperation(s.synchop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(6) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,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.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(c) + end + Duel.SpecialSummonComplete() + if c:IsRelateToEffect(e) then + --This card cannot be used as Synchro Material for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3310) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end +end +function s.synchrocheck(tp,sg,sc) + return sg:IsExists(Card.IsRace,1,nil,RACE_WARRIOR) +end +function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + Synchro.CheckAdditional=s.synchrocheck + local res=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) + Synchro.CheckAdditional=nil + return res + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.synchop(e,tp,eg,ep,ev,re,r,rp) + Synchro.CheckAdditional=s.synchrocheck + local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil) + if #g>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=g:Select(tp,1,1,nil):GetFirst() + Duel.SynchroSummon(tp,sc) + else + Synchro.CheckAdditional=nil + end +end \ No newline at end of file diff --git a/official/c36672909.lua b/official/c36672909.lua new file mode 100644 index 0000000000..3284d0bae5 --- /dev/null +++ b/official/c36672909.lua @@ -0,0 +1,67 @@ +--再世律 +--Regenesis Pentateuch +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Banish 1 card your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Special Summon 1 monster with 2500 ATK or DEF 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,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={22812963} --"Regenesis Lord" +function s.confilter(c) + return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end + local ct=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,22812963),tp,LOCATION_ONFIELD,0,1,nil) and 2 or 1 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return (c:IsAttack(2500) or c:IsDefense(2500)) 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 \ No newline at end of file diff --git a/official/c37517035.lua b/official/c37517035.lua new file mode 100644 index 0000000000..ca5777ce08 --- /dev/null +++ b/official/c37517035.lua @@ -0,0 +1,66 @@ +--アルトメギア・マスターワーク-継承- +--Artmegia Masterwork - Succession +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fusion Monster from your Extra Deck + local e1=Fusion.CreateSummonEff({handler=c,extrafil=s.fextra,stage2=s.atkop,extratg=s.atktg}) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCondition(function() return Duel.IsMainPhase() end) + c:RegisterEffect(e1) + --Shuffle into your Deck 3 "Artmegia" cards in your GY with different names + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARTMEGIA} +function s.matcheck(tp,sg,fc) + return sg:IsExists(Card.IsSetCard,1,nil,SET_ARTMEGIA,fc,SUMMON_TYPE_FUSION,tp) +end +function s.fextra(e,tp,mg,sumtype) + return nil,s.matcheck +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,500) +end +function s.atkop(e,tc,tp,mg,chk) + if chk==1 then + if not Duel.IsExistingMatchingCard(nil,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) then return end + Duel.BreakEffect() + --Gains 500 ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.tdfilter(c,e) + return c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) + if chk==0 then return #g>=3 and g:GetClassCount(Card.GetCode)>=3 end + local tg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c40543231.lua b/official/c40543231.lua new file mode 100644 index 0000000000..1fdd55337a --- /dev/null +++ b/official/c40543231.lua @@ -0,0 +1,59 @@ +--巳剣之尊 麁正 +--Mitsurugi no Mikoto, Aramasa +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Mitsurugi" monster from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetCode(EVENT_RELEASE) + c:RegisterEffect(e3) + --If another Reptile monster(s) you control would be destroyed by battle or card effect, you can Tribute this card instead + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e4:SetCode(EFFECT_DESTROY_REPLACE) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetTarget(s.reptg) + e4:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Release(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end) + c:RegisterEffect(e4) +end +s.listed_series={SET_MITSURUGI} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_MITSURUGI) 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 +function s.repfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_REPTILE) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return eg:IsExists(s.repfilter,1,c,tp) + and c:IsReleasableByEffect(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end + return Duel.SelectEffectYesNo(tp,c,96) +end \ No newline at end of file diff --git a/official/c40673853.lua b/official/c40673853.lua new file mode 100644 index 0000000000..f4ee1b3547 --- /dev/null +++ b/official/c40673853.lua @@ -0,0 +1,61 @@ +--超念銃士ヴァロン +--Vallon, the Psychic Skyblaster +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 5 monsters + Xyz.AddProcedure(c,nil,5,2) + --Change 1 face-up monster your opponent controls 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_MZONE) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --Destroy 1 face-down card on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + 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:IsFaceup() and tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsFacedown() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c40706444.lua b/official/c40706444.lua new file mode 100644 index 0000000000..9fcffb7452 --- /dev/null +++ b/official/c40706444.lua @@ -0,0 +1,77 @@ +--ARG☆S-勇駿のアリオン +--Argostars - Courageous Arion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters, OR 1 "Argostars" monster you control + Xyz.AddProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop) + --Add 1 "Argostars" Spell from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + 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():IsXyzSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Place up to 3 "Argostars" Continuous Traps from your GY, face-up in your Spell & Trap Zone + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_LEAVE_GRAVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.Detach(2)) + e2:SetTarget(s.pltg) + e2:SetOperation(s.plop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_ARGOSTARS} +function s.ovfilter(c,tp,lc) + return c:IsSetCard(SET_ARGOSTARS,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.thfilter(c) + return c:IsSetCard(SET_ARGOSTARS) 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) +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.plfilter(c) + return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and not c:IsForbidden() +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_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft<=0 then return end + ft=math.min(ft,3) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local g=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_GRAVE,0,1,ft,nil) + if #g>0 then + for sc in g:Iter() do + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end + end +end \ No newline at end of file diff --git a/official/c41522092.lua b/official/c41522092.lua new file mode 100644 index 0000000000..266cb5dd20 --- /dev/null +++ b/official/c41522092.lua @@ -0,0 +1,86 @@ +--FNo.0 未来皇ホープ・ゼアル +--Number F0: Utopic Future Zexal +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Xyz Monsters with the same Rank + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_XYZ),nil,2,nil,nil,nil,nil,false,s.xyzcheck) + --Gains ATK/DEF equal to the total Ranks of all Xyz Monsters you control and in your opponent's GY x 500 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_XYZ),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_GRAVE,nil):GetSum(Card.GetRank)*500 end) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2) + --Your opponent's monsters cannot target monsters for attacks, except this one + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(0,LOCATION_MZONE) + e3:SetValue(function(e,c) return c~=e:GetHandler() end) + c:RegisterEffect(e3) + --Your opponent cannot target target other cards on the field with card effects + local e4=e3:Clone() + e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) + e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) + e4:SetTarget(function(e,c) return c~=e:GetHandler() end) + e4:SetValue(aux.tgoval) + c:RegisterEffect(e4) + --Take control of 1 monster your opponent controls + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,0)) + e5:SetCategory(CATEGORY_CONTROL) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetCode(EVENT_CHAINING) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetCondition(s.ctcon) + e5:SetCost(Cost.Detach(1)) + e5:SetTarget(s.cttg) + e5:SetOperation(s.ctop) + c:RegisterEffect(e5,false,REGISTER_FLAG_DETACH_XMAT) +end +s.xyz_number=0 +function s.xyzcheck(g,tp,xyz) + local mg=g:Filter(function(c) return not c:IsHasEffect(EFFECT_EQUIP_SPELL_XYZ_MAT) end,nil) + return mg:GetClassCount(Card.GetRank)==1 +end +function s.ctcon(e,tp,eg,ep,ev,re,r,rp) + local trig_loc,trig_p=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER) + return trig_p==1-tp and (trig_loc&LOCATION_ONFIELD)>0 +end +function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,0) +end +function s.ctop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp) + end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + --This card cannot be destroyed by battle or card effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3008) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/official/c47060528.lua b/official/c47060528.lua new file mode 100644 index 0000000000..e61a0f783a --- /dev/null +++ b/official/c47060528.lua @@ -0,0 +1,84 @@ +--雷霆ノ魔軍神 +--Sakra Vendirage +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Special Summon 1 Level/Rank 4 Psychic monster from your GY, except "Sakra Vendirage" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --Change the name of 1 other face-up monster on the field to "Sakra Vendirage" until the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) end) + e2:SetTarget(s.nametg) + e2:SetOperation(s.nameop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.spfilter(c,e,tp) + return (c:IsLevel(4) or c:IsRank(4)) and c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.nametg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and not chkc:IsCode(id) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(aux.NOT(Card.IsCode),id),tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,aux.FaceupFilter(aux.NOT(Card.IsCode),id),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) +end +function s.nameop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + --That monster's name becomes "Sakra Vendirage" until the End Phase + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(id) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + --Reset the name change effect manually in the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetOperation(function(e) e1:Reset() Duel.HintSelection(Group.FromCards(tc)) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end) + e2:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e2) + end +end diff --git a/official/c483.lua b/official/c483.lua new file mode 100644 index 0000000000..a6f8423a7b --- /dev/null +++ b/official/c483.lua @@ -0,0 +1,67 @@ +--パラレル・テレポート +--Parallel Teleport +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 7 or lower Psychic monster from your Deck or Extra Deck + 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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_PSYCHIC) end) +end +function s.costfilter(c,e,tp) + return c:IsRace(RACE_PSYCHIC) and c:HasLevel() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,mc) + if not (c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp,mc)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + end +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(100) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 + and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,e,tp) end + local rc=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,e,tp):GetFirst() + e:SetLabel(rc:GetOriginalLevel()) + Duel.Release(rc,REASON_COST) + --You cannot Special Summon the turn you activate this card, except Psychic monsters + 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_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_PSYCHIC) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local cost_chk=e:GetLabel()==100 + e:SetLabel(0) + return cost_chk or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + local lv_diff=math.abs(sc:GetOriginalLevel()-e:GetLabel()) + if lv_diff>0 then + Duel.BreakEffect() + Duel.SetLP(tp,Duel.GetLP(tp)-lv_diff*1000) + end + end +end \ No newline at end of file diff --git a/official/c48739627.lua b/official/c48739627.lua new file mode 100644 index 0000000000..3f060c769e --- /dev/null +++ b/official/c48739627.lua @@ -0,0 +1,83 @@ +--無垢なる予幻視 +--Theorealize +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Look at the top card of your opponent's Deck and place it on either the top or the bottom of the Deck + 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) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Change the Monster Type and Attribute of 1 face-up monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.chngtg) + e2:SetOperation(s.chngop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MEDIUS_THE_INNOCENT} +function s.costfilter(c) + return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsAbleToGraveAsCost() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetDecktopGroup(1-tp,1) + if #g>0 then + Duel.ConfirmCards(tp,g) + Duel.Hint(HINT_SELECTMSG,tp,0) + local ac=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) + if ac==1 then Duel.MoveSequence(g:GetFirst(),1) end + end +end +function s.chngtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local race=Duel.AnnounceRace(tp,1,RACE_ALL) + local attr=tc:IsDifferentRace(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or tc:AnnounceAnotherAttribute(tp) + e:SetLabel(race,attr) +end +function s.chngop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if (not tc:IsFaceup() and tc:IsRelateToEffect(e)) then return end + local c=e:GetHandler() + local race,attr=e:GetLabel() + if tc:IsDifferentRace(race) then + --Change its Monster Type + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(race) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + tc:RegisterEffect(e1) + end + if tc:IsAttributeExcept(attr) then + --Change its Attribute + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(attr) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) + tc:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/official/c48882106.lua b/official/c48882106.lua new file mode 100644 index 0000000000..708321db3d --- /dev/null +++ b/official/c48882106.lua @@ -0,0 +1,59 @@ +--トックス・ボックス +--Toxic Boxfish +--Scripted by Hatter +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) + --Banish 1 card in either GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + 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) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) + c:RegisterEffect(e1) + --Negate the effects of 1 face-up card your opponent controls 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_REMOVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(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.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and c:IsControler(1-tp) and chkc:IsNegatable() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + 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(),RESET_PHASE|PHASE_END,true) + end +end \ No newline at end of file diff --git a/official/c49451215.lua b/official/c49451215.lua new file mode 100644 index 0000000000..00b5102437 --- /dev/null +++ b/official/c49451215.lua @@ -0,0 +1,93 @@ +--うかのみつねのおなり +--Ukanomitsune-no-Onari +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 LIGHT monsters, including a Beast monster + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),2,2,s.matcheck) + --Your opponent cannot target cards in the Field Zones with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_FZONE,LOCATION_FZONE) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --Set 1 Quick-Play Spell from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_LEAVE_GRAVE) + 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) + e2:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) + --Apply effects up to the number of cards in the Field Zones + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) + c:RegisterEffect(e3) +end +function s.matcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsRace,1,nil,RACE_BEAST,lc,sumtype,tp) +end +function s.setfilter(c) + return c:IsQuickPlaySpell() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsSSetable() then + Duel.SSet(tp,tc) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,1500) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local ct=Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE) + if ct==0 then return end + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + local b1=#g>0 + local b2=true + local b3=b1 and ct==2 + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}, + {b3,aux.Stringid(id,4)}) + local breakeffect=false + if op&1>0 then + --Destroy 1 card your opponent controls + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.HintSelection(sg) + Duel.Destroy(sg,REASON_EFFECT) + breakeffect=true + end + end + if op&2>0 then + --Inflict 1500 damage to your opponent + if breakeffect then Duel.BreakEffect() end + Duel.Damage(1-tp,1500,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c49604192.lua b/official/c49604192.lua new file mode 100644 index 0000000000..583fc46fcf --- /dev/null +++ b/official/c49604192.lua @@ -0,0 +1,44 @@ +--八雲断巳剣 +--Mitsurugi Tempest +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Make your opponent banish exactly 8 cards from their hand, Extra Deck, field, and/or GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(s.rmconfilter,tp,LOCATION_GRAVE,0,1,nil) end) + e1:SetCost(s.rmcost) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) + c:RegisterEffect(e1) +end +s.listed_names={19899073,55397172,13332685} +--"Ame no Murakumo no Mitsurugi", "Futsu no Mitama no Mitsurugi", "Ame no Habakiri no Mitsurugi" +s.listed_series={SET_MITSURUGI} +function s.rmconfilter(c) + return c:IsSetCard(SET_MITSURUGI) and c:IsRitualSpell() +end +function s.rmcostrescon(sg) + return sg:GetClassCount(Card.GetOriginalCodeRule)==3 +end +function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,false,s.rmcostrescon,nil,19899073,55397172,13332685) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsOriginalCodeRule,3,3,false,s.rmcostrescon,nil,19899073,55397172,13332685) + Duel.Release(g,REASON_COST) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,30459350) + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_EXTRA|LOCATION_GRAVE,8,nil,1-tp) end +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local p=1-tp + Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(p,Card.IsAbleToRemove,p,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_EXTRA|LOCATION_GRAVE,0,8,8,nil,p) + if #g==8 then + Duel.Remove(g,POS_FACEUP,REASON_RULE,PLAYER_NONE,p) + end +end \ No newline at end of file diff --git a/official/c49721684.lua b/official/c49721684.lua new file mode 100644 index 0000000000..a441101396 --- /dev/null +++ b/official/c49721684.lua @@ -0,0 +1,44 @@ +--巳剣之神鏡 +--Mitsurugi Mirror +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon any Reptile Ritual Monster from your hand or GY + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=function(c) return c:IsRace(RACE_REPTILE) end,matfilter=function(c) return c:IsRace(RACE_REPTILE) end,location=LOCATION_HAND|LOCATION_GRAVE}) + e1:SetCountLimit(1,id) + c:RegisterEffect(e1) + --Shuffle this card into the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_RELEASE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.tdcon) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_names={19899073,55397172,13332685} +--"Ame no Murakumo no Mitsurugi", "Futsu no Mitama no Mitsurugi", "Ame no Habakiri no Mitsurugi" +function s.tdconfilter(c,tp) + return c:IsPreviousCodeOnField(19899073,55397172,13332685) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) + and c:IsPreviousLocation(LOCATION_ONFIELD) +end +function s.tdcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.tdconfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) +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.HintSelection(c) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c49904658.lua b/official/c49904658.lua new file mode 100644 index 0000000000..6a936f2622 --- /dev/null +++ b/official/c49904658.lua @@ -0,0 +1,73 @@ +--久遠の神徒フリムニル +--Hrimnir the Divine Follower +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Set 1 Continuous Spell from your Deck, but send it to the GY during your opponent's End Phase + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.setcost) + e1:SetTarget(s.settg) + e1:SetOperation(s.setop) + c:RegisterEffect(e1) + --Special Summon this card, 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,3,true,nil,nil,RACE_FAIRY) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsRace,3,3,true,nil,nil,RACE_FAIRY) + Duel.Release(g,REASON_COST) +end +function s.setfilter(c) + return c:IsContinuousSpell() 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.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_STZONE) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + 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 + --Send it to the GY during your opponent's End Phase + aux.DelayedOperation(sc,PHASE_END,id,e,tp, + function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, + function() return Duel.IsTurnPlayer(1-tp) end, + 0,1,aux.Stringid(id,2) + ) + end +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/c52644170.lua b/official/c52644170.lua new file mode 100644 index 0000000000..9f3fc62cfa --- /dev/null +++ b/official/c52644170.lua @@ -0,0 +1,83 @@ +--メンタルクロス・デーモン +--Thought Cross Archfiend +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 of your banished Level 7 or lower Psychic monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Gain LP equal to the original ATK of 1 Tributed monster, and if you do, this card gains that much ATK until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end) + e2:SetCost(s.lpatkost) + e2:SetTarget(s.lpatktg) + e2:SetOperation(s.lpatkop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(7) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.atkfilter(c) + return c:GetTextAttack()>0 +end +function s.lpatkost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.atkfilter,1,false,nil,c) end + local g=Duel.SelectReleaseGroupCost(tp,s.atkfilter,1,1,false,nil,c) + Duel.Release(g,REASON_COST) + e:SetLabel(g:GetFirst():GetTextAttack()) +end +function s.lpatktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,e:GetLabel()) +end +function s.lpatkop(e,tp,eg,ep,ev,re,r,rp) + local lpgain=e:GetLabel() + local atk=Duel.Recover(tp,lpgain,REASON_EFFECT) + local c=e:GetHandler() + if atk>0 and c:IsFaceup() and c:IsRelateToEffect(e) then + --This card gains that much ATK until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(atk) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c53466722.lua b/official/c53466722.lua new file mode 100644 index 0000000000..cb8a7fbd2d --- /dev/null +++ b/official/c53466722.lua @@ -0,0 +1,51 @@ +--始祖の竜王 +--First of the Dragonlords +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Normal Monsters + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_NORMAL),3) + c:AddMustBeFusionSummoned() + --You can only control 1 "First of the Dragonlords" + c:SetUniqueOnField(1,0,id) + --Cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + c:RegisterEffect(e1) + --Unaffected by other monsters' effects + 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(function(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end) + c:RegisterEffect(e2) + --Destroy all Spells and Traps on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsSpellTrapEffect() end) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c53589300.lua b/official/c53589300.lua new file mode 100644 index 0000000000..16118c41a6 --- /dev/null +++ b/official/c53589300.lua @@ -0,0 +1,91 @@ +--創獄神ネルヴァ +--Nerva the Imprisoned Deity of Creation +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 "Artmegia" monsters + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ARTMEGIA),3,3) + c:AddMustFirstBeFusionSummoned() + c:SetSPSummonOnce(id) + --Must first be either Fusion Summoned, or Special Summoned (from your Extra Deck) in Defense Position by Tributing 3 monsters with different Types + 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+EFFECT_FLAG_SPSUM_PARAM) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_EXTRA) + e0:SetTargetRange(POS_FACEUP_DEFENSE,0) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --Cannot be destroyed by card effects while a card is in the Field Zone + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function() return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Make your "Artmegia" monster's effect become "Destroy all cards your opponent controls" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.chcon) + e2:SetTarget(s.chtg) + e2:SetOperation(s.chop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARTMEGIA} +function s.rescon(sg,e,tp) + return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 and sg:GetClassCount(Card.GetRace)==#sg +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetReleaseGroup(tp) + return aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetReleaseGroup(tp) + local mg=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) + if #mg==3 then + mg:KeepAlive() + e:SetLabelObject(mg) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.Release(g,REASON_COST|REASON_MATERIAL) + g:DeleteGroup() +end +function s.chcon(e,tp,eg,ep,ev,re,r,rp) + if not (re:IsMonsterEffect() and rp==tp) then return false end + local setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_SETCODES) + for _,set in ipairs(setcodes) do + if (SET_ARTMEGIA&0xfff)==(set&0xfff) and (SET_ARTMEGIA&set)==SET_ARTMEGIA then return true end + end + return false +end +function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end +end +function s.chop(e,tp,eg,ep,ev,re,r,rp) + local g=Group.CreateGroup() + Duel.ChangeTargetCard(ev,g) + Duel.ChangeChainOperation(ev,s.desop) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c54701958.lua b/official/c54701958.lua new file mode 100644 index 0000000000..91b6525030 --- /dev/null +++ b/official/c54701958.lua @@ -0,0 +1,59 @@ +--月光舞獅子神姫 +--Lunalight Liger Dancer +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Lunalight Leo Dancer" + 3 "Lunalight" monsters + Fusion.AddProcMixN(c,false,false,24550676,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT),3) + c:AddMustBeFusionSummoned() + --Unaffected by card effects, except "Lunalight" cards + 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(function(e,te) return not te:GetHandler():IsSetCard(SET_LUNALIGHT) end) + c:RegisterEffect(e1) + --Can make a second attack during each Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_EXTRA_ATTACK) + e2:SetValue(1) + c:RegisterEffect(e2) + --Destroy all your opponent's Special Summoned monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCost(s.descost) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_series={SET_LUNALIGHT} +s.material_setcode={SET_LUNALIGHT} +s.listed_names={24550676} --"Lunalight Leo Dancer" +function s.descostfilter(c,tp) + return c:IsSetCard(SET_LUNALIGHT) and c:IsAbleToGraveAsCost() +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsSpecialSummoned,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(Card.IsSpecialSummoned,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c55423549.lua b/official/c55423549.lua new file mode 100644 index 0000000000..c511ccd81c --- /dev/null +++ b/official/c55423549.lua @@ -0,0 +1,92 @@ +--黒き魔族-レオ・ウィザード +--Leo Wizard, the Dark Mage +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Monsters whose original Level is 4 or lower with more than 1350 ATK and/or DEF require 1 Tribute to Normal Summon from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) + e1:SetCondition(s.nsumcon) + e1:SetTarget(aux.FieldSummonProcTg(s.nsumtg,s.nsumcost)) + e1:SetOperation(s.nsumop) + e1:SetValue(SUMMON_TYPE_TRIBUTE) + c:RegisterEffect(e1) + --Destroy a LIGHT monster that this card is battling + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_START) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Add 1 monster with 1350 ATK from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,id) + e3:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +function s.nsumcon(e,c,minc) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetReleaseGroup(tp) + return aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) +end +function s.nsumtg(e,c) + return c:GetOriginalLevel()<=4 and (c:GetAttack()>1350 or c:GetDefense()>1350) +end +function s.nsumcost(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetReleaseGroup(tp) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_RELEASE,nil,nil,true) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.nsumop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + c:SetMaterial(g) + Duel.Release(g,REASON_COST|REASON_SUMMON|REASON_MATERIAL) + g:DeleteGroup() +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_LIGHT) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + if bc and bc:IsRelateToBattle() then + Duel.Destroy(bc,REASON_EFFECT) + end +end +function s.thfilter(c) + return c:IsAttack(1350) 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/official/c58761791.lua b/official/c58761791.lua new file mode 100644 index 0000000000..e6da7c0315 --- /dev/null +++ b/official/c58761791.lua @@ -0,0 +1,56 @@ +--誤出荷 +--Shipment Error +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --An activated effect becomes "Your opponent takes 1 card from their Deck for you to add to your hand, and you must keep that card revealed" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(s.changecon) + e1:SetTarget(s.changetg) + e1:SetOperation(s.changeop) + c:RegisterEffect(e1) +end +function s.changecon(e,tp,eg,ep,ev,re,r,rp) + if re:IsHasCategory(CATEGORY_SEARCH) or re:IsHasCategory(CATEGORY_DRAW) then return true end + local ex1,g1,gc1,dp1,loc1=Duel.GetOperationInfo(ev,CATEGORY_TOHAND) + local ex2,g2,gc2,dp2,loc2=Duel.GetPossibleOperationInfo(ev,CATEGORY_TOHAND) + local g=Group.CreateGroup() + if g1 then g:Merge(g1) end + if g2 then g:Merge(g2) end + return (((loc1 or 0)|(loc2 or 0))&LOCATION_DECK)>0 or (#g>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK)) +end +function s.changetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,1-rp,LOCATION_DECK,0,1,nil) end +end +function s.changeop(e,tp,eg,ep,ev,re,r,rp) + local g=Group.CreateGroup() + Duel.ChangeTargetCard(ev,g) + Duel.ChangeChainOperation(ev,s.replaceop) +end +function s.replaceop(e,tp,eg,ep,ev,re,r,rp) + local opp=1-tp + Duel.Hint(HINT_SELECTMSG,opp,aux.Stringid(id,1)) + local sc=Duel.SelectMatchingCard(opp,Card.IsAbleToHand,opp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,tp,REASON_EFFECT)>0 then + local c=e:GetHandler() + --Keep it revealed + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_PUBLIC) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + --During the End Phase of this turn, shuffle it into the Deck, and if you do, draw 1 card + aux.DelayedOperation(sc,PHASE_END,id,e,tp, + function() + if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK) then + Duel.Draw(tp,1,REASON_EFFECT) + end + end + ) + end +end \ No newline at end of file diff --git a/official/c59983249.lua b/official/c59983249.lua new file mode 100644 index 0000000000..33b7421772 --- /dev/null +++ b/official/c59983249.lua @@ -0,0 +1,151 @@ +--帝王の極致 +--Culmination of the Monarchs +--Scripted by The Razgriz +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) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_MONARCH} +function s.effcostfilter(c) + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local cost_skip=e:GetLabel()~=-100 + --Destroy 1 monster on the field + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + --Destroy up to 2 Spells/Traps on the field + local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+1)) + and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + --Discard 1 random card from your opponent's hand + local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+2)) + and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT) + --Destroy 1 face-down card on the field + local b4=(cost_skip or not Duel.HasFlagEffect(tp,id+3)) + and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) + --Place 1 card on the field on top of the Deck + local b5=(cost_skip or not Duel.HasFlagEffect(tp,id+4)) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + --Banish 1 card on the field + local b6=(cost_skip or not Duel.HasFlagEffect(tp,id+5)) + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + if chk==0 then e:SetLabel(0) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) + and (b1 or b2 or b3 or b4 or b5 or b6) end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}, + {b4,aux.Stringid(id,4)}, + {b5,aux.Stringid(id,5)}, + {b6,aux.Stringid(id,6)}) + e:SetLabel(op) + if op==1 then + --Destroy 1 monster on the field + e:SetCategory(CATEGORY_DESTROY) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + elseif op==2 then + --Destroy up to 2 Spells/Traps on the field + e:SetCategory(CATEGORY_DESTROY) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + elseif op==3 then + --Discard 1 random card from your opponent's hand + e:SetCategory(CATEGORY_HANDES) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) + elseif op==4 then + --Destroy 1 face-down card on the field + e:SetCategory(CATEGORY_DESTROY) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+3,RESET_PHASE|PHASE_END,0,1) end + local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + elseif op==5 then + --Place 1 card on the field on top of the Deck + e:SetCategory(CATEGORY_TODECK) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+4,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD) + elseif op==6 then + --Banish 1 card on the field + e:SetCategory(CATEGORY_REMOVE) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+5,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Destroy 1 monster on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==2 then + --Destroy up to 2 Spells/Traps on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==3 then + --Discard 1 random card from your opponent's hand + local hg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,0,LOCATION_HAND,nil,REASON_EFFECT) + if #hg>0 then + local g=hg:RandomSelect(tp,1,1,nil) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) + end + elseif op==4 then + --Destroy 1 face-down card on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==5 then + --Place 1 card on the field on top of the Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) + end + elseif op==6 then + --Banish 1 card on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c60600821.lua b/official/c60600821.lua new file mode 100644 index 0000000000..2f5edf1912 --- /dev/null +++ b/official/c60600821.lua @@ -0,0 +1,104 @@ +--春 +--Spring +--scripted by Naim +local COUNTER_SEASON=0x214 +local s,id=GetID() +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_SEASON) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Select any number of your Main Monster Zones to make them unusuable + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_COUNTER) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1) + e1:SetTarget(s.countertg) + e1:SetOperation(s.counterop) + c:RegisterEffect(e1) + --Monsters you control gain 400 ATK for each Season Counter on this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_FZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetValue(function(e,c) return e:GetHandler():GetCounter(COUNTER_SEASON)*400 end) + c:RegisterEffect(e2) + --Place 1 Field Spell from your Deck that you can place a Season Counter on face-up on your field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_COUNTER) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e3:SetTarget(s.pltg) + e3:SetOperation(s.plop) + c:RegisterEffect(e3) +end +s.counter_place_list={COUNTER_SEASON} +function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) + local max_zones=Duel.GetLocationCount(tp,LOCATION_MZONE) + if chk==0 then return max_zones>0 end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,max_zones,tp,COUNTER_SEASON) +end +function s.counterop(e,tp,eg,ep,ev,re,r,rp) + local max_zones=Duel.GetLocationCount(tp,LOCATION_MZONE) + if max_zones<=0 then return end + local ct=0 + local selected_zones=0 + repeat + ct=ct+1 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE) + local new_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,selected_zones) + selected_zones=selected_zones|new_zone + until (ct>=max_zones or not Duel.SelectYesNo(tp,aux.Stringid(id,2))) + local c=e:GetHandler() + c:AddCounter(COUNTER_SEASON,ct) + --Those zones cannot be used while this card is on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_DISABLE_FIELD) + e1:SetRange(LOCATION_FZONE) + e1:SetOperation(function() return selected_zones end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) +end +function s.plfilter(c) + return c:IsFieldSpell() and c:IsCanAddCounter(COUNTER_SEASON,1,false,LOCATION_ONFIELD) and not c:IsForbidden() +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler():GetCounter(COUNTER_SEASON),tp,COUNTER_SEASON) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if not sc then return end + local c=e:GetHandler() + local ct=c:GetCounter(COUNTER_SEASON) + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + if Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then + --Cannot activate its effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3302) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + if ct>0 then + sc:AddCounter(COUNTER_SEASON,ct) + end + end +end \ No newline at end of file diff --git a/official/c60946049.lua b/official/c60946049.lua new file mode 100644 index 0000000000..3702b4d157 --- /dev/null +++ b/official/c60946049.lua @@ -0,0 +1,83 @@ +--神芸学徒 グラフレア +--Artmegia Graphlare +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --The first time this card would be destroyed by battle 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(1) + e1:SetValue(function(e,re,r) return (r&REASON_BATTLE)==REASON_BATTLE end) + c:RegisterEffect(e1) + --Special Summon this card from your hand, then you can Set 1 "Artmegia" Spell from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Destroy 1 Spell/Trap your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(aux.NOT(s.quickdescon)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) + --This is a Quick Effect if you control 3 or more Monster Types + local e3a=e3:Clone() + e3a:SetType(EFFECT_TYPE_QUICK_O) + e3a:SetCode(EVENT_FREE_CHAIN) + e3a:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3a:SetCondition(s.quickdescon) + c:RegisterEffect(e3a) +end +s.listed_series={SET_ARTMEGIA} +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.setfilter(c) + return c:IsSetCard(SET_ARTMEGIA) and c:IsSpell() and c:IsSSetable() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SSet(tp,sg) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end +function s.quickdescon(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3 +end \ No newline at end of file diff --git a/official/c61168637.lua b/official/c61168637.lua new file mode 100644 index 0000000000..c313b0b2bd --- /dev/null +++ b/official/c61168637.lua @@ -0,0 +1,82 @@ +--リンクスレイヤー@イグニスター +--Linkslayer @Ignister +local s,id=GetID() +function s.initial_effect(c) + --If a Cyberse monster you control would be used as Link Material for an "@Ignister" Link Monster, this card in your hand can also be used as material + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_EXTRA_MATERIAL) + e1:SetRange(LOCATION_HAND) + e1:SetTargetRange(1,0) + e1:SetOperation(s.extracon) + e1:SetValue(s.extraval) + c:RegisterEffect(e1) + if s.flagmap==nil then + s.flagmap={} + end + if s.flagmap[c]==nil then + s.flagmap[c] = {} + end + --Destroy 1 Spell/Trap on the field, or 2 if this card on the field was used as material + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_BE_MATERIAL) + e2:SetCountLimit(1,id) + e2:SetCondition(s.descon) + e2:SetCost(Cost.Discard()) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_IGNISTER} +function s.extrafilter(c,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) +end +function s.extracon(c,e,tp,sg,mg,lc,og,chk) + return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsRace,1,og,RACE_CYBERSE) and sg:FilterCount(Card.HasFlagEffect,nil,id)<2 +end +function s.extraval(chk,summon_type,e,...) + local c=e:GetHandler() + if chk==0 then + local tp,sc=... + if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(SET_IGNISTER) or Duel.HasFlagEffect(tp,id) then + return Group.CreateGroup() + else + table.insert(s.flagmap[c],c:RegisterFlagEffect(id,0,0,1)) + return Group.FromCards(c) + end + elseif chk==1 then + local sg,sc,tp=... + if summon_type&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK and #sg>0 then + Duel.Hint(HINT_CARD,tp,id) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + end + elseif chk==2 then + for _,eff in ipairs(s.flagmap[c]) do + eff:Reset() + end + s.flagmap[c]={} + end +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + e:SetLabel(c:IsPreviousLocation(LOCATION_ONFIELD) and 1 or 0) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK +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+e:GetLabel(),nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c61822419.lua b/official/c61822419.lua new file mode 100644 index 0000000000..cfda863561 --- /dev/null +++ b/official/c61822419.lua @@ -0,0 +1,99 @@ +--咎を擁く魔瞳 +--Guilt Gripping Morganite +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Apply effects for the rest of the Duel + 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) + c:RegisterEffect(e1) + --Place 1 revealed "Morganite" card on the bottom of the Deck, then draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.tddrawcost) + e2:SetTarget(s.tddrawtg) + e2:SetOperation(s.tddrawop) + c:RegisterEffect(e2) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,0,0,1) + local c=e:GetHandler() + --You cannot activate monster effects in the hand + 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.aclimit) + Duel.RegisterEffect(e1,tp) + --You can Normal Summon Level 5 or higher monsters without Tributing. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,3)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_SUMMON_PROC) + e2:SetTargetRange(LOCATION_HAND,0) + e2:SetCondition(s.nontribcon) + e2:SetTarget(aux.FieldSummonProcTg(function(e,c) return c:IsLevelAbove(5) end)) + Duel.RegisterEffect(e2,tp) + --You do not pay LP to activate Spell/Trap Cards + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EFFECT_LPCOST_CHANGE) + e3:SetTargetRange(1,0) + e3:SetValue(s.nolpcost) + Duel.RegisterEffect(e3,tp) +end +s.listed_series={SET_MORGANITE} +function s.aclimit(e,re,tp) + local rc=re:GetHandler() + return rc and rc:IsLocation(LOCATION_HAND) and re:IsMonsterEffect() +end +function s.nontribcon(e,c,minc) + if c==nil then return true end + return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 +end +function s.nolpcost(e,re,rp,val) + return (re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSpellTrap()) and 0 or val +end +function s.revealfilter(c) + return c:IsSetCard(SET_MORGANITE) and not c:IsPublic() +end +function s.tddrawcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil) end + Duel.Remove(c,POS_FACEUP,REASON_COST) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + Duel.SetTargetCard(rc) +end +function s.tddrawtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetLabelObject(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.tddrawop(e,tp,eg,ep,ev,re,r,rp) + local rc=e:GetLabelObject() + if rc:IsRelateToEffect(e) and Duel.SendtoDeck(rc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 + and Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c61944066.lua b/official/c61944066.lua new file mode 100644 index 0000000000..e170655ffd --- /dev/null +++ b/official/c61944066.lua @@ -0,0 +1,125 @@ +--Recettes de Nouvellez~ヌーベルズのレシピ帳~ +--Nouvelles Recipe Book "Recettes de Nouvellez" +--scripted by Naim +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) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + c:RegisterEffect(e0) + --While you control a "Nouvelles" Monster Card, all face-up monsters your opponent controls are changed to Attack Position + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_SET_POSITION) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetCondition(s.atkposcon) + e1:SetValue(POS_FACEUP_ATTACK) + c:RegisterEffect(e1) + --Each time a monster(s) is Tributed by a Ritual Monster's effect, your opponent pays 850 LP + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_RELEASE) + e2:SetRange(LOCATION_SZONE) + e2:SetCondition(s.lpcon) + e2:SetOperation(s.lpop) + c:RegisterEffect(e2) + --Add 1 "Recipe" or "Nouvelles" card from your Deck to your hand, except a Continuous Spell, and if you do, increase the target's Level by 1 + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_CUSTOM+id) + e3a:SetRange(LOCATION_SZONE) + e3a:SetCountLimit(1) + e3a:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end) + e3a:SetTarget(s.thtg) + e3a:SetOperation(s.thop) + c:RegisterEffect(e3a) + local g=Group.CreateGroup() + g:KeepAlive() + e3a:SetLabelObject(g) + --Register your Special Summoned Ritual Monsters + local e3b=Effect.CreateEffect(c) + e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + e3b:SetRange(LOCATION_SZONE) + e3b:SetLabelObject(e3a) + e3b:SetOperation(s.regsumop) + c:RegisterEffect(e3b) +end +s.listed_seris={SET_NOUVELLES,SET_RECIPE} +function s.nouvfilter(c) + return c:IsSetCard(SET_NOUVELLES) and c:IsMonsterCard() and c:IsFaceup() +end +function s.atkposcon(e) + return Duel.IsExistingMatchingCard(s.nouvfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) +end +function s.lpcon(e,tp,eg,ep,ev,re,r,rp) + return re and re:IsMonsterEffect() and re:GetHandler():IsRitualMonster() + and r&REASON_EFFECT>0 and eg:IsExists(Card.IsMonster,1,nil) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + if Duel.CheckLPCost(1-tp,850) then + Duel.Hint(HINT_CARD,1-tp,id) + Duel.PayLPCost(1-tp,850) + end +end +function s.lvfilter(c,e,tp) + return c:IsRitualMonster() and c:IsSummonPlayer(tp) and c:IsFaceup() + and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) and c:HasLevel() +end +function s.thfilter(c) + return c:IsSetCard({SET_RECIPE,SET_NOUVELLES}) and not c:IsContinuousSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=e:GetLabelObject():Filter(s.lvfilter,nil,e,tp) + if chkc then return g:IsContains(chkc) and s.lvfilter(chkc,e,tp) end + if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) 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_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tc,1,tp,1) +end +function s.thop(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) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Increase that monster's Level by 1 + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + end +end +function s.regsumop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.lvfilter,nil,e,tp) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end \ No newline at end of file diff --git a/official/c62006866.lua b/official/c62006866.lua new file mode 100644 index 0000000000..d21ea08266 --- /dev/null +++ b/official/c62006866.lua @@ -0,0 +1,108 @@ +--ズバババナイト +--Zubababa Knight +--Scripted by The Razgriz +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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Add 1 "Gagaga" monster from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.gathcon) + e3:SetTarget(s.gathtg) + e3:SetOperation(s.gathop) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EVENT_REMOVE) + c:RegisterEffect(e4) +end +s.listed_series={SET_ZUBABA,SET_GAGAGA} +s.listed_names={id} +function s.zbthfilter(c) + return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) +end +function s.desfilter(c) + return c:IsLevelBelow(4) and c:IsDefensePos() and c:IsFaceup() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) + local b1=Duel.IsExistingMatchingCard(s.zbthfilter,tp,LOCATION_DECK,0,1,nil) + local b2=#g>0 + 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==1 then + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_DESTROY) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Add 1 "Zubaba" monster from your Deck to your hand, except "Zubababa Knight", and if you do, this card's Level becomes that added monster's + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.zbthfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sc) + local lv=sc:GetLevel() + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsLevel(lv) then + --This card's Level becomes the added monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + end + elseif op==2 then + --Destroy 1 Level 4 or lower Defense Position monster your opponent controls + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.gathcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.gathfilter(c) + return c:IsSetCard(SET_GAGAGA) and c:IsMonster() and c:IsAbleToHand() +end +function s.gathtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.gathfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.gathop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.gathfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c62606805.lua b/official/c62606805.lua new file mode 100644 index 0000000000..82119965d4 --- /dev/null +++ b/official/c62606805.lua @@ -0,0 +1,70 @@ +--メンタルプロシージャー +--Mind Procedure +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card you control would be used as Synchro Material for a Psychic monster, you can treat it as a non-Tuner + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_NONTUNER) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,sc) return sc:IsRace(RACE_PSYCHIC) end) + c:RegisterEffect(e1) + --Add 1 "Teleport" Normal or Quick-Play Spell from your Deck or GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.PayLP(2000)) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:IsMonsterEffect() end) + c:RegisterEffect(e3) + --Special Summn this card + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_REMOVE) + e4:SetCountLimit(1,id) + e4:SetCost(Cost.PayLP(1000)) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +s.listed_series={SET_TELEPORT} +function s.thfilter(c) + return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c62767644.lua b/official/c62767644.lua new file mode 100644 index 0000000000..a69742a8b2 --- /dev/null +++ b/official/c62767644.lua @@ -0,0 +1,69 @@ +--灰滅の劫火 +--Inferno of the Ashened +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can place 1 "Obsidim, the Ashened City" from your Deck face-up in either Field Zone + 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,EFFECT_COUNT_CODE_OATH) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Send 1 face-up card your opponent controls to the GY and Special Summon 1 Level 8 or higher DARK Pyro monster from your GY to your opponent's field in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tgsptg) + e2:SetOperation(s.tgspop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_OBSIDIM_ASHENED_CITY} +function s.plfilter(c) + return c:IsCode(CARD_OBSIDIM_ASHENED_CITY) and not c:IsForbidden() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_DECK,0,nil,tp) + if Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc then + local op=Duel.SelectOption(tp,false,aux.Stringid(id,3),aux.Stringid(id,4)) + local target_player=op==0 and tp or 1-tp + Duel.MoveToField(sc,tp,target_player,LOCATION_FZONE,POS_FACEUP,true) + end + end +end +function s.tgfilter(c,tp) + return c:IsFaceup() and c:IsAbleToGrave() and Duel.GetMZoneCount(1-tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsLevelAbove(8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_PYRO) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) +end +function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g1=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g2=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,tp,0) +end +function s.tgspop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + local fg,gg=tg:Split(Card.IsLocation,nil,LOCATION_ONFIELD) + if #fg>0 and Duel.SendtoGrave(fg,REASON_EFFECT)>0 and fg:GetFirst():IsLocation(LOCATION_GRAVE) + and #gg>0 then + Duel.SpecialSummon(gg,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c62880279.lua b/official/c62880279.lua new file mode 100644 index 0000000000..5c00900495 --- /dev/null +++ b/official/c62880279.lua @@ -0,0 +1,96 @@ +--ドドドドウォリアー +--Dodododo Warrior +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Zubaba" monster 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:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_REMOVE) + c:RegisterEffect(e3) +end +s.listed_series={SET_DODODO,SET_ZUBABA} +function s.spcostfilter(c) + return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToGraveAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then + --Its Level becomes 4 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(4) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + --Its ATK becomes 1800 + local e2=e1:Clone() + e2:SetCode(EFFECT_SET_ATTACK) + e2:SetValue(1800) + c:RegisterEffect(e2) + end + Duel.SpecialSummonComplete() + --You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz 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 not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.thfilter(c) + return c:IsSetCard(SET_ZUBABA) 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 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c63899196.lua b/official/c63899196.lua new file mode 100644 index 0000000000..7210fd5e42 --- /dev/null +++ b/official/c63899196.lua @@ -0,0 +1,78 @@ +--帝王の策略 +--Scheme of the Monarchs +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Send 1 "Monarch" Spell/Trap from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --Add 1 monster with 2400 ATK/1000 DEF from your Deck or GY to your hand, then you can Normal Summon 1 listed monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_REMOVE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MONARCH} +s.listed_names={id,51945556,4929256,26205777,60229110,73125233,9748752} +--"Zaborg the Thunder Monarch", "Mobius the Frost Monarch", "Thestalos the Firestorm Monarch", "Granmarg the Rock Monarch", "Raiza the Storm Monarch", "Caius the Shadow Monarch" +function s.tgfilter(c) + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsCode(id) 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 +function s.attrfilter(c,tp) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetAttribute()) +end +function s.thfilter(c,attr) + return c:IsAttribute(attr) and c:IsAttack(2400) and c:IsDefense(1000) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.attrfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.attrfilter,tp,0,LOCATION_MZONE,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.attrfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.sumfilter(c) + return c:IsSummonable(true,nil) and c:IsCode(51945556,4929256,26205777,60229110,73125233,9748752) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end + 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,tc:GetAttribute()):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + Duel.ShuffleDeck(tp) + local sg=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) + if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sumc=sg:Select(tp,1,1,nil):GetFirst() + Duel.BreakEffect() + Duel.Summon(tp,sumc,true,nil) + end + end +end \ No newline at end of file diff --git a/official/c66646087.lua b/official/c66646087.lua new file mode 100644 index 0000000000..0f6d45c454 --- /dev/null +++ b/official/c66646087.lua @@ -0,0 +1,90 @@ +--超量妖精ゼータン +--Super Quantal Fairy Zetan +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card, then you can make its Level become the Level of 1 "Super Quant" monster you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.hspcon) + e1:SetTarget(s.hsptg) + e1:SetOperation(s.hspop) + c:RegisterEffect(e1) + --Special Summon 1 "Super Quant" monster from your Deck, except "Super Quantal Fairy Zetan" + 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.AND(Cost.SelfTribute,s.dspcost)) + e2:SetTarget(s.dsptg) + e2:SetOperation(s.dspop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_SUPER_QUANT} +function s.hspconfilter(c) + return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) +end +function s.hspcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.hspconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) +end +function s.lvfilter(c,lv) + return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and c:HasLevel() and not c:IsLevel(lv) +end +function s.hspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end + local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,c,c:GetLevel()) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local sc=g:Select(tp,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + Duel.BreakEffect() + --This card's Level becomes that monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(sc:GetLevel()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end +function s.dspcostfilter(c,e,tp) + return c:IsSetCard(SET_SUPER_QUANT) and not c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() + and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,c,e,tp) +end +function s.dspfilter(c,e,tp) + return c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.dspcostfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.dspcostfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + Duel.SendtoGrave(g,REASON_COST) +end +function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.dspop(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.dspfilter,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 \ No newline at end of file diff --git a/official/c67584223.lua b/official/c67584223.lua new file mode 100644 index 0000000000..ce0bbc65de --- /dev/null +++ b/official/c67584223.lua @@ -0,0 +1,98 @@ +--源帝従騎テセラ +--Tessera the Prime Squire +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --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) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Tribute Summon 1 monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tribsumtg) + e2:SetOperation(s.tribsumop) + c:RegisterEffect(e2) + --Special Summon 1 monster with 800 ATK/1000 DEF from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MONARCH} +function s.selfspcostfilter(c) + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsPublic() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_HAND,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) +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 +end +function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,nil,true,nil,1) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) +end +function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,1,nil,true,nil,1):GetFirst() + if tc then + Duel.SummonOrSet(tp,tc,true,nil,1) + end +end +function s.spfilter(c,e,tp) + return c:IsAttack(800) and c:IsDefense(1000) 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) + --You cannot Special Summon from the Extra Deck for the rest of 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_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) + 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 \ No newline at end of file diff --git a/official/c67768675.lua b/official/c67768675.lua new file mode 100644 index 0000000000..f41113ef42 --- /dev/null +++ b/official/c67768675.lua @@ -0,0 +1,90 @@ +--正義の伝説 カイバーマン +--Legend of Justice Kaibaman +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Show 3 "Blue-Eyes White Dragon" in your hand/Deck/field/GY, then Special Summon 1 "Blue-Eyes White Dragon" from your hand, Deck, or GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Add 1 "Blue-Eyes" monster 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_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.thcon) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_BLUEEYES_W_DRAGON} +s.listed_series={SET_BLUE_EYES} +function s.showfilter(c) + return c:IsCode(CARD_BLUEEYES_W_DRAGON) and (c:IsFaceup() or not c:IsOnField()) +end +function s.spfilter(c,e,tp) + return c:IsCode(CARD_BLUEEYES_W_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.IsExistingMatchingCard(s.showfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD|LOCATION_GRAVE,0,3,nil) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local rg=Duel.GetMatchingGroup(s.showfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if #rg>3 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + rg=Duel.SelectMatchingCard(tp,s.showfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD|LOCATION_GRAVE,0,3,3,nil) + end + if #rg==3 then + local fieldgraveg,handdeckg=rg:Split(Card.IsLocation,nil,LOCATION_ONFIELD|LOCATION_GRAVE) + if #fieldgraveg>0 then Duel.HintSelection(fieldgraveg) end + if #handdeckg>0 then Duel.ConfirmCards(1-tp,handdeckg) end + if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then Duel.ShuffleHand(tp) end + if rg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + 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_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.thconfilter(c,tp) + return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsFaceup() and c:IsSummonPlayer(tp) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.thconfilter,1,nil,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_BLUE_EYES) 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 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c74011784.lua b/official/c74011784.lua new file mode 100644 index 0000000000..cce5fb2177 --- /dev/null +++ b/official/c74011784.lua @@ -0,0 +1,85 @@ +--アルトメギア・バーニッシュ-改変- +--Artmegia Banish - Change +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Place 1 "Artmegia the Academy City of Divine Arts" from your Deck or GY face-up in your Field Zone + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Negate an attack targeting your "Artmegia" monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.negcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MEDIUS_THE_INNOCENT,74733322,id} --"Artmegia the Academy City of Divine Arts" +s.listed_series={SET_ARTMEGIA} +function s.plthfilter(c,tohand_chk) + return (c:IsCode(74733322) and not c:IsForbidden()) or (tohand_chk and c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToHand() and c:IsLocation(LOCATION_DECK) and not c:IsCode(id)) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,74733322),tp,LOCATION_ONFIELD,0,1,nil) + return Duel.IsExistingMatchingCard(s.plthfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tohand_chk) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tohand_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,74733322),tp,LOCATION_ONFIELD,0,1,nil) + local hint_desc=tohand_chk and aux.Stringid(id,2) or HINTMSG_TOFIELD + Duel.Hint(HINT_SELECTMSG,tp,hint_desc) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plthfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tohand_chk):GetFirst() + if not sc then return end + if sc:IsCode(74733322) then + if not tohand_chk then + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + else + aux.ToHandOrElse(sc,tp, + function() return tohand_chk and not sc:IsForbidden() end, + function() Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) end, + aux.Stringid(id,3) + ) + end + else + Duel.SendtoHand(sc,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sc) + end +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetAttackTarget() + return bc and bc:IsSetCard(SET_ARTMEGIA) and bc:IsControler(tp) and bc:IsFaceup() +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spfilter(c,e,tp) + return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end diff --git a/official/c74271714.lua b/official/c74271714.lua new file mode 100644 index 0000000000..c200019702 --- /dev/null +++ b/official/c74271714.lua @@ -0,0 +1,73 @@ +--フィッシュアンドビッズ +--Fish and Bids +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Take 2 Fish monsters from your Deck and either banish both or send both to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(function() return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end) + e1:SetCost(s.rmtgcost) + e1:SetTarget(s.rmtgtg) + e1:SetOperation(s.rmtgop) + c:RegisterEffect(e1) +end +function s.rmtgcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.rmtgfilter(c) + return c:IsRace(RACE_FISH) and (c:IsAbleToRemove() or c:IsAbleToGrave()) +end +function s.rescon(sg) + return sg:FilterCount(Card.IsAbleToRemove,nil)==2 or sg:FilterCount(Card.IsAbleToGrave,nil)==2 +end +function s.rmtgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.rmtgfilter,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) +end +function s.rmtgop(e,tp,eg,ep,ev,re,r,rp) + local oppo=1-tp + local hg=Duel.GetMatchingGroup(Card.IsAbleToRemove,oppo,LOCATION_HAND,0,nil,oppo) + --Your opponent can banish 2 cards from their hand + if #hg>=2 and Duel.SelectYesNo(oppo,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,oppo,HINTMSG_REMOVE) + local hsg=hg:Select(oppo,2,2,nil) + return #hsg==2 and Duel.Remove(hsg,POS_FACEUP,REASON_EFFECT,PLAYER_NONE,oppo)==2 + end + --If they do not, take 2 Fish monsters from your Deck and either banish both or send both to the GY + local g=Duel.GetMatchingGroup(s.rmtgfilter,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 + local b1=sg:FilterCount(Card.IsAbleToRemove,nil)==2 + local b2=sg:FilterCount(Card.IsAbleToGrave,nil)==2 + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + if op==1 then + Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) + elseif op==2 then + Duel.SendtoGrave(sg,REASON_EFFECT) + end + end + --You cannot Special Summon for the rest of this turn, except Fish monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,5)) + 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 not c:IsRace(RACE_FISH) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c74733322.lua b/official/c74733322.lua new file mode 100644 index 0000000000..03b2320a0f --- /dev/null +++ b/official/c74733322.lua @@ -0,0 +1,93 @@ +--神芸学都アルトメギア +--Artmegia the Academy City of Divine Arts +--Scripted by Hatter +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 Normal Summon 1 "Medius the Innocent" in addition to your Normal Summon/Set + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e1:SetRange(LOCATION_FZONE) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_MEDIUS_THE_INNOCENT)) + c:RegisterEffect(e1) + --Add 1 declared "Artmegia" monster 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_FZONE) + e2:SetCost(Cost.Discard(Card.IsSpellTrap)) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Track names declared to activate e2 + aux.GlobalCheck(s,function() + s.declared_names={} + s.declared_names[0]={} + s.declared_names[1]={} + aux.AddValuesReset(function() + s.declared_names={} + s.declared_names[0]={} + s.declared_names[1]={} + end) + end) +end +s.listed_names={CARD_MEDIUS_THE_INNOCENT} +s.listed_series={SET_ARTMEGIA} +function s.declfilter(c,exc1,exc2) + return c:IsSetCard(SET_ARTMEGIA) and c:IsMonster() and c:IsAbleToHand() + and (#exc1==0 or not c:IsCode(table.unpack(exc1))) and (#exc2==0 or not c:IsCode(table.unpack(exc2))) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local fcs=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_MZONE,0,nil):GetClass(Card.GetCode) + local g=Duel.GetMatchingGroup(s.declfilter,tp,LOCATION_DECK,0,nil,fcs,s.declared_names[tp]) + if chk==0 then return #g>0 end + s.announce_filter={} + for _,code in ipairs(g:GetClass(Card.GetCode)) do + if #s.announce_filter==0 then + table.insert(s.announce_filter,code) + table.insert(s.announce_filter,OPCODE_ISCODE) + else + table.insert(s.announce_filter,code) + table.insert(s.announce_filter,OPCODE_ISCODE) + table.insert(s.announce_filter,OPCODE_OR) + end + end + local ac=Duel.AnnounceCard(tp,table.unpack(s.announce_filter)) + table.insert(s.declared_names[tp],ac) + Duel.SetTargetParam(ac) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER) +end +function s.thfilter(c,code) + return c:IsCode(code) and c:IsMonster() and c:IsAbleToHand() +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,code) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + if not Duel.HasFlagEffect(tp,id) then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --Cannot Special Summon from outside the Extra Deck for the rest of this turn, except "Artmegia" monsters and "Medius the Innocent" + 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 not (c:IsSetCard(SET_ARTMEGIA) or c:IsCode(CARD_MEDIUS_THE_INNOCENT) or c:IsLocation(LOCATION_EXTRA)) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end diff --git a/official/c75493362.lua b/official/c75493362.lua new file mode 100644 index 0000000000..cf1ec544db --- /dev/null +++ b/official/c75493362.lua @@ -0,0 +1,70 @@ +--ヴィンゴルヴの祝福 +--Vingolf's Blessing +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can send 1 LIGHT Fairy monster from your Deck to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Fairy monsters you control gain 100 ATK for each Fairy monster in your field and GY + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return c:IsRace(RACE_FAIRY) end) + e2:SetValue(function(e,c) return 100*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_FAIRY),c:GetControler(),LOCATION_MZONE|LOCATION_GRAVE,0,nil) end) + c:RegisterEffect(e2) + --Special Summon 1 Level 4 or lower Fairy monster from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.tgfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToGrave() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + 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 +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c75956913.lua b/official/c75956913.lua new file mode 100644 index 0000000000..c92ca3e21f --- /dev/null +++ b/official/c75956913.lua @@ -0,0 +1,119 @@ +--ガガガ・ホープ・タクティクス +--Gagaga Hope Tactics +--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) + --"Utopia" and "Utopic" Xyz Monsters you control whose original Attribute is LIGHT cannot be destroyed by card effects, also your opponent cannot target them with 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(aux.TargetBoolFunction(s.utopixyzfilter)) + e1:SetValue(1) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetValue(aux.tgoval) + c:RegisterEffect(e2) + --Change the Levels of 2 face-up monsters you control, including a "Gagaga" monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_SZONE) + e3:SetCountLimit(1,{id,0}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) + --Destroy 1 card your opponent controls + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DESTROY) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + e4:SetRange(LOCATION_SZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.descon) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_series={SET_UTOPIC,SET_GAGAGA} +function s.utopixyzfilter(c) + return c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup() +end +function s.lvfilter(c,e) + return c:HasLevel() and c:IsFaceup() and c:IsCanBeEffectTarget(e) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_GAGAGA) +end +s.nlvfilter=aux.NOT(Card.IsLevel) +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local gg=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil,e) + if chk==0 then return aux.SelectUnselectGroup(gg,e,tp,2,2,s.rescon,0) end + local g1,g2=gg:Split(Card.IsSetCard,nil,SET_GAGAGA) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK) + local lv=Duel.AnnounceNumber(tp,s.get_declarable_levels(g1,g2)) + local g=gg:Match(s.nlvfilter,nil,lv) + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_TARGET) + Duel.SetTargetCard(tg) + e:SetLabel(lv) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,tg,2,tp,lv) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e):Filter(Card.IsFaceup,nil) + if #tg==0 then return end + local lv=e:GetLabel() + for tc in tg:Iter() do + if not tc:IsLevel(lv) then + --Its Level becomes the declared Level + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + end +end +function s.get_declarable_levels(g1,g2) + local opts={} + for lv=1,12 do + local ct=g1:FilterCount(s.nlvfilter,nil,lv) + if ct>1 or (ct>0 and g2:IsExists(s.nlvfilter,1,nil,lv)) then + table.insert(opts,lv) + end + end + return table.unpack(opts) +end +function s.desconfilter(c,tp) + return s.utopixyzfilter(c) and c:IsSummonPlayer(tp) and c:IsXyzSummoned() +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.desconfilter,1,nil,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +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/official/c76072561.lua b/official/c76072561.lua new file mode 100644 index 0000000000..1610320d3b --- /dev/null +++ b/official/c76072561.lua @@ -0,0 +1,90 @@ +--閃刀姫=ゼロ +--Sky Striker Ace - Zero +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 "Sky Striker Ace" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SKY_STRIKER_ACE),2) + --You can only Special Summon "Sky Striker Ace - Zero(s)" once per turn + c:SetSPSummonOnce(id) + --Cannot be used as Link Material + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) + e0:SetValue(1) + c:RegisterEffect(e0) + --Add 1 "Sky Striker" Spell from your Deck or GY to your hand + 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:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon both 1 "Sky Striker Ace - Raye" and 1 "Sky Striker Ace - Roze" from your Deck and/or GY, then you can destroy 1 card on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfTribute) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SKY_STRIKER_ACE,SET_SKY_STRIKER} +s.listed_names={id,26077387,37351133} --"Sky Striker Ace - Raye", "Sky Striker Ace - Roze" +function s.thfilter(c) + return c:IsSetCard(SET_SKY_STRIKER) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp) + return c:IsCode(26077387,37351133) 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 + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) + return Duel.GetMZoneCount(tp,e:GetHandler())>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,0) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +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)<2 then return end + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) + if #g<2 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_SPSUMMON) + if #sg==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)==2 + and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c76725398.lua b/official/c76725398.lua new file mode 100644 index 0000000000..2d2bd43457 --- /dev/null +++ b/official/c76725398.lua @@ -0,0 +1,63 @@ +--巳剣之勾玉 +--Mitsurugi Magatama +--Scripted by Hatter +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,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_MITSURUGI} +s.ritparams={ + lvtype=RITPROC_GREATER, + filter=aux.FilterBoolFunction(Card.IsSetCard,SET_MITSURUGI), + matfilter=aux.FilterBoolFunction(Card.IsLocation,LOCATION_MZONE) +} +function s.rescon(sg,tp) + return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,sg) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end + local b1=Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,s.rescon,nil,RACE_REPTILE) + local b2=Ritual.Target(s.ritparams)(e,tp,eg,ep,ev,re,r,rp,0) + 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(CATEGORY_DESTROY) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + local rg=Duel.SelectReleaseGroupCost(tp,Card.IsRace,1,1,false,s.rescon,nil,RACE_REPTILE) + Duel.Release(rg,REASON_COST) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e:SetProperty(0) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Destroy 1 card your opponent controls + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + elseif op==2 then + --Ritual Summon1 "Mitsurugi" Ritual Monster from your hand, by Tributing monsters you control + Ritual.Operation(s.ritparams)(e,tp,eg,ep,ev,re,r,rp) + end +end \ No newline at end of file diff --git a/official/c76948970.lua b/official/c76948970.lua new file mode 100644 index 0000000000..fa60308884 --- /dev/null +++ b/official/c76948970.lua @@ -0,0 +1,83 @@ +--巳剣之皇子 小碓 +--Mitsurugi no Miko, Wousu +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by Tributing 1 other Reptile mosnter from your hand and 1 monster your opponent controls + 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,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Discard 1 card, and if you do, add this card to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_RELEASE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +function s.spconfilter(c,tp) + return (c:IsRace(RACE_REPTILE) or c:IsControler(1-tp)) and c:IsReleasable() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND,LOCATION_MZONE,c,tp) + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND,LOCATION_MZONE,c,tp) + local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_RELEASE,nil,nil,true) + if #g>0 then + g:KeepAlive() + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if not g then return end + Duel.Release(g,REASON_COST) + g:DeleteGroup() + --You cannot Special Summon nor activate monster effects for the rest of this turn, except Reptile 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_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_REPTILE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetTarget(aux.TRUE) + e2:SetValue(function(e,re) return re:IsMonsterEffect() and not re:GetHandler():IsRace(RACE_REPTILE) end) + Duel.RegisterEffect(e2,tp) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) + and c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + 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 Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD)>0 and c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,c) + end +end \ No newline at end of file diff --git a/official/c77894049.lua b/official/c77894049.lua new file mode 100644 index 0000000000..714abbcf78 --- /dev/null +++ b/official/c77894049.lua @@ -0,0 +1,80 @@ +--VS ロックス +--Vanquish Soul Rocks +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2+ Level 4 "Vanquish Soul" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_VANQUISH_SOUL),4,2,s.ovfilter,aux.Stringid(id,0),Xyz.InfiniteMats,s.xyzop) + --All monsters your opponent controls lose 800 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetCondition(s.attrcon(ATTRIBUTE_DARK)) + e1:SetValue(-800) + c:RegisterEffect(e1) + --"Vanquish Soul" monsters you control gain 1000 ATK + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetCondition(s.attrcon(ATTRIBUTE_FIRE)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VANQUISH_SOUL)) + e2:SetValue(1000) + c:RegisterEffect(e2) + --Destroy 1 card your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(s.attrcon(ATTRIBUTE_EARTH)) + e3:SetCost(Cost.Detach(1)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) + --Track battles involving "Vanquish Soul" monsters + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_BATTLED) + ge1:SetOperation(s.regop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_names={28168628} --"Rock of the Vanquisher" +s.listed_series={SET_VANQUISH_SOUL} +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local a,b=Duel.GetBattleMonster(0) + if (a and a:IsSetCard(SET_VANQUISH_SOUL)) or (b and b:IsSetCard(SET_VANQUISH_SOUL)) then + Duel.RegisterFlagEffect(0,id+1,RESET_PHASE|PHASE_END,0,1) + end +end +function s.ovfilter(c,tp,lc) + return (c:IsSetCard(SET_VANQUISH_SOUL,lc,SUMMON_TYPE_XYZ,tp) or c:IsCode(28168628)) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.HasFlagEffect(0,id+1) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.attrcon(attr) + return function(e) + return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,attr) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if chk==0 then return #g>0 end + 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,nil,tp,0,LOCATION_ONFIELD,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/official/c80073414.lua b/official/c80073414.lua new file mode 100644 index 0000000000..c1afbda78e --- /dev/null +++ b/official/c80073414.lua @@ -0,0 +1,74 @@ +--アブソリュートサイキッカー +--Absolute Axon Kicker +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Psychic Synchro Monster + 1 Synchro Monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO)) + c:AddMustFirstBeFusionSummoned() + --Banish all face-up cards your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + 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():IsFusionSummoned() end) + e1:SetCost(Cost.PayLP(2000)) + e1:SetTarget(s.rmvtg) + e1:SetOperation(s.rmvop) + c:RegisterEffect(e1) + --Cannot be destroyed by card effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetRange(LOCATION_MZONE) + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetValue(1) + c:RegisterEffect(e2) + --Special Summon 1 Level 10 Psychic Fusion Monster from your Extra Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,id) + e3:SetCondition(aux.exccon) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.miracle_synchro_fusion=true +function s.matfilter(c,fc,sumtype,tp) + return c:IsType(TYPE_SYNCHRO,fc,sumtype,tp) and c:IsRace(RACE_PSYCHIC,fc,sumtype,tp) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsLevel(10) and c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc then + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end + end +end \ No newline at end of file diff --git a/official/c81196066.lua b/official/c81196066.lua new file mode 100644 index 0000000000..b574592641 --- /dev/null +++ b/official/c81196066.lua @@ -0,0 +1,101 @@ +--月光舞香姫 +--Lunalight Perfume Dancer +--Scripted by ahtelel +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 "Lunalight" monsters + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT),2) + --Add 1 "Luna Light Perfume" 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_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() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Bounce and Special Summon 1 "Lunalight" monster from hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Apply an ATK reduction effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.SelfBanish) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) +end +s.listed_names={48444114} --"Luna Light Perfume" +s.listed_series={SET_LUNALIGHT} +function s.thfilter(c) + return c:IsCode(48444114) 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,tp,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.tgfilter(c) + return c:IsSetCard(SET_LUNALIGHT) and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra()) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.tgfilter(chkc) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_ONFIELD,0,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_LUNALIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) then + Duel.ShuffleHand(tp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,4)) + --This turn, monsters your opponent controls lose ATK equal to their own original DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetValue(function(e,c) return -c:GetBaseDefense() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c8379983.lua b/official/c8379983.lua new file mode 100644 index 0000000000..e94bd18c4c --- /dev/null +++ b/official/c8379983.lua @@ -0,0 +1,101 @@ +--月光金獅子 +--Lunalight Gold Leo +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Lunalight" monster from your Deck to your hand, except "Lunalight Gold Leo", 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.deckthtg) + e1:SetOperation(s.deckthop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Add 1 "Lunalight" monster sent to the GY to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e3:SetCode(EVENT_CUSTOM+id) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.gythtg) + e3:SetOperation(s.gythop) + c:RegisterEffect(e3) + local g=Group.CreateGroup() + g:KeepAlive() + e3:SetLabelObject(g) + --Keep track of "Lunalight" monsters sent to the GY + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e4:SetCode(EVENT_TO_GRAVE) + e4:SetRange(LOCATION_MZONE) + e4:SetLabelObject(e3) + e4:SetOperation(s.regop) + c:RegisterEffect(e4) +end +s.listed_series={SET_LUNALIGHT} +s.listed_names={id} +function s.deckthfilter(c) + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and not c:IsCode(id) 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 and g:GetFirst():IsLocation(LOCATION_HAND) 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.gythfilter(c,e,tp) + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and c:IsAbleToHand() + and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local tg=eg:Filter(s.gythfilter,nil,e,tp) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.gythtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local g=e:GetLabelObject():Filter(s.gythfilter,nil,e,tp) + if chkc then return g:IsContains(chkc) and s.gythfilter(chkc,e,tp) end + if chk==0 then return #g>0 end + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,tp,0) +end +function s.gythop(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/official/c85150300.lua b/official/c85150300.lua new file mode 100644 index 0000000000..5b67095208 --- /dev/null +++ b/official/c85150300.lua @@ -0,0 +1,120 @@ +--精霊の狩人 +--Spirit Hunter +--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) + --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_SZONE) + e1:SetCountLimit(1) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE) + e1:SetCondition(function(e,tp) return Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(1-tp) end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Special Summon 1 Level 4 or lower monster from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_SZONE) + e2:SetCondition(s.spcon) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.plfilter(c,tp) + return c:IsMonster() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.stspfilter(c,e,opp,opp_lp) + return c:IsMonsterCard() and c:GetBaseAttack()0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) + local opp=1-tp + local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.stspfilter,tp,LOCATION_STZONE,0,1,nil,e,opp,Duel.GetLP(opp)) + 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==1 then + e:SetCategory(0) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_STZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Place 1 monster from your Deck in your Spell & Trap Zone as a face-up Continuous Spell + 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 and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then + --Treated as a Continuous Spell + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) + sc:RegisterEffect(e1) + end + elseif op==2 then + --Your opponent can Special Summon 1 Monster Card with less original ATK than their LP from your Spell & Trap Zone to their field, then they pay LP equal to its original ATK + local opp=1-tp + local opp_lp=Duel.GetLP(opp) + if Duel.GetLocationCount(opp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.stspfilter,tp,LOCATION_STZONE,0,1,nil,e,opp,opp_lp) + and Duel.SelectYesNo(opp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(opp,s.stspfilter,tp,LOCATION_STZONE,0,1,1,nil,e,opp,opp_lp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,opp,opp,false,false,POS_FACEUP)>0 then + Duel.BreakEffect() + Duel.PayLPCost(opp,sc:GetBaseAttack()) + end + end + end +end +function s.spconfilter(c,tp) + return c:IsType(TYPE_EFFECT) and c:IsOwner(tp) and c:IsControler(1-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.spcost(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) end + Duel.SendtoGrave(c,REASON_COST) +end +function s.deckspfilter(c,e,tp) + return c:IsLevelBelow(4) 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.deckspfilter,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.deckspfilter,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 \ No newline at end of file diff --git a/official/c88139289.lua b/official/c88139289.lua new file mode 100644 index 0000000000..87cc6373df --- /dev/null +++ b/official/c88139289.lua @@ -0,0 +1,80 @@ +--サイコガンナーMk-Ⅱ +--Psychic Blaster Mk-II +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Psychic Tuner + 1+ non-Tuner Psychic monsters + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) + --Special Summon 1 banished monster to your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Banish 1 other monster on the field then gain LP equal to its original ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_RECOVER) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetCost(s.rmvcost) + e2:SetTarget(s.rmvtg) + e2:SetOperation(s.rmvop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.costfilter(c) + return c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,tc:GetBaseAttack()) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) then + local atk=tc:GetBaseAttack() + if atk>0 then + Duel.BreakEffect() + Duel.Recover(tp,atk,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c88917691.lua b/official/c88917691.lua new file mode 100644 index 0000000000..a69cef9132 --- /dev/null +++ b/official/c88917691.lua @@ -0,0 +1,64 @@ +--ガガガガガール +--Gagagaga Girl +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Add 1 "Gagaga", "Onomat", or "Xyz" card 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_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,{SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) end) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --A "Utopic Future" Xyz Monster that has this card as material gains this effect. + --● If it is Xyz Summoned: Activate this effect; it can make a second attack during each Battle Phase this turn. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCondition(s.secondattackcon) + e2:SetOperation(s.secondattackop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_ONOMAT,SET_XYZ,SET_UTOPIC_FUTURE} +function s.thfilter(c) + return c:IsSetCard({SET_GAGAGA,SET_ONOMAT,SET_XYZ}) 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.secondattackcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsSetCard(SET_UTOPIC_FUTURE) and c:IsXyzSummoned() and (Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and not Duel.IsPhase(PHASE_BATTLE))) +end +function s.secondattackop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + --It can make a second attack during each Battle Phase this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3201) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_EXTRA_ATTACK) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c89851827.lua b/official/c89851827.lua new file mode 100644 index 0000000000..7a9481a2d0 --- /dev/null +++ b/official/c89851827.lua @@ -0,0 +1,73 @@ +--聖秘なる竜騎士 +--Sacramentum Dragoon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Dragon monster + 1 Spellcaster monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) + --Loses 100 ATK for each of your banished cards + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e) return -100*Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_REMOVED,0) end) + c:RegisterEffect(e1) + --While you control this Fusion Summoned card, your opponent cannot activate the effects of Special Summoned Dragon and Spellcaster monsters they control + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,1) + e2:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) + e2:SetValue(s.actlimval) + c:RegisterEffect(e2) + --Special Summon 1 Dragon or 1 Spellcaster monster from your GY and place the other on the bottom of the Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetTarget(s.sptdtg) + e3:SetOperation(s.sptdop) + c:RegisterEffect(e3) +end +function s.actlimval(e,re,rp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsSpecialSummoned() and rc:IsFaceup() and rc:IsRace(RACE_DRAGON|RACE_SPELLCASTER) and rc:IsLocation(LOCATION_MZONE) +end +function s.sptdfilter(c,e,tp) + return c:IsRace(RACE_DRAGON|RACE_SPELLCASTER) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsAbleToDeck()) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsRace,1,nil,RACE_DRAGON) and sg:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER) + and sg:IsExists(s.spchk,1,nil,e,tp,sg) +end +function s.spchk(c,e,tp,sg) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (#sg==1 or sg:IsExists(Card.IsAbleToDeck,1,c)) +end +function s.sptdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.sptdfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and #g>=2 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_TARGET) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,tp,0) +end +function s.sptdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if (#tg==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=tg:FilterSelect(tp,s.spchk,1,1,nil,e,tp,tg) + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 and #tg==2 then + local dg=tg-sg + Duel.HintSelection(dg) + Duel.SendtoDeck(dg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c91818544.lua b/official/c91818544.lua new file mode 100644 index 0000000000..3935179eb1 --- /dev/null +++ b/official/c91818544.lua @@ -0,0 +1,99 @@ +--WAKE CUP! モカ +--WAKE CUP! Mocha +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Make 1 monster on the field gain 1000 ATK, but send it to the GY during the End Phase + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FLIP) + e1:SetCountLimit(1,id) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Special Summon this card from your hand, and if you do, change that monster to Attack Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Change this card to face-down Defense Position + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_POSITION) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e3:SetTarget(s.postg) + e3:SetOperation(s.posop) + c:RegisterEffect(e3) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,1000) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --It gains 1000 ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + --Send it to the GY during the End Phase + aux.DelayedOperation(tc,PHASE_END,id,e,tp, + function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, + nil,0,1,aux.Stringid(id,3),aux.Stringid(id,4) + ) + end +end +function s.posfilter(c) + return c:IsFacedown() and c:IsDefensePos() and c:IsCanChangePosition() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_ATTACK) + end +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsCanTurnSet() end + Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,POS_FACEDOWN_DEFENSE) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c92034192.lua b/official/c92034192.lua new file mode 100644 index 0000000000..84608132c6 --- /dev/null +++ b/official/c92034192.lua @@ -0,0 +1,107 @@ +--超量士ブラックレイヤー +--Super Quantum Black Layer +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Discard 1 other card, and if you do, Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsMonsterEffect() end) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Special Summon 1 "Super Quantal Mech Beast" Xyz Monster from your Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.xyzsptg) + e2:SetOperation(s.xyzspop) + c:RegisterEffect(e2) + --Add 1 "Super Quant" Spell from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SUPER_QUANT,SET_SUPER_QUANTAL_MECH_BEAST} +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_EFFECT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false)end + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + 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() + local exc=c:IsRelateToEffect(e) and c or nil + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,exc)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.xyzspfilter(c,e,tp,mc,chk_att) + return c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and mc:IsCanBeXyzMaterial(c,tp) + and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) + and (not chk_att or Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c)) +end +function s.attachfilter(c,tp,xc) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsMonster() and c:IsCanBeXyzMaterial(xc,tp,REASON_EFFECT) +end +function s.xyzsptg(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.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,true) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.xyzspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xc=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,false):GetFirst() + if not xc then return end + xc:SetMaterial(c) + Duel.Overlay(xc,c) + if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end + xc:CompleteProcedure() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) + local ac=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,xc):GetFirst() + if ac then + Duel.Overlay(xc,ac) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_SUPER_QUANT) 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) +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/official/c9213491.lua b/official/c9213491.lua new file mode 100644 index 0000000000..5cdb8f8750 --- /dev/null +++ b/official/c9213491.lua @@ -0,0 +1,90 @@ +--静寂のサイコガール+ +--Serene Psychic Girl +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish 1 card from your hand, and if you do, Special Summon 1 Level 4 or lower Psychic monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.rmvsptg) + e1:SetOperation(s.rmvspop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Increase the Level of face-up monster(s) by 1 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.rmvsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.rmvspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) + if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 and rg:GetFirst():IsLocation(LOCATION_REMOVED) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + 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 + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Psychic monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PSYCHIC) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_PSYCHIC) end) +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:HasLevel() end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil) + if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) +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 by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c9283801.lua b/official/c9283801.lua new file mode 100644 index 0000000000..2c7a9f292e --- /dev/null +++ b/official/c9283801.lua @@ -0,0 +1,78 @@ +--叛逆の帝王 +--Rebellion of the Monarchs +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Reveal 3 monsters with 800 or 2400 or more ATK, and 1000 DEF, from your Deck, your opponent chooses 1 for you to add to your hand, and you send the rest to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Discard(nil,true)) + e1:SetTarget(s.thtgtg) + e1:SetOperation(s.thtgop) + c:RegisterEffect(e1) + --Special Summon 1 monster with 800 ATK/1000 DEF 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,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.revfilter(c) + return (c:IsAttack(800) or c:IsAttackAbove(2400)) and c:IsDefense(1000) and (c:IsAbleToHand() or c:IsAbleToGrave()) +end +function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) + if chk==0 then return #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsAbleToHand,1,nil) +end +function s.thtgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.revfilter,tp,LOCATION_DECK,0,nil) + if #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil) then + local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,rg) + Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,2)) + local sc=rg:FilterSelect(1-tp,Card.IsAbleToHand,1,1,nil):GetFirst() + Duel.SendtoHand(sc,nil,REASON_EFFECT) + Duel.SendtoGrave(rg-sc,REASON_EFFECT) + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves + 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:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spfilter(c,e,tp) + return c:IsAttack(800) and c:IsDefense(1000) 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 diff --git a/official/c93156774.lua b/official/c93156774.lua new file mode 100644 index 0000000000..46cb5fbfc9 --- /dev/null +++ b/official/c93156774.lua @@ -0,0 +1,120 @@ +--VS ホーリー・スー +--Vanquish Soul Holy Sue +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --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_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(Cost.AND(Cost.HardOncePerChain(id),s.spcost)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Activate 1 of these effects by revealing monster(s) in your hand with the listed Attribute(s) + 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_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.HardOncePerChain(id)) + e2:SetTarget(s.vstg) + e2:SetOperation(s.vsop) + c:RegisterEffect(e2) +end +s.listed_series={SET_VANQUISH_SOUL} +function s.spcostfilter(c) + return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsMonster() and not c:IsPublic() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(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) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.vscostfilter(c,att) + return c:IsAttribute(att) and not c:IsPublic() +end +function s.vsrescon(sg) + return sg:GetBinClassCount(Card.GetAttribute)==2 +end +function s.deckspfilter(c,e,tp) + return c:IsSetCard(SET_VANQUISH_SOUL) and not c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.vstg(e,tp,eg,ep,ev,re,r,rp,chk) + local cg1=Duel.GetMatchingGroup(s.vscostfilter,tp,LOCATION_HAND,0,nil,ATTRIBUTE_EARTH|ATTRIBUTE_DARK) + local b1=aux.SelectUnselectGroup(cg1,e,tp,2,2,s.vsrescon,0) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,nil) + local cg2=Duel.GetMatchingGroup(s.vscostfilter,tp,LOCATION_HAND,0,nil,ATTRIBUTE_FIRE|ATTRIBUTE_DARK) + local b2=aux.SelectUnselectGroup(cg2,e,tp,2,2,s.vsrescon,0) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + 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==1 then + --EARTH & DARK + local g=aux.SelectUnselectGroup(cg1,e,tp,2,2,s.vsrescon,1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + e:SetCategory(CATEGORY_CONTROL) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) + elseif op==2 then + --FIRE & DARK + local g=aux.SelectUnselectGroup(cg2,e,tp,2,2,s.vsrescon,1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + end +end +function s.vsop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Take control of 1 monster your opponent controls with the lowest ATK (your choice, if tied) until the End Phase + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,nil) + if #g==0 then return end + local ming=g:GetMinGroup(Card.GetAttack) + local sc=ming:GetFirst() + if #ming>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + sc=ming:Select(tp,1,1,nil) + end + if sc then + Duel.HintSelection(sc) + Duel.GetControl(sc,tp,PHASE_END,1) + end + elseif op==2 then + --Special Summon 1 non-Psychic "Vanquish Soul" monster from your Deck + if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c9491461.lua b/official/c9491461.lua new file mode 100644 index 0000000000..9543496d60 --- /dev/null +++ b/official/c9491461.lua @@ -0,0 +1,103 @@ +--ガガガガンバラナイト +--Gagaga Ganbara Knight +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Gogogo" monster 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:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_REMOVE) + c:RegisterEffect(e3) +end +s.listed_series={SET_GAGAGA,SET_GOGOGO} +function s.spcostfilter(c) + return c:IsSetCard(SET_GAGAGA) and not c:IsPublic() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleExtra(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,0,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) +end +function s.gaspfilter(c,e,tp) + return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.gaspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + local b2=Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + if op==1 then + --Special Summon 1 "Gagaga" monster from your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.gaspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --Change the battle position of 1 monster on the field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end + end + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) +end +function s.thfilter(c) + return c:IsSetCard(SET_GOGOGO) 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 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c94979322.lua b/official/c94979322.lua new file mode 100644 index 0000000000..b4e60fb3c8 --- /dev/null +++ b/official/c94979322.lua @@ -0,0 +1,84 @@ +--黒炎の剣士-ブラック・フレア・ソードマン- +--Dark Flare Swordsman +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You take no damage from battles involving this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(s.selfspcost) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon 1 monster that mentions "Flame Swordsman" from your Deck, except a Level 6 monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.SelfTribute) + e3:SetTarget(s.decksptg) + e3:SetOperation(s.deckspop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_FLAME_SWORDSMAN} +function s.selfcostfilter(c,tp) + return (c:IsCode(CARD_FLAME_SWORDSMAN) or c:ListsCode(CARD_FLAME_SWORDSMAN)) and c:IsAbleToGraveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.selfcostfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.selfcostfilter,tp,LOCATION_EXTRA,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 declare attacks for the rest of this turn, except with Warrior monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_WARRIOR) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) +end +function s.deckspfilter(c,e,tp) + return c:ListsCode(CARD_FLAME_SWORDSMAN) and not c:IsLevel(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.deckspop(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.deckspfilter,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 \ No newline at end of file diff --git a/official/c95091919.lua b/official/c95091919.lua new file mode 100644 index 0000000000..6c168ec901 --- /dev/null +++ b/official/c95091919.lua @@ -0,0 +1,75 @@ +--プロトタイプサイコガンナー +--Prototype Psychic Blaster +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Psychic monster from your hand or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Special Summon this card from your 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_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(Cost.PayLP(1000),s.selfspcost)) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_PSYCHIC) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) + 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_REMOVED,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_REMOVED) +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|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.spcostfilter(c) + return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,c) + Duel.Remove(g,POS_FACEUP,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) 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/c95382988.lua b/official/c95382988.lua new file mode 100644 index 0000000000..ad6fabb9bc --- /dev/null +++ b/official/c95382988.lua @@ -0,0 +1,60 @@ +--再世十戒 +--Regenesis Commandments +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Apply effects to all cards your opponent controls in the same column as your "Regenesis" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_REGENESIS} +function s.oppfilter(c,tp) + return (c:IsNegatable() or c:IsFacedown()) and c:GetColumnGroup():IsExists(s.regenesisfilter,1,nil,tp) +end +function s.regenesisfilter(c,tp) + return c:IsSetCard(SET_REGENESIS) and c:IsMonster() and c:IsFaceup() and c:IsControler(tp) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.oppfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.oppfilter,tp,0,LOCATION_ONFIELD,nil,tp) + if #g==0 then return end + local c=e:GetHandler() + local faceup_g,facedown_g=g:Split(Card.IsFaceup,nil) + for neg_c in faceup_g:Iter() do + --Negate their effects + neg_c:NegateEffects(c,nil,true) + end + if #facedown_g==0 then return end + local facedown_mons,facedown_st=facedown_g:Split(Card.IsMonster,nil) + for pos_c in facedown_mons:Iter() do + --Cannot change their battle positions + local e1=Effect.CreateEffect(c) + e1:SetDescription(3313) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + pos_c:RegisterEffect(e1) + end + for act_c in facedown_st:Iter() do + --Cannot be activated until the end of the next turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(3302) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_TRIGGER) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) + act_c:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/official/c96004535.lua b/official/c96004535.lua new file mode 100644 index 0000000000..0fecdc0e3a --- /dev/null +++ b/official/c96004535.lua @@ -0,0 +1,86 @@ +--エクシーズ・アンブレイカブル・バリア +--Xyz Unbreakable Barrier +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation of a Spell/Trap Card, or monster effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,id) + e1:SetCondition(s.negcon) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --Attach 1 LIGHT "Utopia" or "Utopic" Xyz Monster from your GY to 1 Xyz Monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LEAVE_GRAVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.attachtg) + e2:SetOperation(s.attachop) + c:RegisterEffect(e2) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,0,1,nil) +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 + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + if Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT)==2 then + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) + if #dg==0 then return end + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end +function s.xyzfilter(c,tp) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c) +end +function s.matfilter(c,tp,xyzc) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) + and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) + local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,tc) + if #g>0 then + Duel.Overlay(tc,g) + end + end +end \ No newline at end of file diff --git a/official/c97227123.lua b/official/c97227123.lua new file mode 100644 index 0000000000..97ba3e50e7 --- /dev/null +++ b/official/c97227123.lua @@ -0,0 +1,31 @@ +--リターン・オブ・ザ・デュエリスト +--Return of the Duelist +local s,id=GetID() +function s.initial_effect(c) + --Add 1 Equip Spell from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),0,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.thfilter(c) + return c:IsEquipSpell() 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|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c97434754.lua b/official/c97434754.lua new file mode 100644 index 0000000000..7ebde9e8f5 --- /dev/null +++ b/official/c97434754.lua @@ -0,0 +1,82 @@ +--神芸学徒 リテラ +--Artmegia Litera +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --You take no battle damage from battles involving this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + e1:SetValue(1) + c:RegisterEffect(e1) + --Special Summon this card from your hand, then you can add 1 "Artmegia" card from your GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon 1 "Artmegia" monster from your hand or GY, except "Artmegia Litera", then return this card from the field to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e3:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={id} +s.listed_series={SET_ARTMEGIA} +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,0,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToHand() +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.HintSelection(sg) + Duel.BreakEffect() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ARTMEGIA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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 Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) + and c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,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,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,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then + Duel.BreakEffect() + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c97556336.lua b/official/c97556336.lua new file mode 100644 index 0000000000..ddcb365b19 --- /dev/null +++ b/official/c97556336.lua @@ -0,0 +1,87 @@ +--無垢なる者 メディウス +--Medius the Innocent +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Take 1 "Imprisoned Deity" monster from your Deck and either add it to your hand or Special Summon it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thsptg) + e1:SetOperation(s.thspop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Shuffle 1 monster from your hand or face-up field into the Deck, and if you do, Special Summon this card, but banish it when it leaves the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + c:RegisterEffect(e3) +end +s.listed_series={SET_IMPRISONED_DEITY} +function s.thspfilter(c,e,tp,sp_chk) + return c:IsSetCard(SET_IMPRISONED_DEITY) and c:IsMonster() + and (c:IsAbleToHand() or (sp_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sp_chk) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local tc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,sp_chk):GetFirst() + if not tc then return end + aux.ToHandOrElse(tc,tp, + function() return sp_chk and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,3) + ) +end +function s.tdfilter(c,tp) + return (c:IsLocation(LOCATION_HAND) and c:IsMonster() or c:IsFaceup()) + and c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0 +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local sc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp):GetFirst() + if not sc then return end + if sc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,sc) + else Duel.HintSelection(sc) end + local c=e:GetHandler() + if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + and sc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) + and 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/c98349765.lua b/official/c98349765.lua new file mode 100644 index 0000000000..ec23534ec6 --- /dev/null +++ b/official/c98349765.lua @@ -0,0 +1,103 @@ +--第19層『襲来干渉!漆黒の超量士!!』 +--Layer 19: "Preventing the Invasion! The Pitch-Black Super Quantum!!" +--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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_SUPER_QUANT} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalAttribute,c:GetOriginalAttribute()),tp,LOCATION_MZONE,0,1,nil) +end +function s.setfilter(c) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsTrap() and c:IsSSetable() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + local b3=not Duel.HasFlagEffect(tp,id+2) + and (e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 or b3 end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return e:GetLabel()==1 and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttackPos() and chkc:IsCanChangePosition() end + local cost_skip=e:GetLabel()~=-100 + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingTarget(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b2=(cost_skip or (not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUPER_QUANT),tp,LOCATION_MZONE,0,1,nil))) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + local b3=(cost_skip or not Duel.HasFlagEffect(tp,id+2)) + and (not e:IsHasType(EFFECT_TYPE_ACTIVATE) or e:GetHandler():IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>=2) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then e:SetLabel(0) 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_POSITION) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + elseif op==3 then + e:SetCategory(0) + e:SetProperty(0) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) end + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Change 1 Attack Position monster on the field to Defense Position + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) + end + elseif op==2 then + --Special Summon 1 "Super Quant" monster from your Deck in Defense Position, with a different original Attribute from the monsters you control + 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_DEFENSE) + end + elseif op==3 then + --Set 1 "Super Quant" Trap from your Deck + 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 + --It can be activated this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/official/c99161253.lua b/official/c99161253.lua new file mode 100644 index 0000000000..6bea2b3900 --- /dev/null +++ b/official/c99161253.lua @@ -0,0 +1,50 @@ +--原石融合 +--Primite Fusion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Dragon Fusion Monster from your Extra Deck, by shuffling its materials from your field, GY, and/or banishment into the Deck, including a Normal Monster + local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),matfilter=aux.FALSE,extrafil=s.fextra,extraop=Fusion.ShuffleMaterial,extratg=s.extratg}) + e1:SetCountLimit(1,id) + c:RegisterEffect(e1) + --Add 1 Level 5 or higher "Primite" monster from your Deck or GY 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:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_PRIMITE} +function s.fextrafil(c) + return c:IsAbleToDeck() and (c:IsOnField() or c:IsFaceup()) +end +function s.fcheck(tp,sg,fc) + return sg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(s.fextrafil),tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED,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_TODECK,nil,1,tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.thfilter(c) + return c:IsLevelAbove(5) and c:IsSetCard(SET_PRIMITE) 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|LOCATION_GRAVE,0,1,nil) 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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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