From e70262bd2ec2e9a357f8bd2d65ca7e62e5bdfea2 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 28 Jan 2025 13:48:27 +0200 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c101208000.lua | 60 ----------------- pre-release/c101208004.lua | 91 ------------------------- pre-release/c101208005.lua | 88 ------------------------ pre-release/c101208006.lua | 92 ------------------------- pre-release/c101208007.lua | 73 -------------------- pre-release/c101208008.lua | 65 ------------------ pre-release/c101208009.lua | 88 ------------------------ pre-release/c101208010.lua | 96 -------------------------- pre-release/c101208011.lua | 83 ----------------------- pre-release/c101208012.lua | 75 --------------------- pre-release/c101208013.lua | 78 --------------------- pre-release/c101208014.lua | 98 --------------------------- pre-release/c101208015.lua | 78 --------------------- pre-release/c101208016.lua | 102 ---------------------------- pre-release/c101208017.lua | 83 ----------------------- pre-release/c101208018.lua | 87 ------------------------ pre-release/c101208019.lua | 112 ------------------------------- pre-release/c101208020.lua | 83 ----------------------- pre-release/c101208021.lua | 51 -------------- pre-release/c101208022.lua | 78 --------------------- pre-release/c101208023.lua | 81 ---------------------- pre-release/c101208024.lua | 134 ------------------------------------- pre-release/c101208025.lua | 79 ---------------------- pre-release/c101208026.lua | 116 -------------------------------- pre-release/c101208027.lua | 63 ----------------- pre-release/c101208028.lua | 66 ------------------ pre-release/c101208029.lua | 63 ----------------- pre-release/c101208030.lua | 82 ----------------------- pre-release/c101208031.lua | 63 ----------------- pre-release/c101208032.lua | 67 ------------------- pre-release/c101208033.lua | 98 --------------------------- pre-release/c101208034.lua | 69 ------------------- pre-release/c101208035.lua | 104 ---------------------------- pre-release/c101208036.lua | 102 ---------------------------- pre-release/c101208037.lua | 86 ------------------------ pre-release/c101208039.lua | 60 ----------------- pre-release/c101208040.lua | 92 ------------------------- pre-release/c101208041.lua | 81 ---------------------- pre-release/c101208042.lua | 83 ----------------------- pre-release/c101208043.lua | 78 --------------------- pre-release/c101208045.lua | 69 ------------------- pre-release/c101208046.lua | 72 -------------------- pre-release/c101208047.lua | 111 ------------------------------ pre-release/c101208048.lua | 84 ----------------------- pre-release/c101208049.lua | 77 --------------------- pre-release/c101208050.lua | 86 ------------------------ pre-release/c101208052.lua | 80 ---------------------- pre-release/c101208053.lua | 77 --------------------- pre-release/c101208055.lua | 82 ----------------------- pre-release/c101208056.lua | 77 --------------------- pre-release/c101208057.lua | 85 ----------------------- pre-release/c101208058.lua | 83 ----------------------- pre-release/c101208059.lua | 75 --------------------- pre-release/c101208060.lua | 83 ----------------------- pre-release/c101208061.lua | 74 -------------------- pre-release/c101208062.lua | 82 ----------------------- pre-release/c101208063.lua | 106 ----------------------------- pre-release/c101208064.lua | 77 --------------------- pre-release/c101208065.lua | 67 ------------------- pre-release/c101208066.lua | 57 ---------------- pre-release/c101208067.lua | 75 --------------------- pre-release/c101208068.lua | 54 --------------- pre-release/c101208069.lua | 88 ------------------------ pre-release/c101208071.lua | 73 -------------------- pre-release/c101208072.lua | 68 ------------------- pre-release/c101208073.lua | 77 --------------------- pre-release/c101208074.lua | 91 ------------------------- pre-release/c101208075.lua | 78 --------------------- pre-release/c101208076.lua | 98 --------------------------- pre-release/c101208077.lua | 78 --------------------- pre-release/c101208078.lua | 64 ------------------ pre-release/c101208079.lua | 69 ------------------- pre-release/c101208080.lua | 52 -------------- pre-release/c101208101.lua | 84 ----------------------- pre-release/c101208102.lua | 68 ------------------- pre-release/c101208103.lua | 77 --------------------- pre-release/c101208104.lua | 101 ---------------------------- pre-release/c101208105.lua | 63 ----------------- pre-release/c101208106.lua | 92 ------------------------- pre-release/c101208107.lua | 81 ---------------------- pre-release/c101208108.lua | 68 ------------------- 81 files changed, 6531 deletions(-) delete mode 100644 pre-release/c101208000.lua delete mode 100644 pre-release/c101208004.lua delete mode 100644 pre-release/c101208005.lua delete mode 100644 pre-release/c101208006.lua delete mode 100644 pre-release/c101208007.lua delete mode 100644 pre-release/c101208008.lua delete mode 100644 pre-release/c101208009.lua delete mode 100644 pre-release/c101208010.lua delete mode 100644 pre-release/c101208011.lua delete mode 100644 pre-release/c101208012.lua delete mode 100644 pre-release/c101208013.lua delete mode 100644 pre-release/c101208014.lua delete mode 100644 pre-release/c101208015.lua delete mode 100644 pre-release/c101208016.lua delete mode 100644 pre-release/c101208017.lua delete mode 100644 pre-release/c101208018.lua delete mode 100644 pre-release/c101208019.lua delete mode 100644 pre-release/c101208020.lua delete mode 100644 pre-release/c101208021.lua delete mode 100644 pre-release/c101208022.lua delete mode 100644 pre-release/c101208023.lua delete mode 100644 pre-release/c101208024.lua delete mode 100644 pre-release/c101208025.lua delete mode 100644 pre-release/c101208026.lua delete mode 100644 pre-release/c101208027.lua delete mode 100644 pre-release/c101208028.lua delete mode 100644 pre-release/c101208029.lua delete mode 100644 pre-release/c101208030.lua delete mode 100644 pre-release/c101208031.lua delete mode 100644 pre-release/c101208032.lua delete mode 100644 pre-release/c101208033.lua delete mode 100644 pre-release/c101208034.lua delete mode 100644 pre-release/c101208035.lua delete mode 100644 pre-release/c101208036.lua delete mode 100644 pre-release/c101208037.lua delete mode 100644 pre-release/c101208039.lua delete mode 100644 pre-release/c101208040.lua delete mode 100644 pre-release/c101208041.lua delete mode 100644 pre-release/c101208042.lua delete mode 100644 pre-release/c101208043.lua delete mode 100644 pre-release/c101208045.lua delete mode 100644 pre-release/c101208046.lua delete mode 100644 pre-release/c101208047.lua delete mode 100644 pre-release/c101208048.lua delete mode 100644 pre-release/c101208049.lua delete mode 100644 pre-release/c101208050.lua delete mode 100644 pre-release/c101208052.lua delete mode 100644 pre-release/c101208053.lua delete mode 100644 pre-release/c101208055.lua delete mode 100644 pre-release/c101208056.lua delete mode 100644 pre-release/c101208057.lua delete mode 100644 pre-release/c101208058.lua delete mode 100644 pre-release/c101208059.lua delete mode 100644 pre-release/c101208060.lua delete mode 100644 pre-release/c101208061.lua delete mode 100644 pre-release/c101208062.lua delete mode 100644 pre-release/c101208063.lua delete mode 100644 pre-release/c101208064.lua delete mode 100644 pre-release/c101208065.lua delete mode 100644 pre-release/c101208066.lua delete mode 100644 pre-release/c101208067.lua delete mode 100644 pre-release/c101208068.lua delete mode 100644 pre-release/c101208069.lua delete mode 100644 pre-release/c101208071.lua delete mode 100644 pre-release/c101208072.lua delete mode 100644 pre-release/c101208073.lua delete mode 100644 pre-release/c101208074.lua delete mode 100644 pre-release/c101208075.lua delete mode 100644 pre-release/c101208076.lua delete mode 100644 pre-release/c101208077.lua delete mode 100644 pre-release/c101208078.lua delete mode 100644 pre-release/c101208079.lua delete mode 100644 pre-release/c101208080.lua delete mode 100644 pre-release/c101208101.lua delete mode 100644 pre-release/c101208102.lua delete mode 100644 pre-release/c101208103.lua delete mode 100644 pre-release/c101208104.lua delete mode 100644 pre-release/c101208105.lua delete mode 100644 pre-release/c101208106.lua delete mode 100644 pre-release/c101208107.lua delete mode 100644 pre-release/c101208108.lua diff --git a/pre-release/c101208000.lua b/pre-release/c101208000.lua deleted file mode 100644 index 9874e6f547..0000000000 --- a/pre-release/c101208000.lua +++ /dev/null @@ -1,60 +0,0 @@ ---超究極魔導竜王 ---Dragon Master Lord ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 12 monsters - Xyz.AddProcedure(c,nil,12,2) - --While you control this Xyz Summoned card, your opponent cannot target it with card effects, also it cannot be destroyed by your opponent's card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(aux.indoval) - c:RegisterEffect(e2) - --If this cards attacks a Defense Position monster while you have 25 or more cards in your GY, inflict double piercing battle damage to your opponent - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - e3:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_GRAVE,0)>=25 end) - e3:SetValue(DOUBLE_DAMAGE) - c:RegisterEffect(e3) - --Special Summon 1 monster from your Deck, Extra Deck, or GY - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=25 end) - e4:SetCost(aux.dxmcostgen(1,1)) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -function s.spfilter(c,e,tp) - if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end - if c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - else - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,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/c101208004.lua b/pre-release/c101208004.lua deleted file mode 100644 index b910e26016..0000000000 --- a/pre-release/c101208004.lua +++ /dev/null @@ -1,91 +0,0 @@ ---魔術師の弟子-ブラック・マジシャン・ガール ---Dark Magician Girl the Magician's Apprentice ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by discarding 1 card, and if you do, its name becomes "Dark Magician Girl" - 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) - --Add 1 "Shining Sarcophagus" 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,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --Gains 300 ATK for each monster in the GYs that mentions "Shining Sarcophagus" - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(s.atkval) - c:RegisterEffect(e4) -end -s.listed_names={CARD_DARK_MAGICIAN_GIRL,CARD_SHINING_SARCOPHAGUS} -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(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,0,1,c) - 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_DISCARD|REASON_COST) - g:DeleteGroup() - --Its name becomes "Dark Magician Girl" - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_DARK_MAGICIAN_GIRL) - e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TOFIELD) - c:RegisterEffect(e1) -end -function s.thfilter(c) - return c:IsCode(CARD_SHINING_SARCOPHAGUS) 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.atkfilter(c) - return c:ListsCode(CARD_SHINING_SARCOPHAGUS) and c:IsMonster() -end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(s.atkfilter,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*300 -end \ No newline at end of file diff --git a/pre-release/c101208005.lua b/pre-release/c101208005.lua deleted file mode 100644 index db470d321a..0000000000 --- a/pre-release/c101208005.lua +++ /dev/null @@ -1,88 +0,0 @@ ---E-HERO ヴィシャス・クローズ ---Evil HERO Vicious Claws ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from the hand and increase the targeted monster's ATK by 300 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetTarget(s.handsptg) - e1:SetOperation(s.handspop) - c:RegisterEffect(e1) - --Special Summon this card from the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e2:SetCondition(s.gyspcon) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_HERO} -s.listed_names={CARD_DARK_FUSION} -function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and c:IsSetCard(SET_HERO) end - 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) - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_HERO),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_HERO),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,300) -end -function s.handspop(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_DEFENSE)>0 - and tc:IsFaceup() and tc:IsRelateToEffect(e) then - --That monster gains 300 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.gyspconfilter(c,tp) - return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) -end -function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.gyspconfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) -end -function s.gysptg(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_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.darkfusfilter(c) - return c:IsMonster() and c:ListsCode(CARD_DARK_FUSION) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.IsExistingMatchingCard(s.darkfusfilter,tp,LOCATION_GRAVE,0,1,nil) then - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,1,1,nil) - Duel.HintSelection(sg) - Duel.BreakEffect() - Duel.Destroy(sg,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101208006.lua b/pre-release/c101208006.lua deleted file mode 100644 index 7f803a887f..0000000000 --- a/pre-release/c101208006.lua +++ /dev/null @@ -1,92 +0,0 @@ ---妖精獣レグルス ---Regulus the Fairy Beast ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Add 1 Spell/Trap the mentions "Ancient Fairy Dragon" 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_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 1 Level 4 or lower LIGHT Beast, Plant, or Fairy monster from your hand in Defense Position - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) - --Place 1 Field Spell from your GY on the bottom of the Deck, then draw 1 card - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1,{id,2}) - e4:SetCost(aux.SelfBanishCost) - e4:SetTarget(s.tdtg) - e4:SetOperation(s.tdop) - c:RegisterEffect(e4) -end -s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} -function s.thfilter(c) - return c:IsSpellTrap() and c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) 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.spfilter(c,e,tp) - return c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevelBelow(4) - 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_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_DEFENSE) - end -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsFieldSpell() and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(aux.AND(Card.IsFieldSpell,Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsFieldSpell,Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 - and tc:IsLocation(LOCATION_DECK) 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/c101208007.lua b/pre-release/c101208007.lua deleted file mode 100644 index b369965575..0000000000 --- a/pre-release/c101208007.lua +++ /dev/null @@ -1,73 +0,0 @@ ---妖精胞スポーア ---Spore the Fairy Cell ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Increase this card's Level by up to the number of monsters you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():HasLevel() end end) - e1:SetOperation(s.lvop) - 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_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:HasLevel() then - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - local lv=Duel.AnnounceLevel(tp,1,ct) - --Increase its Level by the selected number - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end -function s.spconfilter(c) - return c:IsFaceup() and (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) - or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsMonster())) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil) -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 - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) -end \ No newline at end of file diff --git a/pre-release/c101208008.lua b/pre-release/c101208008.lua deleted file mode 100644 index c9d3bca921..0000000000 --- a/pre-release/c101208008.lua +++ /dev/null @@ -1,65 +0,0 @@ ---妖精霊クリボン ---Kuribon the Fairy Spirit ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand, 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_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If another "Ancient Fairy Dragon", or monster(s) that mentions it, that you control would be destroyed by card effect, you can return this card from the field to the hand instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.reptg) - e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) and c~=e:GetHandler() end) - e2:SetOperation(function(e) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT|REASON_REPLACE) end) - c:RegisterEffect(e2) -end -s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} -function s.spconfilter(c) - return c:IsFaceup() and (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) - or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsMonster())) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil) -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 - --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) - c:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end -function s.repfilter(c,tp) - return (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) or (c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) and c:IsMonster())) - and c:IsControler(tp) and c:IsFaceup() 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:IsAbleToHand() and not eg:IsContains(c) and eg:IsExists(s.repfilter,1,c,tp) end - return Duel.SelectEffectYesNo(tp,c,96) -end \ No newline at end of file diff --git a/pre-release/c101208009.lua b/pre-release/c101208009.lua deleted file mode 100644 index 9be705b55a..0000000000 --- a/pre-release/c101208009.lua +++ /dev/null @@ -1,88 +0,0 @@ ---紋章獣グリフォン ---Heraldic Beast Gryphon ---scripted by Naim -local EFFECT_DOUBLE_XYZ_MATERIAL=511001225 --to be removed when the procedure is updated -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) - --Can be treated as 2 Materials for the Xyz Summon of a "Number" Xyz monter that requires 3 or more materials - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DOUBLE_XYZ_MATERIAL) - e2:SetValue(1) - e2:SetCondition(function(e) return not Duel.HasFlagEffect(e:GetHandlerPlayer(),id) end) - e2:SetOperation(function(e,c,matg) return c:IsSetCard(SET_NUMBER) and c.minxyzct and c.minxyzct>=3 and matg:FilterCount(s.gryphonhoptfilter,nil)<2 end) - c:RegisterEffect(e2) - --HOPT workaround for having already used the double material effect earlier in that turn - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD) - ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - ge1:SetCode(EFFECT_MATERIAL_CHECK) - ge1:SetValue(s.valcheck) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_series={SET_HERALDIC_BEAST} -s.listed_names={id} -function s.costfilter(c) - return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsMonster() and c:IsAbleToGraveAsCost() and not c:IsCode(id) -end -function s.spcost(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.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 - --Cannot Special Summon from the Extra Deck for the rest of this turn, except by Xyz Summon - 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,sump,sumtype) return c:IsLocation(LOCATION_EXTRA) and (sumtype&SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --Can only use monsters with "Heraldic Beast" and/or "Number" in their original names as material for an Xyz Summon this turn - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e2:SetTargetRange(LOCATION_ALL,LOCATION_ALL) - e2:SetTarget(function(e,c) return not c:IsOriginalSetCard({SET_HERALDIC_BEAST,SET_NUMBER}) end) - e2:SetValue(function(e,c) return c and c:IsControler(e:GetHandlerPlayer()) end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function s.gryphonhoptfilter(c) - return c:IsCode(id) and c:IsHasEffect(EFFECT_DOUBLE_XYZ_MATERIAL) -end -function s.valcheck(e,c) - if not (c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) and c.minxyzct and c.minxyzct>=3) then return end - local g=c:GetMaterial() - if #g=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,1,tp,HINTMSG_SPSUMMON) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if #tg>0 and ft>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then - if ft==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - tg=tg:FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false,POS_FACEUP_DEFENSE) - end - Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - local c=e:GetHandler() - --Cannot Special Summon from the Extra Deck for the rest of this turn, except by Xyz Summon - 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,sump,sumtype) return c:IsLocation(LOCATION_EXTRA) and (sumtype&SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --Can only use monsters with "Heraldic Beast" and/or "Number" in their original names as material for an Xyz Summon this turn - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e2:SetTargetRange(LOCATION_ALL,LOCATION_ALL) - e2:SetTarget(function(e,c) return not c:IsOriginalSetCard({SET_HERALDIC_BEAST,SET_NUMBER}) end) - e2:SetValue(function(e,c) return c and c:IsControler(e:GetHandlerPlayer()) end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) -end \ No newline at end of file diff --git a/pre-release/c101208011.lua b/pre-release/c101208011.lua deleted file mode 100644 index 771b33ab57..0000000000 --- a/pre-release/c101208011.lua +++ /dev/null @@ -1,83 +0,0 @@ ---断罪のディアベルスター ---Diabellstar the Sin Adjudicator ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand or GY - 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|LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Destroy 1 card your opponent controls then you can Special Summon 1 Illusion or Spellcaster Tuner Synchro Monster from your Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.PayLPCost(1/2)) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SINFUL_SPOILS,SET_DIABELL} -function s.rmcostfilter(c) - return c:IsSpellTrap() and c:IsAbleToRemoveAsCost() -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,e:GetHandler()) - if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetMainCardType),0) end - local rg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetMainCardType),1,tp,HINTMSG_REMOVE) - Duel.Remove(rg,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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.diabellfilter(c) - return c:IsSetCard(SET_DIABELL) and c:IsMonsterCard() and c:IsFaceup() -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_ILLUSION|RACE_SPELLCASTER) and c:IsType(TYPE_TUNER) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCountFromEx(tp,tp,nil,c)>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 tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(s.diabellfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if #sg==0 then return end - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101208012.lua b/pre-release/c101208012.lua deleted file mode 100644 index b6a2d741a7..0000000000 --- a/pre-release/c101208012.lua +++ /dev/null @@ -1,75 +0,0 @@ ---白魔女ディアベルゼ ---Diabellze the White Witch ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Monsters you control cannot be destroyed by your opponent's card effects while you control 2 or more "Diabell" monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DIABELL),e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) end) - e1:SetValue(aux.indoval) - 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.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Send 1 "Sinful Spoils" or "Diabell" card from your Deck to the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.tgtg) - e3:SetOperation(s.tgop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -s.listed_series={SET_WHITE_FOREST,SET_SINFUL_SPOILS,SET_DIABELL} -function s.spcostfilter(c,tp) - return c:IsSpellTrap() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 -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|LOCATION_ONFIELD,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) - 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 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.tgfilter(c) - return c:IsSetCard({SET_SINFUL_SPOILS,SET_DIABELL}) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208013.lua b/pre-release/c101208013.lua deleted file mode 100644 index fb6547b502..0000000000 --- a/pre-release/c101208013.lua +++ /dev/null @@ -1,78 +0,0 @@ ---再世の戦神 ベレシート ---Regenesis Warrior Beresheet ---Scripted by Satella -local s,id=GetID() -function s.initial_effect(c) - --If a monster with 2500 original ATK or DEF is on the field, you can Special Summon this card (from your hand) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Return 1 monster your opponent controls to the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - 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:SetCost(aux.SelfTributeCost) - e2:SetTarget(s.rttg) - e2:SetOperation(s.rtop) - c:RegisterEffect(e2) - --Add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -function s.spconfilter(c) - return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spconfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.rtop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208014.lua b/pre-release/c101208014.lua deleted file mode 100644 index 465352d3f0..0000000000 --- a/pre-release/c101208014.lua +++ /dev/null @@ -1,98 +0,0 @@ ---再世の導神 シェモース ---Regenesis Sage Shemot ---Scripted by Satella -local s,id=GetID() -function s.initial_effect(c) - --If a monster with 2500 original ATK or DEF is on the field, you can Special Summon this card (from your hand) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Negate the activation of an opponent's card or effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) - --Add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_REGENESIS} -function s.spconfilter(c) - return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spconfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()==Duel.GetTurnCount() and Duel.IsTurnPlayer(1-tp) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp and Duel.IsChainNegatable(ev) -end -function s.negcostfilter(c) - return c:IsSetCard(SET_REGENESIS) and c:IsAbleToGraveAsCost() - and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208015.lua b/pre-release/c101208015.lua deleted file mode 100644 index 78cf115263..0000000000 --- a/pre-release/c101208015.lua +++ /dev/null @@ -1,78 +0,0 @@ ---再世の龍神 ワイクラー ---Regenesis Dragon Vayikra ---Scripted by Satella -local s,id=GetID() -function s.initial_effect(c) - --If a monster with 2500 original ATK or DEF is on the field, you can Special Summon this card (from your hand) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Banish 1 Spell/Trap your opponent controls - 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_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfTributeCost) - e2:SetTarget(s.rmtg) - e2:SetOperation(s.rmop) - c:RegisterEffect(e2) - --Add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -function s.spconfilter(c) - return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() -end -function s.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spconfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,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.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208016.lua b/pre-release/c101208016.lua deleted file mode 100644 index ce04f51073..0000000000 --- a/pre-release/c101208016.lua +++ /dev/null @@ -1,102 +0,0 @@ ---再世の魔神 ベミドバル ---Regenesis Archfiend Bemidbar ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by revealing 1 other monster in your hand with 2500 ATK or DEF - 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) - --Add 1 "Regenesis" card from your Deck or banishment 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,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --Add this card to your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(s.selfthcon) - e4:SetTarget(s.selfthtg) - e4:SetOperation(s.selfthop) - c:RegisterEffect(e4) -end -s.listed_series={SET_REGENESIS} -s.listed_names={id} -function s.rvlfilter(c) - return (c:IsAttack(2500) or c:IsDefense(2500)) and not c:IsPublic() -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.rvlfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.rvlfilter,tp,LOCATION_HAND,0,0,1,c) - 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.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - g:DeleteGroup() -end -function s.thfilter(c) - return c:IsSetCard(SET_REGENESIS) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) 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|LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_REMOVED) -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|LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) -end -function s.selfthtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.selfthop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208017.lua b/pre-release/c101208017.lua deleted file mode 100644 index 2169aed4b4..0000000000 --- a/pre-release/c101208017.lua +++ /dev/null @@ -1,83 +0,0 @@ ---創世の神 デウテロノミオン ---Regenesis God Deuteronomion ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Must be Special Summoned (from your hand) by banishing 1 face-up monster you control with 2500 original ATK and DEF - 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_HAND) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Set 1 "Regenesis" Spell/Trap from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - 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.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --Gains 2500 ATK during the Battle Phase only - 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:SetCondition(function() return Duel.IsBattlePhase() end) - e3:SetValue(2500) - c:RegisterEffect(e3) - --Inflicts piercing battle damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e4) -end -s.listed_series={SET_REGENESIS} -function s.selfspconfilter(c) - return (c:IsBaseAttack(2500) and c:IsBaseDefense(2500)) and c:IsFaceup() and c:IsAbleToRemoveAsCost() -end -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.selfspconfilter,tp,LOCATION_MZONE,0,nil) - return #g>0 and Duel.GetMZoneCount(tp,g)>0 -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.selfspconfilter,tp,LOCATION_MZONE,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) - if #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) - g:DeleteGroup() -end -function s.setfilter(c) - return c:IsSetCard(SET_REGENESIS) and c:IsSpellTrap() 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/c101208018.lua b/pre-release/c101208018.lua deleted file mode 100644 index edb8f65224..0000000000 --- a/pre-release/c101208018.lua +++ /dev/null @@ -1,87 +0,0 @@ ---光征竜-スペクトル ---Spector, Dragon Ruler of Rays ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 2 "Dragon Ruler" monsters from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DRAGON_RULER) - --Special Summon 1 "Chasmatis, Dragon Ruler of Auroras" 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_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGON_RULER} -s.listed_names={id,101208047} --"Chasmatis, Dragon Ruler of Auroras" -function s.thcostfilter(c) - return (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.thfilter(c) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,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>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spcostfilter(c,e,tp) - return (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsRace(RACE_DRAGON)) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsCode(101208047) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -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 \ No newline at end of file diff --git a/pre-release/c101208019.lua b/pre-release/c101208019.lua deleted file mode 100644 index d6e460d705..0000000000 --- a/pre-release/c101208019.lua +++ /dev/null @@ -1,112 +0,0 @@ ---闇征竜-ネビュラス ---Nebulous, Dragon Ruler of Shadows ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 2 of your banished "Dragon Ruler" monsters with different Attributes - 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_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.rmspcost) - e1:SetTarget(s.rmsptg) - e1:SetOperation(s.rmspop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DRAGON_RULER) - --Special Summon 1 "Eclepsis, Dragon Ruler of Woes" 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_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(s.gyspcost) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGON_RULER} -s.listed_names={id,101208048} --"Eclepsis, Dragon Ruler of Woes" -function s.rmcostfilter(c) - return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() -end -function s.rmspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) -end -function s.rmspfilter(c,e,tp) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsFaceup() and c:IsCanBeEffectTarget(e) and not c:IsCode(id) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.rmsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.rmspfilter,tp,LOCATION_REMOVED,0,nil,e,tp) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and g:GetClassCount(Card.GetAttribute)>=2 end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,2,tp,0) -end -function s.rmspop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and #tg>1 then return end - if #tg>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - tg=tg:Select(tp,ft,ft,nil) - end - local c=e:GetHandler() - for tc in tg:Iter() do - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --It cannot attack this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3206) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end - end - Duel.SpecialSummonComplete() -end -function s.gyspcostfilter(c,e,tp) - return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_DRAGON)) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) -end -function s.gyspfilter(c,e,tp) - return c:IsCode(101208048) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gyspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.gyspcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.gyspcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.gyspfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.gyspop(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/c101208020.lua b/pre-release/c101208020.lua deleted file mode 100644 index f79fe640ee..0000000000 --- a/pre-release/c101208020.lua +++ /dev/null @@ -1,83 +0,0 @@ ---ARG☆S-熱闘のパルテ ---Argostars - Fierce Parthe ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Gains 700 ATK/DEF for each other "Argostars" monster you control with different names - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(s.atkdefval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2) - --Return 1 face-up "Argostars" Continuous Trap you control to the hand, and if you do, Special Summon this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_HAND) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfRevealCost) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) - --Set 1 Continuous Trap from your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.SelfBanishCost) - e4:SetTarget(s.settg) - e4:SetOperation(s.setop) - c:RegisterEffect(e4) -end -s.listed_series={SET_ARGOSTARS} -function s.atkdefval(e,c) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ARGOSTARS),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()) - return g:GetClassCount(Card.GetCode)*700 -end -function s.thfilter(c,tp) - return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and c:IsFaceup() and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0 -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,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_RTOHAND) - local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst() - if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.setfilter(c) - return c:IsContinuousTrap() 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_HAND,0,1,nil) end -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_HAND,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,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101208021.lua b/pre-release/c101208021.lua deleted file mode 100644 index 1372b6de32..0000000000 --- a/pre-release/c101208021.lua +++ /dev/null @@ -1,51 +0,0 @@ ---プリマ・マテリアクトル ---Prima Materiactor ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Pendulum Summon procedure - Pendulum.AddProcedure(c) - --Xyz Monsters you control gain 100 ATK for each material attached to monsters on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_PZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsFaceup() and c:IsType(TYPE_XYZ) end) - e1:SetValue(function(e,c) return Duel.GetOverlayCount(0,1,1)*100 end) - c:RegisterEffect(e1) - --Attach this card to 1 "Materiactor" Xyz Monster you control as material, then draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.attachtg) - e2:SetOperation(s.attachop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MATERIACTOR} -function s.xyzfilter(c,tp,hc) - return c:IsSetCard(SET_MATERIACTOR) and c:IsType(TYPE_XYZ) and c:IsFaceup() and hc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) -end -function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp,c) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) -end -function s.attachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.Overlay(tc,c) - if Duel.IsPlayerCanDraw(tp) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101208022.lua b/pre-release/c101208022.lua deleted file mode 100644 index b01dd38087..0000000000 --- a/pre-release/c101208022.lua +++ /dev/null @@ -1,78 +0,0 @@ ---スター・ライゼオル ---Star Ryzeal ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by detaching 1 material from a monster you control - 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.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Set 1 "Ryzeal" Spell/Trap from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - 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.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RYZEAL} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) - local g=Duel.GetOverlayGroup(tp,1,0):Select(tp,0,1,nil) - if #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 - local xyzc=g:GetFirst():GetOverlayTarget() - Duel.SendtoGrave(g,REASON_COST) - Duel.RaiseSingleEvent(xyzc,EVENT_DETACH_MATERIAL,e,0,0,0,0) - Duel.RaiseEvent(xyzc,EVENT_DETACH_MATERIAL,e,REASON_EFFECT,tp,tp,0) - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Rank 4 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_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:IsType(TYPE_XYZ) and c:IsRank(4)) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not (c:IsOriginalType(TYPE_XYZ) and c:IsOriginalRank(4)) end) -end -function s.setfilter(c) - return c:IsSetCard(SET_RYZEAL) and c:IsSpellTrap() 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/c101208023.lua b/pre-release/c101208023.lua deleted file mode 100644 index ecc4a88d61..0000000000 --- a/pre-release/c101208023.lua +++ /dev/null @@ -1,81 +0,0 @@ ---M∀LICE<P>March Hare ---Maliss

March Hare ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Your opponent cannot target "Maliss" Link Monsters that point to this card 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,LOCATION_MZONE) - e1:SetTarget(s.linkfilter) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --Banish 1 other "Maliss" card from your hand or GY, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 of your banished "Maliss" monsters to your 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) - e3:SetCode(EVENT_REMOVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.PayLPCost(300)) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_MALISS} -function s.linkfilter(e,c) - return c:IsSetCard(SET_MALISS) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(e:GetHandler()) -end -function s.rmfilter(c,tp) - return c:IsSetCard(SET_MALISS) and c:IsAbleToRemove() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) - and Duel.GetMZoneCount(tp,c)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,c,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,1,exc,tp) - if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_MALISS) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208024.lua b/pre-release/c101208024.lua deleted file mode 100644 index a737289d07..0000000000 --- a/pre-release/c101208024.lua +++ /dev/null @@ -1,134 +0,0 @@ ---転惺竜華-闇巴 ---Tensei Ryu-Ge Anva ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Pendulum Summon procedure - Pendulum.AddProcedure(c) - --You cannot Pendulum Summon, except "Ryu-Ge" monsters (this effect cannot be negated) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_PZONE) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,tp,sumtp,sumpos) return not c:IsSetCard(SET_RYU_GE) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end) - c:RegisterEffect(e1) - --When a card or effect activated by your opponent in response to your "Ryu-Ge" Spell Card or effect activation resolves, you can negate that effect, then destroy this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(s.discon) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Special Summon this card from your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetCountLimit(1,id) - e3:SetCost(s.spcost) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) - --Destroy 1 card on the field - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCountLimit(1,{id,1}) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) - --Place 1 "Ryu-Ge" Continuous Spell/Trap from your Deck, GY, or banishment face-up on your field - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,2)) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_DELAY) - e5:SetCode(EVENT_DESTROYED) - e5:SetCountLimit(1,{id,2}) - e5:SetTarget(s.pltg) - e5:SetOperation(s.plop) - c:RegisterEffect(e5) -end -s.listed_series={SET_RYU_GE} -s.listed_names={id} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return false end - local chainlink=Duel.GetCurrentChain(true)-1 - if not (chainlink>0 and ep==1-tp and Duel.IsChainDisablable(ev)) then return false end - local trig_p,trig_typ,setcodes=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) - if not (trig_p==tp and (trig_typ&TYPE_SPELL)>0) then return false end - for _,set in ipairs(setcodes) do - if ((SET_RYU_GE&0xfff)==(set&0xfff) and (SET_RYU_GE&set)==SET_RYU_GE) then - return true - end - end - return false -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,3)) then - Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - if Duel.NegateEffect(ev) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end - end -end -function s.spcostfilter(c) - return c:IsSetCard(SET_RYU_GE) and not c:IsCode(id) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,true,aux.ReleaseCheckMMZ,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,true,aux.ReleaseCheckMMZ,c) - Duel.Release(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 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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,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 -function s.plfilter(c,tp) - return c:IsContinuousSpellTrap() and c:IsSetCard(SET_RYU_GE) and not c:IsForbidden() - and c:CheckUniqueOnField(tp) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,tp) end - Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,tp):GetFirst() - if tc then - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101208025.lua b/pre-release/c101208025.lua deleted file mode 100644 index 568d11ea1a..0000000000 --- a/pre-release/c101208025.lua +++ /dev/null @@ -1,79 +0,0 @@ ---真紅眼の鋼爪竜 ---Red-Eyes Metal Claw Dragon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can activate "Metalmorph" Trap Cards the turn they are Set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_METALMORPH) end) - c:RegisterEffect(e1) - --Special Summon this card 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_HAND) - e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Metalmorph" Trap from your Deck or GY 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_SUMMON_SUCCESS) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -s.listed_names={CARD_MAX_METALMORPH} -s.liested_series={SET_METALMORPH} -function s.spcostfilter(c,tp) - return c:IsFacedown() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SendtoGrave(tc,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.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_METALMORPH) and c:IsTrap() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MAX_METALMORPH),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) - and 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/c101208026.lua b/pre-release/c101208026.lua deleted file mode 100644 index 577ceaedc3..0000000000 --- a/pre-release/c101208026.lua +++ /dev/null @@ -1,116 +0,0 @@ ---サイバー・ヨルムンガンド ---Cyber Jormungandr ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableUnsummonable() - --Must be Special Summoned by a card effect - c:AddMustBeSpecialSummonedByCardEffect() - --Special Summon this card from your hand, then take 1 "Cyber Dragon" from your Deck, and either Special Summon it or equip it to this card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Polymerization" 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_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={CARD_CYBER_DRAGON,CARD_POLYMERIZATION} -function s.cyberdragonfilter(c,e,tp,mon_ft,st_ft) - return c:IsCode(CARD_CYBER_DRAGON) and (s.spfilter(c,e,tp,mon_ft) or s.eqpfilter(c,tp,st_ft)) -end -function s.spfilter(c,e,tp,freezone) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and freezone>0 -end -function s.eqpfilter(c,tp,freezone) - return c:CheckUniqueOnField(tp) and not c:IsForbidden() and freezone>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local mon_ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local st_ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if chk==0 then return mon_ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.cyberdragonfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mon_ft-1,st_ft) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -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 mon_ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local st_ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local tc=Duel.SelectMatchingCard(tp,s.cyberdragonfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mon_ft,st_ft):GetFirst() - if tc then - local b1=s.spfilter(tc,e,tp,mon_ft) - local b2=s.eqpfilter(tc,tp,st_ft) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - Duel.BreakEffect() - if op==1 then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - elseif op==2 then - if Duel.Equip(tp,tc,c) then - --Equip limit - local e0=Effect.CreateEffect(tc) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EQUIP_LIMIT) - e0:SetValue(function(e,cc) return cc==c end) - e0:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e0) - end - end - end - end - --You cannot Special Summon for the rest of this turn, except Machine monsters - local e1=Effect.CreateEffect(c) - 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_MACHINE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thcostfilter(c) - return c:IsCode(CARD_CYBER_DRAGON) and c:IsFaceup() and c:IsAbleToHandAsCost() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function s.thfilter(c) - return c:IsCode(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|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/c101208027.lua b/pre-release/c101208027.lua deleted file mode 100644 index 8ec8b057a8..0000000000 --- a/pre-release/c101208027.lua +++ /dev/null @@ -1,63 +0,0 @@ ---サイバー・ダーク・ヴルム ---Cyberdark Wurm ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --This card's name becomes "Cyber Dragon" while on the field or in the GY - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e1:SetValue(CARD_CYBER_DRAGON) - c:RegisterEffect(e1) - --Special Summon this card from your hand or GY then you can add 1 "Cyber" Spell/Trap 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|LOCATION_GRAVE) - e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) - e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(s.cybermachinefilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_CYBER_DRAGON} -s.listed_series={SET_CYBER,SET_CYBER_DRAGON} -function s.cybermachinefilter(c) - return c:IsSetCard(SET_CYBER) and c:IsRace(RACE_MACHINE) and c:IsFaceup() -end -function s.spcostfilter(c) - return c:IsSetCard(SET_CYBER_DRAGON) and c:IsMonster() and c:IsAbleToGraveAsCost() -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|LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|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) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function s.thfilter(c) - return c:IsSetCard({SET_CYBER,SET_CYBERNETIC}) and c:IsSpellTrap() and c:IsAbleToHand() -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 g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.BreakEffect() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end -end diff --git a/pre-release/c101208028.lua b/pre-release/c101208028.lua deleted file mode 100644 index e572482721..0000000000 --- a/pre-release/c101208028.lua +++ /dev/null @@ -1,66 +0,0 @@ ---Live☆Twin リィラ・スウィート ---Live☆Twin Lil-la Sweet ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Negate an opponent's effect activated in response in response to the activation of your "Live☆Twin" card or effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.discon) - e1:SetCost(aux.SelfDiscardCost) - e1:SetTarget(s.distg) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e1) - --Special Summon this card from the 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:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_KI_SIKIL),tp,LOCATION_MZONE,0,1,nil) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_LIVE_TWIN,SET_KI_SIKIL} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local chainlink=Duel.GetCurrentChain(true)-1 - if not (chainlink>0 and Duel.IsChainDisablable(ev) and ep==1-tp) then return false end - local trig_p,setcodes=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) - if not trig_p==tp then return false end - for _,set in ipairs(setcodes) do - if (SET_LIVE_TWIN&0xfff)==(set&0xfff) and (SET_LIVE_TWIN&set)==SET_LIVE_TWIN then return true end - end -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,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 - --You cannot Special Summon from the Extra Deck, except Fiend 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_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetAbsoluteRange(tp,1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_FIEND) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101208029.lua b/pre-release/c101208029.lua deleted file mode 100644 index 6ac185ce99..0000000000 --- a/pre-release/c101208029.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ワンモア・ザ・ワイト ---Moissa Wight ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --This card's name becomes "Skull Servant" while in the GY - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_GRAVE) - e1:SetValue(CARD_SKULL_SERVANT) - c:RegisterEffect(e1) - --Add 1 "Skull Servant" or 1 card that mentions it from your Deck to your hand, except "Moissa Wight" - 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:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --During your Main Phase, you can Normal Summon 1 Level 4 or lower Zombie monster in addition to your Normal Summon/Set - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e4:SetTarget(function(e,c) return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) end) - c:RegisterEffect(e4) -end -s.listed_names={CARD_SKULL_SERVANT,id} -function s.thfilter(c) - return (c:IsCode(CARD_SKULL_SERVANT) or c:ListsCode(CARD_SKULL_SERVANT)) 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) -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 - --You cannot Special Summon for the rest of this turn, except Zombie 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:IsRace(RACE_ZOMBIE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101208030.lua b/pre-release/c101208030.lua deleted file mode 100644 index 38ba008264..0000000000 --- a/pre-release/c101208030.lua +++ /dev/null @@ -1,82 +0,0 @@ ---NT8000-SIRIUS ---NT8000 - SIRIUS ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --This linked card cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e) return e:GetHandler():IsLinked() end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Destroy 1 face-up card you control and 1 face-up card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - 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_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --Check if the effect of a Link Monster was activated this turn - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re) return not re:GetHandler():IsLinkMonster() end) - --Special Summon this card from the 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) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCanBeEffectTarget,e),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local dg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_DESTROY) - Duel.SetTargetCard(dg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==2 then - Duel.Destroy(tg,REASON_EFFECT) - end -end -function s.darklinkfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsLinkMonster() and c:IsFaceup() -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) - and Duel.IsExistingMatchingCard(s.darklinkfilter,tp,LOCATION_MZONE,0,1,nil) 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/c101208031.lua b/pre-release/c101208031.lua deleted file mode 100644 index 6090919669..0000000000 --- a/pre-release/c101208031.lua +++ /dev/null @@ -1,63 +0,0 @@ ---邪悪龍エビルナイト・ドラゴン ---Serpent Night Dragon, the Wicked Dragon ---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.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Send 1 monster your opponent controls to the GY, then you can Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsAttribute,1,true,aux.ReleaseCheckMMZ,c,ATTRIBUTE_DARK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,Card.IsAttribute,1,1,true,aux.ReleaseCheckMMZ,c,ATTRIBUTE_DARK) - Duel.Release(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 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.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsAbleToGrave() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) - and 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/c101208032.lua b/pre-release/c101208032.lua deleted file mode 100644 index e4f7d56347..0000000000 --- a/pre-release/c101208032.lua +++ /dev/null @@ -1,67 +0,0 @@ ---紅天馬ファイヤー・ウイング・ペガサス ---Firewing Pegasus, the Crimson Heavenly Horse ---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: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:SetOperation(s.spop) - c:RegisterEffect(e1) - --Inflict damage to your opponent equal to the Chain Link number of this effect x 300 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.damcon) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) -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.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 and c:IsRelateToEffect(e) then - --This card cannot be destroyed by card effects activated before this effect in this Chain - 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_EFFECT) - e1:SetValue(function(e,re,rp) return re:IsActivated() end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END|RESET_CHAIN) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101208033.lua b/pre-release/c101208033.lua deleted file mode 100644 index 92d9420309..0000000000 --- a/pre-release/c101208033.lua +++ /dev/null @@ -1,98 +0,0 @@ ---ブレインコントローラー ---Brain Controller ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Brain Control" 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_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 Level of 1 face-up monster on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PAY_LPCOST) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp,eg,ep) return ep==tp end) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) - --Special Summon this card to your opponent's field in Defense Position - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_BE_MATERIAL) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -s.listed_names={87910978} --"Brain Control" -function s.thfilter(c) - return c:IsCode(87910978) 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.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:HasLevel() and chkc:IsFaceup() end - if chk==0 then return 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,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK) - local lv=Duel.AnnounceLevel(tp,1,8,g:GetFirst():GetLevel()) - Duel.SetTargetParam(lv) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,lv) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - --It becomes the declared Level - local e1=Effect.CreateEffect(e:GetHandler()) - 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 -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) 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,1-tp,false,false,POS_FACEUP_DEFENSE) then - c:NegateEffects(c) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c101208034.lua b/pre-release/c101208034.lua deleted file mode 100644 index 6a2879aba1..0000000000 --- a/pre-release/c101208034.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ボンバー・プレイス ---Bomber Place ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate one of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(aux.PayLPCost(600)) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -function s.oppfilter(c,tp) - return c:HasLevel() and c:IsFaceup() and Duel.IsExistingMatchingCard(s.lvrklnkfilter,tp,0,LOCATION_MZONE,1,c,c:GetLevel()) -end -function s.lvrklnkfilter(c,lv) - return c:IsFaceup() and (c:IsLevel(lv) or c:IsRank(lv) or c:IsLink(lv)) -end -function s.selffilter(c,tp) - return c:HasLevel() and c:IsFaceup() and Duel.IsExistingMatchingCard(s.columnfilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel(),c:GetColumnGroup()) -end -function s.columnfilter(c,lv,columng) - return columng:IsContains(c) and s.lvrklnkfilter(c,lv) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelBelow,6),tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetLevel)==6 - and Duel.IsExistingMatchingCard(s.oppfilter,tp,0,LOCATION_MZONE,1,nil,tp) - local b2=Duel.IsExistingMatchingCard(s.selffilter,tp,LOCATION_MZONE,0,1,nil,tp) - 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) - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,1-tp,0) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Choose 1 face-up monster your opponent controls that has a Level, and destroy all other monsters they control with an equal Level/Rank/Link Rating - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) --"Select your opponent's card" - local sc=Duel.SelectMatchingCard(tp,s.oppfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst() - if sc then - Duel.HintSelection(sc) - local g=Duel.GetMatchingGroup(s.lvrklnkfilter,tp,0,LOCATION_MZONE,sc,sc:GetLevel()) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - end - elseif op==2 then - --Choose 1 face-up monster you control that has a Level, and destroy all your opponent's monsters in its column with an equal Level/Rank/Link Rating - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) --"Select your card" - local sc=Duel.SelectMatchingCard(tp,s.selffilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() - if sc then - Duel.HintSelection(sc) - local g=Duel.GetMatchingGroup(s.columnfilter,tp,0,LOCATION_MZONE,nil,sc:GetLevel(),sc:GetColumnGroup()) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101208035.lua b/pre-release/c101208035.lua deleted file mode 100644 index 5e816a2a00..0000000000 --- a/pre-release/c101208035.lua +++ /dev/null @@ -1,104 +0,0 @@ ---贖罪神女 ---Azamina ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Queen of the Azamina" + 1 Fusion or Synchro Monster - Fusion.AddProcMix(c,true,true,65033975,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION|TYPE_SYNCHRO)) - c:AddMustFirstBeFusionSummoned() - --Special Summon this card (from your Extra Deck) by Tributing 1 "St. Azamina" you control and 1 face-up monster your opponent controls - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_EXTRA) - e0:SetCondition(s.selfspcon) - e0:SetTarget(s.selfsptg) - e0:SetOperation(s.selfspop) - c:RegisterEffect(e0) - --Cannot be destroyed by card effects - 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:SetValue(1) - c:RegisterEffect(e1) - --Each time your opponent activates a card or effect, all monsters your opponent currently controls lose 500 ATK immediately after it resolves - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2a:SetCode(EVENT_CHAINING) - e2a:SetRange(LOCATION_MZONE) - e2a:SetOperation(aux.chainreg) - c:RegisterEffect(e2a) - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2b:SetProperty(EFFECT_FLAG_DELAY) - e2b:SetCode(EVENT_CHAIN_SOLVED) - e2b:SetRange(LOCATION_MZONE) - e2b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(1) end) - e2b:SetOperation(s.atkop) - c:RegisterEffect(e2b) - --Your opponent cannot activate the effects of monsters with 0 ATK - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,1) - e3:SetValue(function(e,re,tp) return re:IsMonsterEffect() and re:GetHandler():IsAttack(0) end) - c:RegisterEffect(e3) -end -s.miracle_synchro_fusion=true -s.material_setcode={SET_AZAMINA} -s.listed_names={65033975,85065943} --"Queen of the Azamina", "St. Azamina" -function s.selfspcostfilter(c,tp,fc) - return ((c:IsCode(85065943) or c:IsSummonCode(fc,MATERIAL_FUSION,tp,85065943)) or c:IsControler(1-tp)) and c:IsReleasable() - and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) and (c:IsControler(tp) or c:IsFaceup()) -end -function s.rescon(sg,e,tp,mg) - return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 - and sg:FilterCount(Card.IsControler,nil,tp)==1 -end -function s.selfspcon(e,c) - if not c then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,e:GetHandler()) - return #mg>=2 and aux.SelectUnselectGroup(mg,e,tp,2,2,s.rescon,0) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local mg=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_ONFIELD,LOCATION_MZONE,nil,tp,e:GetHandler()) - local g=aux.SelectUnselectGroup(mg,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) - if #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.Release(g,REASON_COST|REASON_MATERIAL) - g:DeleteGroup() -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - if rp~=1-tp then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if #g==0 then return end - Duel.Hint(HINT_CARD,0,id) - local c=e:GetHandler() - for tc in g:Iter() do - --It loses 500 ATK - local e1=Effect.CreateEffect(c) - 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 \ No newline at end of file diff --git a/pre-release/c101208036.lua b/pre-release/c101208036.lua deleted file mode 100644 index 682fe24080..0000000000 --- a/pre-release/c101208036.lua +++ /dev/null @@ -1,102 +0,0 @@ ---黄金郷のアンヘルカイド ---Angelcaido of the Golden Land ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Eldlich the Golden Lord" + 1 Zombie monster - Fusion.AddProcMix(c,true,true,CARD_GOLDEN_LORD,aux.FilterBoolFunctionEx(Card.IsRace,RACE_ZOMBIE)) - c:AddMustBeFusionSummoned() - --You can only Fusion Summon or Special Summon by its alternate procedure "Angelcaido of the Golden Land" 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 Tributing 1 LIGHT Zombie monster while you have "Eldlich the Golden Lord" in your field or GY - local e1=Effect.CreateEffect(c) - 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) - --Special Summon 1 "Eldlich" monster from your Deck, Extra Deck, or GY - 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) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_GOLDEN_LORD,id} -s.material_setcode={SET_ELDLICH} -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 "Angelcaido of the Golden Land" 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:IsCode(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:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_ZOMBIE) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 -end -function s.selfspcon(e,c) - if not c then return true end - if c:IsFaceup() then return false end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_GOLDEN_LORD),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) - and Duel.CheckReleaseGroup(tp,s.selfspcostfilter,1,false,1,true,c,tp,nil,nil,nil,tp,c) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.SelectReleaseGroup(tp,s.selfspcostfilter,1,1,false,true,true,c,tp,nil,false,nil,tp,c) - if not g then return false end - g:KeepAlive() - e:SetLabelObject(g) - return true -end -function s.selfspop(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.spfilter(c,e,tp,ft) - if not (c:IsSetCard(SET_ELDLICH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - else - return ft>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp,ft) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp,ft) - 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/c101208037.lua b/pre-release/c101208037.lua deleted file mode 100644 index efdeef137c..0000000000 --- a/pre-release/c101208037.lua +++ /dev/null @@ -1,86 +0,0 @@ ---妖竜の禁姫 ---Philia Regis ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Dragon Fusion Monster + 1 Level 7 or higher Dragon monster - Fusion.AddProcMix(c,true,true,s.matfilter1,s.matfilter2) - --Banish 1 card your opponent controls or in their GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) - 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.rmvtg) - e1:SetOperation(s.rmvop) - c:RegisterEffect(e1) - --Return 1 Dragon monster you control to the hand/Extra Deck, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -function s.matfilter1(c,fc,sumtype,tp) - return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsType(TYPE_FUSION,fc,sumtype,tp) -end -function s.matfilter2(c,fc,sumtype,tp) - return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsLevelAbove(7) -end -function s.rethandfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() and c:IsFaceup() -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsControler(1-tp) 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) - if g:GetFirst():IsLocation(LOCATION_ONFIELD) then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) - end -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:IsPreviousLocation(LOCATION_ONFIELD) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.rethandfilter,tp,LOCATION_MZONE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - end -end -function s.thfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 and c:IsRace(RACE_DRAGON) and (c:IsAbleToHand() or c:IsAbleToExtra()) and c:IsFaceup() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,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_RTOHAND) - local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() - if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) - and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/pre-release/c101208039.lua b/pre-release/c101208039.lua deleted file mode 100644 index 213807dcbf..0000000000 --- a/pre-release/c101208039.lua +++ /dev/null @@ -1,60 +0,0 @@ ---エンシェント・フェアリー・ライフ・ドラゴン ---Ancient Fairy Life Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Draw 1 card, or add 1 LIGHT Beast, Plant, or Fairy monster, or 1 "Eternal Sunshine" from your Deck to your hand instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DRAW+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():IsSynchroSummoned() end) - e1:SetTarget(s.drthtg) - e1:SetOperation(s.drthop) - c:RegisterEffect(e1) - --Your "Ancient Fairy Dragon" and monsters that mention it can attack while in face-up Defense Position. If they do, apply their DEF for damage calculation - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DEFENSE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(function(e,c) return c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) or c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) end) - e2:SetValue(1) - c:RegisterEffect(e2) -end -s.listed_names={101208055,101208071,CARD_ANCIENT_FAIRY_DRAGON} --"The World of Spirits", "Eternal Sunshine" -function s.thfilter(c) - return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY)) or c:IsCode(101208071)) and c:IsAbleToHand() -end -function s.drthtg(e,tp,eg,ep,ev,re,r,rp,chk) - local world_of_spirits_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,101208055),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - local b1=not world_of_spirits_chk and Duel.IsPlayerCanDraw(tp,1) - local b2=world_of_spirits_chk and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - if b1 then - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - else - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.drthop(e,tp,eg,ep,ev,re,r,rp) - local world_of_spirits_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,101208055),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - if not world_of_spirits_chk then - Duel.Draw(tp,1,REASON_EFFECT) - else - 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 \ No newline at end of file diff --git a/pre-release/c101208040.lua b/pre-release/c101208040.lua deleted file mode 100644 index 726e545def..0000000000 --- a/pre-release/c101208040.lua +++ /dev/null @@ -1,92 +0,0 @@ ---蛇眼の断罪龍 ---Snake-Eyes Execute Dragon ---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) - --Place 1 face-up monster on the field or in either GY face-up in its owner's Spell & Trap Zone as a Continuous Spell - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - 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(e) return Duel.IsMainPhase() and not e:GetHandler():HasFlagEffect(id) end) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Destroy 1 monster and 1 Continuous Spell 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_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsBattlePhase() end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.plfilter(c) - local p=c:GetOwner() - return c:IsFaceup() and c:IsMonster() and Duel.GetLocationCount(p,LOCATION_SZONE)>0 - and c:CheckUniqueOnField(p,LOCATION_SZONE) - and (c:IsLocation(LOCATION_MZONE) or not c:IsForbidden()) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.plfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.plfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil):GetFirst() - if tc:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) - end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - --Register a flag to prevent this card from using it again during the next turn - c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,2)) - end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end - if tc:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tc:GetOwner(),LOCATION_SZONE)==0 then - Duel.SendtoGrave(tc,REASON_RULE,nil,PLAYER_NONE) - elseif Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,tc:IsMonsterCard()) then - --Treat it as a Continuous Spell - local e1=Effect.CreateEffect(c) - 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)) - tc:RegisterEffect(e1) - end -end -function s.desfilter(c,e) - return c:IsCanBeEffectTarget(e) and (c:IsMonster() or (c:IsContinuousSpell() and c:IsFaceup())) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(Card.IsContinuousSpell,1,nil) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) - if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_DESTROY) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,2,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/c101208041.lua b/pre-release/c101208041.lua deleted file mode 100644 index 5ceec26bcc..0000000000 --- a/pre-release/c101208041.lua +++ /dev/null @@ -1,81 +0,0 @@ ---白き森の幻妖 ---Mystic Mystery of the White Forest ---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) - --Place 2 "White Forest" monsters from your GY in face-up in their owners' Spell & Trap Zones as Continuous Spells - 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+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Immediately after this effect resolves, Synchro Summon using this card you control - 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:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.synchtg) - e2:SetOperation(s.synchop) - c:RegisterEffect(e2) -end -s.listed_series={SET_WHITE_FOREST} -function s.plfilter(c) - local p=c:GetOwner() - return c:IsSetCard(SET_WHITE_FOREST) and c:IsMonster() and c:CheckUniqueOnField(p,LOCATION_SZONE) and not c:IsForbidden() -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 - and Duel.IsExistingTarget(s.plfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - if #tg>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - tg=tg:Select(tp,ft,ft,nil) - end - for tc in tg:Iter() do - if Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,tc:IsMonsterCard()) then - --Treat it 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)) - tc:RegisterEffect(e1) - end - end -end -function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.synchop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) - if #g>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),c) - end -end \ No newline at end of file diff --git a/pre-release/c101208042.lua b/pre-release/c101208042.lua deleted file mode 100644 index 40eb344049..0000000000 --- a/pre-release/c101208042.lua +++ /dev/null @@ -1,83 +0,0 @@ ---真魔六武衆-キザン ---Legendary Lord Six Samurai - Kizan ---Scripted by Cybercatman -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) - --"Six Samurai" monsters you control gain 600 ATK/DEF during the Battle Phase only - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(function() return Duel.IsBattlePhase() end) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SIX_SAMURAI)) - e1:SetValue(600) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2) - --Destroy 1 card 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_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,id) - e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) - e3:SetCost(s.descost) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) - --Special Summon this card from your GY - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SIX_SAMURAI),tp,LOCATION_MZONE,0,2,nil) end) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -s.listed_series={SET_SIX_SAMURAI,SET_SIX_STRIKE} -function s.costfilter(c) - return c:IsSetCard(SET_SIX_STRIKE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,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 -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/c101208043.lua b/pre-release/c101208043.lua deleted file mode 100644 index b5ae1352c5..0000000000 --- a/pre-release/c101208043.lua +++ /dev/null @@ -1,78 +0,0 @@ ---呪雷神ジュラ ---Jura the Curse-Thunder Deity ---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) - --Each time your opponent activates a card or effect, gain 300 LP immediately after it resolves - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1a:SetCode(EVENT_CHAINING) - e1a:SetRange(LOCATION_MZONE) - e1a:SetOperation(aux.chainreg) - c:RegisterEffect(e1a) - local e1b=Effect.CreateEffect(c) - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1b:SetProperty(EFFECT_FLAG_DELAY) - e1b:SetCode(EVENT_CHAIN_SOLVED) - e1b:SetRange(LOCATION_MZONE) - e1b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(1) end) - e1b:SetOperation(s.lpop) - c:RegisterEffect(e1b) - --Activate 1 of these effects - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(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:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetCost(s.descost) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - if rp==1-tp then - Duel.Hint(HINT_CARD,0,id) - Duel.Recover(tp,300,REASON_EFFECT) - end -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckLPCost(tp,1500) and c:IsReleasable() end - Duel.PayLPCost(tp,1500) - Duel.Release(c,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local g2=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,nil) - local b1=#g1>0 - local b2=#g2>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) - local g=(op==1 and g1 or g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==2 then - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101208045.lua b/pre-release/c101208045.lua deleted file mode 100644 index 9617116bb2..0000000000 --- a/pre-release/c101208045.lua +++ /dev/null @@ -1,69 +0,0 @@ ---No.69 紋章神コート・オブ・アームズ-ゴッド・シャーター ---Number 69: Heraldry Crest - Shatter Stream ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 4 Level 4 monsters OR 1 monster whose original name is "Number 69: Heraldry Crest" - Xyz.AddProcedure(c,nil,4,4,s.ovfilter,aux.Stringid(id,0),4) - --Special Summon 1 "Number 69: Heraldry Crest - Dark Matter Demolition" from your Extra Deck and destroy an opponent's monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - c:RegisterEffect(e2) -end -s.xyz_number=69 -s.listed_series={2407234,101208046} --"Number 69: Heraldry Crest", "Number 69: Heraldry Crest - Dark Matter Demolition" -function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsOriginalCodeRule(2407234) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local ttype,tloc,tplayer=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER) - return ttype&TYPE_MONSTER>0 and tloc&LOCATION_ONFIELD>0 and tplayer==1-tp -end -function s.xyzfilter(c,e,tp,mc) - return c:IsCode(101208046) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) - and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - 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.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) - end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not 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 xyzc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c):GetFirst() - if not xyzc then return end - xyzc:SetMaterial(c) - Duel.Overlay(xyzc,c) - if Duel.SpecialSummon(xyzc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - xyzc:CompleteProcedure() - local dg=Duel.GetFirstTarget() - if dg:IsControler(1-tp) and dg:IsRelateToEffect(e) - and (Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) or dg:IsRelateToEffect(re)) then - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101208046.lua b/pre-release/c101208046.lua deleted file mode 100644 index 9d39123235..0000000000 --- a/pre-release/c101208046.lua +++ /dev/null @@ -1,72 +0,0 @@ ---No.69 紋章神コート・オブ・アームズ-ゴッド・レイジ ---Number 69: Heraldry Crest - Dark Matter Demolition ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 5 Level 4 monsters - Xyz.AddProcedure(c,nil,4,5) - --Cannot be destroyed by battle or card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --Change opponent's monster's name to "Unknown" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCost(aux.dxmcostgen(1,1,nil)) - e3:SetTarget(s.namechangetg) - e3:SetOperation(s.namechangeop) - c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) - --Negate the activated effects of "Unknown" your opponent controls - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_MZONE) - e4:SetOperation(s.disop) - c:RegisterEffect(e4) -end -s.xyz_number=69 -s.listed_names={CARD_UNKNOWN} -function s.namechangefilter(c) - return c:IsFaceup() and not c:IsCode(CARD_UNKNOWN) -end -function s.namechangetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.namechangefilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.namechangefilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.namechangefilter,tp,0,LOCATION_MZONE,1,1,nil) -end -function s.namechangeop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsCode(CARD_UNKNOWN) then - --Its name becomes "Unknown" - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_UNKNOWN) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if rp==1-tp and re:IsMonsterEffect() then - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and rc:IsCode(CARD_UNKNOWN) then - Duel.NegateEffect(ev) - end - end -end \ No newline at end of file diff --git a/pre-release/c101208047.lua b/pre-release/c101208047.lua deleted file mode 100644 index fa23041494..0000000000 --- a/pre-release/c101208047.lua +++ /dev/null @@ -1,111 +0,0 @@ ---極征竜-シャスマティス ---Chasmatis, Dragon Ruler of Auroras ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 7 Dragon monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),7,2) - --This effect becomes the effect of a Level 7 "Dragon Ruler" monster that activates by discarding itself - 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_MZONE) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetCost(s.applycost) - e1:SetTarget(s.applytg) - e1:SetOperation(s.applyop) - c:RegisterEffect(e1) - --Special Summon 1 Level 7 "Dragon Ruler" from your GY or banishment - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGON_RULER} -function s.tgfilter(c,tp) - if not (c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsAbleToGraveAsCost() and c:IsHasEffect(id)) then - return false - end - local eff=c:GetCardEffect(id) - local te=eff:GetLabelObject() - local con=te:GetCondition() - local tg=te:GetTarget() - if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) - and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) then - return true - end - return false -end -function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - Duel.SendtoGrave(sc,REASON_COST) - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - e:SetLabelObject(sc:GetCardEffect(id):GetLabelObject()) - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end -function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local te=e:GetLabelObject() - local tg=te and te:GetTarget() or nil - if chkc then return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end - if chk==0 then return true end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) - if tg then - tg(e,tp,eg,ep,ev,re,r,rp,1) - end - e:SetLabelObject(te) - Duel.ClearOperationInfo(0) -end -function s.applyop(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if not te then return end - local sc=te:GetHandler() - if sc:GetFlagEffect(id)==0 then - e:SetLabel(0) - e:SetLabelObject(nil) - return - end - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - local op=te:GetOperation() - if op then - op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) - end - e:SetLabel(0) - e:SetLabelObject(nil) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp)) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() -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,e,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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,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/c101208048.lua b/pre-release/c101208048.lua deleted file mode 100644 index 268cddf58c..0000000000 --- a/pre-release/c101208048.lua +++ /dev/null @@ -1,84 +0,0 @@ ---凶征竜-エクレプシス ---Eclepsis, Dragon Ruler of Woes ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 7 Dragon monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),7,2) - --Special Summon 1 Level/Rank 7 "Dragon Ruler" monster mentioned on a target from your Deck or banishment, then shuffle that target into the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - 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():IsXyzSummoned() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the activation of an opponent's Spell/Trap Card or effect, and if you do, banish it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_CHAINING) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.negcon) - e2:SetCost(aux.dxmcostgen(2,2,nil)) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) -end -s.listed_series={SET_DRAGON_RULER} -function s.tdfilter(c,e,tp) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsLevelBelow(4) and c:IsAbleToDeck() and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,tc) - return c:IsSetCard(SET_DRAGON_RULER) and (c:IsLevel(7) or c:IsRank(7)) and tc:ListsCode(c:GetCode()) - and (c:IsLocation(LOCATION_DECK) or 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_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_REMOVED) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,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 tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp,tc) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - local rc=re:GetHandler() - local relation=rc:IsRelateToEffect(re) - if chk==0 then return rc:IsAbleToRemove(tp) - or (not relation and Duel.IsPlayerCanRemove(tp)) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if relation then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,rc:GetControler(),rc:GetLocation()) - else - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,rc:GetPreviousLocation()) - end -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208049.lua b/pre-release/c101208049.lua deleted file mode 100644 index 7483670002..0000000000 --- a/pre-release/c101208049.lua +++ /dev/null @@ -1,77 +0,0 @@ ---超征竜-ディザスター ---Disaster, Dragon Ruler of Paranormalities ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Rank 7 Xyz monsters - Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsRank,7),nil,2) - --Attach Level 7 "Dragon Ruler" monsters to this card when it is Xyz Summoned - 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():IsXyzSummoned() end) - e1:SetTarget(s.attachtg) - e1:SetOperation(s.attachop) - c:RegisterEffect(e1) - --If this card has LIGHT, DARK, EARTH, WATER, FIRE, and WIND "Dragon Ruler" monsters as material, it gains 4600 ATK/DEF - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.attributematcon) - e2:SetValue(4600) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e3) - --If this card has LIGHT, DARK, EARTH, WATER, FIRE, and WIND "Dragon Ruler" monsters as material, it is unaffected by other cards' effects - local e4=e2:Clone() - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetValue(function(e,te) return te:GetOwner()~=e:GetOwner() end) - c:RegisterEffect(e4) -end -s.listed_series={SET_DRAGON_RULER} -function s.attachfilter(c,xc,tp) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsCanBeXyzMaterial(xc,tp,REASON_EFFECT) and c:IsFaceup() -end -function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.attachfilter(chkc,c,tp) end - if chk==0 then return Duel.IsExistingTarget(s.attachfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectTarget(tp,s.attachfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,4,nil,c,tp) - if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then - local gyg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,gyg,#gyg,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE|LOCATION_GRAVE) -end -function s.rmfilter(c,og) - return c:IsMonster() and c:IsAbleToRemove() and c:IsFaceup() and og:IsExists(Card.IsAttribute,1,nil,c:GetAttribute()) -end -function s.attachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end - local tg=Duel.GetTargetCards(e):Filter(s.attachfilter,nil,c,tp):Remove(Card.IsImmuneToEffect,nil,e) - if #tg>0 then - Duel.Overlay(c,tg) - local og=c:GetOverlayGroup() - if Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil,og) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - local rg=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil,og) - Duel.BreakEffect() - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end - end -end -function s.attributematcon(e) - local og=e:GetHandler():GetOverlayGroup():Filter(Card.IsSetCard,nil,SET_DRAGON_RULER) - return og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK) - and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) - and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) -end \ No newline at end of file diff --git a/pre-release/c101208050.lua b/pre-release/c101208050.lua deleted file mode 100644 index cc82e82ff3..0000000000 --- a/pre-release/c101208050.lua +++ /dev/null @@ -1,86 +0,0 @@ ---怒髪天衝セイバーザウルス ---Ferociously Angered Sabersaurus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 monsters - Xyz.AddProcedure(c,nil,4,2) - --Destroy 1 Dinosaur monster in your hand or face-up field, then you can change the battle position of 1 monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --Destroy this card, and if you do, your Dinosaur monster battling gains 2000 ATK until the end of the Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.atkcon) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - c:RegisterEffect(e2) -end -function s.desfilter(c) - return c:IsRace(RACE_DINOSAUR) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if not dc then return end - if dc:IsOnField() then Duel.HintSelection(dc) end - if Duel.Destroy(dc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - 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 return end - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local b=Duel.GetAttackTarget() - if a:IsControler(1-tp) then a,b=b,a end - return a:IsFaceup() and a:IsRace(RACE_DINOSAUR) and a~=e:GetHandler() -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local a=Duel.GetAttacker() - local b=Duel.GetAttackTarget() - if a:IsControler(1-tp) then a,b=b,a end - Duel.SetTargetCard(a) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,a,1,tp,2000) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and bc:IsRelateToEffect(e) - and bc:IsFaceup() and bc:IsRace(RACE_DINOSAUR) then - --That Dinosaur monster gains 2000 ATK until the end of the Battle Phase - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(2000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) - bc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101208052.lua b/pre-release/c101208052.lua deleted file mode 100644 index 2b57009032..0000000000 --- a/pre-release/c101208052.lua +++ /dev/null @@ -1,80 +0,0 @@ ---Evil★Twin キスキル・ディール ---Evil★Twin Ki-sikil Deal ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 1 "Ki-Sikil" monster - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_KI_SIKIL),1,1) - --You can only Link Summon "Evil★Twin Ki-sikil Deal" 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(function(e) return e:GetHandler():IsLinkSummoned() end) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --Apply this effect for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) - e1:SetCost(s.effcost) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_KI_SIKIL,SET_LIL_LA} -s.listed_names={id} -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --Prevent another Link Summon of "Evil★Twin Ki-sikil Deal" 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:IsCode(id) and sumtype&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.costfilter(c) - return c:IsSetCard(SET_LIL_LA) and c:IsMonster() and c:IsAbleToGraveAsCost() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - local c=e:GetHandler() - --Draw 1 card immediately after it resolves - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetCondition(s.drawcon) - e1:SetOperation(s.drawop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,1)) -end -function s.drawcon(e,tp,eg,ep,ev,re,r,rp) - local chainlink=Duel.GetCurrentChain(true)-1 - if not (chainlink>0 and ep==1-tp) then return false end - local trig_p,trig_typ,setcodes=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) - if not (trig_p==tp and (trig_typ&TYPE_MONSTER)>0) then return false end - for _,set in ipairs(setcodes) do - if ((SET_KI_SIKIL&0xfff)==(set&0xfff) and (SET_KI_SIKIL&set)==SET_KI_SIKIL) - or ((SET_LIL_LA&0xfff)==(set&0xfff) and (SET_LIL_LA&set)==SET_LIL_LA) then - return true - end - end -end -function s.drawop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,1-tp,id) - Duel.Draw(tp,1,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c101208053.lua b/pre-release/c101208053.lua deleted file mode 100644 index 9bfc08880c..0000000000 --- a/pre-release/c101208053.lua +++ /dev/null @@ -1,77 +0,0 @@ ---機動石器ドグラード ---Dogurado the Moving Stone Relic ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters, including a Rock monster - Link.AddProcedure(c,nil,2,3,s.matcheck) - --Gains the ATK of 1 Rock monster in your GY - 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:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --Destroy 1 other monster on the field with ATK less than or equal to this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+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_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.matcheck(g,sc,sumtype,tp) - return g:IsExists(Card.IsRace,1,nil,RACE_ROCK,sc,sumtype,tp) -end -function s.atkfilter(c) - return c:IsRace(RACE_ROCK) and c:GetAttack()>0 -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - --This card gains ATK equal to that monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()) - 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) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:HasNonZeroAttack() and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,-g:GetFirst():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:HasNonZeroAttack() - and c:UpdateAttack(-tc:GetAttack())==-tc:GetAttack() then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208055.lua b/pre-release/c101208055.lua deleted file mode 100644 index c4f9298af8..0000000000 --- a/pre-release/c101208055.lua +++ /dev/null @@ -1,82 +0,0 @@ ---精霊の世界 ---The World of Spirits ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Activate - 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) - --Change any monster that is Special Summoned in Attack Position to Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_FZONE) - e2:SetCondition(s.lightdragonsynchrocon) - e2:SetTarget(s.postg) - e2:SetOperation(s.posop) - c:RegisterEffect(e2) - --Destroy all the turn player's Attack Position monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCondition(s.lightdragonsynchrocon) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} -function s.thfilter(c) - return c:IsMonster() and c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) 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,3)) 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.lightdragonsynchroconfilter(c) - return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() -end -function s.lightdragonsynchrocon(e,tp,eg,ev,ep,re,r,rp) - return Duel.IsExistingMatchingCard(s.lightdragonsynchroconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=eg:Filter(Card.IsPosition,nil,POS_ATTACK) - if chk==0 then return #g>0 end - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,0) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetTargetCards(e):Filter(Card.IsPosition,nil,POS_ATTACK) - if #g>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsPosition,Duel.GetTurnPlayer(),LOCATION_MZONE,0,nil,POS_ATTACK) - 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.IsPosition,Duel.GetTurnPlayer(),LOCATION_MZONE,0,nil,POS_ATTACK) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/pre-release/c101208056.lua b/pre-release/c101208056.lua deleted file mode 100644 index 730ff91a2d..0000000000 --- a/pre-release/c101208056.lua +++ /dev/null @@ -1,77 +0,0 @@ ---紋章の明滅 ---Heraldry Flash ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Target any number of monsters to become "Unknown" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - 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.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Set itself from GY during your End Phase if you control a Psychic Xyz monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.setcon) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_UNKNOWN} -function s.tgfilter(c) - return c:IsFaceup() and not c:IsCode(CARD_UNKNOWN) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_MZONE,1,99,nil) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - local c=e:GetHandler() - for tc in tg:Iter() do - --Its name becomes "Unknown" - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_UNKNOWN) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.setconfilter(c) - return c:IsType(TYPE_XYZ) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.setconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsSSetable() and Duel.SSet(tp,c)>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) - end -end \ No newline at end of file diff --git a/pre-release/c101208057.lua b/pre-release/c101208057.lua deleted file mode 100644 index 504902689a..0000000000 --- a/pre-release/c101208057.lua +++ /dev/null @@ -1,85 +0,0 @@ ---フィリアス・ディアベル ---Philias Diabell ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 Level 8 or higher "Diabell" monster from your Deck to your hand, or, if only your opponent controls a monster, you can Special Summon it instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thsptg) - e1:SetOperation(s.thspop) - c:RegisterEffect(e1) - --Make all "Diabell" monsters you currently control gain 500 ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DIABELL} -function s.thspfilter(c,e,tp,sp_check) - return c:IsSetCard(SET_DIABELL) and c:IsLevelAbove(8) - and (c:IsAbleToHand() or (sp_check 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_check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sp_check) - 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_check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - local desc=sp_check and aux.Stringid(id,2) or HINTMSG_ATOHAND - Duel.Hint(HINT_SELECTMSG,tp,desc) - local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,sp_check):GetFirst() - if not sc then return end - if sp_check then - aux.ToHandOrElse(sc,tp, - function() - return sp_check and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - end, - function() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end, - aux.Stringid(id,3) - ) - else - Duel.SendtoHand(sc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sc) - end -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DIABELL),tp,LOCATION_MZONE,0,nil) - if chk==0 then return #g>0 end - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,500) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DIABELL),tp,LOCATION_MZONE,0,nil) - if #g==0 then return end - local c=e:GetHandler() - for tc in g:Iter() do - --It gains 500 ATK - local e1=Effect.CreateEffect(c) - 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 \ No newline at end of file diff --git a/pre-release/c101208058.lua b/pre-release/c101208058.lua deleted file mode 100644 index 77cf4ffd77..0000000000 --- a/pre-release/c101208058.lua +++ /dev/null @@ -1,83 +0,0 @@ ---白き森の魔女 ---Witches of the White Forest ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Activate - 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) - --The first time each "White Forest" monster you control would be destroyed by battle each turn, it is not destroyed - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_WHITE_FOREST)) - e2:SetValue(function(e,re,r,rp) return r&REASON_BATTLE==REASON_BATTLE end) - c:RegisterEffect(e2) - --Make 1 "White Forest" monster you control become a Tuner that turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.tunertg) - e3:SetOperation(s.tunerop) - c:RegisterEffect(e3) -end -s.listed_series={SET_WHITE_FOREST} -function s.thfilter(c) - return c:IsSetCard(SET_WHITE_FOREST) and c:IsMonster() and c:IsAbleToHand() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:GetFirst():IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sg) - local c=e:GetHandler() - --You cannot Special Summon DARK monsters from the Extra Deck for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsAttribute(ATTRIBUTE_DARK) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return c:IsOriginalAttribute(ATTRIBUTE_DARK) end) - end - end -end -function s.nontunertgfilter(c) - return c:IsSetCard(SET_WHITE_FOREST) and not c:IsType(TYPE_TUNER) and c:IsFaceup() -end -function s.tunertg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.nontunertgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.nontunertgfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.nontunertgfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.tunerop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - --It is treated as a Tuner this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetValue(TYPE_TUNER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101208059.lua b/pre-release/c101208059.lua deleted file mode 100644 index bfa49f15ed..0000000000 --- a/pre-release/c101208059.lua +++ /dev/null @@ -1,75 +0,0 @@ ---再世記 ---Regenesis ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Take 1 "Regenesis" monster from your Deck, and either add it to your hand or send it 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:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Special Summon 1 "Regenesis" 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_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_REGENESIS} -function s.thfilter(c,alt) - return s.filter1(c) or (alt and s.filter2(c)) -end -function s.filter1(c) - return c:IsSetCard(SET_REGENESIS) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) -end -function s.filter2(c) - return c:IsAttack(2500) and c:IsDefense(2500) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local alt=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_REGENESIS),tp,LOCATION_MZONE,0,1,nil) - return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,alt) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local alt=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_REGENESIS),tp,LOCATION_MZONE,0,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,alt):GetFirst() - if sc:IsSetCard(SET_REGENESIS) then - aux.ToHandOrElse(sc,tp) - else - Duel.SendtoHand(sc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sc) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_REGENESIS) 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 \ No newline at end of file diff --git a/pre-release/c101208060.lua b/pre-release/c101208060.lua deleted file mode 100644 index 1b79b0c537..0000000000 --- a/pre-release/c101208060.lua +++ /dev/null @@ -1,83 +0,0 @@ ---再世神 ---Torah Regenesis ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Regenesis" monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - 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) - --Special Summon 1 of your banished "Regenesis" monsters - 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_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_REGENESIS} -function s.deckspfilter(c,e,tp) - return c:IsSetCard(SET_REGENESIS) 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.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckspfilter,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 - --Send it to the GY during your opponent's End Phase - aux.DelayedOperation(g,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 - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon from the Extra Deck until the end of the next turn after this card resolves - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function s.rmspfilter(c,e,tp) - return c:IsSetCard(SET_REGENESIS) 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.rmspfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.rmspfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.rmspfilter,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/c101208061.lua b/pre-release/c101208061.lua deleted file mode 100644 index 460108c262..0000000000 --- a/pre-release/c101208061.lua +++ /dev/null @@ -1,74 +0,0 @@ ---超竜災禍 ---Dragocalamity ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Dragon Ruler" monster from your hand, GY, or banishment then you can Xyz Summon 1 "Dragon Ruler" 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:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Return any number of your banished "Dragon Ruler" monsters with different Attributes to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DRAGON_RULER} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.xyzfilter(c,mg) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsXyzSummonable(nil,mg) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DRAGON_RULER),tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=g:Select(tp,1,1,nil):GetFirst() - Duel.XyzSummon(tp,sc,nil,mg,2,99) - end - end -end -function s.tgfilter(c,e) - return c:IsSetCard(SET_DRAGON_RULER) and c:IsFaceup() and c:IsMonster() and c:IsCanBeEffectTarget(e) -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil,e) - if chk==0 then return #g>0 end - local tg=aux.SelectUnselectGroup(g,e,tp,1,#g,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_RTOGRAVE) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,#tg,tp,0) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoGrave(tg,REASON_EFFECT|REASON_RETURN) - end -end \ No newline at end of file diff --git a/pre-release/c101208062.lua b/pre-release/c101208062.lua deleted file mode 100644 index ceed27fb83..0000000000 --- a/pre-release/c101208062.lua +++ /dev/null @@ -1,82 +0,0 @@ ---ARG☆S-GiantKilling ---Argostars - Giant Hunting ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Argostars" monster from your Deck to your hand, then, immediately after this effect resolves, you can Normal Summon 1 Warrior monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_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.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Return 2 cards on the field, including 1 "Argostars" card, to the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.retthtg) - e2:SetOperation(s.retthop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ARGOSTARS} -function s.thfilter(c) - return c:IsSetCard(SET_ARGOSTARS) 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.trapfilter(c) - return c:IsContinuousTrap() and (c:IsLocation(LOCATION_MZONE) or (c:IsTrapMonster() and c:IsLocation(LOCATION_STZONE))) and c:IsFaceup() -end -function s.nsfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,tc) - Duel.ShuffleHand(tp) - if Duel.IsExistingMatchingCard(s.trapfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.BreakEffect() - Duel.Summon(tp,sc,true,nil) - end - end - end -end -function s.argstrapfilter(c,tp) - return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and c:IsControler(tp) and c:IsFaceup() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(s.argstrapfilter,1,nil,tp) -end -function s.retthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local rg=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) - if chk==0 then return #rg>=2 and aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,0) end - local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_RTOHAND) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) -end -function s.retthop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208063.lua b/pre-release/c101208063.lua deleted file mode 100644 index c7dcb14a8f..0000000000 --- a/pre-release/c101208063.lua +++ /dev/null @@ -1,106 +0,0 @@ ---原質の炉心貫通 ---Materiactor Meltthrough ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Excavate the top 6 cards of your Deck, and if you do, place them on top of the Deck in any order - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.excavtg) - e1:SetOperation(s.excavop) - c:RegisterEffect(e1) - --Special Summon 1 "Materiactor" Xyz Monster from your Extra Deck, by using 1 Level 3 Normal Monster you control as material (this is treated as an Xyz Summon) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1) - e2:SetCost(aux.PayLPCost(1500)) - e2:SetTarget(s.xyztg) - e2:SetOperation(s.xyzop) - c:RegisterEffect(e2) - --Attach the top card of your Deck to 1 "Materiactor" Xyz Monster you control - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e3:SetCondition(function(e,tp,eg) return eg:IsExists(function(c) return c:IsXyzSummoned() and c:IsType(TYPE_XYZ) and c:IsFaceup() end,1,nil) end) - e3:SetTarget(s.attachtg) - e3:SetOperation(s.attachop) - c:RegisterEffect(e3) -end -s.listed_series={SET_MATERIACTOR} -function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=6 end -end -function s.excavop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then - Duel.ConfirmDecktop(tp,6) - Duel.SortDecktop(tp,tp,6) - end -end -function s.normalfilter(c,e,tp) - if not (c:IsLevel(3) and c:IsType(TYPE_NORMAL) and c:IsFaceup()) then return false end - 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) -end -function s.xyzspfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_MATERIACTOR) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.normalfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.xyzop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local mc=Duel.SelectMatchingCard(tp,s.normalfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() - if mc then - Duel.HintSelection(mc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mc):GetFirst() - if sc then - sc:SetMaterial(mc) - Duel.Overlay(sc,mc) - if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.attachfilter(c,tp,top_c) - return c:IsSetCard(SET_MATERIACTOR) and c:IsType(TYPE_XYZ) and c:IsFaceup() and top_c:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) -end -function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local top_c=Duel.GetDecktopGroup(tp,1):GetFirst() - return top_c and Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_MZONE,0,1,nil,tp,top_c) - end -end -function s.attachop(e,tp,eg,ep,ev,re,r,rp) - local top_c=Duel.GetDecktopGroup(tp,1):GetFirst() - if not top_c then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4)) - local xyzc=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,top_c):GetFirst() - if xyzc then - Duel.HintSelection(xyzc) - Duel.DisableShuffleCheck() - Duel.Overlay(xyzc,top_c) - end -end \ No newline at end of file diff --git a/pre-release/c101208064.lua b/pre-release/c101208064.lua deleted file mode 100644 index 4186cf8ed3..0000000000 --- a/pre-release/c101208064.lua +++ /dev/null @@ -1,77 +0,0 @@ ---M∀LICE IN THE MIRROR ---Maliss in the Mirror ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Banish 1 "Maliss" monster from your hand or field and negate 1 face-up opponent's monster's effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE) - 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.rmdistg) - e1:SetOperation(s.rmdisop) - c:RegisterEffect(e1) - --Banish 1 "Maliss" card from your GY and add 1 "Maliss" card with the same type (Monster, Spell, or Trap) from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH+CATEGORY_TOHAND) - 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.rmthtg) - e2:SetOperation(s.rmthop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MALISS} -function s.rmdisfilter(c) - return c:IsSetCard(SET_MALISS) and c:IsMonster() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToRemove() -end -function s.rmdistg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsNegatableMonster() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(s.rmdisfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.rmdisop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmdisfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) - if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 - and g:GetFirst():IsLocation(LOCATION_REMOVED) - and tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) - end -end -function s.rmthfilter(c,tp) - return c:IsSetCard(SET_MALISS) and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetMainCardType()) -end -function s.thfilter(c,typ) - return c:IsSetCard(SET_MALISS) and c:IsType(typ) and c:IsAbleToHand() -end -function s.rmthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.rmthfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.rmthfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmthfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.rmthop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_REMOVED) 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:GetMainCardType()) - 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/c101208065.lua b/pre-release/c101208065.lua deleted file mode 100644 index 65cb1faf05..0000000000 --- a/pre-release/c101208065.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ワイト・マスター ---Wight Master ---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) - --If your "King of the Skull Servants" attacks a Defense Position monster, inflict piercing battle damage to your opponent - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsCode(36021814) end) - c:RegisterEffect(e1) - --Send 1 "Skull Servant" or 1 monster that mentions it from your Deck to the GY and Special Summon 1 "Skull Servant" or "King of the Skull Servants" from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - 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) - e2:SetTarget(s.tgsptg) - e2:SetOperation(s.tgspop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_SKULL_SERVANT,36021814} --"King of the Skull Servants" -function s.spfilter(c,e,tp) - return c:IsCode(CARD_SKULL_SERVANT,36021814) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.tgfilter(c) - return (c:IsCode(CARD_SKULL_SERVANT) or (c:IsMonster() and c:ListsCode(CARD_SKULL_SERVANT))) and c:IsAbleToGrave() -end -function s.tgsptg(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) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) 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_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.tgspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon for the rest of this turn, except Zombie 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_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_ZOMBIE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101208066.lua b/pre-release/c101208066.lua deleted file mode 100644 index d882c2e186..0000000000 --- a/pre-release/c101208066.lua +++ /dev/null @@ -1,57 +0,0 @@ ---械刀婪魔皇断 ---Gordian Schneider ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish cards from your hand and/or from your Extra Deck face-down and return the targeted cards to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsMainPhase() and not Duel.CheckPhaseActivity() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() and chkc:IsFaceup() and chkc~=c end - local ct1=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_HAND,0,c,tp,POS_FACEDOWN) - local ct2=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil,tp,POS_FACEDOWN) - if chk==0 then return (ct1>=1 or ct2>=6) and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local ct=ct1+(ct2//6) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,c) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA) -end -function s.rescon(ct) - return function(sg,e,tp,mg) - local count=sg:FilterCount(Card.IsLocation,nil,LOCATION_HAND) - local remaining=ct-count - if remaining<0 then return false,true end - local extracnt=sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) - local extra_needed=remaining*6 - if extracnt>extra_needed then return false,true end - return extracnt==extra_needed,extracnt>extra_needed - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - local ct=#tg - if ct==0 then return end - local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil,tp,POS_FACEDOWN) - local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil,tp,POS_FACEDOWN) - if (#g1+#g2//6)0 then - Duel.BreakEffect() - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end -end diff --git a/pre-release/c101208067.lua b/pre-release/c101208067.lua deleted file mode 100644 index 13f6d595cf..0000000000 --- a/pre-release/c101208067.lua +++ /dev/null @@ -1,75 +0,0 @@ ---カオティック・エレメンツ ---Chaotic Elements ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 Level 5 or higher LIGHT or DARK Pyro or Aqua monster 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+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Take control of 1 monster your opponent controls until the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.ctrlcon) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.crtltg) - e2:SetOperation(s.crtlop) - c:RegisterEffect(e2) -end -function s.thfilter(c) - return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and c:IsRace(RACE_PYRO|RACE_AQUA) 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() - if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,tc) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - if Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,3,nil,RACE_PYRO|RACE_AQUA) - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc) - if #sg==0 then return end - Duel.HintSelection(sg) - Duel.BreakEffect() - Duel.Destroy(sg,REASON_EFFECT) - end - end -end -function s.ctrlconfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and c:IsRace(RACE_PYRO|RACE_AQUA) and c:IsFaceup() -end -function s.ctrlcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.ctrlconfilter,tp,0,LOCATION_MZONE,1,nil) -end -function s.crtltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) -end -function s.crtlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.GetControl(tc,tp,PHASE_END,1) - end -end \ No newline at end of file diff --git a/pre-release/c101208068.lua b/pre-release/c101208068.lua deleted file mode 100644 index 6bb41c7e7f..0000000000 --- a/pre-release/c101208068.lua +++ /dev/null @@ -1,54 +0,0 @@ ---夙めてはしろ 二人ではしろ ---Do it Early, Do it Together ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Your opponent banishes 7 cards from their Extra Deck and/or the top of their Deck, face-down - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCondition(s.rmcon) - e1:SetCost(s.rmcost) - e1:SetTarget(s.rmtg) - e1:SetOperation(s.rmop) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,id),tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) -end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetDecktopGroup(tp,7) - if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==7 end - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEDOWN,REASON_COST) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local p=1-tp - local dg=Duel.GetDecktopGroup(p,7) - local exg=Duel.GetFieldGroup(p,LOCATION_EXTRA,0) - return (dg+exg):IsExists(Card.IsAbleToRemove,7,nil,p,POS_FACEDOWN,REASON_EFFECT) - end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,1-tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local p=1-tp - local rg=nil - local exg=Duel.GetMatchingGroup(Card.IsAbleToRemove,p,LOCATION_EXTRA,0,nil,p,POS_FACEDOWN,REASON_EFFECT) - if #exg>0 then - local min=math.max(0,7-Duel.GetFieldGroupCount(p,LOCATION_DECK,0)) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE) - rg=exg:Select(p,min,7,nil) - rg:Merge(Duel.GetDecktopGroup(p,7-#rg)) - else - rg=Duel.GetDecktopGroup(p,7) - end - if #rg>0 then - Duel.DisableShuffleCheck() - Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT,nil,p) - end -end \ No newline at end of file diff --git a/pre-release/c101208069.lua b/pre-release/c101208069.lua deleted file mode 100644 index 580f45400e..0000000000 --- a/pre-release/c101208069.lua +++ /dev/null @@ -1,88 +0,0 @@ ---七星天流抜刀術-「破軍」 ---Seven Star Sky Style Battojutsu - "Hagun" ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Equip 1 Level 7 monster with the same Type, but a different name, to 1 face-up monster you control, from your hand or Deck as an Equip Spell - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_EQUIP+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetTarget(s.eqtg) - e1:SetOperation(s.eqop) - 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_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -function s.tgfilter(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.eqpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp,c:GetRace(),c:GetCode()) -end -function s.eqpfilter(c,tp,rac,code) - return c:IsLevel(7) and c:IsRace(rac) and not c:IsCode(code) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.eqtg(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,tp) end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if e:GetHandler():IsLocation(LOCATION_HAND) then ft=ft-1 end - if chk==0 then return ft>0 and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_SZONE) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsFaceup() and tc:IsRelateToEffect(e)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=Duel.SelectMatchingCard(tp,s.eqpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp,tc:GetRace(),tc:GetCode()):GetFirst() - if ec and Duel.Equip(tp,ec,tc) then - --The equipped monster gains 700 ATK - local e1=Effect.CreateEffect(ec) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - ec:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(ec) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(function(e,c) return c==tc end) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - ec:RegisterEffect(e2) - --Return that Equip Card to the hand during the End Phase - aux.DelayedOperation(ec,PHASE_END,id,e,tp,function() Duel.SendtoHand(ec,nil,REASON_EFFECT) end,nil,0,1,aux.Stringid(id,2)) - end -end -function s.thconfilter(c,tp) - return c:IsPreviousControler(1-tp) and (c:GetPreviousLevelOnField()>=8 or c:GetPreviousRankOnField()>=8) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.thconfilter,1,nil,tp) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208071.lua b/pre-release/c101208071.lua deleted file mode 100644 index 064f745d9c..0000000000 --- a/pre-release/c101208071.lua +++ /dev/null @@ -1,73 +0,0 @@ ---エターナル・サンシャイン ---Eternal Sunshine ---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) - --Monsters you control gain 500 DEF for each "Ancient Fairy Dragon", and monster that mentions it, that you control - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(s.defval) - c:RegisterEffect(e1) - --Halve the current ATK/DEF and negate the effects of 1 opponent's monster until the end of that turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(s.discond) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} -function s.afdfilter(c) - return (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) or (c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) and c:IsMonster())) and c:IsFaceup() -end -function s.defval(e,c) - return Duel.GetMatchingGroupCount(s.afdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*500 -end -function s.discond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,id)0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_DIABELL) and c:IsSpellTrap() 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) -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/c101208073.lua b/pre-release/c101208073.lua deleted file mode 100644 index c28f099bcd..0000000000 --- a/pre-release/c101208073.lua +++ /dev/null @@ -1,77 +0,0 @@ ---罪なき罪宝 ---Sinless Sinful Spoils ---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) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_DIABELL} -function s.diabellspfilter(c,e,tp) - return c:IsSetCard(SET_DIABELL) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spfilter(c,e,tp) - return c:IsMonsterCard() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if not chkc:IsControler(tp) then return false end - local label=e:GetLabel() - if label==1 then - return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.diabellspfilter(chkc,e,tp) - elseif label==2 then - return chkc:IsLocation(LOCATION_STZONE) and s.spfilter(chkc,e,tp) - end - end - local mzone_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local b1=mzone_chk and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) - and Duel.IsExistingTarget(s.diabellspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) - local b2=mzone_chk and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_STZONE,0,1,nil,e,tp) - 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) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - if op==1 then - e:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) - g=Duel.SelectTarget(tp,s.diabellspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_STZONE,0,1,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Special Summon 1 "Diabell" monster from your GY or banishment - local tc=Duel.GetFirstTarget() - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)>0 and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --Special Summon 1 face-up Monster Card from your Spell & Trap Zone - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c101208074.lua b/pre-release/c101208074.lua deleted file mode 100644 index 9f878abf51..0000000000 --- a/pre-release/c101208074.lua +++ /dev/null @@ -1,91 +0,0 @@ ---天地再世 ---Regenesis Birth ---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) - --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_SZONE) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetCost(s.poscost) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - c:RegisterEffect(e1) - --Special Summon as many "Regenesis" monsters with different names as possible from your hand, GY, and/or banishment - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - 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:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_REGENESIS} -function s.poscostfilter(c) - return c:IsSetCard(SET_REGENESIS) and c:IsMonster() and c:IsAbleToGraveAsCost() -end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsCanTurnSet() 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:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - end -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.spfilter(c,e,tp) - return c:IsSetCard(SET_REGENESIS) 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_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) - if #tg==0 or ft<=0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local ct=math.min(ft,tg:GetClassCount(Card.GetCode)) - local g=aux.SelectUnselectGroup(tg,e,tp,ct,ct,aux.dncheck,1,tp,HINTMSG_SPSUMMON) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - --Send them to the GY during the End Phase - aux.DelayedOperation(g,PHASE_END,id,e,tp, - function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, - nil,0,1,aux.Stringid(id,2) - ) - end -end \ No newline at end of file diff --git a/pre-release/c101208075.lua b/pre-release/c101208075.lua deleted file mode 100644 index 6b08cdbeb0..0000000000 --- a/pre-release/c101208075.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ライゼオル・マスドライバー ---Ryzeal Mass Driver ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Apply the following effect then you can attach this card to a Rank 4 Xyz Monster you control as material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --Banish 1 card from your opponent's GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2:SetTarget(s.rmvtg) - e2:SetOperation(s.rmvop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RYZEAL} -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_RYZEAL),tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,1000) -end -function s.xyzfilter(c,mc,tp) - return c:IsType(TYPE_XYZ) and c:IsRank(4) and c:IsFaceup() and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --"Ryzeal" monsters you control will gain 1000 ATK for the rest of this turn - 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:IsSetCard(SET_RYZEAL) 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)) - if c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - c:CancelToGrave() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp):GetFirst() - if tc then - Duel.HintSelection(tc) - Duel.BreakEffect() - if tc:IsImmuneToEffect(e) then return end - Duel.Overlay(tc,c) - end - end -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,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 - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208076.lua b/pre-release/c101208076.lua deleted file mode 100644 index 773e1debce..0000000000 --- a/pre-release/c101208076.lua +++ /dev/null @@ -1,98 +0,0 @@ ---竜華襲焉 ---Ryu-Ge Ruin ---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) - --Your opponent cannot target "Ryu-Ge" 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_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_RYU_GE)) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --Destroy 1 monster on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - 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:SetCondition(s.descon) - e2:SetCost(s.descost) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --Set 1 non-Continuous "Ryu-Ge" Trap from your Deck, GY, or banishment - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_RYU_GE} -function s.desconfilter(c) - return c:IsSetCard(SET_RYU_GE) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE|LOCATION_EXTRA,0,1,nil) -end -function s.tdfilter(c) - return c:IsSetCard(SET_RYU_GE) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) - and c:IsAbleToDeckAsCost() -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,2,2,nil) - local rvg,hintg=g:Split(Card.IsLocation,nil,LOCATION_HAND) - if #rvg>0 then - Duel.ConfirmCards(1-tp,rvg) - end - if #hintg>0 then - Duel.HintSelection(hintg) - end - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,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.setfilter(c) - return c:IsSetCard(SET_RYU_GE) and c:IsTrap() and not c:IsContinuousTrap() - and c:IsSSetable() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) -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|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,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/c101208077.lua b/pre-release/c101208077.lua deleted file mode 100644 index f8efea86d6..0000000000 --- a/pre-release/c101208077.lua +++ /dev/null @@ -1,78 +0,0 @@ ---貴き黄金郷のエルドリクシル ---Eldlixir of the Exalted Golden Land ---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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id) - e1:SetCost(aux.PayLPCost(800)) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_names={CARD_GOLDEN_LORD} -s.listed_series={SET_GOLDEN_LAND,SET_ELDLIXIR} -function s.setfilter(c) - return c:IsSetCard({SET_GOLDEN_LAND,SET_ELDLIXIR}) and c:IsSSetable() and c:IsFaceup() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_GOLDEN_LAND,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT) - local b2=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_REMOVED,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_EITHER,LOCATION_MZONE) - elseif op==2 then - e:SetCategory(0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Special Summon this card as a Normal Monster - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_GOLDEN_LAND,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT)) then return end - c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TRAP) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) - c:AddMonsterAttributeComplete() - if Duel.SpecialSummonComplete()==0 then return end - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_GOLDEN_LORD),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - end - elseif op==2 then - --Set 1 of your banished "Golden Land" or "Eldlixir" Spells/Traps - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c101208078.lua b/pre-release/c101208078.lua deleted file mode 100644 index 94e73c9028..0000000000 --- a/pre-release/c101208078.lua +++ /dev/null @@ -1,64 +0,0 @@ ---列王詩篇 ---The Psalms of Kings ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Negate an opponent's activated monster effect on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) - --If you have no monsters in your GY, you can activate this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e2:SetCondition(function(e) return not Duel.IsExistingMatchingCard(Card.IsMonster,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end) - c:RegisterEffect(e2) -end -s.listed_series={SET_DOMINUS} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local trig_p,trig_typ,trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_LOCATION) - return trig_p==1-tp and trig_typ&TYPE_MONSTER>0 and trig_loc&LOCATION_MZONE>0 -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local act_from_hand_chk=(e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND)) and 1 or 0 - e:SetLabel(act_from_hand_chk) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thfilter(c) - return c:IsSetCard(SET_DOMINUS) and c:IsAbleToHand() -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and Duel.IsExistingMatchingCard(Card.IsTrap,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()==1 then - --You cannot activate monster effects in the hand, GY, or banishment until the end of the next 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_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(function(e,re) return re:IsMonsterEffect() and re:GetHandler():IsLocation(LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) 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/c101208079.lua b/pre-release/c101208079.lua deleted file mode 100644 index 66c9915da1..0000000000 --- a/pre-release/c101208079.lua +++ /dev/null @@ -1,69 +0,0 @@ ---竜の精神 ---Dragon's Mind ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Negate the activation of a Spell/Trap Card, or monster effect, and if you do, destroy that card. - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,id) - e1:SetCondition(s.negcon) - e1:SetTarget(s.negtg) - e1:SetOperation(s.negop) - c:RegisterEffect(e1) - --Set this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.PayLPCost(2500)) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -function s.negconfilter(c) - return c:IsFaceup() and (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) -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(s.negconfilter,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 -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.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsSSetable() and Duel.SSet(tp,c)>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) - end -end \ No newline at end of file diff --git a/pre-release/c101208080.lua b/pre-release/c101208080.lua deleted file mode 100644 index e79cd38041..0000000000 --- a/pre-release/c101208080.lua +++ /dev/null @@ -1,52 +0,0 @@ ---アブダクション ---Abduction ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Banish 1 monster from your Deck or Extra Deck and take control of opponent's monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_CONTROL) - 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,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.rmtg) - e1:SetOperation(s.rmop) - c:RegisterEffect(e1) -end -function s.ctfilter(c,tp) - if not (c:IsFaceup() and c:IsAbleToChangeControler()) then return false end - local original_lvrklnk=(c:HasLevel() and c:GetOriginalLevel()) - or (c:HasRank() and c:GetOriginalRank()) - or (c:IsLinkMonster() and c:GetLink()) - return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c:GetOriginalRace(),c:GetOriginalAttribute(),c,original_lvrklnk) -end -function s.rmfilter(c,race,attr,tc,lvrklnk) - return c:IsAbleToRemove() and c:IsOriginalRace(race) and c:IsOriginalAttribute(attr) - and ((tc:HasLevel() and c:IsOriginalLevel(lvrklnk)) - or (tc:HasRank() and c:IsOriginalRank(lvrklnk)) - or (tc:IsLinkMonster() and c:IsLink(lvrklnk))) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 - and Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end - local original_lvrklnk=(tc:HasLevel() and tc:GetOriginalLevel()) - or (tc:HasRank() and tc:GetOriginalRank()) - or (tc:IsLinkMonster() and tc:GetLink()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rc=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc:GetOriginalRace(),tc:GetOriginalAttribute(),tc,original_lvrklnk):GetFirst() - if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and rc:IsLocation(LOCATION_REMOVED) - and Duel.GetControl(tc,tp) and rc:IsOriginalCodeRule(tc:GetOriginalCodeRule()) then - tc:NegateEffects(e:GetHandler(),RESET_CONTROL) - end -end \ No newline at end of file diff --git a/pre-release/c101208101.lua b/pre-release/c101208101.lua deleted file mode 100644 index 9a7232c4cb..0000000000 --- a/pre-release/c101208101.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ウィザード@イグニスター ---Wizard @Ignister ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both this card and 1 DARK Cyberse monster from your GY in Defense Position - 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_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Change the battle position of 1 monster your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.postg) - e2:SetOperation(s.posop) - c:RegisterEffect(e2) -end -function s.spconfilter(c) - return c:IsRace(RACE_CYBERSE) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_CYBERSE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - 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+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then - Duel.SpecialSummon(Group.FromCards(c,tc),0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - --You cannot Special Summon for the rest of this turn, except Cyberse 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:IsRace(RACE_CYBERSE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsCanChangePosition() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,0,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 \ No newline at end of file diff --git a/pre-release/c101208102.lua b/pre-release/c101208102.lua deleted file mode 100644 index d15d7c1154..0000000000 --- a/pre-release/c101208102.lua +++ /dev/null @@ -1,68 +0,0 @@ ---バックアップ@イグニスター ---Backup @Ignister ---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_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 DARK Cyberse monster from your Deck to your hand, except "Backup @Ignister", then discard 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.spconfilter(c) - return c:IsRace(RACE_CYBERSE) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) -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:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_CYBERSE) 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) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local 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) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end \ No newline at end of file diff --git a/pre-release/c101208103.lua b/pre-release/c101208103.lua deleted file mode 100644 index 41321ba568..0000000000 --- a/pre-release/c101208103.lua +++ /dev/null @@ -1,77 +0,0 @@ ---クリクリンク@イグニスター ---Kurikulink @Ignister ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand or GY - 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|LOCATION_GRAVE) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate an effect that targets a Cyberse monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.discon) - e2:SetCost(aux.SelfTributeCost) - e2:SetTarget(s.distg) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) - c:RegisterEffect(e2) -end -s.listed_series={SET_IGNISTER} -function s.spcostfilter(c,tp) - return c:IsSetCard(SET_IGNISTER) and Duel.GetMZoneCount(tp,c)>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,tp) - Duel.Release(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 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 -function s.disconfilter(c) - return c:IsRace(RACE_CYBERSE) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.tgfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsRace(RACE_CYBERSE) and c:IsFaceup() -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - if not (Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,0,1,nil) - and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) - and Duel.IsChainDisablable(ev)) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsExists(s.tgfilter,1,nil,tp) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) -end \ No newline at end of file diff --git a/pre-release/c101208104.lua b/pre-release/c101208104.lua deleted file mode 100644 index 128c497657..0000000000 --- a/pre-release/c101208104.lua +++ /dev/null @@ -1,101 +0,0 @@ ---ファイアウォール・S・ドラゴン ---Firewall Saber Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Add 1 Cyberse monster from your GY or banishment to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.gyrmthtg) - e1:SetOperation(s.gyrmthop) - c:RegisterEffect(e1) - --Make this card's level become the Level of 1 other Cyberse monster you control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LVCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.lvtg) - e2:SetOperation(s.lvop) - c:RegisterEffect(e2) - --Add 1 "A.I." 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_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) - e3:SetTarget(s.deckthtg) - e3:SetOperation(s.deckthop) - c:RegisterEffect(e3) -end -s.listed_series={SET_AI} -function s.gyrmthfilter(c) - return c:IsRace(RACE_CYBERSE) and c:IsFaceup() and c:IsAbleToHand() -end -function s.gyrmthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.gyrmthfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.gyrmthfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.gyrmthfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.gyrmthop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function s.lvfilter(c,lv) - return c:IsRace(RACE_CYBERSE) and c:HasLevel() and c:IsFaceup() and not c:IsLevel(lv) -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - local lv=c:GetLevel() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc~=c and s.lvfilter(chkc,lvl) end - if chk==0 then return c:HasLevel() and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,c,lv) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,c,lv) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:HasLevel() - and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:HasLevel() then - --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(tc:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end -function s.deckthfilter(c) - return c:IsSetCard(SET_AI) and c:IsSpell() and c:IsAbleToHand() -end -function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.deckthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 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/c101208105.lua b/pre-release/c101208105.lua deleted file mode 100644 index 12fdc4c6cf..0000000000 --- a/pre-release/c101208105.lua +++ /dev/null @@ -1,63 +0,0 @@ ---コード・イグナイター ---Code Igniter ---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 Cyberse Ritual 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e1:SetTarget(s.thtg(s.thfilter1)) - e1:SetOperation(s.thop(s.thfilter1)) - c:RegisterEffect(e1) - --Ritual Summon 1 Ritual Monster from your hand, by Tributing monsters from your hand and/or field whose total Levels equal or exceed its Level - local e2=Ritual.CreateProc(c,RITPROC_GREATER,nil,nil,aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.dxmcostgen(1,1,nil)) - c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) - --Add 1 "A.I." Trap 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_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) - e3:SetTarget(s.thtg(s.thfilter2)) - e3:SetOperation(s.thop(s.thfilter2)) - c:RegisterEffect(e3) -end -s.listed_series={SET_AI} -function s.thfilter1(c) - return c:IsRace(RACE_CYBERSE) and c:IsRitualMonster() and c:IsAbleToHand() -end -function s.thfilter2(c) - return c:IsSetCard(SET_AI) and c:IsTrap() and c:IsAbleToHand() -end -function s.thtg(filter) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function s.thop(filter) - return function(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,filter,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 \ No newline at end of file diff --git a/pre-release/c101208106.lua b/pre-release/c101208106.lua deleted file mode 100644 index 25eed615c5..0000000000 --- a/pre-release/c101208106.lua +++ /dev/null @@ -1,92 +0,0 @@ ---アコード・トーカー@イグニスター ---Accode Talker @Ignister ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 3+ Effect Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) - --Special Summon as many Cyberse monsters with 2300 ATK from your GY as possible to your zones this card points to - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - 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():IsLinkSummoned() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the activation of an opponent's card or effect, and if you do, banish that card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - 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(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp,zone) - return c:IsRace(RACE_CYBERSE) and c:IsAttack(2300) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLinkedZone(tp)) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local zone=c:GetLinkedZone(tp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) - if c:IsRelateToEffect(e) and c:IsFaceup() and zone>0 and ft>0 then - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp,zone) - if #g>0 then - local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone) - if ct>0 then - c:UpdateAttack(ct*500) - end - end - end - --You cannot Special Summon for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.negcostfilter(c,lg) - return c:IsLinkMonster() and lg:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local lg=e:GetHandler():GetLinkedGroup() - if chk==0 then return #lg>0 and Duel.CheckReleaseGroupCost(tp,s.negcostfilter,1,false,nil,nil,lg) end - local g=Duel.SelectReleaseGroupCost(tp,s.negcostfilter,1,1,false,nil,nil,lg) - Duel.Release(g,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - local rc=re:GetHandler() - local relation=rc:IsRelateToEffect(re) - if chk==0 then return rc:IsAbleToRemove(tp) - or (not relation and Duel.IsPlayerCanRemove(tp)) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - if relation then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,rc:GetPreviousLocation()) - end -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101208107.lua b/pre-release/c101208107.lua deleted file mode 100644 index 5da10a08fb..0000000000 --- a/pre-release/c101208107.lua +++ /dev/null @@ -1,81 +0,0 @@ ---繋がり-Ai- ---TA.I.es ---Scripted by Eerie Code -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+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - 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) -end -s.listed_series={SET_IGNISTER} -function s.revfilter(c,e,tp,mmz_chk) - if not c:IsRace(RACE_CYBERSE) or c:IsPublic() then return false end - if c:IsAttribute(ATTRIBUTE_DARK) then - return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) - else - return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetAttribute()) - end -end -function s.thfilter1(c) - return c:IsAttributeExcept(ATTRIBUTE_DARK) and c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsAbleToHand() -end -function s.thfilter2(c,attr) - return c:IsSetCard(SET_IGNISTER) and c:IsMonster() and c:IsAttributeExcept(attr) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chk==0 then return Duel.IsExistingMatchingCard(s.revfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mmz_chk) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mmz_chk):GetFirst() - Duel.ConfirmCards(1-tp,rc) - Duel.ShuffleHand(tp) - e:SetLabelObject(rc) - Duel.SetTargetCard(rc) - local category=rc:IsAttribute(ATTRIBUTE_DARK) and CATEGORY_SPECIAL_SUMMON or CATEGORY_TODECK - Duel.SetOperationInfo(0,category,rc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetLabelObject() - if rc:IsRelateToEffect(e) then - local success=nil - local thfilter=nil - if rc:IsAttribute(ATTRIBUTE_DARK) then - --Special Summon the revealed monster, and if you do, add 1 non-DARK Level 4 or lower Cyberse monster from your Deck to your hand - success=Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEUP)>0 - thfilter=s.thfilter1 - else - --Shuffle the revealed monster into the Deck, and if you do, add 1 "@Ignister" monster with a different Attribute from your Deck to your hand - Duel.ConfirmCards(1-tp,rc) - success=Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - thfilter=s.thfilter2 - end - if success then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetAttribute()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon for the rest of this turn after this card resolves, except Cyberse 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_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_CYBERSE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101208108.lua b/pre-release/c101208108.lua deleted file mode 100644 index ef8fbb3487..0000000000 --- a/pre-release/c101208108.lua +++ /dev/null @@ -1,68 +0,0 @@ ---Ai-ボウ ---PA.I.rtners ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Negate the effects of face-up cards your opponent controls equal to the number of Cyberse monsters you control with 2300 original ATK - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - 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,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Special Summon 1 of your banished Cyberse 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,1}) - e2:SetCost(aux.SelfBanishCost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.tgctfilter(c) - return c:IsRace(RACE_CYBERSE) and c:IsBaseAttack(2300) and c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end - local ct=Duel.GetMatchingGroupCount(s.tgctfilter,tp,LOCATION_MZONE,0,nil) - if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,ct,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 return end - local c=e:GetHandler() - for tc in tg:Iter() do - tc:NegateEffects(c,RESET_PHASE|PHASE_END,true) - end -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_CYBERSE) 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_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,false,false,POS_FACEUP) - end -end \ No newline at end of file From 78917dd7b806d035961afabc2d1e5fa6f7b42aa0 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Tue, 28 Jan 2025 13:49:48 +0200 Subject: [PATCH 2/2] Add files via upload --- official/c16926971.lua | 101 +++++++++++++++++++++++++++++++ official/c17749468.lua | 104 ++++++++++++++++++++++++++++++++ official/c18861006.lua | 67 +++++++++++++++++++++ official/c19093698.lua | 63 +++++++++++++++++++ official/c19715246.lua | 115 +++++++++++++++++++++++++++++++++++ official/c20938824.lua | 81 +++++++++++++++++++++++++ official/c21050476.lua | 83 +++++++++++++++++++++++++ official/c21846145.lua | 52 ++++++++++++++++ official/c22669793.lua | 78 ++++++++++++++++++++++++ official/c22812963.lua | 83 +++++++++++++++++++++++++ official/c22938501.lua | 98 ++++++++++++++++++++++++++++++ official/c23151193.lua | 83 +++++++++++++++++++++++++ official/c2501624.lua | 91 ++++++++++++++++++++++++++++ official/c27781371.lua | 91 ++++++++++++++++++++++++++++ official/c28903523.lua | 73 ++++++++++++++++++++++ official/c30118811.lua | 68 +++++++++++++++++++++ official/c30350202.lua | 84 ++++++++++++++++++++++++++ official/c30964246.lua | 82 +++++++++++++++++++++++++ official/c31086840.lua | 69 +++++++++++++++++++++ official/c31786838.lua | 75 +++++++++++++++++++++++ official/c31809476.lua | 77 +++++++++++++++++++++++ official/c34873741.lua | 65 ++++++++++++++++++++ official/c35095329.lua | 88 +++++++++++++++++++++++++++ official/c3723262.lua | 84 ++++++++++++++++++++++++++ official/c3743515.lua | 86 ++++++++++++++++++++++++++ official/c38625110.lua | 54 +++++++++++++++++ official/c39138610.lua | 92 ++++++++++++++++++++++++++++ official/c39848658.lua | 67 +++++++++++++++++++++ official/c42021064.lua | 77 +++++++++++++++++++++++ official/c42209438.lua | 83 +++++++++++++++++++++++++ official/c43143567.lua | 102 +++++++++++++++++++++++++++++++ official/c43321985.lua | 60 ++++++++++++++++++ official/c4398189.lua | 83 +++++++++++++++++++++++++ official/c44265115.lua | 98 ++++++++++++++++++++++++++++++ official/c45488703.lua | 82 +++++++++++++++++++++++++ official/c4575541.lua | 74 +++++++++++++++++++++++ official/c4965193.lua | 111 ++++++++++++++++++++++++++++++++++ official/c5088741.lua | 63 +++++++++++++++++++ official/c53276089.lua | 78 ++++++++++++++++++++++++ official/c5414777.lua | 82 +++++++++++++++++++++++++ official/c56100345.lua | 63 +++++++++++++++++++ official/c56322832.lua | 134 +++++++++++++++++++++++++++++++++++++++++ official/c57448410.lua | 51 ++++++++++++++++ official/c5800323.lua | 81 +++++++++++++++++++++++++ official/c58053438.lua | 64 ++++++++++++++++++++ official/c58201062.lua | 87 ++++++++++++++++++++++++++ official/c58931850.lua | 60 ++++++++++++++++++ official/c59323650.lua | 78 ++++++++++++++++++++++++ official/c60145298.lua | 75 +++++++++++++++++++++++ official/c60268386.lua | 88 +++++++++++++++++++++++++++ official/c61480937.lua | 92 ++++++++++++++++++++++++++++ official/c64998567.lua | 68 +++++++++++++++++++++ official/c65114115.lua | 88 +++++++++++++++++++++++++++ official/c66059345.lua | 106 ++++++++++++++++++++++++++++++++ official/c66102515.lua | 77 +++++++++++++++++++++++ official/c66236707.lua | 57 ++++++++++++++++++ official/c6636319.lua | 80 ++++++++++++++++++++++++ official/c67171933.lua | 83 +++++++++++++++++++++++++ official/c67359907.lua | 77 +++++++++++++++++++++++ official/c70538272.lua | 86 ++++++++++++++++++++++++++ official/c71750854.lua | 69 +++++++++++++++++++++ official/c77571454.lua | 72 ++++++++++++++++++++++ official/c78293584.lua | 85 ++++++++++++++++++++++++++ official/c78693036.lua | 78 ++++++++++++++++++++++++ official/c79015062.lua | 81 +++++++++++++++++++++++++ official/c79415624.lua | 92 ++++++++++++++++++++++++++++ official/c81476402.lua | 63 +++++++++++++++++++ official/c82699999.lua | 66 ++++++++++++++++++++ official/c83711531.lua | 79 ++++++++++++++++++++++++ official/c84433129.lua | 78 ++++++++++++++++++++++++ official/c85442146.lua | 69 +++++++++++++++++++++ official/c90386276.lua | 77 +++++++++++++++++++++++ official/c90664684.lua | 98 ++++++++++++++++++++++++++++++ official/c91509824.lua | 68 +++++++++++++++++++++ official/c92221402.lua | 75 +++++++++++++++++++++++ official/c93453053.lua | 77 +++++++++++++++++++++++ official/c94655777.lua | 112 ++++++++++++++++++++++++++++++++++ official/c95718355.lua | 102 +++++++++++++++++++++++++++++++ official/c96540807.lua | 78 ++++++++++++++++++++++++ official/c97662494.lua | 96 +++++++++++++++++++++++++++++ official/c98888032.lua | 73 ++++++++++++++++++++++ 81 files changed, 6530 insertions(+) create mode 100644 official/c16926971.lua create mode 100644 official/c17749468.lua create mode 100644 official/c18861006.lua create mode 100644 official/c19093698.lua create mode 100644 official/c19715246.lua create mode 100644 official/c20938824.lua create mode 100644 official/c21050476.lua create mode 100644 official/c21846145.lua create mode 100644 official/c22669793.lua create mode 100644 official/c22812963.lua create mode 100644 official/c22938501.lua create mode 100644 official/c23151193.lua create mode 100644 official/c2501624.lua create mode 100644 official/c27781371.lua create mode 100644 official/c28903523.lua create mode 100644 official/c30118811.lua create mode 100644 official/c30350202.lua create mode 100644 official/c30964246.lua create mode 100644 official/c31086840.lua create mode 100644 official/c31786838.lua create mode 100644 official/c31809476.lua create mode 100644 official/c34873741.lua create mode 100644 official/c35095329.lua create mode 100644 official/c3723262.lua create mode 100644 official/c3743515.lua create mode 100644 official/c38625110.lua create mode 100644 official/c39138610.lua create mode 100644 official/c39848658.lua create mode 100644 official/c42021064.lua create mode 100644 official/c42209438.lua create mode 100644 official/c43143567.lua create mode 100644 official/c43321985.lua create mode 100644 official/c4398189.lua create mode 100644 official/c44265115.lua create mode 100644 official/c45488703.lua create mode 100644 official/c4575541.lua create mode 100644 official/c4965193.lua create mode 100644 official/c5088741.lua create mode 100644 official/c53276089.lua create mode 100644 official/c5414777.lua create mode 100644 official/c56100345.lua create mode 100644 official/c56322832.lua create mode 100644 official/c57448410.lua create mode 100644 official/c5800323.lua create mode 100644 official/c58053438.lua create mode 100644 official/c58201062.lua create mode 100644 official/c58931850.lua create mode 100644 official/c59323650.lua create mode 100644 official/c60145298.lua create mode 100644 official/c60268386.lua create mode 100644 official/c61480937.lua create mode 100644 official/c64998567.lua create mode 100644 official/c65114115.lua create mode 100644 official/c66059345.lua create mode 100644 official/c66102515.lua create mode 100644 official/c66236707.lua create mode 100644 official/c6636319.lua create mode 100644 official/c67171933.lua create mode 100644 official/c67359907.lua create mode 100644 official/c70538272.lua create mode 100644 official/c71750854.lua create mode 100644 official/c77571454.lua create mode 100644 official/c78293584.lua create mode 100644 official/c78693036.lua create mode 100644 official/c79015062.lua create mode 100644 official/c79415624.lua create mode 100644 official/c81476402.lua create mode 100644 official/c82699999.lua create mode 100644 official/c83711531.lua create mode 100644 official/c84433129.lua create mode 100644 official/c85442146.lua create mode 100644 official/c90386276.lua create mode 100644 official/c90664684.lua create mode 100644 official/c91509824.lua create mode 100644 official/c92221402.lua create mode 100644 official/c93453053.lua create mode 100644 official/c94655777.lua create mode 100644 official/c95718355.lua create mode 100644 official/c96540807.lua create mode 100644 official/c97662494.lua create mode 100644 official/c98888032.lua diff --git a/official/c16926971.lua b/official/c16926971.lua new file mode 100644 index 0000000000..128c497657 --- /dev/null +++ b/official/c16926971.lua @@ -0,0 +1,101 @@ +--ファイアウォール・S・ドラゴン +--Firewall Saber Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Add 1 Cyberse monster from your GY or banishment to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.gyrmthtg) + e1:SetOperation(s.gyrmthop) + c:RegisterEffect(e1) + --Make this card's level become the Level of 1 other Cyberse monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) + --Add 1 "A.I." 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_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) + e3:SetTarget(s.deckthtg) + e3:SetOperation(s.deckthop) + c:RegisterEffect(e3) +end +s.listed_series={SET_AI} +function s.gyrmthfilter(c) + return c:IsRace(RACE_CYBERSE) and c:IsFaceup() and c:IsAbleToHand() +end +function s.gyrmthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.gyrmthfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.gyrmthfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.gyrmthfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.gyrmthop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.lvfilter(c,lv) + return c:IsRace(RACE_CYBERSE) and c:HasLevel() and c:IsFaceup() and not c:IsLevel(lv) +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local lv=c:GetLevel() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc~=c and s.lvfilter(chkc,lvl) end + if chk==0 then return c:HasLevel() and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,c,lv) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,c,lv) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:HasLevel() + and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:HasLevel() then + --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(tc:GetLevel()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end +function s.deckthfilter(c) + return c:IsSetCard(SET_AI) and c:IsSpell() and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c17749468.lua b/official/c17749468.lua new file mode 100644 index 0000000000..83f3857874 --- /dev/null +++ b/official/c17749468.lua @@ -0,0 +1,104 @@ +--贖罪神女 +--Azamina +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Queen Azamina" + 1 Fusion or Synchro Monster + Fusion.AddProcMix(c,true,true,65033975,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION|TYPE_SYNCHRO)) + c:AddMustFirstBeFusionSummoned() + --Special Summon this card (from your Extra Deck) by Tributing 1 "Saint Azamina" you control and 1 face-up monster your opponent controls + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_EXTRA) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Cannot be destroyed by card effects + 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:SetValue(1) + c:RegisterEffect(e1) + --Each time your opponent activates a card or effect, all monsters your opponent currently controls lose 500 ATK immediately after it resolves + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2a:SetCode(EVENT_CHAINING) + e2a:SetRange(LOCATION_MZONE) + e2a:SetOperation(aux.chainreg) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2b:SetProperty(EFFECT_FLAG_DELAY) + e2b:SetCode(EVENT_CHAIN_SOLVED) + e2b:SetRange(LOCATION_MZONE) + e2b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(1) end) + e2b:SetOperation(s.atkop) + c:RegisterEffect(e2b) + --Your opponent cannot activate the effects of monsters with 0 ATK + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EFFECT_CANNOT_ACTIVATE) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(0,1) + e3:SetValue(function(e,re,tp) return re:IsMonsterEffect() and re:GetHandler():IsAttack(0) end) + c:RegisterEffect(e3) +end +s.miracle_synchro_fusion=true +s.material_setcode={SET_AZAMINA} +s.listed_names={65033975,85065943} --"Queen Azamina", "Saint Azamina" +function s.selfspcostfilter(c,tp,fc) + return ((c:IsCode(85065943) or c:IsSummonCode(fc,MATERIAL_FUSION,tp,85065943)) or c:IsControler(1-tp)) and c:IsReleasable() + and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION) and (c:IsControler(tp) or c:IsFaceup()) +end +function s.rescon(sg,e,tp,mg) + return Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0 + and sg:FilterCount(Card.IsControler,nil,tp)==1 +end +function s.selfspcon(e,c) + if not c then return true end + local tp=c:GetControler() + local mg=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,e:GetHandler()) + return #mg>=2 and aux.SelectUnselectGroup(mg,e,tp,2,2,s.rescon,0) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local mg=Duel.GetMatchingGroup(s.selfspcostfilter,tp,LOCATION_ONFIELD,LOCATION_MZONE,nil,tp,e:GetHandler()) + local g=aux.SelectUnselectGroup(mg,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) + if #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.Release(g,REASON_COST|REASON_MATERIAL) + g:DeleteGroup() +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + if rp~=1-tp then return end + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) + if #g==0 then return end + Duel.Hint(HINT_CARD,0,id) + local c=e:GetHandler() + for tc in g:Iter() do + --It loses 500 ATK + local e1=Effect.CreateEffect(c) + 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 \ No newline at end of file diff --git a/official/c18861006.lua b/official/c18861006.lua new file mode 100644 index 0000000000..e4f7d56347 --- /dev/null +++ b/official/c18861006.lua @@ -0,0 +1,67 @@ +--紅天馬ファイヤー・ウイング・ペガサス +--Firewing Pegasus, the Crimson Heavenly Horse +--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: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:SetOperation(s.spop) + c:RegisterEffect(e1) + --Inflict damage to your opponent equal to the Chain Link number of this effect x 300 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.damcon) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +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.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 and c:IsRelateToEffect(e) then + --This card cannot be destroyed by card effects activated before this effect in this Chain + 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_EFFECT) + e1:SetValue(function(e,re,rp) return re:IsActivated() end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END|RESET_CHAIN) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c19093698.lua b/official/c19093698.lua new file mode 100644 index 0000000000..6ac185ce99 --- /dev/null +++ b/official/c19093698.lua @@ -0,0 +1,63 @@ +--ワンモア・ザ・ワイト +--Moissa Wight +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --This card's name becomes "Skull Servant" while in the GY + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_GRAVE) + e1:SetValue(CARD_SKULL_SERVANT) + c:RegisterEffect(e1) + --Add 1 "Skull Servant" or 1 card that mentions it from your Deck to your hand, except "Moissa Wight" + 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:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) + --During your Main Phase, you can Normal Summon 1 Level 4 or lower Zombie monster in addition to your Normal Summon/Set + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetType(EFFECT_TYPE_FIELD) + e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e4:SetRange(LOCATION_MZONE) + e4:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e4:SetTarget(function(e,c) return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) end) + c:RegisterEffect(e4) +end +s.listed_names={CARD_SKULL_SERVANT,id} +function s.thfilter(c) + return (c:IsCode(CARD_SKULL_SERVANT) or c:ListsCode(CARD_SKULL_SERVANT)) 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) +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 + --You cannot Special Summon for the rest of this turn, except Zombie 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:IsRace(RACE_ZOMBIE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c19715246.lua b/official/c19715246.lua new file mode 100644 index 0000000000..4af3f8b566 --- /dev/null +++ b/official/c19715246.lua @@ -0,0 +1,115 @@ +--サイバー・ヨルムンガンド +--Cyber Jormungandr +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableUnsummonable() + c:AddMustBeSpecialSummonedByCardEffect() + --Special Summon this card from your hand, then take 1 "Cyber Dragon" from your Deck, and either Special Summon it or equip it to this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Polymerization" 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_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={CARD_CYBER_DRAGON,CARD_POLYMERIZATION} +function s.cyberdragonfilter(c,e,tp,mon_ft,st_ft) + return c:IsCode(CARD_CYBER_DRAGON) and (s.spfilter(c,e,tp,mon_ft) or s.eqpfilter(c,tp,st_ft)) +end +function s.spfilter(c,e,tp,freezone) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and freezone>0 +end +function s.eqpfilter(c,tp,freezone) + return c:CheckUniqueOnField(tp) and not c:IsForbidden() and freezone>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local mon_ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + local st_ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if chk==0 then return mon_ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.cyberdragonfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mon_ft-1,st_ft) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) +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 mon_ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + local st_ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local tc=Duel.SelectMatchingCard(tp,s.cyberdragonfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mon_ft,st_ft):GetFirst() + if tc then + local b1=s.spfilter(tc,e,tp,mon_ft) + local b2=s.eqpfilter(tc,tp,st_ft) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + Duel.BreakEffect() + if op==1 then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + elseif op==2 then + if Duel.Equip(tp,tc,c) then + --Equip limit + local e0=Effect.CreateEffect(tc) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EQUIP_LIMIT) + e0:SetValue(function(e,cc) return cc==c end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e0) + end + end + end + end + --You cannot Special Summon for the rest of this turn, except Machine monsters + local e1=Effect.CreateEffect(c) + 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_MACHINE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thcostfilter(c) + return c:IsCode(CARD_CYBER_DRAGON) and c:IsFaceup() and c:IsAbleToHandAsCost() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoHand(g,nil,REASON_COST) +end +function s.thfilter(c) + return c:IsCode(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|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/official/c20938824.lua b/official/c20938824.lua new file mode 100644 index 0000000000..ecc4a88d61 --- /dev/null +++ b/official/c20938824.lua @@ -0,0 +1,81 @@ +--M∀LICE<P>March Hare +--Maliss

March Hare +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Your opponent cannot target "Maliss" Link Monsters that point to this card 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,LOCATION_MZONE) + e1:SetTarget(s.linkfilter) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --Banish 1 other "Maliss" card from your hand or GY, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_HAND) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 of your banished "Maliss" monsters to your 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) + e3:SetCode(EVENT_REMOVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(aux.PayLPCost(300)) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MALISS} +function s.linkfilter(e,c) + return c:IsSetCard(SET_MALISS) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(e:GetHandler()) +end +function s.rmfilter(c,tp) + return c:IsSetCard(SET_MALISS) and c:IsAbleToRemove() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) + and Duel.GetMZoneCount(tp,c)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,c,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,1,exc,tp) + if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_MALISS) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c21050476.lua b/official/c21050476.lua new file mode 100644 index 0000000000..f79fe640ee --- /dev/null +++ b/official/c21050476.lua @@ -0,0 +1,83 @@ +--ARG☆S-熱闘のパルテ +--Argostars - Fierce Parthe +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Gains 700 ATK/DEF for each other "Argostars" monster you control with different names + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(s.atkdefval) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2) + --Return 1 face-up "Argostars" Continuous Trap you control to the hand, and if you do, Special Summon this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_HAND) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCountLimit(1,id) + e3:SetCost(aux.SelfRevealCost) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) + --Set 1 Continuous Trap from your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetCost(aux.SelfBanishCost) + e4:SetTarget(s.settg) + e4:SetOperation(s.setop) + c:RegisterEffect(e4) +end +s.listed_series={SET_ARGOSTARS} +function s.atkdefval(e,c) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ARGOSTARS),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler()) + return g:GetClassCount(Card.GetCode)*700 +end +function s.thfilter(c,tp) + return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and c:IsFaceup() and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0 +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,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_RTOHAND) + local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst() + if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.setfilter(c) + return c:IsContinuousTrap() 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_HAND,0,1,nil) end +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_HAND,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,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c21846145.lua b/official/c21846145.lua new file mode 100644 index 0000000000..e79cd38041 --- /dev/null +++ b/official/c21846145.lua @@ -0,0 +1,52 @@ +--アブダクション +--Abduction +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Banish 1 monster from your Deck or Extra Deck and take control of opponent's monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_CONTROL) + 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,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) + c:RegisterEffect(e1) +end +function s.ctfilter(c,tp) + if not (c:IsFaceup() and c:IsAbleToChangeControler()) then return false end + local original_lvrklnk=(c:HasLevel() and c:GetOriginalLevel()) + or (c:HasRank() and c:GetOriginalRank()) + or (c:IsLinkMonster() and c:GetLink()) + return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c:GetOriginalRace(),c:GetOriginalAttribute(),c,original_lvrklnk) +end +function s.rmfilter(c,race,attr,tc,lvrklnk) + return c:IsAbleToRemove() and c:IsOriginalRace(race) and c:IsOriginalAttribute(attr) + and ((tc:HasLevel() and c:IsOriginalLevel(lvrklnk)) + or (tc:HasRank() and c:IsOriginalRank(lvrklnk)) + or (tc:IsLinkMonster() and c:IsLink(lvrklnk))) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 + and Duel.IsExistingTarget(s.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectTarget(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end + local original_lvrklnk=(tc:HasLevel() and tc:GetOriginalLevel()) + or (tc:HasRank() and tc:GetOriginalRank()) + or (tc:IsLinkMonster() and tc:GetLink()) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rc=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc:GetOriginalRace(),tc:GetOriginalAttribute(),tc,original_lvrklnk):GetFirst() + if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and rc:IsLocation(LOCATION_REMOVED) + and Duel.GetControl(tc,tp) and rc:IsOriginalCodeRule(tc:GetOriginalCodeRule()) then + tc:NegateEffects(e:GetHandler(),RESET_CONTROL) + end +end \ No newline at end of file diff --git a/official/c22669793.lua b/official/c22669793.lua new file mode 100644 index 0000000000..f8efea86d6 --- /dev/null +++ b/official/c22669793.lua @@ -0,0 +1,78 @@ +--貴き黄金郷のエルドリクシル +--Eldlixir of the Exalted Golden Land +--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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetCost(aux.PayLPCost(800)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_GOLDEN_LORD} +s.listed_series={SET_GOLDEN_LAND,SET_ELDLIXIR} +function s.setfilter(c) + return c:IsSetCard({SET_GOLDEN_LAND,SET_ELDLIXIR}) and c:IsSSetable() and c:IsFaceup() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_GOLDEN_LAND,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT) + local b2=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_REMOVED,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_EITHER,LOCATION_MZONE) + elseif op==2 then + e:SetCategory(0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Special Summon this card as a Normal Monster + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_GOLDEN_LAND,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_TOKEN,1500,2800,10,RACE_ZOMBIE,ATTRIBUTE_LIGHT)) then return end + c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TRAP) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + c:AddMonsterAttributeComplete() + if Duel.SpecialSummonComplete()==0 then return end + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_GOLDEN_LORD),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + end + elseif op==2 then + --Set 1 of your banished "Golden Land" or "Eldlixir" Spells/Traps + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end + end +end \ No newline at end of file diff --git a/official/c22812963.lua b/official/c22812963.lua new file mode 100644 index 0000000000..2169aed4b4 --- /dev/null +++ b/official/c22812963.lua @@ -0,0 +1,83 @@ +--創世の神 デウテロノミオン +--Regenesis God Deuteronomion +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your hand) by banishing 1 face-up monster you control with 2500 original ATK and DEF + 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_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Set 1 "Regenesis" Spell/Trap from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + 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.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) + --Gains 2500 ATK during the Battle Phase only + 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:SetCondition(function() return Duel.IsBattlePhase() end) + e3:SetValue(2500) + c:RegisterEffect(e3) + --Inflicts piercing battle damage + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetCode(EFFECT_PIERCE) + c:RegisterEffect(e4) +end +s.listed_series={SET_REGENESIS} +function s.selfspconfilter(c) + return (c:IsBaseAttack(2500) and c:IsBaseDefense(2500)) and c:IsFaceup() and c:IsAbleToRemoveAsCost() +end +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(s.selfspconfilter,tp,LOCATION_MZONE,0,nil) + return #g>0 and Duel.GetMZoneCount(tp,g)>0 +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.selfspconfilter,tp,LOCATION_MZONE,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) + if #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) + g:DeleteGroup() +end +function s.setfilter(c) + return c:IsSetCard(SET_REGENESIS) and c:IsSpellTrap() 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/c22938501.lua b/official/c22938501.lua new file mode 100644 index 0000000000..465352d3f0 --- /dev/null +++ b/official/c22938501.lua @@ -0,0 +1,98 @@ +--再世の導神 シェモース +--Regenesis Sage Shemot +--Scripted by Satella +local s,id=GetID() +function s.initial_effect(c) + --If a monster with 2500 original ATK or DEF is on the field, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Negate the activation of an opponent's card or effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) + --Add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_REGENESIS} +function s.spconfilter(c) + return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spconfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetTurnID()==Duel.GetTurnCount() and Duel.IsTurnPlayer(1-tp) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp and Duel.IsChainNegatable(ev) +end +function s.negcostfilter(c) + return c:IsSetCard(SET_REGENESIS) and c:IsAbleToGraveAsCost() + and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c) + Duel.SendtoGrave(g,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c23151193.lua b/official/c23151193.lua new file mode 100644 index 0000000000..771b33ab57 --- /dev/null +++ b/official/c23151193.lua @@ -0,0 +1,83 @@ +--断罪のディアベルスター +--Diabellstar the Sin Adjudicator +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand or GY + 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|LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Destroy 1 card your opponent controls then you can Special Summon 1 Illusion or Spellcaster Tuner Synchro Monster from your Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(aux.PayLPCost(1/2)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SINFUL_SPOILS,SET_DIABELL} +function s.rmcostfilter(c) + return c:IsSpellTrap() and c:IsAbleToRemoveAsCost() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.rmcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,e:GetHandler()) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetMainCardType),0) end + local rg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetMainCardType),1,tp,HINTMSG_REMOVE) + Duel.Remove(rg,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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.diabellfilter(c) + return c:IsSetCard(SET_DIABELL) and c:IsMonsterCard() and c:IsFaceup() +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ILLUSION|RACE_SPELLCASTER) and c:IsType(TYPE_TUNER) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.GetLocationCountFromEx(tp,tp,nil,c)>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 tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(s.diabellfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) + if #sg==0 then return end + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c2501624.lua b/official/c2501624.lua new file mode 100644 index 0000000000..b910e26016 --- /dev/null +++ b/official/c2501624.lua @@ -0,0 +1,91 @@ +--魔術師の弟子-ブラック・マジシャン・ガール +--Dark Magician Girl the Magician's Apprentice +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by discarding 1 card, and if you do, its name becomes "Dark Magician Girl" + 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) + --Add 1 "Shining Sarcophagus" 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,1}) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) + --Gains 300 ATK for each monster in the GYs that mentions "Shining Sarcophagus" + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetCode(EFFECT_UPDATE_ATTACK) + e4:SetRange(LOCATION_MZONE) + e4:SetValue(s.atkval) + c:RegisterEffect(e4) +end +s.listed_names={CARD_DARK_MAGICIAN_GIRL,CARD_SHINING_SARCOPHAGUS} +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(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,0,1,c) + 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_DISCARD|REASON_COST) + g:DeleteGroup() + --Its name becomes "Dark Magician Girl" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_DARK_MAGICIAN_GIRL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TOFIELD) + c:RegisterEffect(e1) +end +function s.thfilter(c) + return c:IsCode(CARD_SHINING_SARCOPHAGUS) 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.atkfilter(c) + return c:ListsCode(CARD_SHINING_SARCOPHAGUS) and c:IsMonster() +end +function s.atkval(e,c) + return Duel.GetMatchingGroupCount(s.atkfilter,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*300 +end \ No newline at end of file diff --git a/official/c27781371.lua b/official/c27781371.lua new file mode 100644 index 0000000000..9f878abf51 --- /dev/null +++ b/official/c27781371.lua @@ -0,0 +1,91 @@ +--天地再世 +--Regenesis Birth +--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) + --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_SZONE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetCost(s.poscost) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + c:RegisterEffect(e1) + --Special Summon as many "Regenesis" monsters with different names as possible from your hand, GY, and/or banishment + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + 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:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_REGENESIS} +function s.poscostfilter(c) + return c:IsSetCard(SET_REGENESIS) and c:IsMonster() and c:IsAbleToGraveAsCost() +end +function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsCanTurnSet() 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:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end +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.spfilter(c,e,tp) + return c:IsSetCard(SET_REGENESIS) 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_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) + if #tg==0 or ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local ct=math.min(ft,tg:GetClassCount(Card.GetCode)) + local g=aux.SelectUnselectGroup(tg,e,tp,ct,ct,aux.dncheck,1,tp,HINTMSG_SPSUMMON) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + --Send them to the GY during the End Phase + aux.DelayedOperation(g,PHASE_END,id,e,tp, + function(dg) Duel.SendtoGrave(dg,REASON_EFFECT) end, + nil,0,1,aux.Stringid(id,2) + ) + end +end \ No newline at end of file diff --git a/official/c28903523.lua b/official/c28903523.lua new file mode 100644 index 0000000000..064f745d9c --- /dev/null +++ b/official/c28903523.lua @@ -0,0 +1,73 @@ +--エターナル・サンシャイン +--Eternal Sunshine +--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) + --Monsters you control gain 500 DEF for each "Ancient Fairy Dragon", and monster that mentions it, that you control + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_DEFENSE) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetValue(s.defval) + c:RegisterEffect(e1) + --Halve the current ATK/DEF and negate the effects of 1 opponent's monster until the end of that turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(s.discond) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} +function s.afdfilter(c) + return (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) or (c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) and c:IsMonster())) and c:IsFaceup() +end +function s.defval(e,c) + return Duel.GetMatchingGroupCount(s.afdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*500 +end +function s.discond(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetFlagEffect(tp,id)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:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_CYBERSE) 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) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local 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) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end \ No newline at end of file diff --git a/official/c30350202.lua b/official/c30350202.lua new file mode 100644 index 0000000000..268cddf58c --- /dev/null +++ b/official/c30350202.lua @@ -0,0 +1,84 @@ +--凶征竜-エクレプシス +--Eclepsis, Dragon Ruler of Woes +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 7 Dragon monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),7,2) + --Special Summon 1 Level/Rank 7 "Dragon Ruler" monster mentioned on a target from your Deck or banishment, then shuffle that target into the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) + 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():IsXyzSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the activation of an opponent's Spell/Trap Card or effect, and if you do, banish it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetRange(LOCATION_MZONE) + e2:SetCode(EVENT_CHAINING) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.negcon) + e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) +end +s.listed_series={SET_DRAGON_RULER} +function s.tdfilter(c,e,tp) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsLevelBelow(4) and c:IsAbleToDeck() and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,tc) + return c:IsSetCard(SET_DRAGON_RULER) and (c:IsLevel(7) or c:IsRank(7)) and tc:ListsCode(c:GetCode()) + and (c:IsLocation(LOCATION_DECK) or 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_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_REMOVED) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,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 tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp,tc) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsRelateToEffect(e) then + Duel.BreakEffect() + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + local rc=re:GetHandler() + local relation=rc:IsRelateToEffect(re) + if chk==0 then return rc:IsAbleToRemove(tp) + or (not relation and Duel.IsPlayerCanRemove(tp)) end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) + if relation then + Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,rc:GetControler(),rc:GetLocation()) + else + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,rc:GetPreviousLocation()) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c30964246.lua b/official/c30964246.lua new file mode 100644 index 0000000000..ceed27fb83 --- /dev/null +++ b/official/c30964246.lua @@ -0,0 +1,82 @@ +--ARG☆S-GiantKilling +--Argostars - Giant Hunting +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Argostars" monster from your Deck to your hand, then, immediately after this effect resolves, you can Normal Summon 1 Warrior monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_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.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Return 2 cards on the field, including 1 "Argostars" card, to the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.retthtg) + e2:SetOperation(s.retthop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARGOSTARS} +function s.thfilter(c) + return c:IsSetCard(SET_ARGOSTARS) 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.trapfilter(c) + return c:IsContinuousTrap() and (c:IsLocation(LOCATION_MZONE) or (c:IsTrapMonster() and c:IsLocation(LOCATION_STZONE))) and c:IsFaceup() +end +function s.nsfilter(c) + return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,tc) + Duel.ShuffleHand(tp) + if Duel.IsExistingMatchingCard(s.trapfilter,tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.BreakEffect() + Duel.Summon(tp,sc,true,nil) + end + end + end +end +function s.argstrapfilter(c,tp) + return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and c:IsControler(tp) and c:IsFaceup() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(s.argstrapfilter,1,nil,tp) +end +function s.retthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local rg=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) + if chk==0 then return #rg>=2 and aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,0) end + local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_RTOHAND) + Duel.SetTargetCard(g) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) +end +function s.retthop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoHand(tg,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c31086840.lua b/official/c31086840.lua new file mode 100644 index 0000000000..8354a4c1eb --- /dev/null +++ b/official/c31086840.lua @@ -0,0 +1,69 @@ +--No.69 紋章神コート・オブ・アームズ-ゴッド・シャーター +--Number 69: Heraldry Crest - Shatter Stream +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 4 Level 4 monsters OR 1 monster whose original name is "Number 69: Heraldry Crest" + Xyz.AddProcedure(c,nil,4,4,s.ovfilter,aux.Stringid(id,0),4) + --Special Summon 1 "Number 69: Heraldry Crest - Dark Matter Demolition" from your Extra Deck and destroy an opponent's monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_ATTACK_ANNOUNCE) + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + c:RegisterEffect(e2) +end +s.xyz_number=69 +s.listed_series={2407234,77571454} --"Number 69: Heraldry Crest", "Number 69: Heraldry Crest - Dark Matter Demolition" +function s.ovfilter(c,tp,xyzc) + return c:IsFaceup() and c:IsOriginalCodeRule(2407234) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local ttype,tloc,tplayer=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER) + return ttype&TYPE_MONSTER>0 and tloc&LOCATION_ONFIELD>0 and tplayer==1-tp +end +function s.xyzfilter(c,e,tp,mc) + return c:IsCode(77571454) and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) + and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then + 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.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) + end + Duel.SetTargetCard(eg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not 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 xyzc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c):GetFirst() + if not xyzc then return end + xyzc:SetMaterial(c) + Duel.Overlay(xyzc,c) + if Duel.SpecialSummon(xyzc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + xyzc:CompleteProcedure() + local dg=Duel.GetFirstTarget() + if dg:IsControler(1-tp) and dg:IsRelateToEffect(e) + and (Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) or dg:IsRelateToEffect(re)) then + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c31786838.lua b/official/c31786838.lua new file mode 100644 index 0000000000..bfa49f15ed --- /dev/null +++ b/official/c31786838.lua @@ -0,0 +1,75 @@ +--再世記 +--Regenesis +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Take 1 "Regenesis" monster from your Deck, and either add it to your hand or send it 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:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Special Summon 1 "Regenesis" 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_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_REGENESIS} +function s.thfilter(c,alt) + return s.filter1(c) or (alt and s.filter2(c)) +end +function s.filter1(c) + return c:IsSetCard(SET_REGENESIS) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) +end +function s.filter2(c) + return c:IsAttack(2500) and c:IsDefense(2500) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local alt=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_REGENESIS),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,alt) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local alt=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_REGENESIS),tp,LOCATION_MZONE,0,1,nil) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,alt):GetFirst() + if sc:IsSetCard(SET_REGENESIS) then + aux.ToHandOrElse(sc,tp) + else + Duel.SendtoHand(sc,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sc) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_REGENESIS) 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 \ No newline at end of file diff --git a/official/c31809476.lua b/official/c31809476.lua new file mode 100644 index 0000000000..730ff91a2d --- /dev/null +++ b/official/c31809476.lua @@ -0,0 +1,77 @@ +--紋章の明滅 +--Heraldry Flash +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Target any number of monsters to become "Unknown" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + 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.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Set itself from GY during your End Phase if you control a Psychic Xyz monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.setcon) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_UNKNOWN} +function s.tgfilter(c) + return c:IsFaceup() and not c:IsCode(CARD_UNKNOWN) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_MZONE,1,99,nil) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + local c=e:GetHandler() + for tc in tg:Iter() do + --Its name becomes "Unknown" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_UNKNOWN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.setconfilter(c) + return c:IsType(TYPE_XYZ) and c:IsRace(RACE_PSYCHIC) and c:IsFaceup() +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.setconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsSSetable() and Duel.SSet(tp,c)>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) + end +end \ No newline at end of file diff --git a/official/c34873741.lua b/official/c34873741.lua new file mode 100644 index 0000000000..c9d3bca921 --- /dev/null +++ b/official/c34873741.lua @@ -0,0 +1,65 @@ +--妖精霊クリボン +--Kuribon the Fairy Spirit +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand, 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_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If another "Ancient Fairy Dragon", or monster(s) that mentions it, that you control would be destroyed by card effect, you can return this card from the field to the hand instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.reptg) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) and c~=e:GetHandler() end) + e2:SetOperation(function(e) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT|REASON_REPLACE) end) + c:RegisterEffect(e2) +end +s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} +function s.spconfilter(c) + return c:IsFaceup() and (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) + or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsMonster())) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil) +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 + --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) + c:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() +end +function s.repfilter(c,tp) + return (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) or (c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) and c:IsMonster())) + and c:IsControler(tp) and c:IsFaceup() 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:IsAbleToHand() and not eg:IsContains(c) and eg:IsExists(s.repfilter,1,c,tp) end + return Duel.SelectEffectYesNo(tp,c,96) +end \ No newline at end of file diff --git a/official/c35095329.lua b/official/c35095329.lua new file mode 100644 index 0000000000..db470d321a --- /dev/null +++ b/official/c35095329.lua @@ -0,0 +1,88 @@ +--E-HERO ヴィシャス・クローズ +--Evil HERO Vicious Claws +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from the hand and increase the targeted monster's ATK by 300 + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetTarget(s.handsptg) + e1:SetOperation(s.handspop) + c:RegisterEffect(e1) + --Special Summon this card from the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e2:SetRange(LOCATION_GRAVE) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) + e2:SetCondition(s.gyspcon) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_HERO} +s.listed_names={CARD_DARK_FUSION} +function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and c:IsSetCard(SET_HERO) end + 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) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_HERO),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_HERO),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,300) +end +function s.handspop(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_DEFENSE)>0 + and tc:IsFaceup() and tc:IsRelateToEffect(e) then + --That monster gains 300 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(300) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.gyspconfilter(c,tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) +end +function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.gyspconfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) +end +function s.gysptg(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_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.darkfusfilter(c) + return c:IsMonster() and c:ListsCode(CARD_DARK_FUSION) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.IsExistingMatchingCard(s.darkfusfilter,tp,LOCATION_GRAVE,0,1,nil) then + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sg=g:Select(tp,1,1,nil) + Duel.HintSelection(sg) + Duel.BreakEffect() + Duel.Destroy(sg,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c3723262.lua b/official/c3723262.lua new file mode 100644 index 0000000000..9a7232c4cb --- /dev/null +++ b/official/c3723262.lua @@ -0,0 +1,84 @@ +--ウィザード@イグニスター +--Wizard @Ignister +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both this card and 1 DARK Cyberse monster from your GY in Defense Position + 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_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Change the battle position of 1 monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + c:RegisterEffect(e2) +end +function s.spconfilter(c) + return c:IsRace(RACE_CYBERSE) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_CYBERSE) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + 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+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then + Duel.SpecialSummon(Group.FromCards(c,tc),0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + --You cannot Special Summon for the rest of this turn, except Cyberse 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:IsRace(RACE_CYBERSE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsCanChangePosition() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,0,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 \ No newline at end of file diff --git a/official/c3743515.lua b/official/c3743515.lua new file mode 100644 index 0000000000..cc82e82ff3 --- /dev/null +++ b/official/c3743515.lua @@ -0,0 +1,86 @@ +--怒髪天衝セイバーザウルス +--Ferociously Angered Sabersaurus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 monsters + Xyz.AddProcedure(c,nil,4,2) + --Destroy 1 Dinosaur monster in your hand or face-up field, then you can change the battle position of 1 monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) + --Destroy this card, and if you do, your Dinosaur monster battling gains 2000 ATK until the end of the Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_START) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.atkcon) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + c:RegisterEffect(e2) +end +function s.desfilter(c) + return c:IsRace(RACE_DINOSAUR) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if not dc then return end + if dc:IsOnField() then Duel.HintSelection(dc) end + if Duel.Destroy(dc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + 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 return end + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local a=Duel.GetAttacker() + local b=Duel.GetAttackTarget() + if a:IsControler(1-tp) then a,b=b,a end + return a:IsFaceup() and a:IsRace(RACE_DINOSAUR) and a~=e:GetHandler() +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local a=Duel.GetAttacker() + local b=Duel.GetAttackTarget() + if a:IsControler(1-tp) then a,b=b,a end + Duel.SetTargetCard(a) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,a,1,tp,2000) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local bc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and bc:IsRelateToEffect(e) + and bc:IsFaceup() and bc:IsRace(RACE_DINOSAUR) then + --That Dinosaur monster gains 2000 ATK until the end of the Battle Phase + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(2000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) + bc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c38625110.lua b/official/c38625110.lua new file mode 100644 index 0000000000..6bb41c7e7f --- /dev/null +++ b/official/c38625110.lua @@ -0,0 +1,54 @@ +--夙めてはしろ 二人ではしろ +--Do it Early, Do it Together +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Your opponent banishes 7 cards from their Extra Deck and/or the top of their Deck, face-down + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(s.rmcon) + e1:SetCost(s.rmcost) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.rmcon(e,tp,eg,ep,ev,re,r,rp) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,id),tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) +end +function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetDecktopGroup(tp,7) + if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==7 end + Duel.DisableShuffleCheck() + Duel.Remove(g,POS_FACEDOWN,REASON_COST) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local p=1-tp + local dg=Duel.GetDecktopGroup(p,7) + local exg=Duel.GetFieldGroup(p,LOCATION_EXTRA,0) + return (dg+exg):IsExists(Card.IsAbleToRemove,7,nil,p,POS_FACEDOWN,REASON_EFFECT) + end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,1-tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local p=1-tp + local rg=nil + local exg=Duel.GetMatchingGroup(Card.IsAbleToRemove,p,LOCATION_EXTRA,0,nil,p,POS_FACEDOWN,REASON_EFFECT) + if #exg>0 then + local min=math.max(0,7-Duel.GetFieldGroupCount(p,LOCATION_DECK,0)) + Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE) + rg=exg:Select(p,min,7,nil) + rg:Merge(Duel.GetDecktopGroup(p,7-#rg)) + else + rg=Duel.GetDecktopGroup(p,7) + end + if #rg>0 then + Duel.DisableShuffleCheck() + Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT,nil,p) + end +end \ No newline at end of file diff --git a/official/c39138610.lua b/official/c39138610.lua new file mode 100644 index 0000000000..25eed615c5 --- /dev/null +++ b/official/c39138610.lua @@ -0,0 +1,92 @@ +--アコード・トーカー@イグニスター +--Accode Talker @Ignister +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 3+ Effect Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),3) + --Special Summon as many Cyberse monsters with 2300 ATK from your GY as possible to your zones this card points to + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + 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():IsLinkSummoned() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the activation of an opponent's card or effect, and if you do, banish that card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) + 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(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp,zone) + return c:IsRace(RACE_CYBERSE) and c:IsAttack(2300) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLinkedZone(tp)) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local zone=c:GetLinkedZone(tp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) + if c:IsRelateToEffect(e) and c:IsFaceup() and zone>0 and ft>0 then + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp,zone) + if #g>0 then + local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone) + if ct>0 then + c:UpdateAttack(ct*500) + end + end + end + --You cannot Special Summon for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.negcostfilter(c,lg) + return c:IsLinkMonster() and lg:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED) +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local lg=e:GetHandler():GetLinkedGroup() + if chk==0 then return #lg>0 and Duel.CheckReleaseGroupCost(tp,s.negcostfilter,1,false,nil,nil,lg) end + local g=Duel.SelectReleaseGroupCost(tp,s.negcostfilter,1,1,false,nil,nil,lg) + Duel.Release(g,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + local rc=re:GetHandler() + local relation=rc:IsRelateToEffect(re) + if chk==0 then return rc:IsAbleToRemove(tp) + or (not relation and Duel.IsPlayerCanRemove(tp)) end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if relation then + Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,rc:GetPreviousLocation()) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c39848658.lua b/official/c39848658.lua new file mode 100644 index 0000000000..65cb1faf05 --- /dev/null +++ b/official/c39848658.lua @@ -0,0 +1,67 @@ +--ワイト・マスター +--Wight Master +--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) + --If your "King of the Skull Servants" attacks a Defense Position monster, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsCode(36021814) end) + c:RegisterEffect(e1) + --Send 1 "Skull Servant" or 1 monster that mentions it from your Deck to the GY and Special Summon 1 "Skull Servant" or "King of the Skull Servants" from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + 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) + e2:SetTarget(s.tgsptg) + e2:SetOperation(s.tgspop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_SKULL_SERVANT,36021814} --"King of the Skull Servants" +function s.spfilter(c,e,tp) + return c:IsCode(CARD_SKULL_SERVANT,36021814) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.tgfilter(c) + return (c:IsCode(CARD_SKULL_SERVANT) or (c:IsMonster() and c:ListsCode(CARD_SKULL_SERVANT))) and c:IsAbleToGrave() +end +function s.tgsptg(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) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) 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_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.tgspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except Zombie 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_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_ZOMBIE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c42021064.lua b/official/c42021064.lua new file mode 100644 index 0000000000..9bfc08880c --- /dev/null +++ b/official/c42021064.lua @@ -0,0 +1,77 @@ +--機動石器ドグラード +--Dogurado the Moving Stone Relic +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters, including a Rock monster + Link.AddProcedure(c,nil,2,3,s.matcheck) + --Gains the ATK of 1 Rock monster in your GY + 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:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Destroy 1 other monster on the field with ATK less than or equal to this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE+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_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.matcheck(g,sc,sumtype,tp) + return g:IsExists(Card.IsRace,1,nil,RACE_ROCK,sc,sumtype,tp) +end +function s.atkfilter(c) + return c:IsRace(RACE_ROCK) and c:GetAttack()>0 +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.atkfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then + --This card gains ATK equal to that monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(tc:GetAttack()) + 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) + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:HasNonZeroAttack() and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.HasNonZeroAttack,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,-g:GetFirst():GetAttack()) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:HasNonZeroAttack() + and c:UpdateAttack(-tc:GetAttack())==-tc:GetAttack() then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c42209438.lua b/official/c42209438.lua new file mode 100644 index 0000000000..40eb344049 --- /dev/null +++ b/official/c42209438.lua @@ -0,0 +1,83 @@ +--真魔六武衆-キザン +--Legendary Lord Six Samurai - Kizan +--Scripted by Cybercatman +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) + --"Six Samurai" monsters you control gain 600 ATK/DEF during the Battle Phase only + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SIX_SAMURAI)) + e1:SetValue(600) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2) + --Destroy 1 card 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_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,id) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) + e3:SetCost(s.descost) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) + --Special Summon this card from your GY + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_GRAVE) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SIX_SAMURAI),tp,LOCATION_MZONE,0,2,nil) end) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +s.listed_series={SET_SIX_SAMURAI,SET_SIX_STRIKE} +function s.costfilter(c) + return c:IsSetCard(SET_SIX_STRIKE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,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 +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/c43143567.lua b/official/c43143567.lua new file mode 100644 index 0000000000..682fe24080 --- /dev/null +++ b/official/c43143567.lua @@ -0,0 +1,102 @@ +--黄金郷のアンヘルカイド +--Angelcaido of the Golden Land +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Eldlich the Golden Lord" + 1 Zombie monster + Fusion.AddProcMix(c,true,true,CARD_GOLDEN_LORD,aux.FilterBoolFunctionEx(Card.IsRace,RACE_ZOMBIE)) + c:AddMustBeFusionSummoned() + --You can only Fusion Summon or Special Summon by its alternate procedure "Angelcaido of the Golden Land" 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 Tributing 1 LIGHT Zombie monster while you have "Eldlich the Golden Lord" in your field or GY + local e1=Effect.CreateEffect(c) + 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) + --Special Summon 1 "Eldlich" monster from your Deck, Extra Deck, or GY + 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) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_GOLDEN_LORD,id} +s.material_setcode={SET_ELDLICH} +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 "Angelcaido of the Golden Land" 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:IsCode(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:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_ZOMBIE) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 +end +function s.selfspcon(e,c) + if not c then return true end + if c:IsFaceup() then return false end + local tp=c:GetControler() + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_GOLDEN_LORD),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) + and Duel.CheckReleaseGroup(tp,s.selfspcostfilter,1,false,1,true,c,tp,nil,nil,nil,tp,c) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspcostfilter,1,1,false,true,true,c,tp,nil,false,nil,tp,c) + if not g then return false end + g:KeepAlive() + e:SetLabelObject(g) + return true +end +function s.selfspop(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.spfilter(c,e,tp,ft) + if not (c:IsSetCard(SET_ELDLICH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + else + return ft>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp,ft) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp,ft) + 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/c43321985.lua b/official/c43321985.lua new file mode 100644 index 0000000000..d1831c4a23 --- /dev/null +++ b/official/c43321985.lua @@ -0,0 +1,60 @@ +--エンシェント・フェアリー・ライフ・ドラゴン +--Ancient Fairy Life Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Draw 1 card, or add 1 LIGHT Beast, Plant, or Fairy monster, or 1 "Eternal Sunshine" from your Deck to your hand instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW+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():IsSynchroSummoned() end) + e1:SetTarget(s.drthtg) + e1:SetOperation(s.drthop) + c:RegisterEffect(e1) + --Your "Ancient Fairy Dragon" and monsters that mention it can attack while in face-up Defense Position. If they do, apply their DEF for damage calculation + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_DEFENSE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) or c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) end) + e2:SetValue(1) + c:RegisterEffect(e2) +end +s.listed_names={5414777,28903523,CARD_ANCIENT_FAIRY_DRAGON} --"The World of Spirits", "Eternal Sunshine" +function s.thfilter(c) + return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY)) or c:IsCode(28903523)) and c:IsAbleToHand() +end +function s.drthtg(e,tp,eg,ep,ev,re,r,rp,chk) + local world_of_spirits_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,5414777),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + local b1=not world_of_spirits_chk and Duel.IsPlayerCanDraw(tp,1) + local b2=world_of_spirits_chk and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + if b1 then + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + else + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.drthop(e,tp,eg,ep,ev,re,r,rp) + local world_of_spirits_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,5414777),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + if not world_of_spirits_chk then + Duel.Draw(tp,1,REASON_EFFECT) + else + 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 \ No newline at end of file diff --git a/official/c4398189.lua b/official/c4398189.lua new file mode 100644 index 0000000000..77cf4ffd77 --- /dev/null +++ b/official/c4398189.lua @@ -0,0 +1,83 @@ +--白き森の魔女 +--Witches of the White Forest +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate + 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) + --The first time each "White Forest" monster you control would be destroyed by battle each turn, it is not destroyed + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e2:SetRange(LOCATION_FZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_WHITE_FOREST)) + e2:SetValue(function(e,re,r,rp) return r&REASON_BATTLE==REASON_BATTLE end) + c:RegisterEffect(e2) + --Make 1 "White Forest" monster you control become a Tuner that turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.tunertg) + e3:SetOperation(s.tunerop) + c:RegisterEffect(e3) +end +s.listed_series={SET_WHITE_FOREST} +function s.thfilter(c) + return c:IsSetCard(SET_WHITE_FOREST) and c:IsMonster() and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:Select(tp,1,1,nil) + if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:GetFirst():IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sg) + local c=e:GetHandler() + --You cannot Special Summon DARK monsters from the Extra Deck for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsAttribute(ATTRIBUTE_DARK) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return c:IsOriginalAttribute(ATTRIBUTE_DARK) end) + end + end +end +function s.nontunertgfilter(c) + return c:IsSetCard(SET_WHITE_FOREST) and not c:IsType(TYPE_TUNER) and c:IsFaceup() +end +function s.tunertg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.nontunertgfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.nontunertgfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.nontunertgfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.tunerop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + --It is treated as a Tuner this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_ADD_TYPE) + e1:SetValue(TYPE_TUNER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c44265115.lua b/official/c44265115.lua new file mode 100644 index 0000000000..92d9420309 --- /dev/null +++ b/official/c44265115.lua @@ -0,0 +1,98 @@ +--ブレインコントローラー +--Brain Controller +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Brain Control" 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_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 Level of 1 face-up monster on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_PAY_LPCOST) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp,eg,ep) return ep==tp end) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) + --Special Summon this card to your opponent's field in Defense Position + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_BE_MATERIAL) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +s.listed_names={87910978} --"Brain Control" +function s.thfilter(c) + return c:IsCode(87910978) 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.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:HasLevel() and chkc:IsFaceup() end + if chk==0 then return 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,1,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK) + local lv=Duel.AnnounceLevel(tp,1,8,g:GetFirst():GetLevel()) + Duel.SetTargetParam(lv) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,lv) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + --It becomes the declared Level + local e1=Effect.CreateEffect(e:GetHandler()) + 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 +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) 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,1-tp,false,false,POS_FACEUP_DEFENSE) then + c:NegateEffects(c) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c45488703.lua b/official/c45488703.lua new file mode 100644 index 0000000000..38ba008264 --- /dev/null +++ b/official/c45488703.lua @@ -0,0 +1,82 @@ +--NT8000-SIRIUS +--NT8000 - SIRIUS +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --This linked card cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsLinked() end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Destroy 1 face-up card you control and 1 face-up card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + 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_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Check if the effect of a Link Monster was activated this turn + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re) return not re:GetHandler():IsLinkMonster() end) + --Special Summon this card from the 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) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCanBeEffectTarget,e),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + local dg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_DESTROY) + Duel.SetTargetCard(dg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==2 then + Duel.Destroy(tg,REASON_EFFECT) + end +end +function s.darklinkfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsLinkMonster() and c:IsFaceup() +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) + and Duel.IsExistingMatchingCard(s.darklinkfilter,tp,LOCATION_MZONE,0,1,nil) 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/c4575541.lua b/official/c4575541.lua new file mode 100644 index 0000000000..460108c262 --- /dev/null +++ b/official/c4575541.lua @@ -0,0 +1,74 @@ +--超竜災禍 +--Dragocalamity +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Dragon Ruler" monster from your hand, GY, or banishment then you can Xyz Summon 1 "Dragon Ruler" 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:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Return any number of your banished "Dragon Ruler" monsters with different Attributes to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGON_RULER} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.xyzfilter(c,mg) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsXyzSummonable(nil,mg) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DRAGON_RULER),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=g:Select(tp,1,1,nil):GetFirst() + Duel.XyzSummon(tp,sc,nil,mg,2,99) + end + end +end +function s.tgfilter(c,e) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsFaceup() and c:IsMonster() and c:IsCanBeEffectTarget(e) +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil,e) + if chk==0 then return #g>0 end + local tg=aux.SelectUnselectGroup(g,e,tp,1,#g,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_RTOGRAVE) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,#tg,tp,0) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoGrave(tg,REASON_EFFECT|REASON_RETURN) + end +end \ No newline at end of file diff --git a/official/c4965193.lua b/official/c4965193.lua new file mode 100644 index 0000000000..fa23041494 --- /dev/null +++ b/official/c4965193.lua @@ -0,0 +1,111 @@ +--極征竜-シャスマティス +--Chasmatis, Dragon Ruler of Auroras +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 7 Dragon monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON),7,2) + --This effect becomes the effect of a Level 7 "Dragon Ruler" monster that activates by discarding itself + 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_MZONE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetCost(s.applycost) + e1:SetTarget(s.applytg) + e1:SetOperation(s.applyop) + c:RegisterEffect(e1) + --Special Summon 1 Level 7 "Dragon Ruler" from your GY or banishment + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGON_RULER} +function s.tgfilter(c,tp) + if not (c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsAbleToGraveAsCost() and c:IsHasEffect(id)) then + return false + end + local eff=c:GetCardEffect(id) + local te=eff:GetLabelObject() + local con=te:GetCondition() + local tg=te:GetTarget() + if (not con or con(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) + and (not tg or tg(te,tp,Group.CreateGroup(),PLAYER_NONE,0,eff,REASON_EFFECT,PLAYER_NONE,0)) then + return true + end + return false +end +function s.applycost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + Duel.SendtoGrave(sc,REASON_COST) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) + e:SetLabelObject(sc:GetCardEffect(id):GetLabelObject()) + c:RemoveOverlayCard(tp,1,1,REASON_COST) +end +function s.applytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local te=e:GetLabelObject() + local tg=te and te:GetTarget() or nil + if chkc then return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end + if chk==0 then return true end + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + e:SetProperty(te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and EFFECT_FLAG_CARD_TARGET or 0) + if tg then + tg(e,tp,eg,ep,ev,re,r,rp,1) + end + e:SetLabelObject(te) + Duel.ClearOperationInfo(0) +end +function s.applyop(e,tp,eg,ep,ev,re,r,rp) + local te=e:GetLabelObject() + if not te then return end + local sc=te:GetHandler() + if sc:GetFlagEffect(id)==0 then + e:SetLabel(0) + e:SetLabelObject(nil) + return + end + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + local op=te:GetOperation() + if op then + op(e,tp,Group.CreateGroup(),PLAYER_NONE,0,e,REASON_EFFECT,PLAYER_NONE) + end + e:SetLabel(0) + e:SetLabelObject(nil) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp)) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() +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,e,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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,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/c5088741.lua b/official/c5088741.lua new file mode 100644 index 0000000000..12fdc4c6cf --- /dev/null +++ b/official/c5088741.lua @@ -0,0 +1,63 @@ +--コード・イグナイター +--Code Igniter +--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 Cyberse Ritual 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetTarget(s.thtg(s.thfilter1)) + e1:SetOperation(s.thop(s.thfilter1)) + c:RegisterEffect(e1) + --Ritual Summon 1 Ritual Monster from your hand, by Tributing monsters from your hand and/or field whose total Levels equal or exceed its Level + local e2=Ritual.CreateProc(c,RITPROC_GREATER,nil,nil,aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(aux.dxmcostgen(1,1,nil)) + c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) + --Add 1 "A.I." Trap 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_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) + e3:SetTarget(s.thtg(s.thfilter2)) + e3:SetOperation(s.thop(s.thfilter2)) + c:RegisterEffect(e3) +end +s.listed_series={SET_AI} +function s.thfilter1(c) + return c:IsRace(RACE_CYBERSE) and c:IsRitualMonster() and c:IsAbleToHand() +end +function s.thfilter2(c) + return c:IsSetCard(SET_AI) and c:IsTrap() and c:IsAbleToHand() +end +function s.thtg(filter) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end +end +function s.thop(filter) + return function(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,filter,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 \ No newline at end of file diff --git a/official/c53276089.lua b/official/c53276089.lua new file mode 100644 index 0000000000..6b08cdbeb0 --- /dev/null +++ b/official/c53276089.lua @@ -0,0 +1,78 @@ +--ライゼオル・マスドライバー +--Ryzeal Mass Driver +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Apply the following effect then you can attach this card to a Rank 4 Xyz Monster you control as material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Banish 1 card from your opponent's GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.rmvtg) + e2:SetOperation(s.rmvop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RYZEAL} +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_RYZEAL),tp,LOCATION_MZONE,0,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,1000) +end +function s.xyzfilter(c,mc,tp) + return c:IsType(TYPE_XYZ) and c:IsRank(4) and c:IsFaceup() and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --"Ryzeal" monsters you control will gain 1000 ATK for the rest of this turn + 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:IsSetCard(SET_RYZEAL) 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)) + if c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + c:CancelToGrave() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local tc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp):GetFirst() + if tc then + Duel.HintSelection(tc) + Duel.BreakEffect() + if tc:IsImmuneToEffect(e) then return end + Duel.Overlay(tc,c) + end + end +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,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 + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c5414777.lua b/official/c5414777.lua new file mode 100644 index 0000000000..c4f9298af8 --- /dev/null +++ b/official/c5414777.lua @@ -0,0 +1,82 @@ +--精霊の世界 +--The World of Spirits +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Activate + 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) + --Change any monster that is Special Summoned in Attack Position to Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_FZONE) + e2:SetCondition(s.lightdragonsynchrocon) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + c:RegisterEffect(e2) + --Destroy all the turn player's Attack Position monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1) + e3:SetCondition(s.lightdragonsynchrocon) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} +function s.thfilter(c) + return c:IsMonster() and c:ListsCode(CARD_ANCIENT_FAIRY_DRAGON) 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,3)) 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.lightdragonsynchroconfilter(c) + return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() +end +function s.lightdragonsynchrocon(e,tp,eg,ev,ep,re,r,rp) + return Duel.IsExistingMatchingCard(s.lightdragonsynchroconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=eg:Filter(Card.IsPosition,nil,POS_ATTACK) + if chk==0 then return #g>0 end + Duel.SetTargetCard(g) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,0) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetTargetCards(e):Filter(Card.IsPosition,nil,POS_ATTACK) + if #g>0 then + Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetMatchingGroup(Card.IsPosition,Duel.GetTurnPlayer(),LOCATION_MZONE,0,nil,POS_ATTACK) + 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.IsPosition,Duel.GetTurnPlayer(),LOCATION_MZONE,0,nil,POS_ATTACK) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end diff --git a/official/c56100345.lua b/official/c56100345.lua new file mode 100644 index 0000000000..8ec8b057a8 --- /dev/null +++ b/official/c56100345.lua @@ -0,0 +1,63 @@ +--サイバー・ダーク・ヴルム +--Cyberdark Wurm +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --This card's name becomes "Cyber Dragon" while on the field or in the GY + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e1:SetValue(CARD_CYBER_DRAGON) + c:RegisterEffect(e1) + --Special Summon this card from your hand or GY then you can add 1 "Cyber" Spell/Trap 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|LOCATION_GRAVE) + e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) + e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(s.cybermachinefilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_CYBER_DRAGON} +s.listed_series={SET_CYBER,SET_CYBER_DRAGON} +function s.cybermachinefilter(c) + return c:IsSetCard(SET_CYBER) and c:IsRace(RACE_MACHINE) and c:IsFaceup() +end +function s.spcostfilter(c) + return c:IsSetCard(SET_CYBER_DRAGON) and c:IsMonster() and c:IsAbleToGraveAsCost() +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|LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|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) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:IsSetCard({SET_CYBER,SET_CYBERNETIC}) and c:IsSpellTrap() and c:IsAbleToHand() +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 g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:Select(tp,1,1,nil) + Duel.BreakEffect() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end +end diff --git a/official/c56322832.lua b/official/c56322832.lua new file mode 100644 index 0000000000..a737289d07 --- /dev/null +++ b/official/c56322832.lua @@ -0,0 +1,134 @@ +--転惺竜華-闇巴 +--Tensei Ryu-Ge Anva +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c) + --You cannot Pendulum Summon, except "Ryu-Ge" monsters (this effect cannot be negated) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_PZONE) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,tp,sumtp,sumpos) return not c:IsSetCard(SET_RYU_GE) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end) + c:RegisterEffect(e1) + --When a card or effect activated by your opponent in response to your "Ryu-Ge" Spell Card or effect activation resolves, you can negate that effect, then destroy this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVING) + e2:SetRange(LOCATION_PZONE) + e2:SetCondition(s.discon) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Special Summon this card from your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_HAND) + e3:SetCountLimit(1,id) + e3:SetCost(s.spcost) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) + --Destroy 1 card on the field + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_DESTROY) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + e4:SetCountLimit(1,{id,1}) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) + --Place 1 "Ryu-Ge" Continuous Spell/Trap from your Deck, GY, or banishment face-up on your field + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,2)) + e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e5:SetProperty(EFFECT_FLAG_DELAY) + e5:SetCode(EVENT_DESTROYED) + e5:SetCountLimit(1,{id,2}) + e5:SetTarget(s.pltg) + e5:SetOperation(s.plop) + c:RegisterEffect(e5) +end +s.listed_series={SET_RYU_GE} +s.listed_names={id} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return false end + local chainlink=Duel.GetCurrentChain(true)-1 + if not (chainlink>0 and ep==1-tp and Duel.IsChainDisablable(ev)) then return false end + local trig_p,trig_typ,setcodes=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) + if not (trig_p==tp and (trig_typ&TYPE_SPELL)>0) then return false end + for _,set in ipairs(setcodes) do + if ((SET_RYU_GE&0xfff)==(set&0xfff) and (SET_RYU_GE&set)==SET_RYU_GE) then + return true + end + end + return false +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,3)) then + Duel.Hint(HINT_CARD,0,id) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + if Duel.NegateEffect(ev) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end + end +end +function s.spcostfilter(c) + return c:IsSetCard(SET_RYU_GE) and not c:IsCode(id) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,true,aux.ReleaseCheckMMZ,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,true,aux.ReleaseCheckMMZ,c) + Duel.Release(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 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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,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 +function s.plfilter(c,tp) + return c:IsContinuousSpellTrap() and c:IsSetCard(SET_RYU_GE) and not c:IsForbidden() + and c:CheckUniqueOnField(tp) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,tp) end + Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,tp):GetFirst() + if tc then + Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/official/c57448410.lua b/official/c57448410.lua new file mode 100644 index 0000000000..1372b6de32 --- /dev/null +++ b/official/c57448410.lua @@ -0,0 +1,51 @@ +--プリマ・マテリアクトル +--Prima Materiactor +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c) + --Xyz Monsters you control gain 100 ATK for each material attached to monsters on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_PZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsFaceup() and c:IsType(TYPE_XYZ) end) + e1:SetValue(function(e,c) return Duel.GetOverlayCount(0,1,1)*100 end) + c:RegisterEffect(e1) + --Attach this card to 1 "Materiactor" Xyz Monster you control as material, then draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_PZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.attachtg) + e2:SetOperation(s.attachop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MATERIACTOR} +function s.xyzfilter(c,tp,hc) + return c:IsSetCard(SET_MATERIACTOR) and c:IsType(TYPE_XYZ) and c:IsFaceup() and hc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp,c) end + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) + and Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then + Duel.Overlay(tc,c) + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c5800323.lua b/official/c5800323.lua new file mode 100644 index 0000000000..5ceec26bcc --- /dev/null +++ b/official/c5800323.lua @@ -0,0 +1,81 @@ +--白き森の幻妖 +--Mystic Mystery of the White Forest +--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) + --Place 2 "White Forest" monsters from your GY in face-up in their owners' Spell & Trap Zones as Continuous Spells + 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+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Immediately after this effect resolves, Synchro Summon using this card you control + 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:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.synchtg) + e2:SetOperation(s.synchop) + c:RegisterEffect(e2) +end +s.listed_series={SET_WHITE_FOREST} +function s.plfilter(c) + local p=c:GetOwner() + return c:IsSetCard(SET_WHITE_FOREST) and c:IsMonster() and c:CheckUniqueOnField(p,LOCATION_SZONE) and not c:IsForbidden() +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 + and Duel.IsExistingTarget(s.plfilter,tp,LOCATION_GRAVE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local g=Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_GRAVE,0,2,2,nil) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft<=0 then return end + if #tg>ft then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + tg=tg:Select(tp,ft,ft,nil) + end + for tc in tg:Iter() do + if Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,tc:IsMonsterCard()) then + --Treat it 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)) + tc:RegisterEffect(e1) + end + end +end +function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.synchop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end + local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) + if #g>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + Duel.SynchroSummon(tp,sg:GetFirst(),c) + end +end \ No newline at end of file diff --git a/official/c58053438.lua b/official/c58053438.lua new file mode 100644 index 0000000000..94e73c9028 --- /dev/null +++ b/official/c58053438.lua @@ -0,0 +1,64 @@ +--列王詩篇 +--The Psalms of Kings +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Negate an opponent's activated monster effect on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) + --If you have no monsters in your GY, you can activate this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) + e2:SetCondition(function(e) return not Duel.IsExistingMatchingCard(Card.IsMonster,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_DOMINUS} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + local trig_p,trig_typ,trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_LOCATION) + return trig_p==1-tp and trig_typ&TYPE_MONSTER>0 and trig_loc&LOCATION_MZONE>0 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local act_from_hand_chk=(e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND)) and 1 or 0 + e:SetLabel(act_from_hand_chk) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c) + return c:IsSetCard(SET_DOMINUS) and c:IsAbleToHand() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and Duel.IsExistingMatchingCard(Card.IsTrap,tp,LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end + if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()==1 then + --You cannot activate monster effects in the hand, GY, or banishment until the end of the next 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_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(function(e,re) return re:IsMonsterEffect() and re:GetHandler():IsLocation(LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/official/c58201062.lua b/official/c58201062.lua new file mode 100644 index 0000000000..8719bdccde --- /dev/null +++ b/official/c58201062.lua @@ -0,0 +1,87 @@ +--光征竜-スペクトル +--Spector, Dragon Ruler of Rays +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 2 "Dragon Ruler" monsters from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.thcost) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DRAGON_RULER) + --Special Summon 1 "Chasmatis, Dragon Ruler of Auroras" 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_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGON_RULER} +s.listed_names={id,4965193} --"Chasmatis, Dragon Ruler of Auroras" +function s.thcostfilter(c) + return (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,c) + g:AddCard(c) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) +end +function s.thfilter(c) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,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>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spcostfilter(c,e,tp) + return (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsRace(RACE_DRAGON)) and c:IsAbleToRemoveAsCost() + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsCode(4965193) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + g:AddCard(c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +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 \ No newline at end of file diff --git a/official/c58931850.lua b/official/c58931850.lua new file mode 100644 index 0000000000..9874e6f547 --- /dev/null +++ b/official/c58931850.lua @@ -0,0 +1,60 @@ +--超究極魔導竜王 +--Dragon Master Lord +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 12 monsters + Xyz.AddProcedure(c,nil,12,2) + --While you control this Xyz Summoned card, your opponent cannot target it with card effects, also it cannot be destroyed by your opponent's card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetValue(aux.indoval) + c:RegisterEffect(e2) + --If this cards attacks a Defense Position monster while you have 25 or more cards in your GY, inflict double piercing battle damage to your opponent + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_PIERCE) + e3:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_GRAVE,0)>=25 end) + e3:SetValue(DOUBLE_DAMAGE) + c:RegisterEffect(e3) + --Special Summon 1 monster from your Deck, Extra Deck, or GY + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1) + e4:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=25 end) + e4:SetCost(aux.dxmcostgen(1,1)) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +function s.spfilter(c,e,tp) + if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end + if c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + else + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,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/c59323650.lua b/official/c59323650.lua new file mode 100644 index 0000000000..78cf115263 --- /dev/null +++ b/official/c59323650.lua @@ -0,0 +1,78 @@ +--再世の龍神 ワイクラー +--Regenesis Dragon Vayikra +--Scripted by Satella +local s,id=GetID() +function s.initial_effect(c) + --If a monster with 2500 original ATK or DEF is on the field, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Banish 1 Spell/Trap your opponent controls + 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_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(aux.SelfTributeCost) + e2:SetTarget(s.rmtg) + e2:SetOperation(s.rmop) + c:RegisterEffect(e2) + --Add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +function s.spconfilter(c) + return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spconfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,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.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c60145298.lua b/official/c60145298.lua new file mode 100644 index 0000000000..b6a2d741a7 --- /dev/null +++ b/official/c60145298.lua @@ -0,0 +1,75 @@ +--白魔女ディアベルゼ +--Diabellze the White Witch +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Monsters you control cannot be destroyed by your opponent's card effects while you control 2 or more "Diabell" monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DIABELL),e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) end) + e1:SetValue(aux.indoval) + 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.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Send 1 "Sinful Spoils" or "Diabell" card from your Deck to the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.tgtg) + e3:SetOperation(s.tgop) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e4) +end +s.listed_series={SET_WHITE_FOREST,SET_SINFUL_SPOILS,SET_DIABELL} +function s.spcostfilter(c,tp) + return c:IsSpellTrap() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 +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|LOCATION_ONFIELD,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) + 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 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.tgfilter(c) + return c:IsSetCard({SET_SINFUL_SPOILS,SET_DIABELL}) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c60268386.lua b/official/c60268386.lua new file mode 100644 index 0000000000..9be705b55a --- /dev/null +++ b/official/c60268386.lua @@ -0,0 +1,88 @@ +--紋章獣グリフォン +--Heraldic Beast Gryphon +--scripted by Naim +local EFFECT_DOUBLE_XYZ_MATERIAL=511001225 --to be removed when the procedure is updated +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) + --Can be treated as 2 Materials for the Xyz Summon of a "Number" Xyz monter that requires 3 or more materials + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_DOUBLE_XYZ_MATERIAL) + e2:SetValue(1) + e2:SetCondition(function(e) return not Duel.HasFlagEffect(e:GetHandlerPlayer(),id) end) + e2:SetOperation(function(e,c,matg) return c:IsSetCard(SET_NUMBER) and c.minxyzct and c.minxyzct>=3 and matg:FilterCount(s.gryphonhoptfilter,nil)<2 end) + c:RegisterEffect(e2) + --HOPT workaround for having already used the double material effect earlier in that turn + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD) + ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) + ge1:SetCode(EFFECT_MATERIAL_CHECK) + ge1:SetValue(s.valcheck) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_series={SET_HERALDIC_BEAST} +s.listed_names={id} +function s.costfilter(c) + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsMonster() and c:IsAbleToGraveAsCost() and not c:IsCode(id) +end +function s.spcost(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.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 + --Cannot Special Summon from the Extra Deck for the rest of this turn, except by Xyz Summon + 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,sump,sumtype) return c:IsLocation(LOCATION_EXTRA) and (sumtype&SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --Can only use monsters with "Heraldic Beast" and/or "Number" in their original names as material for an Xyz Summon this turn + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e2:SetTargetRange(LOCATION_ALL,LOCATION_ALL) + e2:SetTarget(function(e,c) return not c:IsOriginalSetCard({SET_HERALDIC_BEAST,SET_NUMBER}) end) + e2:SetValue(function(e,c) return c and c:IsControler(e:GetHandlerPlayer()) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end +function s.gryphonhoptfilter(c) + return c:IsCode(id) and c:IsHasEffect(EFFECT_DOUBLE_XYZ_MATERIAL) +end +function s.valcheck(e,c) + if not (c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) and c.minxyzct and c.minxyzct>=3) then return end + local g=c:GetMaterial() + if #g0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevelBelow(4) + 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_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_DEFENSE) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsFieldSpell() and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) + and Duel.IsExistingTarget(aux.AND(Card.IsFieldSpell,Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsFieldSpell,Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 + and tc:IsLocation(LOCATION_DECK) 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/c64998567.lua b/official/c64998567.lua new file mode 100644 index 0000000000..4209b14b26 --- /dev/null +++ b/official/c64998567.lua @@ -0,0 +1,68 @@ +--カース・オブ・ディアベル +--Curse of Diabell +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Destroy all face-up cards your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + 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:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DIABELL),tp,LOCATION_MZONE,0,2,nil) end) + e1:SetCost(s.descost) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Add 1 "Diabell" Spell/Trap 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(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end) + 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_DIABELL} +s.listed_names={id} +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil) + 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.IsFaceup,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_DIABELL) and c:IsSpellTrap() 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) +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/c65114115.lua b/official/c65114115.lua new file mode 100644 index 0000000000..580f45400e --- /dev/null +++ b/official/c65114115.lua @@ -0,0 +1,88 @@ +--七星天流抜刀術-「破軍」 +--Seven Star Sky Style Battojutsu - "Hagun" +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Equip 1 Level 7 monster with the same Type, but a different name, to 1 face-up monster you control, from your hand or Deck as an Equip Spell + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_EQUIP+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) + e1:SetTarget(s.eqtg) + e1:SetOperation(s.eqop) + 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_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +function s.tgfilter(c,tp) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.eqpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp,c:GetRace(),c:GetCode()) +end +function s.eqpfilter(c,tp,rac,code) + return c:IsLevel(7) and c:IsRace(rac) and not c:IsCode(code) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.eqtg(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,tp) end + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if e:GetHandler():IsLocation(LOCATION_HAND) then ft=ft-1 end + if chk==0 then return ft>0 and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_SZONE) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsFaceup() and tc:IsRelateToEffect(e)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local ec=Duel.SelectMatchingCard(tp,s.eqpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp,tc:GetRace(),tc:GetCode()):GetFirst() + if ec and Duel.Equip(tp,ec,tc) then + --The equipped monster gains 700 ATK + local e1=Effect.CreateEffect(ec) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(700) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + ec:RegisterEffect(e1) + --Equip limit + local e2=Effect.CreateEffect(ec) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_EQUIP_LIMIT) + e2:SetValue(function(e,c) return c==tc end) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + ec:RegisterEffect(e2) + --Return that Equip Card to the hand during the End Phase + aux.DelayedOperation(ec,PHASE_END,id,e,tp,function() Duel.SendtoHand(ec,nil,REASON_EFFECT) end,nil,0,1,aux.Stringid(id,2)) + end +end +function s.thconfilter(c,tp) + return c:IsPreviousControler(1-tp) and (c:GetPreviousLevelOnField()>=8 or c:GetPreviousRankOnField()>=8) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.thconfilter,1,nil,tp) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c66059345.lua b/official/c66059345.lua new file mode 100644 index 0000000000..c7dcb14a8f --- /dev/null +++ b/official/c66059345.lua @@ -0,0 +1,106 @@ +--原質の炉心貫通 +--Materiactor Meltthrough +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Excavate the top 6 cards of your Deck, and if you do, place them on top of the Deck in any order + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.excavtg) + e1:SetOperation(s.excavop) + c:RegisterEffect(e1) + --Special Summon 1 "Materiactor" Xyz Monster from your Extra Deck, by using 1 Level 3 Normal Monster you control as material (this is treated as an Xyz Summon) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1) + e2:SetCost(aux.PayLPCost(1500)) + e2:SetTarget(s.xyztg) + e2:SetOperation(s.xyzop) + c:RegisterEffect(e2) + --Attach the top card of your Deck to 1 "Materiactor" Xyz Monster you control + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e3:SetCondition(function(e,tp,eg) return eg:IsExists(function(c) return c:IsXyzSummoned() and c:IsType(TYPE_XYZ) and c:IsFaceup() end,1,nil) end) + e3:SetTarget(s.attachtg) + e3:SetOperation(s.attachop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MATERIACTOR} +function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=6 end +end +function s.excavop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then + Duel.ConfirmDecktop(tp,6) + Duel.SortDecktop(tp,tp,6) + end +end +function s.normalfilter(c,e,tp) + if not (c:IsLevel(3) and c:IsType(TYPE_NORMAL) and c:IsFaceup()) then return false end + 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) +end +function s.xyzspfilter(c,e,tp,mc) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_MATERIACTOR) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.normalfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) + local mc=Duel.SelectMatchingCard(tp,s.normalfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() + if mc then + Duel.HintSelection(mc) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mc):GetFirst() + if sc then + sc:SetMaterial(mc) + Duel.Overlay(sc,mc) + if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.attachfilter(c,tp,top_c) + return c:IsSetCard(SET_MATERIACTOR) and c:IsType(TYPE_XYZ) and c:IsFaceup() and top_c:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local top_c=Duel.GetDecktopGroup(tp,1):GetFirst() + return top_c and Duel.IsExistingMatchingCard(s.attachfilter,tp,LOCATION_MZONE,0,1,nil,tp,top_c) + end +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local top_c=Duel.GetDecktopGroup(tp,1):GetFirst() + if not top_c then return end + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4)) + local xyzc=Duel.SelectMatchingCard(tp,s.attachfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,top_c):GetFirst() + if xyzc then + Duel.HintSelection(xyzc) + Duel.DisableShuffleCheck() + Duel.Overlay(xyzc,top_c) + end +end \ No newline at end of file diff --git a/official/c66102515.lua b/official/c66102515.lua new file mode 100644 index 0000000000..41321ba568 --- /dev/null +++ b/official/c66102515.lua @@ -0,0 +1,77 @@ +--クリクリンク@イグニスター +--Kurikulink @Ignister +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand or GY + 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|LOCATION_GRAVE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate an effect that targets a Cyberse monster you control + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.discon) + e2:SetCost(aux.SelfTributeCost) + e2:SetTarget(s.distg) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_IGNISTER} +function s.spcostfilter(c,tp) + return c:IsSetCard(SET_IGNISTER) and Duel.GetMZoneCount(tp,c)>0 +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,tp) + Duel.Release(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 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 +function s.disconfilter(c) + return c:IsRace(RACE_CYBERSE) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.tgfilter(c,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsRace(RACE_CYBERSE) and c:IsFaceup() +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + if not (Duel.IsExistingMatchingCard(s.disconfilter,tp,LOCATION_MZONE,0,1,nil) + and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) + and Duel.IsChainDisablable(ev)) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsExists(s.tgfilter,1,nil,tp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) +end \ No newline at end of file diff --git a/official/c66236707.lua b/official/c66236707.lua new file mode 100644 index 0000000000..d882c2e186 --- /dev/null +++ b/official/c66236707.lua @@ -0,0 +1,57 @@ +--械刀婪魔皇断 +--Gordian Schneider +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish cards from your hand and/or from your Extra Deck face-down and return the targeted cards to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsMainPhase() and not Duel.CheckPhaseActivity() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() and chkc:IsFaceup() and chkc~=c end + local ct1=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_HAND,0,c,tp,POS_FACEDOWN) + local ct2=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil,tp,POS_FACEDOWN) + if chk==0 then return (ct1>=1 or ct2>=6) and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end + local ct=ct1+(ct2//6) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,c) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA) +end +function s.rescon(ct) + return function(sg,e,tp,mg) + local count=sg:FilterCount(Card.IsLocation,nil,LOCATION_HAND) + local remaining=ct-count + if remaining<0 then return false,true end + local extracnt=sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) + local extra_needed=remaining*6 + if extracnt>extra_needed then return false,true end + return extracnt==extra_needed,extracnt>extra_needed + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + local ct=#tg + if ct==0 then return end + local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil,tp,POS_FACEDOWN) + local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil,tp,POS_FACEDOWN) + if (#g1+#g2//6)0 then + Duel.BreakEffect() + Duel.SendtoHand(tg,nil,REASON_EFFECT) + end +end diff --git a/official/c6636319.lua b/official/c6636319.lua new file mode 100644 index 0000000000..2b57009032 --- /dev/null +++ b/official/c6636319.lua @@ -0,0 +1,80 @@ +--Evil★Twin キスキル・ディール +--Evil★Twin Ki-sikil Deal +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 1 "Ki-Sikil" monster + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_KI_SIKIL),1,1) + --You can only Link Summon "Evil★Twin Ki-sikil Deal" 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(function(e) return e:GetHandler():IsLinkSummoned() end) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --Apply this effect for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) + e1:SetCost(s.effcost) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_KI_SIKIL,SET_LIL_LA} +s.listed_names={id} +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --Prevent another Link Summon of "Evil★Twin Ki-sikil Deal" 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:IsCode(id) and sumtype&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.costfilter(c) + return c:IsSetCard(SET_LIL_LA) and c:IsMonster() and c:IsAbleToGraveAsCost() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + local c=e:GetHandler() + --Draw 1 card immediately after it resolves + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVED) + e1:SetCondition(s.drawcon) + e1:SetOperation(s.drawop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,1)) +end +function s.drawcon(e,tp,eg,ep,ev,re,r,rp) + local chainlink=Duel.GetCurrentChain(true)-1 + if not (chainlink>0 and ep==1-tp) then return false end + local trig_p,trig_typ,setcodes=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) + if not (trig_p==tp and (trig_typ&TYPE_MONSTER)>0) then return false end + for _,set in ipairs(setcodes) do + if ((SET_KI_SIKIL&0xfff)==(set&0xfff) and (SET_KI_SIKIL&set)==SET_KI_SIKIL) + or ((SET_LIL_LA&0xfff)==(set&0xfff) and (SET_LIL_LA&set)==SET_LIL_LA) then + return true + end + end +end +function s.drawop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_CARD,1-tp,id) + Duel.Draw(tp,1,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c67171933.lua b/official/c67171933.lua new file mode 100644 index 0000000000..1b79b0c537 --- /dev/null +++ b/official/c67171933.lua @@ -0,0 +1,83 @@ +--再世神 +--Torah Regenesis +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Regenesis" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + 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) + --Special Summon 1 of your banished "Regenesis" monsters + 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_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_REGENESIS} +function s.deckspfilter(c,e,tp) + return c:IsSetCard(SET_REGENESIS) 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.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckspfilter,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 + --Send it to the GY during your opponent's End Phase + aux.DelayedOperation(g,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 + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon from the Extra Deck until the end of the next turn after this card resolves + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) +end +function s.rmspfilter(c,e,tp) + return c:IsSetCard(SET_REGENESIS) 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.rmspfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.rmspfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.rmspfilter,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/c67359907.lua b/official/c67359907.lua new file mode 100644 index 0000000000..7483670002 --- /dev/null +++ b/official/c67359907.lua @@ -0,0 +1,77 @@ +--超征竜-ディザスター +--Disaster, Dragon Ruler of Paranormalities +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Rank 7 Xyz monsters + Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsRank,7),nil,2) + --Attach Level 7 "Dragon Ruler" monsters to this card when it is Xyz Summoned + 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():IsXyzSummoned() end) + e1:SetTarget(s.attachtg) + e1:SetOperation(s.attachop) + c:RegisterEffect(e1) + --If this card has LIGHT, DARK, EARTH, WATER, FIRE, and WIND "Dragon Ruler" monsters as material, it gains 4600 ATK/DEF + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.attributematcon) + e2:SetValue(4600) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e3) + --If this card has LIGHT, DARK, EARTH, WATER, FIRE, and WIND "Dragon Ruler" monsters as material, it is unaffected by other cards' effects + local e4=e2:Clone() + e4:SetCode(EFFECT_IMMUNE_EFFECT) + e4:SetValue(function(e,te) return te:GetOwner()~=e:GetOwner() end) + c:RegisterEffect(e4) +end +s.listed_series={SET_DRAGON_RULER} +function s.attachfilter(c,xc,tp) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsLevel(7) and c:IsCanBeXyzMaterial(xc,tp,REASON_EFFECT) and c:IsFaceup() +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.attachfilter(chkc,c,tp) end + if chk==0 then return Duel.IsExistingTarget(s.attachfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) + local g=Duel.SelectTarget(tp,s.attachfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,4,nil,c,tp) + if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then + local gyg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,gyg,#gyg,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE|LOCATION_GRAVE) +end +function s.rmfilter(c,og) + return c:IsMonster() and c:IsAbleToRemove() and c:IsFaceup() and og:IsExists(Card.IsAttribute,1,nil,c:GetAttribute()) +end +function s.attachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end + local tg=Duel.GetTargetCards(e):Filter(s.attachfilter,nil,c,tp):Remove(Card.IsImmuneToEffect,nil,e) + if #tg>0 then + Duel.Overlay(c,tg) + local og=c:GetOverlayGroup() + if Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil,og) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local rg=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil,og) + Duel.BreakEffect() + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + end + end +end +function s.attributematcon(e) + local og=e:GetHandler():GetOverlayGroup():Filter(Card.IsSetCard,nil,SET_DRAGON_RULER) + return og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK) + and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) + and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) and og:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) +end \ No newline at end of file diff --git a/official/c70538272.lua b/official/c70538272.lua new file mode 100644 index 0000000000..efdeef137c --- /dev/null +++ b/official/c70538272.lua @@ -0,0 +1,86 @@ +--妖竜の禁姫 +--Philia Regis +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Dragon Fusion Monster + 1 Level 7 or higher Dragon monster + Fusion.AddProcMix(c,true,true,s.matfilter1,s.matfilter2) + --Banish 1 card your opponent controls or in their GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) + 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.rmvtg) + e1:SetOperation(s.rmvop) + c:RegisterEffect(e1) + --Return 1 Dragon monster you control to the hand/Extra Deck, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +function s.matfilter1(c,fc,sumtype,tp) + return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsType(TYPE_FUSION,fc,sumtype,tp) +end +function s.matfilter2(c,fc,sumtype,tp) + return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsLevelAbove(7) +end +function s.rethandfilter(c) + return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() and c:IsFaceup() +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsControler(1-tp) 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) + if g:GetFirst():IsLocation(LOCATION_ONFIELD) then + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) + end +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:IsPreviousLocation(LOCATION_ONFIELD) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.rethandfilter,tp,LOCATION_MZONE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + end +end +function s.thfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 and c:IsRace(RACE_DRAGON) and (c:IsAbleToHand() or c:IsAbleToExtra()) and c:IsFaceup() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,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_RTOHAND) + local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() + if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) + and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end diff --git a/official/c71750854.lua b/official/c71750854.lua new file mode 100644 index 0000000000..6a2879aba1 --- /dev/null +++ b/official/c71750854.lua @@ -0,0 +1,69 @@ +--ボンバー・プレイス +--Bomber Place +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Activate one of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(aux.PayLPCost(600)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +function s.oppfilter(c,tp) + return c:HasLevel() and c:IsFaceup() and Duel.IsExistingMatchingCard(s.lvrklnkfilter,tp,0,LOCATION_MZONE,1,c,c:GetLevel()) +end +function s.lvrklnkfilter(c,lv) + return c:IsFaceup() and (c:IsLevel(lv) or c:IsRank(lv) or c:IsLink(lv)) +end +function s.selffilter(c,tp) + return c:HasLevel() and c:IsFaceup() and Duel.IsExistingMatchingCard(s.columnfilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel(),c:GetColumnGroup()) +end +function s.columnfilter(c,lv,columng) + return columng:IsContains(c) and s.lvrklnkfilter(c,lv) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelBelow,6),tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetLevel)==6 + and Duel.IsExistingMatchingCard(s.oppfilter,tp,0,LOCATION_MZONE,1,nil,tp) + local b2=Duel.IsExistingMatchingCard(s.selffilter,tp,LOCATION_MZONE,0,1,nil,tp) + 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) + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,1-tp,0) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Choose 1 face-up monster your opponent controls that has a Level, and destroy all other monsters they control with an equal Level/Rank/Link Rating + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) --"Select your opponent's card" + local sc=Duel.SelectMatchingCard(tp,s.oppfilter,tp,0,LOCATION_MZONE,1,1,nil,tp):GetFirst() + if sc then + Duel.HintSelection(sc) + local g=Duel.GetMatchingGroup(s.lvrklnkfilter,tp,0,LOCATION_MZONE,sc,sc:GetLevel()) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + end + elseif op==2 then + --Choose 1 face-up monster you control that has a Level, and destroy all your opponent's monsters in its column with an equal Level/Rank/Link Rating + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) --"Select your card" + local sc=Duel.SelectMatchingCard(tp,s.selffilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() + if sc then + Duel.HintSelection(sc) + local g=Duel.GetMatchingGroup(s.columnfilter,tp,0,LOCATION_MZONE,nil,sc:GetLevel(),sc:GetColumnGroup()) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/official/c77571454.lua b/official/c77571454.lua new file mode 100644 index 0000000000..9d39123235 --- /dev/null +++ b/official/c77571454.lua @@ -0,0 +1,72 @@ +--No.69 紋章神コート・オブ・アームズ-ゴッド・レイジ +--Number 69: Heraldry Crest - Dark Matter Demolition +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 5 Level 4 monsters + Xyz.AddProcedure(c,nil,4,5) + --Cannot be destroyed by battle or card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(1) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2) + --Change opponent's monster's name to "Unknown" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetTarget(s.namechangetg) + e3:SetOperation(s.namechangeop) + c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) + --Negate the activated effects of "Unknown" your opponent controls + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e4:SetCode(EVENT_CHAIN_SOLVING) + e4:SetRange(LOCATION_MZONE) + e4:SetOperation(s.disop) + c:RegisterEffect(e4) +end +s.xyz_number=69 +s.listed_names={CARD_UNKNOWN} +function s.namechangefilter(c) + return c:IsFaceup() and not c:IsCode(CARD_UNKNOWN) +end +function s.namechangetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.namechangefilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.namechangefilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.namechangefilter,tp,0,LOCATION_MZONE,1,1,nil) +end +function s.namechangeop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and not tc:IsCode(CARD_UNKNOWN) then + --Its name becomes "Unknown" + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_UNKNOWN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if rp==1-tp and re:IsMonsterEffect() then + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsCode(CARD_UNKNOWN) then + Duel.NegateEffect(ev) + end + end +end \ No newline at end of file diff --git a/official/c78293584.lua b/official/c78293584.lua new file mode 100644 index 0000000000..504902689a --- /dev/null +++ b/official/c78293584.lua @@ -0,0 +1,85 @@ +--フィリアス・ディアベル +--Philias Diabell +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 Level 8 or higher "Diabell" monster from your Deck to your hand, or, if only your opponent controls a monster, you can Special Summon it instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thsptg) + e1:SetOperation(s.thspop) + c:RegisterEffect(e1) + --Make all "Diabell" monsters you currently control gain 500 ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_REMOVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DIABELL} +function s.thspfilter(c,e,tp,sp_check) + return c:IsSetCard(SET_DIABELL) and c:IsLevelAbove(8) + and (c:IsAbleToHand() or (sp_check 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_check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 + and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sp_check) + 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_check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 + and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 + local desc=sp_check and aux.Stringid(id,2) or HINTMSG_ATOHAND + Duel.Hint(HINT_SELECTMSG,tp,desc) + local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,sp_check):GetFirst() + if not sc then return end + if sp_check then + aux.ToHandOrElse(sc,tp, + function() + return sp_check and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end, + aux.Stringid(id,3) + ) + else + Duel.SendtoHand(sc,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sc) + end +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DIABELL),tp,LOCATION_MZONE,0,nil) + if chk==0 then return #g>0 end + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,g,#g,tp,500) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DIABELL),tp,LOCATION_MZONE,0,nil) + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + --It gains 500 ATK + local e1=Effect.CreateEffect(c) + 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 \ No newline at end of file diff --git a/official/c78693036.lua b/official/c78693036.lua new file mode 100644 index 0000000000..b5ae1352c5 --- /dev/null +++ b/official/c78693036.lua @@ -0,0 +1,78 @@ +--呪雷神ジュラ +--Jura the Curse-Thunder Deity +--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) + --Each time your opponent activates a card or effect, gain 300 LP immediately after it resolves + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1a:SetCode(EVENT_CHAINING) + e1a:SetRange(LOCATION_MZONE) + e1a:SetOperation(aux.chainreg) + c:RegisterEffect(e1a) + local e1b=Effect.CreateEffect(c) + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1b:SetProperty(EFFECT_FLAG_DELAY) + e1b:SetCode(EVENT_CHAIN_SOLVED) + e1b:SetRange(LOCATION_MZONE) + e1b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(1) end) + e1b:SetOperation(s.lpop) + c:RegisterEffect(e1b) + --Activate 1 of these effects + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(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:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetCost(s.descost) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + if rp==1-tp then + Duel.Hint(HINT_CARD,0,id) + Duel.Recover(tp,300,REASON_EFFECT) + end +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckLPCost(tp,1500) and c:IsReleasable() end + Duel.PayLPCost(tp,1500) + Duel.Release(c,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) + local g2=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,nil) + local b1=#g1>0 + local b2=#g2>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) + local g=(op==1 and g1 or g2) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==2 then + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c79015062.lua b/official/c79015062.lua new file mode 100644 index 0000000000..5da10a08fb --- /dev/null +++ b/official/c79015062.lua @@ -0,0 +1,81 @@ +--繋がり-Ai- +--TA.I.es +--Scripted by Eerie Code +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+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + 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) +end +s.listed_series={SET_IGNISTER} +function s.revfilter(c,e,tp,mmz_chk) + if not c:IsRace(RACE_CYBERSE) or c:IsPublic() then return false end + if c:IsAttribute(ATTRIBUTE_DARK) then + return mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) + else + return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetAttribute()) + end +end +function s.thfilter1(c) + return c:IsAttributeExcept(ATTRIBUTE_DARK) and c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsAbleToHand() +end +function s.thfilter2(c,attr) + return c:IsSetCard(SET_IGNISTER) and c:IsMonster() and c:IsAttributeExcept(attr) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if chk==0 then return Duel.IsExistingMatchingCard(s.revfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mmz_chk) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mmz_chk):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + Duel.SetTargetCard(rc) + local category=rc:IsAttribute(ATTRIBUTE_DARK) and CATEGORY_SPECIAL_SUMMON or CATEGORY_TODECK + Duel.SetOperationInfo(0,category,rc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local rc=e:GetLabelObject() + if rc:IsRelateToEffect(e) then + local success=nil + local thfilter=nil + if rc:IsAttribute(ATTRIBUTE_DARK) then + --Special Summon the revealed monster, and if you do, add 1 non-DARK Level 4 or lower Cyberse monster from your Deck to your hand + success=Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEUP)>0 + thfilter=s.thfilter1 + else + --Shuffle the revealed monster into the Deck, and if you do, add 1 "@Ignister" monster with a different Attribute from your Deck to your hand + Duel.ConfirmCards(1-tp,rc) + success=Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 + thfilter=s.thfilter2 + end + if success then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetAttribute()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon for the rest of this turn after this card resolves, except Cyberse 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_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_CYBERSE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c79415624.lua b/official/c79415624.lua new file mode 100644 index 0000000000..726e545def --- /dev/null +++ b/official/c79415624.lua @@ -0,0 +1,92 @@ +--蛇眼の断罪龍 +--Snake-Eyes Execute Dragon +--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) + --Place 1 face-up monster on the field or in either GY face-up in its owner's Spell & Trap Zone as a Continuous Spell + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + 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(e) return Duel.IsMainPhase() and not e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Destroy 1 monster and 1 Continuous Spell 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_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsBattlePhase() end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.plfilter(c) + local p=c:GetOwner() + return c:IsFaceup() and c:IsMonster() and Duel.GetLocationCount(p,LOCATION_SZONE)>0 + and c:CheckUniqueOnField(p,LOCATION_SZONE) + and (c:IsLocation(LOCATION_MZONE) or not c:IsForbidden()) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.plfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.plfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local tc=Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil):GetFirst() + if tc:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) + end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + --Register a flag to prevent this card from using it again during the next turn + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,2)) + end + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end + if tc:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tc:GetOwner(),LOCATION_SZONE)==0 then + Duel.SendtoGrave(tc,REASON_RULE,nil,PLAYER_NONE) + elseif Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,tc:IsMonsterCard()) then + --Treat it as a Continuous Spell + local e1=Effect.CreateEffect(c) + 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)) + tc:RegisterEffect(e1) + end +end +function s.desfilter(c,e) + return c:IsCanBeEffectTarget(e) and (c:IsMonster() or (c:IsContinuousSpell() and c:IsFaceup())) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(Card.IsContinuousSpell,1,nil) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_DESTROY) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,2,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/c81476402.lua b/official/c81476402.lua new file mode 100644 index 0000000000..6090919669 --- /dev/null +++ b/official/c81476402.lua @@ -0,0 +1,63 @@ +--邪悪龍エビルナイト・ドラゴン +--Serpent Night Dragon, the Wicked Dragon +--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.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Send 1 monster your opponent controls to the GY, then you can Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_BATTLE_DESTROYED) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsAttribute,1,true,aux.ReleaseCheckMMZ,c,ATTRIBUTE_DARK) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsAttribute,1,1,true,aux.ReleaseCheckMMZ,c,ATTRIBUTE_DARK) + Duel.Release(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 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.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsAbleToGrave() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) + and 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/c82699999.lua b/official/c82699999.lua new file mode 100644 index 0000000000..e572482721 --- /dev/null +++ b/official/c82699999.lua @@ -0,0 +1,66 @@ +--Live☆Twin リィラ・スウィート +--Live☆Twin Lil-la Sweet +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Negate an opponent's effect activated in response in response to the activation of your "Live☆Twin" card or effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.discon) + e1:SetCost(aux.SelfDiscardCost) + e1:SetTarget(s.distg) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) + c:RegisterEffect(e1) + --Special Summon this card from the 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:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_KI_SIKIL),tp,LOCATION_MZONE,0,1,nil) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_LIVE_TWIN,SET_KI_SIKIL} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local chainlink=Duel.GetCurrentChain(true)-1 + if not (chainlink>0 and Duel.IsChainDisablable(ev) and ep==1-tp) then return false end + local trig_p,setcodes=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) + if not trig_p==tp then return false end + for _,set in ipairs(setcodes) do + if (SET_LIVE_TWIN&0xfff)==(set&0xfff) and (SET_LIVE_TWIN&set)==SET_LIVE_TWIN then return true end + end +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,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 + --You cannot Special Summon from the Extra Deck, except Fiend 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_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_FIEND) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c83711531.lua b/official/c83711531.lua new file mode 100644 index 0000000000..568d11ea1a --- /dev/null +++ b/official/c83711531.lua @@ -0,0 +1,79 @@ +--真紅眼の鋼爪竜 +--Red-Eyes Metal Claw Dragon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can activate "Metalmorph" Trap Cards the turn they are Set + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_SZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_METALMORPH) end) + c:RegisterEffect(e1) + --Special Summon this card 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_HAND) + e2:SetCountLimit(1,id) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Metalmorph" Trap from your Deck or GY 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_SUMMON_SUCCESS) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e4) +end +s.listed_names={CARD_MAX_METALMORPH} +s.liested_series={SET_METALMORPH} +function s.spcostfilter(c,tp) + return c:IsFacedown() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local tc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SendtoGrave(tc,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.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_METALMORPH) and c:IsTrap() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MAX_METALMORPH),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) + and 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/official/c84433129.lua b/official/c84433129.lua new file mode 100644 index 0000000000..b01dd38087 --- /dev/null +++ b/official/c84433129.lua @@ -0,0 +1,78 @@ +--スター・ライゼオル +--Star Ryzeal +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by detaching 1 material from a monster you control + 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.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Set 1 "Ryzeal" Spell/Trap from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + 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.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RYZEAL} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) + local g=Duel.GetOverlayGroup(tp,1,0):Select(tp,0,1,nil) + if #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 + local xyzc=g:GetFirst():GetOverlayTarget() + Duel.SendtoGrave(g,REASON_COST) + Duel.RaiseSingleEvent(xyzc,EVENT_DETACH_MATERIAL,e,0,0,0,0) + Duel.RaiseEvent(xyzc,EVENT_DETACH_MATERIAL,e,REASON_EFFECT,tp,tp,0) + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Rank 4 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_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:IsType(TYPE_XYZ) and c:IsRank(4)) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not (c:IsOriginalType(TYPE_XYZ) and c:IsOriginalRank(4)) end) +end +function s.setfilter(c) + return c:IsSetCard(SET_RYZEAL) and c:IsSpellTrap() 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/c85442146.lua b/official/c85442146.lua new file mode 100644 index 0000000000..66c9915da1 --- /dev/null +++ b/official/c85442146.lua @@ -0,0 +1,69 @@ +--竜の精神 +--Dragon's Mind +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Negate the activation of a Spell/Trap Card, or monster effect, and if you do, destroy that card. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,id) + e1:SetCondition(s.negcon) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LEAVE_GRAVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCost(aux.PayLPCost(2500)) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +function s.negconfilter(c) + return c:IsFaceup() and (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) +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(s.negconfilter,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 +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.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsSSetable() and Duel.SSet(tp,c)>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) + end +end \ No newline at end of file diff --git a/official/c90386276.lua b/official/c90386276.lua new file mode 100644 index 0000000000..c28f099bcd --- /dev/null +++ b/official/c90386276.lua @@ -0,0 +1,77 @@ +--罪なき罪宝 +--Sinless Sinful Spoils +--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) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_DIABELL} +function s.diabellspfilter(c,e,tp) + return c:IsSetCard(SET_DIABELL) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spfilter(c,e,tp) + return c:IsMonsterCard() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then + if not chkc:IsControler(tp) then return false end + local label=e:GetLabel() + if label==1 then + return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.diabellspfilter(chkc,e,tp) + elseif label==2 then + return chkc:IsLocation(LOCATION_STZONE) and s.spfilter(chkc,e,tp) + end + end + local mzone_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local b1=mzone_chk and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) + and Duel.IsExistingTarget(s.diabellspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) + local b2=mzone_chk and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_STZONE,0,1,nil,e,tp) + 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) + local g=nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + if op==1 then + e:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) + g=Duel.SelectTarget(tp,s.diabellspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_STZONE,0,1,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 "Diabell" monster from your GY or banishment + local tc=Duel.GetFirstTarget() + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)>0 and tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --Special Summon 1 face-up Monster Card from your Spell & Trap Zone + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c90664684.lua b/official/c90664684.lua new file mode 100644 index 0000000000..773e1debce --- /dev/null +++ b/official/c90664684.lua @@ -0,0 +1,98 @@ +--竜華襲焉 +--Ryu-Ge Ruin +--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) + --Your opponent cannot target "Ryu-Ge" 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_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_RYU_GE)) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --Destroy 1 monster on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + 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:SetCondition(s.descon) + e2:SetCost(s.descost) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Set 1 non-Continuous "Ryu-Ge" Trap from your Deck, GY, or banishment + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_RYU_GE} +function s.desconfilter(c) + return c:IsSetCard(SET_RYU_GE) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE|LOCATION_EXTRA,0,1,nil) +end +function s.tdfilter(c) + return c:IsSetCard(SET_RYU_GE) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + and c:IsAbleToDeckAsCost() +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,2,2,nil) + local rvg,hintg=g:Split(Card.IsLocation,nil,LOCATION_HAND) + if #rvg>0 then + Duel.ConfirmCards(1-tp,rvg) + end + if #hintg>0 then + Duel.HintSelection(hintg) + end + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,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.setfilter(c) + return c:IsSetCard(SET_RYU_GE) and c:IsTrap() and not c:IsContinuousTrap() + and c:IsSSetable() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) +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|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/official/c91509824.lua b/official/c91509824.lua new file mode 100644 index 0000000000..ef8fbb3487 --- /dev/null +++ b/official/c91509824.lua @@ -0,0 +1,68 @@ +--Ai-ボウ +--PA.I.rtners +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Negate the effects of face-up cards your opponent controls equal to the number of Cyberse monsters you control with 2300 original ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + 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,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Special Summon 1 of your banished Cyberse 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,1}) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.tgctfilter(c) + return c:IsRace(RACE_CYBERSE) and c:IsBaseAttack(2300) and c:IsFaceup() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end + local ct=Duel.GetMatchingGroupCount(s.tgctfilter,tp,LOCATION_MZONE,0,nil) + if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,ct,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,ct,ct,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 return end + local c=e:GetHandler() + for tc in tg:Iter() do + tc:NegateEffects(c,RESET_PHASE|PHASE_END,true) + end +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_CYBERSE) 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_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,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c92221402.lua b/official/c92221402.lua new file mode 100644 index 0000000000..13f6d595cf --- /dev/null +++ b/official/c92221402.lua @@ -0,0 +1,75 @@ +--カオティック・エレメンツ +--Chaotic Elements +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 Level 5 or higher LIGHT or DARK Pyro or Aqua monster 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+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Take control of 1 monster your opponent controls until the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_CONTROL) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.ctrlcon) + e2:SetCost(aux.SelfBanishCost) + e2:SetTarget(s.crtltg) + e2:SetOperation(s.crtlop) + c:RegisterEffect(e2) +end +function s.thfilter(c) + return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and c:IsRace(RACE_PYRO|RACE_AQUA) 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() + if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,tc) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + if Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,3,nil,RACE_PYRO|RACE_AQUA) + and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc) + if #sg==0 then return end + Duel.HintSelection(sg) + Duel.BreakEffect() + Duel.Destroy(sg,REASON_EFFECT) + end + end +end +function s.ctrlconfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and c:IsRace(RACE_PYRO|RACE_AQUA) and c:IsFaceup() +end +function s.ctrlcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.ctrlconfilter,tp,0,LOCATION_MZONE,1,nil) +end +function s.crtltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end + if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) +end +function s.crtlop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.GetControl(tc,tp,PHASE_END,1) + end +end \ No newline at end of file diff --git a/official/c93453053.lua b/official/c93453053.lua new file mode 100644 index 0000000000..4186cf8ed3 --- /dev/null +++ b/official/c93453053.lua @@ -0,0 +1,77 @@ +--M∀LICE IN THE MIRROR +--Maliss in the Mirror +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Banish 1 "Maliss" monster from your hand or field and negate 1 face-up opponent's monster's effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE) + 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.rmdistg) + e1:SetOperation(s.rmdisop) + c:RegisterEffect(e1) + --Banish 1 "Maliss" card from your GY and add 1 "Maliss" card with the same type (Monster, Spell, or Trap) from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH+CATEGORY_TOHAND) + 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.rmthtg) + e2:SetOperation(s.rmthop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MALISS} +function s.rmdisfilter(c) + return c:IsSetCard(SET_MALISS) and c:IsMonster() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToRemove() +end +function s.rmdistg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsNegatableMonster() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(s.rmdisfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.rmdisop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.rmdisfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) + if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 + and g:GetFirst():IsLocation(LOCATION_REMOVED) + and tc:IsRelateToEffect(e) and tc:IsFaceup() then + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) + end +end +function s.rmthfilter(c,tp) + return c:IsSetCard(SET_MALISS) and c:IsAbleToRemove() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetMainCardType()) +end +function s.thfilter(c,typ) + return c:IsSetCard(SET_MALISS) and c:IsType(typ) and c:IsAbleToHand() +end +function s.rmthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.rmthfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.rmthfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,s.rmthfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.rmthop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_REMOVED) 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:GetMainCardType()) + 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/c94655777.lua b/official/c94655777.lua new file mode 100644 index 0000000000..231308924b --- /dev/null +++ b/official/c94655777.lua @@ -0,0 +1,112 @@ +--闇征竜-ネビュラス +--Nebulous, Dragon Ruler of Shadows +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 2 of your banished "Dragon Ruler" monsters with different Attributes + 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_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.rmspcost) + e1:SetTarget(s.rmsptg) + e1:SetOperation(s.rmspop) + c:RegisterEffect(e1,false,REGISTER_FLAG_DRAGON_RULER) + --Special Summon 1 "Eclepsis, Dragon Ruler of Woes" 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_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(s.gyspcost) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DRAGON_RULER} +s.listed_names={id,30350202} --"Eclepsis, Dragon Ruler of Woes" +function s.rmcostfilter(c) + return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_DRAGON)) and c:IsDiscardable() +end +function s.rmspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_HAND,0,1,1,c) + g:AddCard(c) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) +end +function s.rmspfilter(c,e,tp) + return c:IsSetCard(SET_DRAGON_RULER) and c:IsFaceup() and c:IsCanBeEffectTarget(e) and not c:IsCode(id) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.rmsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.rmspfilter,tp,LOCATION_REMOVED,0,nil,e,tp) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and g:GetClassCount(Card.GetAttribute)>=2 end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,2,tp,0) +end +function s.rmspop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and #tg>1 then return end + if #tg>ft then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + tg=tg:Select(tp,ft,ft,nil) + end + local c=e:GetHandler() + for tc in tg:Iter() do + if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --It cannot attack this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end + end + Duel.SpecialSummonComplete() +end +function s.gyspcostfilter(c,e,tp) + return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_DRAGON)) and c:IsAbleToRemoveAsCost() + and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) +end +function s.gyspfilter(c,e,tp) + return c:IsCode(30350202) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gyspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.gyspcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.gyspcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + g:AddCard(c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.gyspfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.gyspop(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/c95718355.lua b/official/c95718355.lua new file mode 100644 index 0000000000..ce04f51073 --- /dev/null +++ b/official/c95718355.lua @@ -0,0 +1,102 @@ +--再世の魔神 ベミドバル +--Regenesis Archfiend Bemidbar +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by revealing 1 other monster in your hand with 2500 ATK or DEF + 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) + --Add 1 "Regenesis" card from your Deck or banishment 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,1}) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) + --Add this card to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_TOHAND) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_PHASE+PHASE_END) + e4:SetRange(LOCATION_GRAVE) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(s.selfthcon) + e4:SetTarget(s.selfthtg) + e4:SetOperation(s.selfthop) + c:RegisterEffect(e4) +end +s.listed_series={SET_REGENESIS} +s.listed_names={id} +function s.rvlfilter(c) + return (c:IsAttack(2500) or c:IsDefense(2500)) and not c:IsPublic() +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.rvlfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.rvlfilter,tp,LOCATION_HAND,0,0,1,c) + 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.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + g:DeleteGroup() +end +function s.thfilter(c) + return c:IsSetCard(SET_REGENESIS) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) 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|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_REMOVED) +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|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) +end +function s.selfthtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.selfthop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c96540807.lua b/official/c96540807.lua new file mode 100644 index 0000000000..fb6547b502 --- /dev/null +++ b/official/c96540807.lua @@ -0,0 +1,78 @@ +--再世の戦神 ベレシート +--Regenesis Warrior Beresheet +--Scripted by Satella +local s,id=GetID() +function s.initial_effect(c) + --If a monster with 2500 original ATK or DEF is on the field, you can Special Summon this card (from your hand) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Return 1 monster your opponent controls to the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + 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:SetCost(aux.SelfTributeCost) + e2:SetTarget(s.rttg) + e2:SetOperation(s.rtop) + c:RegisterEffect(e2) + --Add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +function s.spconfilter(c) + return (c:IsBaseAttack(2500) or c:IsBaseDefense(2500)) and c:IsFaceup() +end +function s.spcon(e,c) + if c==nil then return true end + return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spconfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) +end +function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.rtop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and Duel.IsTurnPlayer(1-tp) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c97662494.lua b/official/c97662494.lua new file mode 100644 index 0000000000..1a000adb17 --- /dev/null +++ b/official/c97662494.lua @@ -0,0 +1,96 @@ +--紋章獣スタット・ホエール +--Heraldic Beast Stad Whale +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 2 "Heraldry" Spells/Traps 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_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCost(aux.DiscardCost()) + 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 in Defense Position 2 "Heraldic Beast" monsters with the same name from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(aux.SelfBanishCost) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HERALDRY,SET_HERALDIC_BEAST} +function s.thfilter(c) + return c:IsSetCard(SET_HERALDRY) and c:IsSpellTrap() 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 +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.spcheck(sg,e,tp,mg) + return sg:GetClassCount(Card.GetCode)==1 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e,tp) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,1,tp,HINTMSG_SPSUMMON) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if #tg>0 and ft>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + if ft==1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + tg=tg:FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false,POS_FACEUP_DEFENSE) + end + Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + local c=e:GetHandler() + --Cannot Special Summon from the Extra Deck for the rest of this turn, except by Xyz Summon + 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,sump,sumtype) return c:IsLocation(LOCATION_EXTRA) and (sumtype&SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --Can only use monsters with "Heraldic Beast" and/or "Number" in their original names as material for an Xyz Summon this turn + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e2:SetTargetRange(LOCATION_ALL,LOCATION_ALL) + e2:SetTarget(function(e,c) return not c:IsOriginalSetCard({SET_HERALDIC_BEAST,SET_NUMBER}) end) + e2:SetValue(function(e,c) return c and c:IsControler(e:GetHandlerPlayer()) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/official/c98888032.lua b/official/c98888032.lua new file mode 100644 index 0000000000..b369965575 --- /dev/null +++ b/official/c98888032.lua @@ -0,0 +1,73 @@ +--妖精胞スポーア +--Spore the Fairy Cell +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Increase this card's Level by up to the number of monsters you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():HasLevel() end end) + e1:SetOperation(s.lvop) + 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_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_ANCIENT_FAIRY_DRAGON} +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:HasLevel() then + local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) + local lv=Duel.AnnounceLevel(tp,1,ct) + --Increase its Level by the selected number + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end +function s.spconfilter(c) + return c:IsFaceup() and (c:IsCode(CARD_ANCIENT_FAIRY_DRAGON) + or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST|RACE_PLANT|RACE_FAIRY) and c:IsMonster())) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,1,nil) +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 + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) +end \ No newline at end of file